* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
[official-gcc.git] / gcc / ChangeLog
blob2af78595b206f9c4f958d9d4766332d5387f539d
1 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
3         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
4         builtins, store max (log2 (align), 0) into uchar field instead of
5         align into uptr field.
6         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
7         store uchar 0 field instead of uptr 0 field.
8         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
9         instead of passing one address of struct with 2 locations pass
10         two addresses of structs with 1 location each.
11         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
12         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
13         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
14         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
15         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
16         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
17         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
18         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
20 2017-10-19  Martin Liska  <mliska@suse.cz>
22         PR driver/81829
23         * file-find.c (remove_prefix): Remove.
24         * file-find.h (remove_prefix): Likewise.
25         * gcc-ar.c: Remove smartness of lookup.
27 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
29         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
30         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
31         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
33 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
35         PR target/82580
36         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
37         (setcc + and to xor + setcc): New peephole2.
39 2017-10-19  Tom de Vries  <tom@codesourcery.com>
41         * doc/sourcebuild.texi (Test Directives, Variants of
42         dg-require-support): Add dg-require-stack-size.
44 2017-10-19  Martin Liska  <mliska@suse.cz>
46         PR sanitizer/82517
47         * gimplify.c (gimplify_decl_expr): Do not instrument variables
48         that have a large alignment.
49         (gimplify_target_expr): Likewise.
51 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
53         PR rtl-optimization/82602
54         * ira.c (rtx_moveable_p): Return false for volatile asm.
56 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
58         PR target/82580
59         * config/i386/i386-modes.def (CCGZ): New CC mode.
60         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
61         * config/i386/predicates.md (ix86_comparison_operator):
62         Handle CCGZmode.
63         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
64         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
65         with double-word subtraction.
66         (put_condition_code): Handle CCGZmode.
68 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
70         * wide-int.cc (debug (const wide_int &)): New.
71         (debug (const wide_int *)): New.
72         (debug (const widest_int &)): New.
73         (debug (const widest_int *)): New.
75 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
77         PR middle-end/82556
78         * lra-constraints.c (curr_insn_transform): Use non-input operand
79         instead of output one for matched reload.
81 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
83         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
84         (tree-ssa-loop-ivopts.h): New header file.
85         (struct builtin_info): New fields.
86         (classify_builtin_1): Compute and record base and offset parts for
87         memset builtin partition by calling strip_offset.
88         (offset_cmp, fuse_memset_builtins): New functions.
89         (finalize_partitions): Fuse adjacent memset partitions by calling
90         above function.
91         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
92         Expose the interface.
93         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
95 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
97         PR tree-optimization/82574
98         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
99         that data reference must be executed exactly once per iteration
100         against the outermost loop in nest.
101         (classify_partition): Update call to above function.
103 2017-10-18  Richard Biener  <rguenther@suse.de>
105         PR tree-optimization/82591
106         * graphite.c (graphite_transform_loops): Move code gen message
107         printing ...
108         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
109         Here.  Handle scop_to_isl_ast failing.
110         (scop_to_isl_ast): Limit the number of ISL operations.
112 2017-10-18  Richard Biener  <rguenther@suse.de>
114         * graphite-isl-ast-to-gimple.c
115         (translate_isl_ast_to_gimple::set_rename): Simplify.
116         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
117         (graphite_copy_stmts_from_block): ... here.
118         (copy_bb_and_scalar_dependences): Simplify.
119         (add_parameters_to_ivs_params): Canonicalize.
120         (generate_entry_out_of_ssa_copies): Simplify.
121         * graphite-sese-to-poly.c (extract_affine_name): Simplify
122         by passing in ISL dimension.
123         (parameter_index_in_region_1): Rename to ...
124         (parameter_index_in_region): ... this.
125         (extract_affine): Adjust assert, pass down parameter index.
126         (add_param_constraints): Use range-info when available.
127         (build_scop_context): Adjust.
128         * sese.c (new_sese_info): Adjust.
129         (free_sese_info): Likewise.
130         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
131         Remove unused typedefs.
132         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
134 2017-10-18  Martin Liska  <mliska@suse.cz>
136         * combine.c (simplify_compare_const): Add gcc_fallthrough.
138 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
140         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
141         (s390_sched_init): Do not reset s390_sched_state if we entered the
142         current basic block via a fallthru edge and all others are unlikely.
144 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
146         * config/s390/s390.c (NUM_SIDES): New variable.
147         (LONGRUNNING_THRESHOLD): New variable.
148         (LATENCY_FACTOR): New variable.
149         (s390_sched_score): Decrease score for long-running instructions on
150         wrong side.
151         (s390_sched_variable_issue): Perform bookkeeping for long-running
152         instructions.
154 2017-10-18  Richard Biener  <rguenther@suse.de>
156         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
157         Simplify with removal of the parameter rename map.
158         (set_rename): Likewise.
159         (should_copy_to_new_region): Likewise.
160         (graphite_copy_stmts_from_block): Likewise.
161         (copy_bb_and_scalar_dependences): Remove initialization of
162         unused copied_bb_map.
163         (copy_def): Remove.
164         (copy_internal_parameters): Likewise.
165         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
166         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
167         Use INTEGRAL_TYPE_P.
168         (parameter_index_in_region_1): Rename to ...
169         (assign_parameter_index_in_region): ... this.  Assert we have
170         a parameter we handle.
171         (scan_tree_for_params): Adjust.
172         * sese.h (parameter_rename_map_t): Remove.
173         (struct sese_info_t): Remove unused parameter_rename_map and
174         copied_bb_map members.
175         * sese.c (new_sese_info): Adjust.
176         (free_sese_info): Likewise.
178 2017-10-18  Martin Liska  <mliska@suse.cz>
180         PR sanitizer/82545
181         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
182         on an abnormal edge.
184 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
186         * doc/invoke.texi (ffunction-sections and fdata-sections):
187         Update.
189 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
191         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
192         the use statement can throw internally.
194 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
196         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
197         any RTX present on the RHS of a SET.
198         * compare-elim.c (try_eliminate_compare): Restore comment.
200 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
202         * langhooks.h (struct lang_hooks): Document that tree_size langhook
203         may be also called on tcc_type nodes.
204         * langhooks.c (lhd_tree_size): Likewise.
206 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
208         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
209         format_warning_at_substring.
210         (maybe_warn): Convert source_range * param to a location_t.  Pass
211         UNKNOWN_LOCATION rather than NULL to fmtwarn.
212         (format_directive): Remove code to extract source_ranges and
213         source_range * in favor of just a location_t.
214         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
215         fmtwarn.
216         * substring-locations.c (format_warning_va): Convert
217         source_range * param to a location_t.
218         (format_warning_at_substring): Likewise.
219         * substring-locations.h (format_warning_va): Likewise.
220         (format_warning_at_substring): Likewise.
222 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
224         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
225         vec_scatter_store
226         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
227         and scatter/gather ops.
229         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
230         vec_gather_load and vec_scatter_store.
231         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
232         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
233         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
234         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
235         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
236         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
238 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
240         * reg-stack.c (compare_for_stack_reg): Add bool argument.
241         Detect FTST instruction and handle its register pops.  Only pop
242         second operand if can_pop_second_op is true.
243         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
244         set can_pop_second_op to false in the compare_for_stack_reg call.
246         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
247         output_fp_compare for stack register operands.
248         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
249         instructions here.  Do not emit stack register pops here.  Assert
250         that FCOMPP pops next to top stack register.  Rewrite function.
252 2017-10-17  Nathan Sidwell  <nathan@acm.org>
254         PR middle-end/82577
255         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
256         use DECL_ASSEMBLER_NAME_RAW.
258         PR middle-end/82546
259         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
260         TYPE nodes.
262 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
263             Wilco Dijkstra <wilco.dijkstra@arm.com>
265         * builtins.c (expand_builtin_update_setjmp_buf): Add a
266         converstion to Pmode from the buf_addr.
268 2017-10-17  Richard Biener  <rguenther@suse.de>
270         * graphite-dependences.c (scop_get_reads_and_writes): Change
271         output parameters to references.
273 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
275         PR 71026/tree-optimization
276         * fold-const.c (distribute_real_division): Removed.
277         (fold_binary_loc): Remove calls to distribute_real_divison.
279 2017-10-17  Richard Biener  <rguenther@suse.de>
281         * graphite-scop-detection.c
282         (scop_detection::stmt_has_simple_data_refs_p): Always use
283         the full nest as region.
284         (try_generate_gimple_bb): Likewise.
285         * sese.c (scalar_evolution_in_region): Simplify now that
286         SCEV can handle instantiation in regions.
287         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
288         in the non-loop part of a function if requested.
290 2017-10-17  Richard Biener  <rguenther@suse.de>
292         PR tree-optimization/82563
293         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
294         New function.
295         (graphite_regenerate_ast_isl): Call it.
296         * graphite-scop-detection.c (build_scops): Remove entry edge split.
298 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
300         PR tree-optimization/82549
301         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
302         Formatting fixes.  Instead of calling make_bit_field_ref with negative
303         bitpos return 0.
305 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
307         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
308         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
309         _mm_maskz_reduce_ss): New.
310         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
311         __builtin_ia32_reducess_mask): Ditto..
312         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
313         * config/i386/sse.md (reduces<mode>): Renamed to ...
314         (reduces<mode><mask_scalar_name>): ... this.
315         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}): Changed
316         to ...
317         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
318         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
320 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
322         * Makefile.in (OBJS): Add unique-ptr-tests.o.
323         * selftest-run-tests.c (selftest::run_tests): Call
324         selftest::unique_ptr_tests_cc_tests.
325         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
326         * unique-ptr-tests.cc: New file.
328 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
330         PR sanitizer/82353
331         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
332         locations.
333         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
334         (make_hard_regno_born, make_hard_regno_dead): Update
335         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
337 2017-10-16  Jeff Law  <law@redhat.com>
339         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
341 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
343         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
345 2017-10-16  Olivier Hainque  <hainque@adacore.com>
347         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
348         with_cpu if we were configured for an e500v2 target cpu name.
350 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
352         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
353         * doc/invoke.texi: Document +nodsp as a valid extension for
354         -mcpu=cortex-m33.
356 2017-10-16  Martin Liska  <mliska@suse.cz>
358         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
359         (test_set_range): Likewise.
360         (test_range_functions): Rename to ...
361         (test_bit_in_range): ... this.
362         (sbitmap_c_tests): Add new test.
364 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
366         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32): New.
367         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
368         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
370 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
372         * config/aarch64/aarch64-builtins.c
373         (aarch64_types_quadopu_lane_qualifiers): New.
374         (TYPES_QUADOPU_LANE): New.
375         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
376         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
377         (aarch64_<sur>dot_laneq<vsi2qi>): New.
378         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
379         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
380         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
381         (Vdottype, DOTPROD): New.
382         (sur): Add SDOT and UDOT.
384 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
386         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
387         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
388         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add TARGET_DOTPROD.
389         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
390         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75): Enable TARGET_DOTPROD.
391         (cortex-a75.cortex-a55): Likewise.
392         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
394 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
396         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
397         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS): New.
398         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane): new.
399         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
400         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
401         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
402         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
403         * config/arm/types.md (neon_dot, neon_dot_q): New.
404         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
406 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
408         * config/arm/arm.h (TARGET_DOTPROD): New.
409         * config/arm/arm.c (arm_arch_dotprod): New.
410         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
411         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
412         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
413         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
414         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
415         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
416         * doc/invoke.texi (armv8.2-a): Document dotprod
418 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
420         * i386.c (ix86_vec_cost): New function.
421         (ix86_rtx_costs): Handle vector operations better.
422         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
423         * x86-tune-costs.h: Add new costs to all tables.
425 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
427         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
428         operations.
429         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
430         divsd, sqrtss and sqrtsd
431         * x86-tune-costs.h: Add new entries to all costs.
432         (znver1_cost): Fix to match real instruction latencies.
434 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
435             Michael Collison <michael.collison@arm.com>
437         * compare-elim.c: Include emit-rtl.h.
438         (can_merge_compare_into_arith): New function.
439         (try_validate_parallel): Likewise.
440         (try_merge_compare): Likewise.
441         (try_eliminate_compare): Call the above when no previous clobber
442         is available.
443         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
444         dataflow problems.
446 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
448         PR middle-end/62263
449         PR middle-end/82498
450         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
451         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
453         PR middle-end/62263
454         PR middle-end/82498
455         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
456         to be any operand_equal_p operands.  For & (B - 1) require
457         B to be power of 2.  Recognize
458         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
460 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
462         PR bootstrap/82553
463         * optabs.c (expand_memory_blockage): Fix call of
464         targetm.have_memory_blockage.
466 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
468         PR bootstrap/82548
469         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
470         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
471         objects to extra_objs instead of overwriting it.
473 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
475         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
476         Use any_fp_register_operand as operand[3] predicate.  Simplify
477         equality test for operands[2] and operands[4] memory location.
478         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
479         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
480         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
481         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
482         any_fp_register_operand as operand[1] predicate.  Simplify
483         equality test for operands[0] and operands[3] memory location.
484         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
485         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
486         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
488 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
490         * target-insns.def: Add memory_blockage.
491         * optabs.c (expand_memory_blockage): New function.
492         (expand_asm_memory_barrier): Rename ...
493         (expand_asm_memory_blockage): ... to this.
494         (expand_mem_thread_fence): Call expand_memory_blockage
495         instead of expand_asm_memory_barrier.
496         (expand_mem_singnal_fence): Ditto.
497         (expand_atomic_load): Ditto.
498         (expand_atomic_store): Ditto.
499         * doc/md.texi (Standard Pattern Names For Generation):
500         Document memory_blockage instruction pattern.
502 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
504         * config/rl78/rl78.c (rl78_emit_libcall): New function.
505         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
506         * config/rl78/rl78.md: New define_expand "adddi3".
508 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
510         * cfghooks.c (verify_flow_info): Disable check that all probabilities
511         are set correctly.
513 2017-10-13  Jeff Law  <law@redhat.com>
515         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
517 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
519         PR target/82274
520         * internal-fn.c (expand_mul_overflow): If both operands have
521         the same highpart of -1 or 0 and the topmost bit of lowpart
522         is different, overflow is if res <= 0 rather than res < 0.
524 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
526         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
527         TARGET_P9_VECTOR code for unaligned_load case.
529 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
531         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
533 2017-10-13  Nathan Sidwell  <nathan@acm.org>
535         * tree-core.h (tree_contains_struct): Make bool.
536         * tree.c (tree_contains_struct): Likewise.
537         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
538         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
539         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
540         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
541         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
543 2017-10-13  Richard Biener  <rguenther@suse.de>
545         * graphite-isl-ast-to-gimple.c
546         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
547         parameters and dominance check.
548         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
549         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
550         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
551         Do not update SSA form here or do intermediate IL verification.
552         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
553         (graphite_initialize): Remove check on the number of loops in
554         the function and inline into graphite_transform_loops.
555         (graphite_finalize): Inline into graphite_transform_loops.
556         (graphite_transform_loops): Perform SSA update and IL verification
557         here.
558         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
560 2017-10-13  Richard Biener  <rguenther@suse.de>
562         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
563         graphite_expression_type_precision): Avoid global constructor
564         by moving ...
565         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
566         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
567         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
568         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
569         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
570         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
572 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
574         PR target/82499
575         * config/i386/i386.h (ix86_red_zone_size): New.
576         * config/i386/i386.md (push peephole2s): Replace
577         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
579 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
580             Alan Hayward  <alan.hayward@arm.com>
581             David Sherwood  <david.sherwood@arm.com>
583         * combine.c (can_change_dest_mode): Reject changes in
584         REGMODE_NATURAL_SIZE.
586 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
587             Alan Hayward  <alan.hayward@arm.com>
588             David Sherwood  <david.sherwood@arm.com>
590         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
591         (expand_debug_source_expr): Likewise.
592         * combine.c (combine_simplify_rtx): Likewise.
593         * cse.c (fold_rtx): Likewise.
594         * fwprop.c (canonicalize_address): Likewise.
595         * targhooks.c (default_shift_truncation_mask): Likewise.
597 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
598             Alan Hayward  <alan.hayward@arm.com>
599             David Sherwood  <david.sherwood@arm.com>
601         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
602         (widened_mode): Likewise.
603         (expand_unop): Likewise.
604         * ree.c (transform_ifelse): Likewise.
605         (merge_def_and_ext): Likewise.
606         (combine_reaching_defs): Likewise.
607         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
609 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
610             Alan Hayward  <alan.hayward@arm.com>
611             David Sherwood  <david.sherwood@arm.com>
613         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
614         * combine.c (gen_lowpart_for_combine): Likewise.
615         * dwarf2out.c (rtl_for_decl_location): Likewise.
616         * final.c (alter_subreg): Likewise.
617         * rtlhooks.c (gen_lowpart_general): Likewise.
618         (gen_lowpart_if_possible): Likewise.
620 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
621             Alan Hayward  <alan.hayward@arm.com>
622             David Sherwood  <david.sherwood@arm.com>
624         * calls.c (expand_call): Use subreg_lowpart_offset.
625         * cse.c (cse_insn): Likewise.
626         * regcprop.c (copy_value): Likewise.
627         (copyprop_hardreg_forward_1): Likewise.
629 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
631         PR target/82524
632         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
633         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
634         =Q constraints to +Q and into insn condition add check
635         that operands[0] and operands[1] are equal.
636         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
637         =Q constraints to +Q and into insn condition add check
638         that operands[0] is equal to either operands[1] or operands[2].
640         PR target/82498
641         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
642         instead of handling MINUS_EXPR twice (once for each argument),
643         canonicalize operand order and handle just once, use rtype where
644         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
646         PR target/82498
647         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
648         any values of __C while still being pattern recognizable as a simple
649         rotate instruction.
651 2017-10-13  Richard Biener  <rguenther@suse.de>
653         PR tree-optimization/82451
654         Revert
655         2017-10-02  Richard Biener  <rguenther@suse.de>
657         PR tree-optimization/82355
658         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
659         a mapping for the enclosing loop but avoid generating one for
660         the loop tree root.
661         (copy_bb_and_scalar_dependences): Remove premature codegen
662         error on PHIs in blocks duplicated into multiple places.
663         * graphite-scop-detection.c
664         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
665         in the region use it as loop and nest to analyze the DR in.
666         (try_generate_gimple_bb): Likewise.
667         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
668         (add_loop_constraints): For blocks in a loop not in the region
669         create a dimension with a single iteration.
670         * sese.h (gbb_loop_at_index): Remove assert.
672         * cfgloop.c (loop_preheader_edge): For the loop tree root
673         return the single successor of the entry block.
674         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
675         Reset the SCEV hashtable and niters.
676         * graphite-scop-detection.c
677         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
678         assert that we only have POLYNOMIAL_CHREC that vary in loops
679         contained in the region.
680         (scop_detection::graphite_can_represent_expr): Adjust.
681         (scop_detection::stmt_has_simple_data_refs_p): For loops
682         not in the region set loop to NULL.  The nest is now the
683         entry edge to the region.
684         (try_generate_gimple_bb): Likewise.
685         * sese.c (scalar_evolution_in_region): Adjust for
686         instantiate_scev change.
687         * tree-data-ref.h (graphite_find_data_references_in_stmt):
688         Make nest parameter the edge into the region.
689         (create_data_ref): Likewise.
690         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
691         entry edge into a region and adjust instantiate_scev calls.
692         (create_data_ref): Likewise.
693         (graphite_find_data_references_in_stmt): Likewise.
694         (find_data_references_in_stmt): Pass the loop preheader edge
695         from the nest argument.
696         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
697         parameter the edge into the region.
698         (instantiate_parameters): Use the loop preheader edge as entry.
699         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
700         NULL loop.
701         (get_instantiated_value_entry): Make instantiate_below parameter
702         the edge into the region.
703         (instantiate_scev_name): Likewise.  Adjust dominance checks,
704         when we cannot use loop-based instantiation instantiate by
705         walking use-def chains.
706         (instantiate_scev_poly): Adjust.
707         (instantiate_scev_binary): Likewise.
708         (instantiate_scev_convert): Likewise.
709         (instantiate_scev_not): Likewise.
710         (instantiate_array_ref): Remove.
711         (instantiate_scev_3): Likewise.
712         (instantiate_scev_2): Likewise.
713         (instantiate_scev_1): Likewise.
714         (instantiate_scev_r): Do not blindly handle N-operand trees.
715         Do not instantiate array-refs.  Handle all constants and invariants.
716         (instantiate_scev): Make instantiate_below parameter
717         the edge into the region.
718         (resolve_mixers): Use the loop preheader edge for the region
719         parameter to instantiate_scev_r.
720         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
722 2017-10-13  Richard Biener  <rguenther@suse.de>
724         PR tree-optimization/82525
725         * graphite-isl-ast-to-gimple.c
726         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
727         out from ...
728         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
729         Fail code generation when we cannot represent the isl integer.
730         (binary_op_to_tree): Elide modulo operations that are no-ops
731         in the type we code generate.  Remove now superfluous code
732         generation errors.
734 2017-10-13  Richard Biener  <rguenther@suse.de>
736         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
737         (scop_detection::harmful_loop_in_region): Remove premature
738         IV type restriction.
739         (scop_detection::graphite_can_represent_scev): We can handle
740         pointer IVs just fine.
742 2017-10-13  Alan Modra  <amodra@gmail.com>
744         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
745         "Clobbers and Scratch Registers".  Add paragraph on
746         alternative to clobbers for scratch registers and OpenBLAS
747         example.
749 2017-10-13  Alan Modra  <amodra@gmail.com>
751         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
752         example of a memory input for a string of known length.  Move
753         commentary out of table.  Add a number of new examples
754         covering array memory inputs.
756 2017-10-12  Martin Liska  <mliska@suse.cz>
758         PR tree-optimization/82493
759         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
760         (test_range_functions): New function.
761         (sbitmap_c_tests): Likewise.
762         * selftest-run-tests.c (selftest::run_tests): Run new tests.
763         * selftest.h (sbitmap_c_tests): New function.
765         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
767 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
769         * config/rs6000/amo.h: Fix spacing issue.
771 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
773         PR target/82498
774         * config/i386/i386.md (*ashl<mode>3_mask_1,
775         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
776         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
777         patterns.
779 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
781         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
782         (profile_probability): Set max_probability
783         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
784         in temporaries.
785         * profile-count.c (profile_probability::differs_from_p): Do not
786         rely on max_probaiblity == 10000
788 2017-10-12  Jeff Law  <law@redhat.com>
790         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
791         negative offsets.
793 2017-10-12  Martin Sebor  <msebor@redhat.com>
795         PR other/82301
796         PR c/82435
797         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
798         (handle_alias_pairs): Call it.
799         * common.opt (-Wattribute-alias): New option.
800         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
801         * doc/invoke.texi (-Wattribute-alias): Document.
803 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
805         Revert
806         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
807         PR sanitizer/82353
808         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
809         locations.
810         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
811         (make_hard_regno_born, make_hard_regno_dead): Update
812         bb_killed_pseudos and bb_gen_pseudos.
814 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
816         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
818 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
820         * config/alpha/alpha.c (alpha_split_conditional_move):
821         Use std::swap instead of manually swapping.
822         (alpha_stdarg_optimize_hook): Ditto.
823         (alpha_canonicalize_comparison): Ditto.
825 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
827         * tree-loop-distribution.c (struct builtin_info): New struct.
828         (struct partition): Refactor fields into struct builtin_info.
829         (partition_free): Free struct builtin_info.
830         (build_size_arg_loc, build_addr_arg_loc): Delete.
831         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
832         information from struct builtin_info.
833         (find_single_drs): New function refactored from classify_partition.
834         Also moved builtin validity checks to this function.
835         (compute_access_range, alloc_builtin): New functions.
836         (classify_builtin_st, classify_builtin_ldst): New functions.
837         (classify_partition): Refactor code into functions find_single_drs,
838         classify_builtin_st and classify_builtin_ldst.
839         (distribute_loop): Don't do runtime alias check when distributing
840         loop nest.
841         (find_seed_stmts_for_distribution): New function.
842         (pass_loop_distribution::execute): Refactor code finding seed
843         stmts into above function.  Support distribution for the innermost
844         two-level loop nest.  Adjust dump information.
846 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
848         * tree-loop-distribution.c: Adjust the general comment.
849         (NUM_PARTITION_THRESHOLD): New macro.
850         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
851         (classify_partition): Skip builtin pattern of loop nest's inner loop.
852         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
853         in call to build_partition_graph.
854         (finalize_partitions): New parameter.  Make loop distribution more
855         conservative by fusing more partitions.
856         (distribute_loop): Don't do runtime alias check in case of loop nest
857         distribution.
858         (find_seed_stmts_for_distribution): New function.
859         (prepare_perfect_loop_nest): New function.
860         (pass_loop_distribution::execute): Refactor code finding seed stmts
861         and loop nest into above functions.  Support loop nest distribution.
862         Adjust dump information accordingly.
864 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
866         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
867         and set PTYPE_SEQUENTIAL for merged partition.
869 2017-10-12  Richard Biener  <rguenther@suse.de>
871         PR tree-optimization/69728
872         Revert
873         2017-09-19  Richard Biener  <rguenther@suse.de>
875         PR tree-optimization/69728
876         * graphite-sese-to-poly.c (schedule_error): New global.
877         (add_loop_schedule): Handle empty domain by failing the
878         schedule.
879         (build_original_schedule): Handle schedule_error.
881         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
882         domain by returning an unchanged schedule.
884 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
886         * genrecog.c (validate_pattern): For VEC_SELECT verify that
887         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
889 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
891         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
892         Handle params.def.
894 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
896         PR c++/82159
897         * expr.c (store_field): Don't optimize away bitsize == 0 store
898         from CALL_EXPR with addressable return type.
900 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
902         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
903         * config/rs6000/rs6000.md (sel): Delete mode attribute.
904         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
905         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
906         TARGET_ISEL instead of TARGET_ISEL<sel>.
908 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
910         * config/rs6000/rs6000.c
911         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
913 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
915         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
916         Move up in file.
917         (reg_or_cint_operand): Fix comment.
918         (reg_or_zero_operand): New predicate.
919         * config/rs6000/rs6000-protos.h (output_isel): Delete.
920         * config/rs6000/rs6000.c (output_isel): Delete.
921         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
922         instead of reg_or_cint_operand.  Output instruction directly (not via
923         output_isel).
924         (isel_unsigned_<mode>): Ditto.
925         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
926         gpc_reg_operand.  Add an instruction alternative for this.  Output
927         instruction directly.
928         (*isel_reversed_unsigned_<mode>): Ditto.
930 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
932         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
933         (TARGET_CANONICALIZE_COMPARISON): Define.
935 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
937         PR target/81422
938         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
939         Check whether the dest is REG before adding REG_EQUIV note.
941 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
943         PR sanitizer/82353
944         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
945         locations.
946         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
947         (make_hard_regno_born, make_hard_regno_dead): Update
948         bb_killed_pseudos and bb_gen_pseudos.
950 2017-10-11  Nathan Sidwell  <nathan@acm.org>
952         * incpath.h (enum incpath_kind): Name enum, prefix values.
953         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
954         * incpath.c (heads, tails): Use INC_MAX.
955         (add_env_var_paths, add_standard_paths): Use incpath_kind.
956         (merge_include_chains, split_quote_chain,
957         register_include_chains): Update incpath_kind names.
958         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
959         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
960         names.
961         (add_framework_path, darwin_register_objc_includes): Likewise.
962         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
964 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
966         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
967         Do not use float_operator operator predicate.
968         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
969         * config/i386/predicates.md (float_operator): Remove predicate.
971 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
973         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
974         (*jccxf_i387): Ditto.
975         (*jcc<mode>_i387): Ditto.
976         (*jccu<mode>_i387): Ditto.
977         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
978         (*jcc_*_i387 splitters): Remove.
979         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
980         * config/i386/i386.c (ix86_split_fp_branch): Remove.
981         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
982         Remove predicate.
984 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
986         * profile-count.h (slow_safe_scale_64bit): New function.
987         (safe_scale_64bit): New inline.
988         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
989         * profile-count.c: Include wide-int.h
990         (slow_safe_scale_64bit): New.
992 2017-10-11  Nathan Sidwell  <nathan@acm.org>
994         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
995         HAS_DECL_ASSEMBLER_NAME_P.
996         * gimple-expr.c (gimple_decl_printable_name: Check
997         HAS_DECL_ASSEMBLER_NAME_P too.
998         * ipa-utils.h (type_in_anonymous_namespace_p): Check
999         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
1000         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
1001         * passes.c (rest_of_decl_compilation): Check
1002         HAS_DECL_ASSEMBLER_NAME_P too.
1003         * recog.c (verify_changes): Likewise.
1004         * tree-pretty-print.c (dump_decl_name): Likewise.
1005         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
1007         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
1008         (SET_DECL_ASSEMBLER_NAME): Use it.
1009         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
1010         (COPY_DECL_ASSEMBLER_NAME): Likewise.
1011         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
1013 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
1015         * config.gcc (i386, x86_64): Add extra objects.
1016         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
1017         (ix86_min_insn_size): Declare.
1018         (ix86_issue_rate): Declare.
1019         (ix86_adjust_cost): Declare.
1020         (ia32_multipass_dfa_lookahead): Declare.
1021         (ix86_macro_fusion_p): Declare.
1022         (ix86_macro_fusion_pair_p): Declare.
1023         (ix86_bd_has_dispatch): Declare.
1024         (ix86_bd_do_dispatch): Declare.
1025         (ix86_core2i7_init_hooks): Declare.
1026         (ix86_atom_sched_reorder): Declare.
1027         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
1028         (COSTS_N_BYTES): Move to x86-tune-costs.h.
1029         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
1030         (rip_relative_addr_p): Rename to ...
1031         (ix86_rip_relative_addr_p): ... this one; export.
1032         (memory_address_length): Update.
1033         (ix86_issue_rate): Move to x86-tune-sched.c.
1034         (ix86_flags_dependent): Move to x86-tune-sched.c.
1035         (ix86_agi_dependent): Move to x86-tune-sched.c.
1036         (exact_dependency_1): Move to x86-tune-sched.c.
1037         (exact_store_load_dependency): Move to x86-tune-sched.c.
1038         (ix86_adjust_cost): Move to x86-tune-sched.c.
1039         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
1040         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
1041         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
1042         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
1043         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
1044         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
1045         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
1046         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
1047         (min_insn_size): Rename to ...
1048         (ix86_min_insn_size): ... this one; export.
1049         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
1050         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
1051         (core2i7_first_cycle_multipass_backtrack): Move to
1052         x86-tune-sched-core.c.
1053         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
1054         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
1055         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
1056         (ix86_avoid_jump_mispredicts): Update.
1057         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
1058         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
1059         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
1060         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
1061         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
1062         (MAX_INSN): Move to ix86-tune-sched-bd.c.
1063         (MAX_IMM): Move to ix86-tune-sched-bd.c.
1064         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
1065         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
1066         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
1067         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
1068         (MAX_STORE): Move to ix86-tune-sched-bd.c.
1069         (BIG): Move to ix86-tune-sched-bd.c.
1070         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
1071         (enum insn_path): Move to ix86-tune-sched-bd.c.
1072         (get_mem_group): Move to ix86-tune-sched-bd.c.
1073         (is_cmp): Move to ix86-tune-sched-bd.c.
1074         (dispatch_violation): Move to ix86-tune-sched-bd.c.
1075         (is_branch): Move to ix86-tune-sched-bd.c.
1076         (is_prefetch): Move to ix86-tune-sched-bd.c.
1077         (init_window): Move to ix86-tune-sched-bd.c.
1078         (allocate_window): Move to ix86-tune-sched-bd.c.
1079         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
1080         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
1081         (process_end_window): Move to ix86-tune-sched-bd.c.
1082         (allocate_next_window): Move to ix86-tune-sched-bd.c.
1083         (find_constant): Move to ix86-tune-sched-bd.c.
1084         (get_num_immediates): Move to ix86-tune-sched-bd.c.
1085         (has_immediate): Move to ix86-tune-sched-bd.c.
1086         (get_insn_path): Move to ix86-tune-sched-bd.c.
1087         (get_insn_group): Move to ix86-tune-sched-bd.c.
1088         (count_num_restricted): Move to ix86-tune-sched-bd.c.
1089         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
1090         (add_insn_window): Move to ix86-tune-sched-bd.c.
1091         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
1092         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
1093         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
1094         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
1095         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
1096         (do_dispatch): Move to ix86-tune-sched-bd.c.
1097         (has_dispatch): Move to ix86-tune-sched-bd.c.
1098         * config/i386/t-i386: Add new object files.
1099         * config/i386/x86-tune-costs.h: New file.
1100         * config/i386/x86-tune-sched-atom.c: New file.
1101         * config/i386/x86-tune-sched-bd.c: New file.
1102         * config/i386/x86-tune-sched-core.c: New file.
1103         * config/i386/x86-tune-sched.c: New file.
1105 2017-10-11  Liu Hao  <lh_mouse@126.com>
1107         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
1108         the generic version below instead.
1109         (should_colorize): Recognize Windows consoles as terminals
1110         for MinGW targets.
1111         * pretty-print.c [__MINGW32__] (write_all): New function.
1112         [__MINGW32__] (find_esc_head): Likewise.
1113         [__MINGW32__] (find_esc_terminator): Likewise.
1114         [__MINGW32__] (eat_esc_sequence): Likewise.
1115         [__MINGW32__] (mingw_ansi_fputs): New function that handles
1116         ANSI escape codes.
1117         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
1118         for MinGW targets.
1120 2017-10-11  Richard Biener  <rguenther@suse.de>
1122         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
1123         Properly call analyze_scalar_evolution with the loop of the stmt.
1125 2017-10-11  Richard Biener  <rguenther@suse.de>
1127         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
1128         * tree-core.h (tree_base): Add chrec_var union member.
1129         * tree.h (CHREC_VAR): Remove.
1130         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
1131         * tree-chrec.h (build_polynomial_chrec): Adjust.
1132         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
1133         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
1135 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
1137         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
1138         * match.pd: ... here.
1139         ((T) X == (T) Y): Relax condition.
1141 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
1143         PR tree-optimization/82472
1144         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
1145         comment.
1146         (break_alias_scc_partitions): Update postorder number.
1148 2017-10-11  Martin Liska  <mliska@suse.cz>
1150         PR sanitizer/82490
1151         * opts.c (parse_no_sanitize_attribute): Do not use error_value
1152         variable.
1153         * opts.h (parse_no_sanitize_attribute): Remove last argument.
1155 2017-10-11  Martin Liska  <mliska@suse.cz>
1157         * print-rtl.c (print_insn): Move declaration of idbuf
1158         to same scope as name.
1160 2017-10-11  Martin Liska  <mliska@suse.cz>
1162         Revert r253637:
1164         PR sanitizer/82484
1165         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
1166         volatile arguments.
1168 2017-10-11  Martin Liska  <mliska@suse.cz>
1170         PR sanitizer/82484
1171         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
1172         volatile arguments.
1174 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
1176         * config.gcc (default_gnu_indirect_function): Default to yes for
1177         arm*-*-linux* with glibc.
1179 2017-10-11  Richard Biener  <rguenther@suse.de>
1181         * tree-scalar-evolution.c (get_scalar_evolution): Handle
1182         default-defs and types we do not want to analyze.
1183         (interpret_loop_phi): Replace unreachable code with an assert.
1184         (compute_scalar_evolution_in_loop): Remove and inline ...
1185         (analyze_scalar_evolution_1): ... here, replacing condition with
1186         what makes the intent clearer.  Remove handling of cases
1187         get_scalar_evolution now handles.
1189 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
1191         PR rtl-optimization/81434
1192         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
1193         comment for main loop.  In sched_group_found if, also add checks for
1194         pass and min_cost_group.
1196 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
1198         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
1199         (rs6000_insn_cost): New function.
1200         * config/rs6000/rs6000.md (cost): New attribute.
1202 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
1203             H.J. Lu  <hongjiu.lu@intel.com>
1205         PR target/79565
1206         PR target/82483
1207         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
1208         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
1209         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
1210         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
1211         to OPTION_MASK_ISA_AVX512VL - builtins that have both
1212         OPTION_MASK_ISA_MMX and some other bit set require both
1213         mmx and the ISAs without the mmx bit.
1214         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
1215         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
1216         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
1217         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
1218         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
1219         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
1220         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
1221         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
1222         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
1223         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
1224         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
1225         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
1226         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
1227         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
1228         Add OPTION_MASK_ISA_MMX.
1230 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
1232         * config.gcc (armv7*-*-freebsd*): New target.
1233         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
1235 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
1237         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
1238         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
1239         spot in the file.
1241 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
1243         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
1244         a template parameter.
1245         (WIDE_INT_REF_FOR): Update accordingly.
1246         * tree.h (wi::int_traits <const_tree>): Delete.
1247         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
1248         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
1249         (wi::tree_to_wide_ref): New typedef.
1250         (wi::to_wide): New function.
1251         * calls.c (get_size_range): Use wi::to_wide when operating on
1252         trees as wide_ints.
1253         * cgraph.c (cgraph_node::create_thunk): Likewise.
1254         * config/i386/i386.c (ix86_data_alignment): Likewise.
1255         (ix86_local_alignment): Likewise.
1256         * dbxout.c (stabstr_O): Likewise.
1257         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
1258         * expr.c (const_vector_from_tree): Likewise.
1259         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
1260         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
1261         (fold_negate_expr_1, int_const_binop_1, const_binop)
1262         (fold_convert_const_int_from_real, optimize_bit_field_compare)
1263         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
1264         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
1265         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
1266         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
1267         (fold_not_const, round_up_loc): Likewise.
1268         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
1269         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
1270         (alloca_call_type): Likewise.
1271         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
1272         * godump.c (go_output_typedef): Likewise.
1273         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
1274         * internal-fn.c (get_min_precision): Likewise.
1275         * ipa-cp.c (ipcp_store_vr_results): Likewise.
1276         * ipa-polymorphic-call.c
1277         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
1278         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
1279         (ipa_modify_call_arguments): Likewise.
1280         * match.pd: Likewise.
1281         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
1282         * print-tree.c (print_node_brief, print_node): Likewise.
1283         * stmt.c (expand_case): Likewise.
1284         * stor-layout.c (layout_type): Likewise.
1285         * tree-affine.c (tree_to_aff_combination): Likewise.
1286         * tree-cfg.c (group_case_labels_stmt): Likewise.
1287         * tree-data-ref.c (dr_analyze_indices): Likewise.
1288         (prune_runtime_alias_test_list): Likewise.
1289         * tree-dump.c (dequeue_and_dump): Likewise.
1290         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
1291         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
1292         * tree-pretty-print.c (dump_generic_node): Likewise.
1293         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
1294         (simple_iv_with_niters): Likewise.
1295         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
1296         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
1297         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
1298         * tree-ssa-loop-niter.c (split_to_var_and_offset)
1299         (refine_value_range_using_guard, number_of_iterations_ne_max)
1300         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
1301         (get_cst_init_from_scev, record_nonwrapping_iv)
1302         (scev_var_range_cant_overflow): Likewise.
1303         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
1304         * tree-ssa-pre.c (compute_avail): Likewise.
1305         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
1306         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
1307         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
1308         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
1309         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
1310         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
1311         (dump_case_nodes, try_switch_expansion): Likewise.
1312         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
1313         (vect_do_peeling): Likewise.
1314         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
1315         * tree-vect-stmts.c (vectorizable_load): Likewise.
1316         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
1317         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
1318         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
1319         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
1320         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
1321         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
1322         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
1323         (evrp_dom_walker::before_dom_children): Likewise.
1324         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
1325         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
1326         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
1327         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
1328         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
1329         (get_range_pos_neg): Likewise.
1330         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
1331         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
1332         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
1333         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
1334         * config/avr/avr.c (avr_fold_builtin): Likewise.
1335         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
1336         * config/msp430/msp430.c (msp430_attr): Likewise.
1337         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
1338         * config/powerpcspe/powerpcspe-c.c
1339         (altivec_resolve_overloaded_builtin): Likewise.
1340         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
1341         (rs6000_expand_ternop_builtin): Likewise.
1342         * config/rs6000/rs6000-c.c
1343         (altivec_resolve_overloaded_builtin): Likewise.
1344         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
1345         (rs6000_expand_ternop_builtin): Likewise.
1346         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
1348 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1350         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
1351         when copying loop nest with only one inner loop.
1353 2017-10-10  Richard Biener  <rguenther@suse.de>
1355         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
1356         blocks if SCEV is active.
1357         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
1358         dead code.
1359         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
1360         (scev_initialize): Assert we are not yet initialized.
1362 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1364         * tree-loop-distribution.c (generate_loops_for_partition): Remove
1365         inner loop's exit stmt by making it always exit the loop, otherwise
1366         we would generate an infinite empty loop.
1368 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1370         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
1371         renaming variables in new preheader if it's deleted.
1373 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1375         * tree-loop-distribution.c (struct partition): Remove unused field
1376         loops of the structure.
1377         (partition_alloc, partition_free): Ditto.
1378         (build_rdg_partition_for_vertex): Ditto.
1380 2017-10-09  Jeff Law  <law@redhat.com>
1382         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
1383         return type to match prototype and documentation.
1385 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1387         * config/rs6000/rs6000.c (processor_costs): Move to ...
1388         * config/rs6000/rs6000.h: ... here.
1389         (rs6000_cost): Declare.
1391 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1393         * except.c (setjmp_fn): New global variable.
1394         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
1395         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
1396         if DONT_USE_BUILTIN_SETJMP is defined.
1398 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1400         * target.def (insn_cost): New hook.
1401         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
1402         * doc/tm.texi: Regenerate.
1403         * rtlanal.c (insn_cost): Use the new hook.
1405 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1407         * combine.c (combine_validate_cost): Compute the new insn_cost,
1408         not just pattern_cost.
1409         (try_combine): Adjust comment.
1411 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1413         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
1414         insn_cost.
1415         * combine.c (uid_insn_cost): Adjust comment.
1416         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
1417         of insn_rtx_cost
1418         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
1419         * dse.c (find_shift_sequence): Ditto.
1420         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
1421         (bb_valid_for_noce_process_p): Use pattern_cost.
1422         * rtl.h (insn_rtx_cost): Delete.
1423         (pattern_cost): New prototype.
1424         (insn_cost): New prototype.
1425         * rtlanal.c (insn_rtx_cost): Rename to...
1426         (pattern_cost): ... this.
1427         (insn_cost): New.
1429 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
1431         * config/i386/i386.md (*jcc_2): Remove insn pattern.
1432         (*jcc<mode>_0_r_i387): Ditto.
1433         (*jccxf_r_i387): Ditto.
1434         (*jcc<mode>_r_i387): Ditto.
1435         (*jccu<mode>_r_i387): Ditto.
1436         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
1437         (*jcc): Rename from *jcc_1.
1439 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1441         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
1442         deferred rescans after the lvx/stvx recombination pre-pass.
1444 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
1446         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
1447         memory operation instruction support.
1448         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
1449         (rs6000-ibm-aix[789]*): Likewise.
1450         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
1451         Document new functions.
1453 2017-10-09  Richard Biener  <rguenther@suse.de>
1455         PR tree-optimization/82397
1456         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
1457         equality only for semantically equal trees.
1459 2017-10-09  Richard Biener  <rguenther@suse.de>
1461         PR tree-optimization/82449
1462         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
1463         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
1464         allow constant addresses.
1465         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
1466         are linear.
1468 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1470         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
1471         flags.
1473 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1475         PR target/82463
1476         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
1477         definitions.
1479 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1481         PR target/82465
1482         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
1484 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
1486         PR target/82464
1487         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
1488         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
1490 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
1492         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
1493         (WI_BINARY_PREDICATE_RESULT): Likewise.
1494         (wi::binary_traits::operator_result): New type.
1495         (wi::binary_traits::predicate_result): Likewise.
1496         (generic_wide_int::operator~, unary generic_wide_int::operator-)
1497         (generic_wide_int::operator==, generic_wide_int::operator!=)
1498         (generic_wide_int::operator&, generic_wide_int::and_not)
1499         (generic_wide_int::operator|, generic_wide_int::or_not)
1500         (generic_wide_int::operator^, generic_wide_int::operator+
1501         (binary generic_wide_int::operator-, generic_wide_int::operator*):
1502         Delete.
1503         (operator~, unary operator-, operator==, operator!=, operator&)
1504         (operator|, operator^, operator+, binary operator-, operator*): New
1505         functions.
1506         * expr.c (get_inner_reference): Use wi::bit_and_not.
1507         * fold-const.c (fold_binary_loc): Likewise.
1508         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
1509         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
1510         (bit_value_binop): Likewise.
1511         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
1512         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
1513         (extract_range_from_binary_expr_1): Likewise.
1514         (masked_increment): Likewise.
1515         (simplify_bit_ops_using_ranges): Likewise.
1517 2017-10-09  Martin Jambor  <mjambor@suse.cz>
1519         PR hsa/82416
1520         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
1521         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
1522         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
1523         COMPLEX types.
1524         (hsa_fixup_mov_insn_type): New function.
1525         (hsa_op_with_type::get_in_type): Use it.
1526         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
1527         immediates in an assert.
1528         (hsa_op_with_type::extend_int_to_32bit): New method.
1529         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
1530         types.  Convert to dest type if necessary.
1531         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
1532         (reg_for_gimple_ssa): Pass false as min32int to
1533         hsa_type_for_scalar_tree_type.
1534         (gen_hsa_addr): Fixup type when creating addresable temporary.
1535         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
1536         (gen_hsa_unary_operation): Extend operands and convert to dest type if
1537         necessary.  Call hsa_fixup_mov_insn_type.
1538         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
1539         extend operands and convert to dest type if necessary.
1540         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
1541         to dest type if necessary.
1542         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
1543         if conversion nt necessary and size matches.
1544         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
1545         to dest type if necessary.
1546         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
1547         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
1548         necessary.
1549         (gen_hsa_clrsb): Likewise.
1550         (gen_hsa_ffs): Likewise.
1551         (gen_hsa_divmod): Extend operands and convert to dest type if
1552         necessary.
1553         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
1555 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
1557         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
1558         Remove empty default arguments.  Use a brace block as output
1559         statement.
1560         (conditional return): Ditto.
1561         (jump): Ditto.
1562         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
1563         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
1564         Ditto.
1565         (group_ending_nop): Ditto.
1566         (doloop_end): Ditto.
1567         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
1568         (splitters for those): Ditto.
1570 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
1572         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
1573         a conditional jump (and the compare for it) so that pc_rtx is the
1574         last operand.
1575         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
1576         for the deleted and renamed ctr<mode>_internal[234] patterns.
1577         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
1578         Delete second conditional return pattern.
1579         (ctr<mode>_internal2): Delete this second bdnz pattern.
1580         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
1581         (ctr<mode>_internal4): Delete this second bdz pattern.
1583 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1585         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
1586         (always_initialized_rtx_for_ssa_name_p): New predicate.
1587         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
1588         (finish_out_of_ssa): Free new field of SA.
1589         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
1590         * tree-ssa-coalesce.c: Include tree-ssa.h.
1591         (get_parm_default_def_partitions): Remove extern keyword.
1592         (get_undefined_value_partitions): New function.
1593         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
1594         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
1595         uninitialized bits.
1596         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
1598 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1600         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
1602 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
1604         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
1605         for targets that preffer 128bit.
1607 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
1609         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
1611 2017-10-08  Olivier Hainque  <hainque@adacore.com>
1613         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
1614         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
1615         prevent DSE.
1616         (thumb_set_return_address): Likewise.
1618 2017-10-08  Olivier Hainque  <hainque@adacore.com>
1620         * common/config/arm/arm-common.c (arm_except_unwind_info):
1621         Handle DWARF2_UNWIND_INFO.
1623 2017-10-07  Michael Collison <michael.collison@arm.com>
1625         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
1626         New pattern.
1628 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
1630         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
1631         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
1632         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
1633         defined, force the creation of a new block for a dispatch label.
1635 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
1637         * invoke.texi (Wsuggest-attribute=cold): Document.
1638         * common.opt (Wsuggest-attribute=cold): New
1639         * ipa-pure-const.c (warn_function_cold): New function.
1640         * predict.c (compute_function_frequency): Use it.
1641         * predict.h (warn_function_cold): Declare.
1643 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
1645         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
1646         Update profile.
1648 2017-10-06  Martin Liska  <mliska@suse.cz>
1650         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
1651         keyword for member functions.
1652         (struct sanopt_tree_couple): New struct.
1653         (struct sanopt_tree_couple_hash): New function.
1654         (struct sanopt_ctx): Add new hash_map.
1655         (has_dominating_ubsan_ptr_check): New function.
1656         (record_ubsan_ptr_check_stmt): Likewise.
1657         (maybe_optimize_ubsan_ptr_ifn): Likewise.
1658         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
1659         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
1661 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
1663         PR target/82440
1664         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
1665         aarch64_simd_valid_immediate on CONST_VECTORs.
1666         (aarch64_reg_or_bic_imm): Likewise.
1668 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
1670         PR rtl-optimization/82396
1671         * haifa-sched.c (ready_sort_real): Disable qsort checking.
1673 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
1675         * graphite-dependences.c (scop_get_reads): Move code to...
1676         (scop_get_must_writes): Move code to...
1677         (scop_get_may_writes): Move code to...
1678         (scop_get_reads_and_writes): ... here.
1679         (scop_get_dependences): Call scop_get_reads_and_writes.
1681 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
1683         PR tree-optimization/82434
1684         * fold-const.h (can_native_encode_type_p,
1685         can_native_encode_string_p): Remove.
1686         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
1687         don't encode anything, just return what would be otherwise returned.
1688         (native_encode_fixed, native_encode_complex, native_encode_vector):
1689         Likewise.
1690         (native_encode_string): Likewise.  Inline by hand
1691         can_native_encode_string_p.
1692         (can_native_encode_type_p): Remove.
1693         (can_native_encode_string_p): Remove.
1694         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
1695         STRING_CSTs using can_native_encode_string_p, test all
1696         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
1697         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
1698         argument from native_encode_expr.
1699         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
1700         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
1701         but just 2.
1703 2017-10-06  Richard Biener  <rguenther@suse.de>
1705         PR tree-optimization/82397
1706         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
1707         operand_equal_p but rely on data_ref_compare_tree for detecting
1708         equalities.
1709         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
1710         to match up with dr_group_sort_cmp.
1712 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1714         PR target/82322
1715         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
1716         builtin.
1717         * config/s390/s390-builtin-types.def: Regenerate.
1719 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1721         PR target/82317
1722         * config/s390/s390-builtin-types.def: Regenerate.
1723         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
1724         Change flag from B_VXE to B_VX.
1725         (s390_vec_min_dbl): Remove B_VXE flag.
1727 2017-10-06  Richard Biener  <rguenther@suse.de>
1729         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
1730         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
1731         translate_isl_ast_to_gimple::is_valid_rename,
1732         translate_isl_ast_to_gimple::get_rename,
1733         translate_isl_ast_to_gimple::get_def_bb_for_const,
1734         translate_isl_ast_to_gimple::get_new_name,
1735         translate_isl_ast_to_gimple::collect_all_ssa_names,
1736         translate_isl_ast_to_gimple::copy_loop_phi_args,
1737         translate_isl_ast_to_gimple::collect_all_ssa_names,
1738         translate_isl_ast_to_gimple::copy_loop_phi_args,
1739         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
1740         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
1741         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
1742         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
1743         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
1744         translate_isl_ast_to_gimple::copy_cond_phi_args,
1745         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
1746         translate_isl_ast_to_gimple::edge_for_new_close_phis,
1747         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
1748         translate_isl_ast_to_gimple::rename_uses,
1749         translate_isl_ast_to_gimple::rename_all_uses): Remove.
1750         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
1751         (set_rename_for_each_def): Likewise.
1752         (graphite_copy_stmts_from_block): Handle debug stmt resetting
1753         here.  Handle rewriting SCEV analyzable uses here.
1754         (copy_bb_and_scalar_dependences): Generate code for PHI
1755         copy-in/outs.
1756         (graphite_regenerate_ast_isl): Adjust.
1757         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
1758         (add_write, add_read): New functions.
1759         (build_cross_bb_scalars_def): Use it and simplify.
1760         (build_cross_bb_scalars_use): Likewise.
1761         (graphite_find_cross_bb_scalar_vars): Inline into...
1762         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
1763         simulating out-of-SSA.  Compute liveout and add dependencies.
1764         (build_scops): Force an empty entry block.
1765         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
1766         members.
1767         (sese_build_liveouts): Declare.
1768         (sese_trivially_empty_bb_p): Likewise.
1769         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
1770         compute liveout and debug_liveout.
1771         (sese_bad_liveouts_use): Remove.
1772         (sese_reset_debug_liveouts_bb): Likewise.
1773         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
1774         (sese_build_liveouts): Build liveout and debug_liveout and store
1775         it in region.
1776         (new_sese_info): Adjust.
1777         (free_sese_info): Likewise.
1778         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
1779         do not build liveout here.
1780         (move_sese_in_condition): Adjust region entry.
1781         (scev_analyzable_p): Match up with chrec_apply requirements.
1782         (sese_trivially_empty_bb_p): New.
1783         * tree-into-ssa.c (get_reaching_def): Properly support generating
1784         default-defs for incremental rewrite of anonymous names.
1786 2017-10-06  Richard Biener  <rguenther@suse.de>
1788         * graphite-sese-to-poly.c (extract_affine): For casts increasing
1789         precision do not perform modulo reduction.
1791 2017-10-06  Richard Biener  <rguenther@suse.de>
1793         PR tree-optimization/82436
1794         * tree-vect-slp.c (vect_supported_load_permutation_p): More
1795         conservatively choose the vectorization factor when checking
1796         whether we can perform the required load permutation.
1797         (vect_transform_slp_perm_load): Assert when we may not fail.
1799 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1801         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
1802         message for incompatible -msdata=* and -mcall-* options.
1804 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
1806         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
1807         rate for post-reload scheduling.
1809 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
1811         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
1813 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
1815         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
1816         to improve monte carlo in scimark.
1818 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
1820         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
1821         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
1822         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
1823         pentium4_cost, nocona_cost): Set reassociation width to 1.
1824         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
1825         width to 2 for fp operations and 1 otherwise.
1826         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
1827         for int and fp.
1828         (atom_cost): Set reassociation width to 2.
1829         (slm_cost, generic_cost): Set fp reassociation width
1830         to 2 and 1 otherwise.
1831         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
1832         (core_cost): Set fp reassociation width to 4 and vector to 2.
1833         (ix86_reassociation_width): Rewrite using cost table; special case
1834         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
1835         and TARGET_AVX128_OPTIMAL.
1836         * config/i386/i386.h (processor_costs): Add
1837         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
1838         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
1839         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
1840         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
1841         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
1842         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
1844 2017-10-05  Nathan Sidwell  <nathan@acm.org>
1846         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
1848 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
1850         * config/arm/arm.c (arm_test_fpu_data): New.
1851         (arm_run_selftests): Call arm_test_fpu_data.
1853 2017-10-04  Nathan Sidwell  <nathan@acm.org>
1855         * toplev.c (toplev::main): Remove excess parens on pretty_printer
1856         decl.
1857         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
1859 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
1861         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
1862         check type for aarch64_simd_valid_immediate.
1863         (aarch64_output_simd_mov_immediate): Update prototype.
1864         (aarch64_simd_valid_immediate): Update prototype.
1865         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
1866         support for ORR-immediate.
1867         (and<mode>3): modified pattern to add support for BIC-immediate.
1868         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
1869         now checks for valid immediate for BIC and ORR based on new enum
1870         argument.
1871         (aarch64_output_simd_mov_immediate): Function now used to output
1872         BIC/ORR imm as well based on new enum argument.
1873         * config/aarch64/constraints.md (Do): New vector immediate constraint.
1874         (Db) : Likewise.
1875         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
1876         (aarch64_reg_or_bic_imm): Likewise.
1878 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1880         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
1881         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
1883 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
1885         Revert r253399:
1887         PR rtl-optimization/82396
1888         * haifa-sched.c (autopref_multipass_init): Simplify
1889         initialization.
1890         (autopref_rank_data): Simplify sort order.
1891         * sched-int.h (autopref_multipass_data_): Remove
1892         multi_mem_insn_p, min_offset and max_offset.
1894 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1896         * doc/sourcebuild.texi: Document vect_peeling_profitable.
1898 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1900         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
1901         vect_doubleint_cvt.
1903 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1905         * doc/sourcebuild.texi: Document vect_long_mult.
1907 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
1909         PR tree-optimization/82413
1910         * fold-const.c (build_range_check): Use widest_int when comparing
1911         the maximum ETYPE value with HIGH.
1913 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
1915         PR rtl-optimization/82396
1916         * haifa-sched.c (autopref_multipass_init): Simplify
1917         initialization.
1918         (autopref_rank_data): Simplify sort order.
1919         * sched-int.h (autopref_multipass_data_): Remove
1920         multi_mem_insn_p, min_offset and max_offset.
1922 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
1924         PR tree-optimization/82381
1925         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
1926         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
1927         is not.
1929         PR tree-optimization/82374
1930         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
1931         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
1932         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
1933         current_function_decl to the new decl.
1935 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
1937         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
1938         helper macro for IEEE float128 hardware built-in functions.
1939         (SQRTF128_ODD): Add built-in functions with the round-to-odd
1940         semantics.
1941         (TRUNCF128_ODD): Likewise.
1942         (ADDF128_ODD): Likewise.
1943         (SUBF128_ODD): Likewise.
1944         (MULF128_ODD): Likewise.
1945         (DIVF128_ODD): Likewise.
1946         (FMAF128_ODD): Likewise.
1947         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
1948         UNSPEC_TRUNC_ROUND_TO_ODD.
1949         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
1950         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
1951         floating point round to odd instructions.
1952         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
1953         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
1954         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
1955         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
1956         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
1957         (trunc<mode>sf2_hw): Change the truncate with round to odd
1958         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
1959         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
1960         to odd hardware instructions.
1961         (sub<mode>3_odd): Likewise.
1962         (mul<mode>3_odd): Likewise.
1963         (div<mode>3_odd): Likewise.
1964         (sqrt<mode>2_odd): Likewise.
1965         (fma<mode>4_odd): Likewise.
1966         (fms<mode>4_odd): Likewise.
1967         (nfma<mode>4_odd): Likewise.
1968         (nfms<mode>4_odd): Likewise.
1969         (trunc<mode>df2_odd): Change the truncate with round to odd
1970         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
1971         function.
1972         * doc/extend.texi (PowerPC built-in functions): Update documentation
1973         for existing IEEE float128-bit built-in functions.  Add built-in
1974         functions that generate the IEEE 128-bit floating point round to
1975         odd instructions.
1977 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
1979         PR rtl-optimization/77729
1980         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
1981         to (X&(C1&~C2))|C2 transformations.
1983 2017-10-03  Martin Jambor  <mjambor@suse.cz>
1985         PR tree-optimization/82363
1986         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
1987         mismatch, mark lacc written regardless of racc.
1989 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
1991         PR tree-optimization/82381
1992         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
1993         stmt_to_insert nor wheather SSA_NAMEs are default defs.
1994         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
1995         fallthrough into reassoc_stmt_dominates_stmt_p.
1997         PR target/82386
1998         * combine.c (combine_instructions): Don't combine in unreachable
1999         basic blocks.
2001 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
2003         PR target/80210
2004         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
2005         function to not use the have_cpu variable.  Do not set cpu_index,
2006         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
2007         or the default cpu.
2008         (rs6000_valid_attribute_p): Remove duplicate initializations of
2009         old_optimize and func_optimize.
2010         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
2011         (rs6000_activate_target_options): Make global.
2012         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
2013         prototype.
2015 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
2017         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
2018         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
2019         Set *poffset to 0 and *psize and *pmax_size to -1 if
2020         *poffset + *psize overflows in HOST_WIDE_INT.
2022         PR tree-optimization/82387
2023         PR tree-optimization/82388
2024         PR tree-optimization/82389
2025         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
2026         instead of live_bytes non-NULL.
2028 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
2030         PR target/41076
2031         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
2032         alternative.
2034 2017-10-02  Richard Biener  <rguenther@suse.de>
2036         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
2037         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
2038         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
2040 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2042         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
2043         requested precision matches the type's.
2044         * calls.c (alloc_max_size): Calculate the new candidate size as
2045         a widest_int and use wi::to_widest when comparing it with the
2046         current candidate size.
2047         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
2048         zero rather than integer_zero_node.
2049         * match.pd: Check for a no-op conversion before using wi::add
2050         rather than after.  Use tree_to_uhwi when summing small shift
2051         counts into an unsigned int.
2053 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2054             Alan Hayward  <alan.hayward@arm.com>
2055             David Sherwood  <david.sherwood@arm.com>
2057         PR target/71307
2058         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
2059         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
2060         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
2061         POINTER_AND_FP_REGS.
2063 2017-10-02  Richard Biener  <rguenther@suse.de>
2065         PR tree-optimization/82355
2066         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
2067         a mapping for the enclosing loop but avoid generating one for
2068         the loop tree root.
2069         (copy_bb_and_scalar_dependences): Remove premature codegen
2070         error on PHIs in blocks duplicated into multiple places.
2071         * graphite-scop-detection.c
2072         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
2073         in the region use it as loop and nest to analyze the DR in.
2074         (try_generate_gimple_bb): Likewise.
2075         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
2076         (add_loop_constraints): For blocks in a loop not in the region
2077         create a dimension with a single iteration.
2078         * sese.h (gbb_loop_at_index): Remove assert.
2080 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
2082         * omp-expand.c (adjust_context_scope): New function.
2083         (expand_parallel_call): Call adjust_context_scope.
2085 2017-10-01  Jeff Law  <law@redhat.com>
2087         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
2088         dom_opt_dom_walker class with direct access to private members.
2089         Add comments.  Call test_for_singularity.
2090         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
2091         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
2092         m_dummy_cond anymore.
2093         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
2094         class ctor.
2095         (pass_dominator:execute): Build the dummy_cond here and pass it
2096         to the dom_opt_dom_walker ctor.
2097         (test_for_singularity): New function.
2099 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
2100             Maya Rashish  <coypu@sdf.org>
2102         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
2103         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
2104         (alpha*-*-netbsd*) Use nbsd_tm_file.
2105         (arm*-*-netbsdelf*) Likewise.
2106         (i[34567]86-*-netbsdelf*) Likewise.
2107         (x86_64-*-netbsd*) Likewise.
2108         (mips*-*-netbsd*) Likewise.
2109         (powerpc-*-netbsd*) Likewise.
2110         (sh*-*-netbsd*) Likewise.
2111         (sparc-*-netbsdelf*) Likewise.
2112         (sparc64-*-netbsd*) Likewise.
2113         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
2114         to tm_defines.
2115         (vax-*-netbsdelf*) Likewise.
2116         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
2117         (UINT_FAST8_TYPE) Likewise.
2118         (INT_FAST16_TYPE) Check CHAR_FAST16.
2119         (UINT_FAST16_TYPE) Likewise.
2121 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
2123         PR target/82361
2124         * config/i386/i386.md
2125         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
2126         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
2127         *divmodsi4_zext_2): New define_insn_and_split.
2128         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
2129         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
2130         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
2131         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
2132         New define_insn_and_split.
2133         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
2134         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
2135         operands[1] having DImode when mode is SImode.
2137         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
2138         always SImode for DIV and MOD in REG_EQUAL notes.
2140 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
2142         PR middle-end/82319
2143         * match.pd: Fix handling of NaNs in pattern.
2145 2017-09-29  Jeff Law  <law@redhat.com>
2147         * sbitmap.c (bitmap_bit_in_range_p): New function.
2148         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
2149         * tree-ssa-dse.c (live_bytes_read): New function.
2150         (dse_classify_store): Ignore reads of dead bytes.
2152         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
2153         typos and whitespace errors.
2154         * config/i386/predicates.md (address_no_seg_operand): Likewise.
2155         * config/s390/s390.c (s390_emit_prologue): Likewise.
2157 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
2159         PR target/81481
2160         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
2161         with a symbol for LRA.
2163 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
2165         PR rtl-optimization/82338
2166         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
2168 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
2170         * genmodes.c (calc_wider_mode): Suppress qsort macro.
2171         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
2172         (qsort_chk): Declare.
2173         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
2174         (qsort_chk): New function.
2176 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2178         PR tree-optimization/82337
2179         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
2180         phi definition if the PHI result appears in an abnormal PHI.
2181         (find_basis_for_base_expr): Don't record a basis if the LHS of the
2182         basis appears in an abnormal PHI.
2184 2017-09-29  Richard Biener  <rguenther@suse.de>
2186         * graphite-isl-ast-to-gimple.c
2187         (translate_isl_ast_to_gimple::set_codegen_error): New function.
2188         (binary_op_to_tree): Use it.
2189         (get_rename_from_scev): Likewise.
2190         (copy_loop_phi_nodes): Likewise.
2191         (copy_bb_and_scalar_dependences): Likewise.
2192         (translate_pending_phi_nodes): Likewise.
2194 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
2196         PR target/82339
2197         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
2198         for movabsq $(i32 << shift), r64.
2200 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
2202         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
2203         index when encoding %esp as %rsp to avoid 0x67 prefix.
2205 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
2207         * config/i386/i386.md (*movsf_internal, *movdf_internal):
2208         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
2210 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2212         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
2213         Extensions with more than 16 double VFP registers.
2214         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
2215         to_clear_mask and all code related to it.  Replace the remaining
2216         entry by a sbitmap and adapt code accordingly.
2218 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
2220         * brig-builtins.def: Change pure attributes to const.
2222 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
2224         * config.gcc (default_gnu_indirect_function): Default to yes for
2225         sparc*-*-linux* with glibc.
2227 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
2229         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
2230         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
2231         when creating .init_array and .fini_array sections with priority
2232         specified.
2234 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
2236         PR target/71727
2237         * config/aarch64/aarch64.c
2238         (aarch64_builtin_support_vector_misalignment): Always return false
2239         when misalignment is unknown.
2241 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2243         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
2244         this function to return false if the definition used by the swap
2245         instruction is artificial, or if the memory address from which the
2246         constant value is loaded is not represented by a base address held
2247         in a register or if the base address register is a frame or stack
2248         pointer.  Additionally, return false if the base address of the
2249         loaded constant is a SYMBOL_REF but is not considered to be a
2250         constant.
2251         (replace_swapped_load_constant): New function.
2252         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
2253         loaded constant vector with a load of a swapped constant vector.
2255 2017-09-27  Carl Love  <cel@us.ibm.com>
2257         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
2258         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
2259         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
2260         fctiw instruction.
2262 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
2264         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
2265         first, always call autopref_rank_data otherwise.
2267 2017-09-27  Richard Biener  <rguenther@suse.de>
2269         * graphite-scop-detection.c (find_scop_parameters): Move
2270         loop bound handling ...
2271         (gather_bbs::before_dom_children): ... here, avoiding the need
2272         to build scop_info->loop_nest.
2273         (record_loop_in_sese): Remove.
2274         * sese.h (sese_info_t::loop_nest): Remove.
2275         * sese.c (new_sese_info): Do not allocate loop_nest.
2276         (free_sese_info): Do not free loop_nest.
2278 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
2280         PR c++/82159
2281         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
2282         lhs from calls if the lhs has addressable type.
2284 2017-09-27  Richard Biener  <rguenther@suse.de>
2286         * graphite.h (scop::max_alias_set): New member.
2287         * graphite-scop-detection.c: Remove references to non-existing
2288         --param in comments.
2289         (build_alias_sets): Record the maximum alias set used for drs.
2290         (build_scops): Support zero as unlimited for
2291         --param graphite-max-arrays-per-scop.
2292         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
2293         and inline into ...
2294         (build_poly_sr_1): ... here.  Compute alias set based on the
2295         maximum alias set used for drs rather than
2296         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
2298 2017-09-27  Richard Biener  <rguenther@suse.de>
2300         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
2301         --param loop-block-tile-size=0 to disable tiling.
2303 2017-09-27  Richard Biener  <rguenther@suse.de>
2305         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
2306         (graphite-max-nb-scop-params): Document special value zero.
2307         * domwalk.h (dom_walker::STOP): New symbolical constant.
2308         (dom_walker::dom_walker): Add optional parameter for bb to
2309         RPO mapping.
2310         (dom_walker::~dom_walker): Declare.
2311         (dom_walker::before_dom_children): Document STOP return value.
2312         (dom_walker::m_user_bb_to_rpo): New member.
2313         (dom_walker::m_bb_to_rpo): Likewise.
2314         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
2315         mapping here if not provided by the user.
2316         (dom_walker::~dom_walker): Free bb to RPO mapping if not
2317         provided by the user.
2318         (dom_walker::STOP): Define.
2319         (dom_walker::walk): Do not compute bb to RPO mapping here.
2320         Support STOP return value from before_dom_children to stop
2321         walking.
2322         * graphite-optimize-isl.c (optimize_isl): If the schedule
2323         is the same still generate code if -fgraphite-identity
2324         or -floop-parallelize-all are given.
2325         * graphite-scop-detection.c: Include cfganal.h.
2326         (gather_bbs::gather_bbs): Get and pass through bb to RPO
2327         mapping.
2328         (gather_bbs::before_dom_children): Return STOP for BBs
2329         not in the region.
2330         (build_scops): Compute bb to RPO mapping and pass it to
2331         the domwalk.  Treat --param graphite-max-nb-scop-params=0
2332         as not limiting the number of params.
2333         * graphite.c (graphite_initialize): Remove limit on the
2334         number of basic-blocks in a function.
2335         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
2336         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
2337         default value of 10.
2339 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
2341         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
2342         Adjust code to eliminate needing to do the shift right 32-bits
2343         operation after XSCVDPSPN.
2345 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2347         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
2348         ((X / Y) != 0 -> X >= Y): Likewise.
2350 2017-09-26  Carl Love  <cel@us.ibm.com>
2352         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
2353         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
2354         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
2355         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
2356         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
2357         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
2358         definitions and overloading.
2359         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
2360         statement for P9V_BUILTIN_XST_LEN_R.
2361         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
2362         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
2363         define_expand and define_insn for the instructions and builtins.
2364         * doc/extend.texi: Update the built-in documentation file for the new
2365         built-in functions.
2366         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
2367         define_insn for the instructions
2369 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
2371         PR target/39570
2372         * gcc/config/netbsd-protos.h: New file.
2373         * gcc/config/netbsd.c: New file.
2374         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
2375         * gcc/config/t-netbsd: New file.
2376         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
2377         (tmake_file) Add t-netbsd.
2378         (extra_objs) Add netbsd.o.
2380 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
2382         PR fortran/82143
2383         PR fortran/82324
2384         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
2386 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
2388         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
2389         sign extension from a vector register to a GPR by doing a 32-bit
2390         direct move and then an EXTSW.
2391         (extendsi<mode>2 splitter): Likewise.
2392         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
2393         right or vector extract after doing XSCVDPSPN.  Use
2394         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
2395         the GPRs.
2396         (movdi_from_sf_zero_ext): Likewise.
2397         (reload_gpr_from_vsxsf): Likewise.
2398         (p8_mfvsrd_4_disf): Delete, no longer used.
2399         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
2400         then needing to move the SFmode to a GPR to use the XSCVDPSP
2401         instruction instead of FRSP and XSCVDPSPN.
2402         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
2403         it is adjacent to the other XSCVSPDP insns.
2404         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
2405         SFmode to be in traditional Altivec registers.
2406         (vsx_xscvdpspn): Eliminate useless alternative constraint.
2407         (vsx_xscvspdpn): Likewise.
2408         (vsx_xscvspdpn_scalar): Likewise.
2410 2017-09-26  Martin Jambor  <mjambor@suse.cz>
2412         * tree-sra.c (compare_access_positions): Put integral types first,
2413         stabilize sorting of integral types, remove conditions putting
2414         non-full-precision integers last.
2415         (sort_and_splice_var_accesses): Disable scalarization if a
2416         non-integert would be represented by a non-full-precision integer.
2418 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
2420         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
2421         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
2422         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
2423         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
2424         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
2425         conditionals inside the function instead of around it.  Call
2426         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
2427         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
2429 2017-09-26  Richard Biener  <rguenther@suse.de>
2431         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
2432         fold in ...
2433         (scop_detection::build_scop_breadth): ... this.  Removed.
2434         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
2435         (scop_detection::harmful_stmt_in_bb): Likewise.
2436         (scop_detection::graphite_can_represent_stmt): Likewise.
2437         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
2438         (scop_detection::can_represent_loop): Remove recursion, fold in ...
2439         (scop_detection::can_represent_loop_1): ... this.  Removed.
2440         (scop_detection::harmful_loop_in_region): Simplify after inlining
2441         the above and remove more quadraticness.
2442         (build_scops): Adjust.
2443         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
2444         quadraticness.
2446 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
2448         PR target/82267
2449         * config/i386/i386.c (ix86_print_operand_address_as): Only test
2450         REGNO (base) == SP_REG if base is a REG.
2452         PR middle-end/35691
2453         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
2454         if it is different SSA_NAME.
2455         (optimize_range_tests_cmp_bitwise): New function.
2456         (optimize_range_tests): Call it.
2458 2017-09-26  Richard Biener  <rguenther@suse.de>
2460         PR tree-optimization/82321
2461         * graphite.c (canonicalize_loop_closed_ssa): Properly check
2462         for the def being inside the loop.
2464 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2466         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
2467         assembler output.
2468         * config/s390/s390-builtins.def: Fix constraint on op4.
2470 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2472         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
2473         independent expanders.
2474         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
2475         ("vec_ordered", "vec_unordered"): New expanders.
2477 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2479         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
2480         for SFmode.
2482 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2484         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
2485         vec_unpacks_lo_v16qi.
2486         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
2488 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2490         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
2491         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
2492         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
2494 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2496         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
2497         predicate.
2498         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
2499         and V16QI.
2500         ("*vec_slb<mode>"): New insn pattern.
2501         ("vec_shr_<mode>"): New expander.
2502         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
2503         and force the shift count operand to V16QImode.
2504         ("vec_srb<mode>"): Set shift count mode to V16QI.
2506 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2508         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
2509         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
2510         ("vec_widen_smult_hi_<mode>"): New expander definitions.
2512 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
2514         PR target/82175
2515         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
2517 2017-09-26  Richard Biener  <rguenther@suse.de>
2519         PR tree-optimization/82320
2520         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
2521         isn't a change.
2523 2017-09-25  Jeff Law  <law@redhat.com>
2525         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
2526         prototype for new argument.
2527         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
2528         mostly extracted from rs6000_emit_allocate_stack.
2529         (rs6000_emit_probe_stack_range_stack_clash): New function.
2530         (rs6000_emit_allocate_stack): Call
2531         rs6000_emit_probe_stack_range_stack_clash as needed.
2532         (rs6000_emit_probe_stack_range): Add additional argument
2533         to call to gen_probe_stack_range{si,di}.
2534         (output_probe_stack_range): New.
2535         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
2536         (output_probe_stack_range_stack_clash): New.
2537         (rs6000_emit_prologue): Emit notes into dump file as requested.
2538         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
2539         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
2540         Add additional operand and pass it to output_probe_stack_range.
2542 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
2544         PR tree-optimization/82163
2545         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
2546         (checking_verify_loop_closed_ssa): New parameter.
2547         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
2548         (check_loop_closed_ssa_stmt): Delete.
2549         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
2550         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
2551         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
2552         changed loops.
2554 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
2556         * brig-builtins.def: Treat HSAIL barrier builtins as
2557         setjmp/longjump style functions.
2559 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
2561         * target.def (constant_alignment): New hook.
2562         * defaults.h (CONSTANT_ALIGNMENT): Delete.
2563         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
2564         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
2565         * doc/tm.texi: Regenerate.
2566         * targhooks.h (default_constant_alignment): Declare.
2567         (constant_alignment_word_strings): Likewise.
2568         * targhooks.c (default_constant_alignment): New function.
2569         (constant_alignment_word_strings): Likewise.
2570         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
2571         instead of CONSTANT_ALIGNMENT.
2572         * varasm.c (align_variable, get_variable_align, build_constant_desc)
2573         (force_const_mem): Likewise.
2574         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
2575         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
2576         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
2577         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2578         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
2579         definition.
2580         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
2581         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2582         constant_alignment_word_strings.
2583         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
2584         (CONSTANT_ALIGNMENT): Likewise.
2585         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2586         (arm_constant_alignment): New function.
2587         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
2588         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2589         constant_alignment_word_strings.
2590         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
2591         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2592         constant_alignment_word_strings.
2593         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
2594         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2595         (cris_constant_alignment): New function.
2596         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
2597         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2598         (epiphany_constant_alignment): New function.
2599         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
2600         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2601         constant_alignment_word_strings.
2602         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
2603         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2604         constant_alignment_word_strings.
2605         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
2606         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2607         constant_alignment_word_strings.
2608         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
2609         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
2610         * config/i386/i386.c (ix86_constant_alignment): Make static.
2611         Use the same interface as the target hook.
2612         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2613         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
2614         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2615         constant_alignment_word_strings.
2616         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
2617         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
2618         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2619         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
2620         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2621         constant_alignment_word_strings.
2622         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
2623         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2624         constant_alignment_word_strings.
2625         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
2626         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2627         constant_alignment_word_strings.
2628         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
2629         * config/microblaze/microblaze.c (microblaze_constant_alignment):
2630         New function.
2631         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2632         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
2633         * config/mips/mips.c (mips_constant_alignment): New function.
2634         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2635         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
2636         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
2637         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2638         (mmix_constant_alignment): Make static.  Use the same interface
2639         as the target hook.
2640         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
2641         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2642         constant_alignment_word_strings.
2643         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
2644         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2645         constant_alignment_word_strings.
2646         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
2647         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2648         constant_alignment_word_strings.
2649         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
2650         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2651         (rs6000_constant_alignment): New function.
2652         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
2653         * config/riscv/riscv.c (riscv_constant_alignment): New function.
2654         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2655         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
2656         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2657         (rs6000_constant_alignment): New function.
2658         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
2659         * config/s390/s390.c (s390_constant_alignment): New function.
2660         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2661         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
2662         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2663         constant_alignment_word_strings.
2664         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
2665         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2666         (sparc_constant_alignment): New function.
2667         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
2668         * config/spu/spu.c (spu_constant_alignment): New function.
2669         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2670         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
2671         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2672         constant_alignment_word_strings.
2673         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
2674         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2675         constant_alignment_word_strings.
2676         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
2677         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2678         constant_alignment_word_strings.
2679         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
2680         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2681         (visium_constant_alignment): New function.
2682         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
2683         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2684         (xtensa_constant_alignment): New function.
2685         * system.h (CONSTANT_ALIGNMENT): Poison.
2687 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
2689         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
2690         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
2691         (rs6000_builtin_valid_without_lhs): New helper function.
2692         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2693         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
2695 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
2697         * target.h (vec_perm_indices): Use unsigned short rather than
2698         unsigned char.
2699         (auto_vec_perm_indices): Likewise.
2700         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
2701         Use unsigned int rather than unsigned char.
2702         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
2704 2017-09-25  Richard Biener  <rguenther@suse.de>
2706         * cfgloop.h (sort_sibling_loops): Declare.
2707         * cfgloop.c (sort_sibling_loops_cmp): New helper.
2708         (sort_sibling_loops): New function sorting the sibling loop list
2709         in RPO order.
2710         * graphite.c (graphite_transform_loops): Sort sibling loops.
2712 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
2714         * target.def (vec_perm_const_ok): Change sel parameter to
2715         vec_perm_indices.
2716         * optabs-query.c (can_vec_perm_p): Update accordingly.
2717         * doc/tm.texi: Regenerate.
2718         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
2719         auto_vec_perm_indices and remove separate nelt field.
2720         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
2721         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
2722         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
2723         (aarch64_expand_vec_perm_const): Update accordingly.
2724         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
2725         to vec_perm_indices.
2726         * config/arm/arm.c (expand_vec_perm_d): Change perm to
2727         auto_vec_perm_indices and remove separate nelt field.
2728         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
2729         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
2730         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
2731         accordingly.
2732         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
2733         to vec_perm_indices.
2734         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
2735         sel to vec_perm_indices.
2736         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
2737         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
2738         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
2739         Likewise.
2740         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
2741         Likewise.
2743 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
2745         PR debug/82155
2746         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
2747         on the FUNCTION_DECL function context if it has a DIE that is a
2748         declaration.
2750 2017-09-25  Richard Biener  <rguenther@suse.de>
2752         PR tree-optimization/82285
2753         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
2754         enumeral types.
2756 2017-09-25  Tom de Vries  <tom@codesourcery.com>
2758         PR target/80035
2759         PR target/81069
2760         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
2761         noreturn function.
2763 2017-09-25  Richard Biener  <rguenther@suse.de>
2765         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
2766         ISL errors other than isl_error_quota happen.  Dump if the
2767         schedule is the same.
2768         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
2769         errors instead of aborting inside ISL.
2771 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
2773         PR target/80556
2774         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
2775         of libgcc_eh for m64.
2776         * config/i386/darwin64.h: Likewise.
2778 2017-09-25  Richard Biener  <rguenther@suse.de>
2780         PR middle-end/82144
2781         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
2782         attribute for incomplete types nor twice for complete ones.
2784 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
2786         PR target/82267
2787         * config/i386/i386.c (ix86_print_operand_address_as): Encode
2788         %esp as %rsp to avoid 0x67 prefix if there is no index or base
2789         register.
2791 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
2793         PR bootstrap/82306
2794         * config/i386/i386.opt (mprefer-avx256): Use
2795         ix86_target_flags variable.
2796         * config/i386/i386.c (ix86_target_string): Move
2797         -mprefer-avx256 to flag2_opts.
2799 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
2801         PR middle-end/35691
2802         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
2803         and x != -1 | y != -1 into (x & y) != -1.
2805 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
2807         * config.gcc: Add new case statement to set
2808         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
2809         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
2810         s390x-*-linux* case statements.   Added aarch64 to the list of
2811         supported architectures.
2813 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2815         PR tree-optimization/82289
2816         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
2817         STMT_VINFO_RELEVANT_P.
2819 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2820             Alan Hayward  <alan.hayward@arm.com>
2821             David Sherwood  <david.sherwood@arm.com>
2823         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
2824         for VR_RANGE only; don't allow VR_ANTI_RANGE.
2825         (extract_range_from_binary_expr_1): Don't call
2826         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
2828 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2829             Alan Hayward  <alan.hayward@arm.com>
2830             David Sherwood  <david.sherwood@arm.com>
2832         * target.def (preferred_vector_alignment): New hook.
2833         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
2834         hook.
2835         * doc/tm.texi: Regenerate.
2836         * targhooks.h (default_preferred_vector_alignment): Declare.
2837         * targhooks.c (default_preferred_vector_alignment): New function.
2838         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
2839         Expand commentary.
2840         (DR_TARGET_ALIGNMENT): New macro.
2841         (aligned_access_p): Update commentary.
2842         (vect_known_alignment_in_bytes): New function.
2843         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
2844         function.
2845         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
2846         Calculate the misalignment based on the target alignment rather than
2847         the vector size.
2848         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
2849         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
2850         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
2851         the target alignment, rather than masking the element misalignment
2852         with the number of elements in a vector.  Also use the target
2853         alignment when calculating the maximum number of peels.
2854         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
2855         instead of TYPE_ALIGN_UNIT.
2856         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
2857         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
2858         (vect_create_addr_base_for_vector_ref): Update call accordingly.
2859         (vect_create_data_ref_ptr): Likewise.
2860         (vect_setup_realignment): Realign by ANDing with
2861         -DR_TARGET_MISALIGNMENT.
2862         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
2863         the number of peels based on DR_TARGET_ALIGNMENT.
2864         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
2865         with the guaranteed alignment boundary when deciding whether
2866         overrun is OK.
2867         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
2868         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
2869         (ensure_base_align): Remove stmt_info parameter.  Get the
2870         target base alignment from DR_TARGET_ALIGNMENT.
2871         (vectorizable_store): Update call accordingly.   Interpret
2872         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
2873         TYPE_ALIGN_UNIT.
2874         (vectorizable_load): Likewise.
2876 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2877             Alan Hayward  <alan.hayward@arm.com>
2878             David Sherwood  <david.sherwood@arm.com>
2880         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
2881         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
2882         (vect_enhance_data_refs_alignment): Likewise.
2884 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
2886         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
2887         error.  Only quit immediately if parsing is complete.
2888         (BEGIN): Initialize fatal_err and parse_done.
2889         (begin fpu, end fpu): Check number of arguments.
2890         (begin arch, end arch): Likewise.
2891         (begin cpu, end cpu): Likewise.
2892         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
2893         (optalias): Likewise.
2895 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
2897         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
2898         * config/arm/arm-isa.h: Delete.  Move definitions to ...
2899         * arm-cpus.in: ... here.  Use new feature and fgroup values.
2900         * config/arm/arm.c (arm_option_override): Use lower case for feature
2901         bit names.
2902         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
2903         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
2904         * config/arm/parsecpu.awk (END): Add new command 'isa'.
2905         (isa_pfx): Delete.
2906         (print_isa_bits_for): New function.
2907         (gen_isa): New function.
2908         (gen_comm_data): Use print_isa_bits_for.
2909         (define feature): New keyword.
2910         (define fgroup): New keyword.
2911         * config/arm/t-arm (TM_H): Remove.
2912         (GTM_H): Add arm-isa.h.
2913         (arm-isa.h): Add rule to generate file.
2914         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
2915         case for feature bit names.
2917 2017-09-22  Richard Biener  <rguenther@suse.de>
2919         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
2920         single caller.
2921         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
2922         print of no dependency loops ...
2923         * graphite.c (graphite_transform_loops): ... here.
2924         (canonicalize_loop_closed_ssa_form): Work from inner to outer
2925         loops.
2926         (same_close_phi_node, remove_duplicate_close_phi,
2927         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
2928         (canonicalize_loop_closed_ssa): ... here and simplify.
2929         * graphite-optimize-isl.c: Include tree-vectorizer.h.
2930         (optimize_isl): Use dump_printf_loc to tell when we stopped
2931         optimizing because of an ISL timeout.
2933 2017-09-22  Richard Biener  <rguenther@suse.de>
2935         PR tree-optimization/82291
2936         * tree-if-conv.c (predicate_mem_writes): Make sure to
2937         remove writes in blocks predicated with false.
2939 2017-09-22  Richard Biener  <rguenther@suse.de>
2941         * sese.c: Include cfganal.h.
2942         (if_region_set_false_region): Remove.
2943         (create_if_region_on_edge): Likewise.
2944         (move_sese_in_condition): Re-implement without destroying
2945         dominators.
2947 2017-09-22  Richard Biener  <rguenther@suse.de>
2949         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
2950         Verify both BBs contain loop PHI nodes before dispatching to
2951         copy_loop_phi_args.
2952         (graphite_regenerate_ast_isl): Do not recompute dominators,
2953         do not verify three times.  Restructure for clarity.
2954         * graphite-scop-detection.c (same_close_phi_node,
2955         remove_duplicate_close_phi, make_close_phi_nodes_unique,
2956         defined_in_loop_p, canonicalize_loop_closed_ssa,
2957         canonicalize_loop_closed_ssa_form): Simplify, remove excess
2958         checking and SSA rewrite, move to ...
2959         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
2960         (graphite_initialize): Do not pass in ctx, do not reset the
2961         SCEV cache, compute only dominators.
2962         (graphite_transform_loops): Allocate ISL ctx after
2963         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
2964         Maintain post-dominators only around build_scops.
2965         * sese.c (if_region_set_false_region): Make static.  Free
2966         and recompute dominators.
2967         (move_sese_in_condition): Assert we don't get called with
2968         post-dominators computed.
2969         * sese.h (if_region_set_false_region): Remove.
2971 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
2973         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
2974         mode attribute for TARGET_AVX512VL.
2976 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
2978         * config/i386/i386.opt (mprefer-avx256): New option.
2979         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
2980         to flag_opts.
2981         (ix86_preferred_simd_mode): Return 256-bit AVX modes
2982         for TARGET_PREFER_AVX256.
2983         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
2985 2017-09-21  Jeff Law  <law@redhat.com>
2987         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
2988         Fix dump output if the only stack space is for pushed registers.
2990 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
2992         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
2993         of insn_cost.
2995 2017-09-21  Martin Sebor  <msebor@redhat.com>
2997         PR c/81882
2998         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
2999         code (in C++) or code that triggers warnings.
3001 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3003         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
3005 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
3007         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
3008         * sched-rgn.c: Ditto.
3009         * sel-sched-ir.c: Ditto.
3011 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
3013         * toplev.h (set_random_seed): Adjust return type.
3014         * toplev.c (init_local_tick): Move eager initialization of random_seed
3015         to get_random_seed.  Adjust comment.
3016         (init_random_seed): Inline to get_random_seed, delete.
3017         (get_random_seed): Initialize random_seed lazily.
3018         (set_random_seed): Do not return previous value.
3019         (print_switch_value): Do not call get_random_seed.
3021 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
3023         * cgraph.c (delete_function_version): New, broken out from...
3024         (cgraph_node::delete_function_version): ...here.  Rename to
3025         cgraph_node::delete_function_version_by_decl.  Update all uses.
3026         (cgraph_node::remove): Call delete_function_version.
3028 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
3030         PR sanitizer/81715
3031         * tree-inline.c (expand_call_inline): Emit clobber stmts for
3032         VAR_DECLs to which addressable non-volatile parameters are mapped
3033         and for id->retvar after the return value assignment.  Clear
3034         id->retval and id->retbnd after inlining.
3036 2017-09-21  Richard Biener  <rguenther@suse.de>
3038         PR tree-optimization/82276
3039         PR tree-optimization/82244
3040         * tree-vrp.c (build_assert_expr_for): Set
3041         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
3042         has it set.
3043         (remove_range_assertions): Revert earlier change.
3045 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
3047         PR target/71951
3048         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
3050 2017-09-21  Richard Biener  <rguenther@suse.de>
3052         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
3053         Restore valid IL after code generation errors.
3054         * graphite.c (graphite_transform_loops): Diagnose code
3055         generation issues as MSG_MISSED_OPTIMIZATION and continue
3056         with processing SCOPs.
3058 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3059             Alan Hayward  <alan.hayward@arm.com>
3060             David Sherwood  <david.sherwood@arm.com>
3062         * calls.c (compute_argument_addresses): Use simplify_gen_binary
3063         rather than choosing between plus_constant and gen_rtx_<CODE>.
3064         * expr.c (emit_push_insn): Likewise.
3065         (expand_expr_real_2): Likewise.
3067 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3068             Alan Hayward  <alan.hayward@arm.com>
3069             David Sherwood  <david.sherwood@arm.com>
3071         * loop-unroll.c (split_iv): Call copy_rtx on the step.
3073 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3074             Alan Hayward  <alan.hayward@arm.com>
3075             David Sherwood  <david.sherwood@arm.com>
3077         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
3078         calling tree_to_uhwi.
3080 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3081             Alan Hayward  <alan.hayward@arm.com>
3082             David Sherwood  <david.sherwood@arm.com>
3084         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
3085         INTEGER_CST rather than a negative test for ADDR_EXPR.
3087 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3088             Alan Hayward  <alan.hayward@arm.com>
3089             David Sherwood  <david.sherwood@arm.com>
3091         * tree-vrp.c (extract_range_from_binary_expr_1): Check
3092         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
3094 2017-09-21  Richard Biener  <rguenther@suse.de>
3096         PR tree-optimization/71351
3097         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
3098         graphite_create_new_loop_guard): Remove, fold remaining parts
3099         into caller ...
3100         (translate_isl_ast_node_for): ... here and simplify.
3102 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
3104         PR target/82260
3105         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
3106         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
3107         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
3108         alternative always use QI mode, for -Os imov (=R,R) alternative
3109         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
3110         ignore -Os.
3112 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3113             Jeff Law  <law@redhat.com>
3115         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
3116         (allocate_stack_space): New function, partially extracted from
3117         s390_emit_prologue.
3118         (s390_emit_prologue): Track offset to most recent stack probe.
3119         Code to allocate space moved into allocate_stack_space.
3120         Dump actions when no stack is allocated.
3121         (s390_prologue_plus_offset): New function.
3122         (s390_emit_stack_probe): Likewise.
3124 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
3126         * common.opt (Wa, Wl, Wp, g, gz=): Add
3127         RejectNegative.
3128         (gno-column-info): Remove.
3129         (gcolumn-info): Drop RejectNegative.
3130         (gno-): New prefix.
3131         (gno-record-gcc-switches): Remove.
3132         (grecord-gcc-switches): Drop RejectNegative.
3133         (gno-split-dwarf): Remove.
3134         (gsplit-dwarf): Drop RejectNegative.
3135         (gno-strict-dwarf): Remove.
3136         (gstrict-dwarf): Drop RejectNegative.
3137         * config/darwin.opt (gfull, gused): Add RejectNegative.
3138         * dwarf2out.c (gen_producer_string): Drop
3139         gno-record-gcc-switches handler.
3140         * optc-gen.awk: Add g to prefixes with negative forms.
3141         * opts-common.c (remapping_prefix_p): New.
3142         (find_opt): Check it.
3143         (generate_canonical_option): Test g prefix.
3144         (option_map): Add -gno- mapping.
3145         (add_misspelling_candidates): Check remapping_prefix_p.
3147 2017-09-20  Jeff Law  <law@redhat.com>
3149         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
3150         thinko in stack clash protection support.
3152         * explow.c (compute_stack_clash_protection_loop_data): Use
3153         CONST_INT_P instead of explicit test.  Verify object is a
3154         CONST_INT_P before looking at INTVAL.
3155         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
3156         instead of explicit test.
3158 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3160         PR target/77687
3161         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
3162         address instead of to r1 and r11.
3164 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
3166         * config.gcc: Support "knm".
3167         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
3168         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3169         PROCESSOR_KNM.
3170         * config/i386/i386.c (m_KNM): Define.
3171         (processor_target_table): Add "knm".
3172         (PTA_KNM): Define.
3173         (ix86_option_override_internal): Add "knm".
3174         (ix86_issue_rate): Add PROCESSOR_KNM.
3175         (ix86_adjust_cost): Ditto.
3176         (ia32_multipass_dfa_lookahead): Ditto.
3177         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
3178         (fold_builtin_cpu): Add M_INTEL_KNM.
3179         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
3180         (processor_type): Add PROCESSOR_KNM.
3181         * config/i386/x86-tune.def: Add m_KNM.
3182         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
3184 2017-09-20  Richard Biener  <rguenther@suse.de>
3186         PR tree-optimization/80213
3187         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
3188         are allowed in empty BBs as well.
3189         (canonicalize_loop_closed_ssa): Also look for other complex
3190         edges.
3191         (scop_detection::get_sese): Include the loop-closed PHI block
3192         in loop SESEs.
3193         (scop_detection::merge_sese): Remove code adding extra blocks.
3194         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
3195         (build_scops): Assert the final returned scop is invalid.
3197 2017-09-20  Richard Biener  <rguenther@suse.de>
3199         PR tree-optimization/82264
3200         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
3201         for GIMPLE_CONDs.
3202         (vn_phi_lookup): Likewise.
3203         (vn_phi_insert): Likewise.
3205 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
3207         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
3208         that fits into uhwi or shwi, add DW_AT_const_value regardless
3209         of early_dwarf without going through RTL, using add_AT_unsigned
3210         or add_AT_int.
3212         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
3213         (DEBUG_LTO_ABBREV_SECTION): Likewise.
3214         (DEBUG_LTO_MACINFO_SECTION): Likewise.
3215         (DEBUG_MACRO_SECTION): Likewise.
3216         (DEBUG_LTO_MACRO_SECTION): Likewise.
3217         (DEBUG_STR_DWO_SECTION): Likewise.
3218         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
3219         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
3220         (DEBUG_LTO_DWO_LINE_SECTION): Define.
3221         (DEBUG_LTO_LINE_STR_SECTION): Define.
3222         (init_sections_and_labels): Initialize debug_line_str_section
3223         variable.  Initialize debug_loc_section for -gdwarf-5 to
3224         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
3226 2017-09-20  Richard Biener  <rguenther@suse.de>
3228         * graphite-sese-to-poly.c (extract_affine): Properly handle
3229         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
3231 2017-09-20  Richard Biener  <rguenther@suse.de>
3233         PR tree-optimization/81373
3234         * graphite-scop-detection.c (build_cross_bb_scalars_def):
3235         Force SESE live-out defs to be handled even if they are
3236         scev_analyzable_p.
3238 2017-09-19  Jeff Law  <law@redhat.com>
3240         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
3241         nothing for stack adjustments with REG_STACK_CHECK.
3242         * sched-deps.c (parse_add_or_inc): Reject insns with
3243         REG_STACK_CHECK from dependency breaking.
3244         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
3245         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
3246         * reg-notes.def (STACK_CHECK): New note.
3248         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
3249         (ix86_expand_prologue): Dump stack clash info as needed.
3250         Call ix86_adjust_stack_and_probe_stack_clash as needed.
3252         * function.c (dump_stack_clash_frame_info): New function.
3253         * function.h (dump_stack_clash_frame_info): Prototype.
3254         (enum stack_clash_probes): New enum.
3256         * config/alpha/alpha.c (alpha_expand_prologue): Also check
3257         flag_stack_clash_protection.
3258         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
3259         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
3260         (arm_frame_pointer_required): Likewise.
3261         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
3262         (ia64_expand_prologue): Likewise.
3263         * config/mips/mips.c (mips_expand_prologue): Likewise.
3264         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
3265         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
3266         (sparc_flat_expand_prologue): Likewise.
3267         * config/spu/spu.c (spu_expand_prologue): Likewise.
3269         * explow.c: Include "params.h".
3270         (anti_adjust_stack_and_probe_stack_clash): New function.
3271         (get_stack_check_protect): Likewise.
3272         (compute_stack_clash_protection_loop_data): Likewise.
3273         (emit_stack_clash_protection_loop_start): Likewise.
3274         (emit_stack_clash_protection_loop_end): Likewise.
3275         (allocate_dynamic_stack_space): Use get_stack_check_protect.
3276         Use anti_adjust_stack_and_probe_stack_clash.
3277         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
3278         (emit_stack_clash_protection_loop_start): Likewise.
3279         (emit_stack_clash_protection_loop_end): Likewise.
3280         * rtl.h (get_stack_check_protect): Prototype.
3281         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
3282         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
3283         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
3284         Prototype.
3285         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
3286         Add @hook.
3287         * doc/tm.texi: Rebuilt.
3288         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
3289         get_stack_check_protect.
3290         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
3291         * config/arm/arm.c (arm_expand_prologue): Likewise.
3292         (arm_frame_pointer_required): Likewise.
3293         * config/i386/i386.c (ix86_expand_prologue): Likewise.
3294         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
3295         * config/mips/mips.c (mips_expand_prologue): Likewise.
3296         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
3297         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
3298         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
3299         (sparc_flat_expand_prologue): Likewise.
3301         * common.opt (-fstack-clash-protection): New option.
3302         * flag-types.h (enum stack_check_type): Note difference between
3303         -fstack-check= and -fstack-clash-protection.
3304         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
3305         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
3306         * toplev.c (process_options): Issue warnings/errors for cases
3307         not handled with -fstack-clash-protection.
3308         * doc/invoke.texi (-fstack-clash-protection): Document new option.
3309         (-fstack-check): Note additional problem with -fstack-check=generic.
3310         Note that -fstack-check is primarily for Ada and refer users
3311         to -fstack-clash-protection for stack-clash-protection.
3312         Document new params for stack clash protection.
3314 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
3316         * config/i386/i386.c (ix86_split_long_move): Do not handle
3317         address used for LEA in a special way.
3319 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
3321         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
3323 2017-09-19  Martin Sebor  <msebor@redhat.com>
3325         PR c/81854
3326         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
3327         of incompatible types.
3329 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
3331         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
3332         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
3333         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3334         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
3336 2017-09-19  Richard Biener  <rguenther@suse.de>
3338         PR tree-optimization/82244
3339         * tree-vrp.c (remove_range_assertions): Do not propagate
3340         a constant to abnormals but replace the assert with a copy.
3342 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
3344         PR rtl-optimization/57878
3345         PR rtl-optimization/68988
3346         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
3347         avoidance test involving non_reload_pseudos.  Move frequency test
3348         below the general fragmentation avoidance test.
3350 2017-09-19  Richard Biener  <rguenther@suse.de>
3352         PR tree-optimization/69728
3353         * graphite-sese-to-poly.c (schedule_error): New global.
3354         (add_loop_schedule): Handle empty domain by failing the
3355         schedule.
3356         (build_original_schedule): Handle schedule_error.
3358 2017-09-19  Richard Biener  <rguenther@suse.de>
3360         * graphite-scop-detection.c (scop_detection::can_represent_loop):
3361         Do not iterate to sibling loops but only to siblings of inner
3362         loops.
3364 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
3366         PR target/81613
3367         * config/m68k/m68k.md (moveq feeding equality comparison): Check
3368         that the registers are different.
3370 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
3372         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
3373         to processor_model and "amdfam17h" to arch_names_table.
3374         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
3376 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
3378         PR c/82234
3379         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
3381 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3382             Alan Hayward  <alan.hayward@arm.com>
3383             David Sherwood  <david.sherwood@arm.com>
3385         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
3386         with a vec_info *.
3387         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
3388         accordingly.
3389         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
3390         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
3391         vect_schedule_slp_instance.
3392         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
3393         Update call to vect_slp_analyze_node_operations.  Simplify return
3394         value.
3395         (vect_slp_analyze_bb_1): Update call accordingly.
3396         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
3397         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
3398         (vect_schedule_slp): Update call accordingly.
3400 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3401             Alan Hayward  <alan.hayward@arm.com>
3402             David Sherwood  <david.sherwood@arm.com>
3404         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
3405         with types that aren't in fact scalar.
3407 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3409         * tree-vect-slp.c (vect_record_max_nunits): New function,
3410         split out from...
3411         (vect_build_slp_tree_1): ...here.
3412         (vect_build_slp_tree_2): Call it for phis too.
3414 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3416         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
3417         to vect_get_vec_def_for_operand when getting the mask operand.
3419 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3420             Alan Hayward  <alan.hayward@arm.com>
3421             David Sherwood  <david.sherwood@arm.com>
3423         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
3424         bitstart.
3426 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3427             Alan Hayward  <alan.hayward@arm.com>
3428             David Sherwood  <david.sherwood@arm.com>
3430         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
3431         calculation for vector booleans.
3433 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3434             Alan Hayward  <alan.hayward@arm.com>
3435             David Sherwood  <david.sherwood@arm.com>
3437         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
3438         split out from...
3439         (vect_transform_stmt): ...here.
3440         (vect_analyze_stmt): Use it instead of calling
3441         vectorizable_live_operation directly.
3443 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
3445         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
3446         non-SIMT targets in acc vector loops.
3448 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
3450         * configure.ac: Add arc and check if assembler supports gdwarf2.
3451         * configure: Regenerate.
3453 2017-09-18  Richard Biener  <rguenther@suse.de>
3455         PR tree-optimization/82220
3456         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
3457         epilogue niters from the min_profitable_iters compute.
3459 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
3461         PR target/82145
3462         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
3463         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
3464         (ix86_init_pic_reg): Revert 2017-09-01 changes.
3466 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
3468         PR target/81361
3469         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
3470         switching to a new text section.
3472 2017-09-18  Richard Biener  <rguenther@suse.de>
3474         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
3475         Simplify.
3476         (build_alias_set): Reject aliases with no access function.
3478 2017-09-18  Richard Biener  <rguenther@suse.de>
3480         PR tree-optimization/79622
3481         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
3482         handle PHIs.
3483         (build_cross_bb_scalars_use): Likewise.
3485 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
3487         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
3489 2017-09-18  Alan Modra  <amodra@gmail.com>
3491         PR target/81996
3492         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
3493         stack_pointer_rtx for count 0.  Update comments.  Break up
3494         large rtl expression.
3496 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
3498         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
3499         Increase to 20 bytes.
3500         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
3501         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
3502         or avx version of the stub.
3504 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
3506         PR target/82166
3507         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
3508         compute the minimum stack alignment.  Also update preferred stack
3509         boundary for leaf functions.
3511 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
3513         PR tree-optimization/82228
3514         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
3515         of ncopies.
3517 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3519         * common/config/nds32/nds32-common.c
3520         (nds32_option_optimization_table): Refine formatting.
3521         (nds32_option_optimization_table): Use -fsched-pressure and
3522         -fomit-frame-pointer for specific optimization level.
3524 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3526         * config/nds32/nds32.c: Refine formatting and comments.
3527         * config/nds32/nds32.h: Likewise.
3528         * config/nds32/nds32.md: Likewise.
3529         * config/nds32/nds32-cost.c: Likewise.
3530         * config/nds32/nds32-isr.c: Likewise.
3531         * config/nds32/nds32-md-auxiliary.c: Likewise.
3532         * config/nds32/nds32-multiple.md: Likewise.
3533         * config/nds32/nds32-predicates.c: Likewise.
3535 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
3536             Jakub Jelinek  <jakub@redhat.com>
3538         Add support for -std=c++2a.
3539         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
3540         or -std=gnu+2a.
3541         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
3543 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
3545         PR target/82066
3546         * doc/extend.texi (Common Function Attributes): Add 
3547         references to ARM, AArch64, and S/390 specific attributes.
3548         (Function Specific Option Pragmas): Add AArch64 and S/390
3549         to list of back ends that support the target pragma.
3551 2017-09-15  Nathan Sidwell  <nathan@acm.org>
3553         * doc/standards.texi: Fix C++17 description.  Update URLs for
3554         C++11 & 14.
3556 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3558         * common.opt (Wcast-align=strict): New warning option.
3559         * doc/invoke.texi: Document -Wcast-align=strict. 
3561 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
3563         * cgraph.h (cgraph_thunk_info): Add comments.
3564         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
3565         assert for VIRTUAL_* arguments stricter.
3567 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
3569         PR tree-optimization/71026
3570         * match.pd: Move RDIV patterns from fold-const.c
3571         * fold-const.c (distribute_real_division): Removed.
3572         (fold_binary_loc): Remove calls to distribute_real_divison.
3574 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3576         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
3577         c++1z and gnu++1z as deprecated.  Change other references to
3578         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
3579         Change -Wc++1z-compat to -Wc++17-compat.
3580         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
3581         * dwarf2out.c (highest_c_language): Handle C++17.
3582         (gen_compile_unit_die): Likewise.
3584 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3586         PR rtl-optimization/82192
3587         * combine.c (make_extraction): Don't look through non-paradoxical
3588         SUBREGs or TRUNCATE if pos + len is or might be bigger than
3589         inner's mode.
3591 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3592             Alan Hayward  <alan.hayward@arm.com>
3593             David Sherwood  <david.sherwood@arm.com>
3595         * target.def (function_arg_offset): New hook.
3596         * targhooks.h (default_function_arg_offset): Declare.
3597         * targhooks.c (default_function_arg_offset): New function.
3598         * function.c (locate_and_pad_parm): Use
3599         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
3600         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
3601         (TARGET_FUNCTION_ARG_OFFSET): ...this.
3602         * doc/tm.texi: Regenerate.
3603         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
3604         * config/spu/spu.c (spu_function_arg_offset): New function.
3605         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
3606         * system.h (FUNCTION_ARG_OFFSET): Poison.
3608 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3609             Alan Hayard  <alan.hayward@arm.com>
3610             David Sherwood  <david.sherwood@arm.com>
3612         * target.def (truly_noop_truncation): New hook.
3613         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
3614         than TRULY_NOOP_TRUNCATION.
3615         * hooks.h (hook_bool_uint_uint_true): Declare.
3616         * hooks.c (hook_bool_uint_uint_true): New function.
3617         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
3618         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
3619         * doc/tm.texi: Regenerate.
3620         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
3621         rather than TRULY_NOOP_TRUNCATION in comments.
3622         (simplify_comparison): Likewise.
3623         (record_truncated_value): Likewise.
3624         * expmed.c (extract_bit_field_1): Likewise.
3625         (extract_split_bit_field): Likewise.
3626         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
3627         instead of TRULY_NOOP_TRUNCATION.
3628         * function.c (assign_parm_setup_block): Likewise.
3629         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
3630         * rtlhooks.c: Include target.h.
3631         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
3632         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
3633         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
3634         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
3635         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
3636         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
3637         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
3638         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
3639         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
3640         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
3641         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
3642         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
3643         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
3644         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
3645         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
3646         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
3647         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
3648         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
3649         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
3650         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
3651         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
3652         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
3653         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
3654         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
3655         * config/mips/mips.c (mips_truly_noop_truncation): New function.
3656         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
3657         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3658         rather than TRULY_NOOP_TRUNCATION in comments.
3659         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
3660         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
3661         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
3662         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
3663         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
3664         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
3665         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
3666         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
3667         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
3668         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
3669         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
3670         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3671         rather than TRULY_NOOP_TRUNCATION in comments.
3672         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
3673         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
3674         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
3675         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
3676         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
3677         TRULY_NOOP_TRUNCATION condition.
3678         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
3679         (TRULY_NOOP_TRUNCATION): Delete.
3680         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
3681         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
3682         * config/spu/spu.c (spu_truly_noop_truncation): New function.
3683         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
3684         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
3685         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
3686         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
3687         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
3688         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3689         rather than TRULY_NOOP_TRUNCATION in comments.
3690         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
3691         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
3692         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
3693         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
3694         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
3695         * system.h (TRULY_NOOP_TRUNCATION): Poison.
3697 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
3699         PR target/67591
3700         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
3701         (*cmp_ior): Likewise.
3702         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
3703         (*ior_scc_scc_cmp): Likewise.
3704         (*and_scc_scc): Likewise.
3705         (*and_scc_scc_cmp): Likewise.
3707 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3708             Alan Hayard  <alan.hayward@arm.com>
3709             David Sherwood  <david.sherwood@arm.com>
3711         * target.def (can_change_mode_class): New hook.
3712         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
3713         (hard_regno_nregs): Likewise.
3714         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
3715         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
3716         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
3717         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
3718         (LOAD_EXTEND_OP): Update accordingly.
3719         * doc/tm.texi: Regenerate.
3720         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
3721         CANNOT_CHANGE_MODE_CLASS.
3722         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
3723         (REG_CAN_CHANGE_MODE_P): ...this new macro.
3724         * combine.c (simplify_set): Update accordingly.
3725         * emit-rtl.c (validate_subreg): Likewise.
3726         * recog.c (general_operand): Likewise.
3727         * regcprop.c (mode_change_ok): Likewise.
3728         * reload1.c (choose_reload_regs): Likewise.
3729         (inherit_piecemeal_p): Likewise.
3730         * rtlanal.c (simplify_subreg_regno): Likewise.
3731         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
3732         instead of CANNOT_CHANGE_MODE_CLASS.
3733         (reload_cse_simplify_operands): Likewise.
3734         * reload.c (push_reload): Use targetm.can_change_mode_class
3735         instead of CANNOT_CHANGE_MODE_CLASS.
3736         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
3737         REG_CANNOT_CHANGE_MODE_P.
3738         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3739         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
3740         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3741         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3742         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3743         (arm_can_change_mode_class): New function.
3744         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
3745         than CANNOT_CHANGE_MODE_CLASS in comments.
3746         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3747         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
3748         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
3749         (ix86_can_change_mode_class): ...this new function, inverting the
3750         sense of the return value.
3751         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3752         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3753         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3754         (ia64_can_change_mode_class): New function.
3755         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3756         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
3757         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
3758         (m32c_can_change_mode_class): ...this new function, inverting the
3759         sense of the return value.
3760         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3761         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3762         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
3763         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
3764         (mips_can_change_mode_class): ...this new function, inverting the
3765         sense of the return value.
3766         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3767         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3768         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3769         (msp430_can_change_mode_class): New function.
3770         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3771         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
3772         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3773         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3774         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3775         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
3776         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3777         (pa_cannot_change_mode_class): Replace with...
3778         (pa_can_change_mode_class): ...this new function, inverting the
3779         sense of the return value.
3780         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
3781         than CANNOT_CHANGE_MODE_CLASS in comments.
3782         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3783         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
3784         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3785         (pdp11_cannot_change_mode_class): Replace with...
3786         (pdp11_can_change_mode_class): ...this new function, inverting the
3787         sense of the return value.
3788         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3789         * config/powerpcspe/powerpcspe-protos.h
3790         (rs6000_cannot_change_mode_class_ptr): Delete.
3791         * config/powerpcspe/powerpcspe.c
3792         (rs6000_cannot_change_mode_class_ptr): Delete.
3793         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3794         (rs6000_option_override_internal): Assign to
3795         targetm.can_change_mode_class instead of
3796         rs6000_cannot_change_mode_class_ptr.
3797         (rs6000_cannot_change_mode_class): Replace with...
3798         (rs6000_can_change_mode_class): ...this new function, inverting the
3799         sense of the return value.
3800         (rs6000_debug_cannot_change_mode_class): Replace with...
3801         (rs6000_debug_can_change_mode_class): ...this new function.
3802         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3803         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
3804         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3805         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3806         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
3807         Delete.
3808         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
3809         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3810         (rs6000_option_override_internal): Assign to
3811         targetm.can_change_mode_class instead of
3812         rs6000_cannot_change_mode_class_ptr.
3813         (rs6000_cannot_change_mode_class): Replace with...
3814         (rs6000_can_change_mode_class): ...this new function, inverting the
3815         sense of the return value.
3816         (rs6000_debug_cannot_change_mode_class): Replace with...
3817         (rs6000_debug_can_change_mode_class): ...this new function.
3818         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3819         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
3820         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
3821         (s390_can_change_mode_class): ...this new function, inverting the
3822         sense of the return value.
3823         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3824         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3825         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
3826         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3827         (sh_cannot_change_mode_class): Replace with...
3828         (sh_can_change_mode_class): ...this new function, inverting the
3829         sense of the return value.
3830         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3831         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3832         (sparc_can_change_mode_class): New function.
3833         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3834         * config/spu/spu.c (spu_can_change_mode_class): New function.
3835         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3836         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3837         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3838         (visium_can_change_mode_class): New function.
3839         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
3841 2017-09-15  Richard Biener  <rguenther@suse.de>
3843         PR tree-optimization/82217
3844         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
3845         but not undefined case.
3847 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3849         PR target/82145
3850         * postreload.c (reload_cse_simplify_operands): Skip
3851         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
3853 2017-09-15  Richard Biener  <rguenther@suse.de>
3855         PR tree-optimization/68823
3856         * graphite-scop-detection.c (build_alias_set): If we have a
3857         possible dependence check whether we can handle them by just
3858         looking at the DRs DR_ACCESS_FNs.
3859         (build_scops): If build_alias_set fails, fail the SCOP.
3861 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
3863         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
3864         to support float128 built-in functions that require the ISA 3.0
3865         hardware.
3866         (BU_FLOAT128_3_HW): Likewise.
3867         (SQRTF128): Add support for the IEEE 128-bit square root and fma
3868         built-in functions.
3869         (FMAF128): Likewise.
3870         (FMAQ): Likewise.
3871         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
3872         support for built-in functions that need the ISA 3.0 IEEE 128-bit
3873         floating point instructions.
3874         (rs6000_invalid_builtin): Likewise.
3875         (rs6000_builtin_mask_names): Likewise.
3876         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
3877         (RS6000_BTM_FLOAT128_HW): Likewise.
3878         (RS6000_BTM_COMMON): Likewise.
3879         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
3880         function.
3881         * doc/extend.texi (RS/6000 built-in functions): Document the
3882         IEEE 128-bit floating point square root and fused multiply-add
3883         built-in functions.
3885 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
3887         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
3888         reg (r2) isn't in the set of registers defined in the prologue.
3890 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3891             Alan Hayward  <alan.hayward@arm.com>
3892             David Sherwood  <david.sherwood@arm.com>
3894         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
3895         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
3896         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
3897         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
3898         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
3899         accordingly.
3900         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
3901         max_vectorization_factor.
3902         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
3904 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3905             Alan Hayward  <alan.hayward@arm.com>
3906             David Sherwood  <david.sherwood@arm.com>
3908         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
3909         (vect_worthwhile_without_simd_p): Declare.
3910         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
3911         (vectorizable_reduction): Use it.
3912         * tree-vect-stmts.c (vectorizable_shift): Likewise.
3913         (vectorizable_operation): Likewise.
3915 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3916             Alan Hayward  <alan.hayward@arm.com>
3917             David Sherwood  <david.sherwood@arm.com>
3919         * tree-vectorizer.h (vect_get_num_copies): New function.
3920         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
3921         * tree-vect-loop.c (vectorizable_reduction): Likewise.
3922         (vectorizable_induction): Likewise.
3923         (vectorizable_live_operation): Likewise.
3924         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
3925         (vectorizable_bswap): Likewise.
3926         (vectorizable_call): Likewise.
3927         (vectorizable_conversion): Likewise.
3928         (vectorizable_assignment): Likewise.
3929         (vectorizable_shift): Likewise.
3930         (vectorizable_operation): Likewise.
3931         (vectorizable_store): Likewise.
3932         (vectorizable_load): Likewise.
3933         (vectorizable_condition): Likewise.
3934         (vectorizable_comparison): Likewise.
3935         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
3937 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3938             Alan Hayward  <alan.hayward@arm.com>
3939             David Sherwood  <david.sherwood@arm.com>
3941         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
3942         of vect_init_vector.
3944 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3945             Alan Hayward  <alan.hayward@arm.com>
3946             David Sherwood  <david.sherwood@arm.com>
3948         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
3949         an inline wrapper that provides a location.
3950         (gimple_build_vector): Likewise.
3951         * gimple-fold.c (gimple_build_vector_from_val): New function.
3952         (gimple_build_vector): Likewise.
3953         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
3954         functions to build the initial value.  Always return a gimple value.
3955         (get_initial_defs_for_reduction): Likewise.  Only compute
3956         neutral_vec once.
3957         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
3958         vect_init_vector on the results from get_initial_def(s)_for_reduction.
3959         (vectorizable_induction): Use gimple_build_vector rather than
3960         vect_init_vector.
3962 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3963             Alan Hayward  <alan.hayward@arm.com>
3964             David Sherwood  <david.sherwood@arm.com>
3966         * target.h (vec_perm_indices): New typedef.
3967         (auto_vec_perm_indices): Likewise.
3968         * optabs-query.h: Include target.h
3969         (can_vec_perm_p): Take a vec_perm_indices *.
3970         * optabs-query.c (can_vec_perm_p): Likewise.
3971         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
3972         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
3973         * tree-vect-generic.c (lower_vec_perm): Likewise.
3974         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
3975         (vect_grouped_load_supported): Likewise.
3976         (vect_shift_permute_load_chain): Likewise.
3977         (vect_permute_store_chain): Use auto_vec_perm_indices.
3978         (vect_permute_load_chain): Likewise.
3979         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
3980         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
3981         Update uses of can_vec_perm_p.
3982         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
3983         mode with a number of elements.  Take a vec_perm_indices *.
3984         (vect_create_epilog_for_reduction): Update accordingly.
3985         Use auto_vec_perm_indices.
3986         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
3987         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
3988         (vect_transform_slp_perm_load): Likewise.
3989         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
3990         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
3991         (vect_gen_perm_mask_checked): Likewise.
3992         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
3993         (vect_gen_perm_mask_checked): Likewise.
3994         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
3995         (vectorizable_store): Likewise.
3996         (vectorizable_load): Likewise.
3997         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
3998         (vectorizable_bswap): Likewise.
4000 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4001             Alan Hayward  <alan.hayward@arm.com>
4002             David Sherwood  <david.sherwood@arm.com>
4004         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
4005         * tree.c (build_vector): Likewise.
4006         (build_vector_from_ctor): Update accordingly.
4007         (build_vector_from_val): Likewise.
4008         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4009         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
4010         * tree-vect-generic.c (add_rshift): Likewise.
4011         (expand_vector_divmod): Likewise.
4012         (optimize_vector_constructor): Likewise.
4013         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
4014         (vect_transform_slp_perm_load): Likewise.
4015         (vect_schedule_slp_instance): Likewise.
4016         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
4017         (vectorizable_call): Likewise.
4018         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
4019         * expmed.c (make_tree): Likewise.
4020         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
4021         a vector passed to build_vector.
4022         (fold_convert_const): Likewise.
4023         (exact_inverse): Likewise.
4024         (fold_ternary_loc): Likewise.
4025         (fold_relational_const): Likewise.
4026         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
4027         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
4028         (const_unop): Likewise.  Store the reduction accumulator in a
4029         variable rather than an array.
4030         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
4031         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
4032         the new vector, rather than constructing it after the input arrays.
4033         (native_interpret_vector): Use auto_vec<tree> when building
4034         a vector passed to build_vector.  Add elements in order.
4035         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
4036         auto_vec<tree> when building a vector passed to build_vector.
4037         (vect_create_epilog_for_reduction): Likewise.
4038         (vectorizable_induction): Likewise.
4039         (get_initial_def_for_reduction): Likewise.  Fix indentation of
4040         case statements.
4041         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
4042         to a vec<tree> *.
4043         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
4044         passed to build_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         * tree-core.h (tree_base::u): Add an "nelts" field.
4051         (tree_vector): Use VECTOR_CST_NELTS as the length.
4052         * tree.c (tree_size): Likewise.
4053         (make_vector): Initialize VECTOR_CST_NELTS.
4054         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
4055         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
4056         TYPE_VECTOR_SUBPARTS.
4057         * expr.c (const_vector_mask_from_tree): Consistently use "units"
4058         as the number of units, setting it from VECTOR_CST_NELTS.
4059         (const_vector_from_tree): Likewise.
4060         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
4061         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
4062         (fold_negate_expr_1): Likewise.
4063         (fold_convert_const): Likewise.
4064         (const_binop): Likewise.  Differentiate the number of output and
4065         input elements.
4066         (const_unop): Likewise.
4067         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
4068         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
4069         in cases that did the opposite.
4071 2017-09-14  Richard Biener  <rguenther@suse.de>
4073         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
4074         to VN_TOP.
4076 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
4078         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
4080 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
4082         PR target/81325
4083         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
4084         if and where to split a bb, except for splitting before debug insn
4085         sequences followed by non-label real insn.  Delete debug insns
4086         in between basic blocks.
4088         * combine.c (make_compound_operation_int): Formatting fixes.
4090         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
4091         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4092         * config/netbsd.h (LINK_EH_SPEC): Likewise.
4093         * config/sol2.h (LINK_EH_SPEC): Likewise.
4094         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4095         * config/s390/linux.h (LINK_SPEC): Likewise.
4096         * config/freebsd.h (LINK_EH_SPEC): Likewise.
4097         * config/openbsd.h (LINK_EH_SPEC): Likewise.
4098         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4099         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
4100         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
4101         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4102         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
4103         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
4105 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
4107         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
4108         support.
4109         (ENDFILE_LINUX_SPEC): Likewise.
4110         (LINK_EH_SPEC): Likewise.
4111         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
4112         (LINK_OS_LINUX_SPEC32): Likewise.
4113         (LINK_OS_LINUX_SPEC64): Likewise.
4114         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
4115         (LINK_OS_LINUX_SPEC): Likewise.
4117 2017-09-13  Martin Liska  <mliska@suse.cz>
4119         PR middle-end/82154
4120         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
4121         CASE_HIGH is NULL_TREE.
4123 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
4124             Alan Hayward  <alan.hayward@arm.com>
4125             David Sherwood  <david.sherwood@arm.com>
4127         * target.def (secondary_memory_needed): New hook.
4128         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
4129         instead of SECONDARY_MEMORY_NEEDED.
4130         (secondary_memory_needed_mode): Likewise.
4131         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
4132         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
4133         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
4134         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
4135         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
4136         * doc/tm.texi: Regenerate.
4137         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
4138         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
4139         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4140         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
4141         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
4142         * config/i386/i386.c (inline_secondary_memory_needed): Put the
4143         mode argument first and change the reg_class arguments to reg_class_t.
4144         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
4145         Make static.  Update the call to inline_secondary_memory_needed.
4146         (ix86_register_move_cost): Update the call to
4147         inline_secondary_memory_needed.
4148         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4149         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
4150         definition.
4151         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
4152         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4153         in comment.
4154         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
4155         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
4156         * config/mips/mips.c (mips_secondary_memory_needed): Make static
4157         and match hook interface.  Add comment from mips.h.
4158         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4159         * config/mmix/mmix.md (truncdfsf2): Refer to
4160         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4161         in comment.
4162         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
4163         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
4164         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4165         (pa_secondary_memory_needed): New function.
4166         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
4167         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
4168         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4169         (pdp11_secondary_memory_needed): Make static and match hook interface.
4170         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
4171         * config/powerpcspe/powerpcspe-protos.h
4172         (rs6000_secondary_memory_needed_ptr): Delete.
4173         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
4174         Delete.
4175         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4176         (rs6000_option_override_internal): Assign to
4177         targetm.secondary_memory_needed rather than
4178         rs6000_secondary_memory_needed_ptr.
4179         (rs6000_secondary_memory_needed): Match hook interface.
4180         (rs6000_debug_secondary_memory_needed): Likewise.
4181         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
4182         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
4183         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
4184         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4185         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
4186         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
4187         Delete.
4188         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
4189         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4190         (rs6000_option_override_internal): Assign to
4191         targetm.secondary_memory_needed rather than
4192         rs6000_secondary_memory_needed_ptr.
4193         (rs6000_secondary_memory_needed): Match hook interface.
4194         (rs6000_debug_secondary_memory_needed): Likewise.
4195         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
4196         * config/s390/s390.c (s390_secondary_memory_needed): New function.
4197         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4198         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
4199         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4200         (sparc_secondary_memory_needed): New function.
4201         * lra-constraints.c (check_and_process_move): Refer to
4202         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4203         in comment.
4204         (curr_insn_transform): Likewise.
4205         (process_alt_operands): Use targetm.secondary_memory_needed
4206         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4207         (check_secondary_memory_needed_p): Likewise.
4208         (choose_split_class): Likewise.
4209         * reload.c: Unconditionally include code that was previously
4210         conditional on SECONDARY_MEMORY_NEEDED.
4211         (push_secondary_reload): Use targetm.secondary_memory_needed
4212         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4213         (push_reload): Likewise.
4214         * reload1.c: Unconditionally include code that was previously
4215         conditional on SECONDARY_MEMORY_NEEDED.
4216         (choose_reload_regs): Use targetm.secondary_memory_needed
4217         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4218         (gen_reload): Likewise.
4219         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
4221 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
4222             Alan Hayward  <alan.hayward@arm.com>
4223             David Sherwood  <david.sherwood@arm.com>
4225         * target.def (secondary_memory_needed_mode): New hook:
4226         * targhooks.c (default_secondary_memory_needed_mode): Declare.
4227         * targhooks.h (default_secondary_memory_needed_mode): New function.
4228         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
4229         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
4230         * doc/tm.texi: Regenerate.
4231         * lra-constraints.c (check_and_process_move): Use
4232         targetm.secondary_memory_needed_mode instead of
4233         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
4234         (curr_insn_transform): Likewise.
4235         * reload.c (get_secondary_mem): Likewise.
4236         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4237         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
4238         function.
4239         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4240         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4241         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
4242         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4243         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
4244         Delete.
4245         * config/powerpcspe/powerpcspe-protos.h
4246         (rs6000_secondary_memory_needed_mode): Delete.
4247         * config/powerpcspe/powerpcspe.c
4248         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4249         (rs6000_secondary_memory_needed_mode): Make static.
4250         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4251         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
4252         Delete.
4253         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
4254         Redefine.
4255         (rs6000_secondary_memory_needed_mode): Make static.
4256         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4257         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
4258         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4259         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4260         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
4261         Redefine.
4262         (sparc_secondary_memory_needed_mode): New function.
4263         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
4265 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4267         * config/aarch64/constraints.md (Umq): New constraint.
4268         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
4269         Change to use Umq.
4270         (mov<mode>): Update condition.
4272 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4274         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
4275         when bitposition is the same.
4277 2017-09-13  Richard Biener  <rguenther@suse.de>
4279         * dwarf2out.c (output_die_symbol): Remove.
4280         (output_die): Do not output a DIEs symbol.
4282 2017-09-13  Richard Biener  <rguenther@suse.de>
4284         PR middle-end/82128
4285         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
4286         default-def to avoid breaking iterator update with the weird
4287         interaction with cgraph_update_edges_for_call_stmt_node.
4289 2017-09-13  Richard Biener  <rguenther@suse.de>
4291         * tree-cfg.c (verify_gimple_assign_binary): Add verification
4292         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
4293         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
4294         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
4296 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4298         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
4299         Disable pc relative literal load irrespective of
4300         TARGET_FIX_ERR_A53_84341 for default.
4302 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
4304         * config/sparc/sparc.c (output_return): Output the source location of
4305         the insn in the delay slot, if any.
4306         (output_sibcall): Likewise.
4308 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
4310         PR driver/81498
4311         * common.opt (-static-pie): New alias.
4312         (shared): Negate static-pie.
4313         (-no-pie): Update help text.
4314         (-pie): Likewise.
4315         (static-pie): New option.
4316         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
4317         -static-pie support.
4318         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
4319         (LINK_EH_SPEC): Likewise.
4320         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4321         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
4322         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
4323         * gcc.c (LINK_COMMAND_SPEC): Likewise.
4324         (init_gcc_specs): Likewise.
4325         (init_spec): Likewise.
4326         (display_help): Update help message for -pie.
4327         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
4328         -static-pie.
4330 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
4332         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
4333         (movdi_aarch64): Likewise.
4334         (movti_aarch64): Likewise.
4336 2017-09-12 Simon Wright <simon@pushface.org>
4338         PR target/80204
4339         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
4340         calculation of the minor version, always output as 0.
4342 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
4344         PR target/82112
4345         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
4346         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
4347         on it early, rather than manual conversion late.  For
4348         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
4349         instead of performing manual conversion.
4351 2017-09-12  Carl Love  <cel@us.ibm.com>
4353         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
4354         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
4355         vmulouw, vmulosw.
4356         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
4357         VMULOSW): Add definitions.
4358         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4359         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
4360         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
4361         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
4362         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
4364 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
4366         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
4367         types correctly.
4368         (movti_aarch64): Likewise.
4369         (movdf_aarch64): Likewise.
4370         (movtf_aarch64): Likewise.
4371         (load_pairdi): Likewise.
4372         (store_pairdi): Likewise.
4373         (load_pairdf): Likewise.
4374         (store_pairdf): Likewise.
4375         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
4376         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
4377         (ldr_got_small_<mode>): Likewise.
4378         (ldr_got_small_28k_<mode>): Likewise.
4379         (ldr_got_tiny): Likewise.
4380         * config/aarch64/iterators.md (ldst_sz): New.
4381         (ldpstp_sz): Likewise.
4382         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
4383         to store_16.
4384         (thunderx_load): Split load_8 to load_16.
4385         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
4386         load_8 to load_16.
4387         (thunderx2t99_storepair_basic): Split store_8 to store_16.
4388         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
4389         (xgene1_store_pair): Split store_8 to store_16.
4390         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
4391         (falkor_st_0_st_sd): Split store_8 to store_16.
4393 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
4395         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
4396         and store1/2/3/4 to store_4/8/12/16.
4397         * config/aarch64/aarch64.md: Update for rename.
4398         * config/arm/arm.md: Likewise.: Likewise.
4399         * config/arm/arm.c: Likewise.
4400         * config/arm/thumb1.md: Likewise.
4401         * config/arm/thumb2.md: Likewise.
4402         * config/arm/vfp.md: Likewise.
4403         * config/arm/arm-generic.md: Likewise.
4404         * config/arm/arm1020e.md: Likewise.
4405         * config/arm/arm1026ejs.md: Likewise.
4406         * config/arm/arm1136jfs.md: Likewise.
4407         * config/arm/arm926ejs.md: Likewise.
4408         * config/arm/cortex-a15.md: Likewise.
4409         * config/arm/cortex-a17.md: Likewise.
4410         * config/arm/cortex-a5.md: Likewise.
4411         * config/arm/cortex-a53.md: Likewise.
4412         * config/arm/cortex-a57.md: Likewise.
4413         * config/arm/cortex-a7.md: Likewise.
4414         * config/arm/cortex-a8.md: Likewise.
4415         * config/arm/cortex-a9.md: Likewise.
4416         * config/arm/cortex-m4.md: Likewise.
4417         * config/arm/cortex-m7.md: Likewise.
4418         * config/arm/cortex-r4.md: Likewise.
4419         * config/arm/exynos-m1.md: Likewise.
4420         * config/arm/fa526.md: Likewise.
4421         * config/arm/fa606te.md: Likewise.
4422         * config/arm/fa626te.md: Likewise.
4423         * config/arm/fa726te.md: Likewise.
4424         * config/arm/fmp626.md: Likewise.
4425         * config/arm/iwmmxt.md: Likewise.
4426         * config/arm/ldmstm.md: Likewise.
4427         * config/arm/marvell-pj4.md: Likewise.
4428         * config/arm/xgene1.md: Likewise.
4429         * config/aarch64/thunderx.md: Likewise.
4430         * config/aarch64/thunderx2t99.md: Likewise.
4431         * config/aarch64/falkor.md: Likewise.
4433 2017-09-12  Martin Liska  <mliska@suse.cz>
4435         * attribs.c (private_lookup_attribute): New function.
4436         * attribs.h (private_lookup_attribute): Declared here.
4437         (lookup_attribute): Called from this place.
4439 2017-09-12  Richard Biener  <rguenther@suse.de>
4441         PR tree-optimization/82157
4442         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
4443         stmts with side-effects.
4445 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4446             Alan Hayward  <alan.hayward@arm.com>
4447             David Sherwood <david.sherwood@arm.com>
4449         * target.def (hard_regno_nregs): New hook.
4450         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
4451         * targhooks.h (default_hard_regno_nregs): Declare.
4452         * targhooks.c (default_hard_regno_nregs): New function.
4453         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
4454         (TARGET_HARD_REGNO_NREGS): ...this hook.
4455         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
4456         (CLASS_MAX_NREGS): Likewise.
4457         * doc/tm.texi: Regenerate.
4458         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
4459         instead of HARD_REGNO_NREGS.
4460         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
4461         HARD_REGNO_NREGS in the comment.
4462         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
4463         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
4464         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
4465         Return an unsigned int.
4466         (TARGET_HARD_REGNO_NREGS): Redefine.
4467         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
4468         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
4469         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
4470         (arc_hard_regno_nregs): New function.
4471         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
4472         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
4473         (arm_hard_regno_nregs): New function.
4474         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
4475         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
4476         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
4477         (TARGET_HARD_REGNO_NREGS): Redefine.
4478         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
4479         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
4480         (HARD_REGNO_NREGS): Delete.
4481         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
4482         (cr16_hard_regno_nregs): New function.
4483         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
4484         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
4485         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
4486         (cris_hard_regno_nregs): New function.
4487         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
4488         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
4489         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
4490         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
4491         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
4492         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
4493         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
4494         (frv_hard_regno_nregs): Make static.  Take and return an
4495         unsigned int.
4496         (frv_class_max_nregs): Remove outdated copy of documentation.
4497         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
4498         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
4499         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
4500         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
4501         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
4502         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
4503         (TARGET_HARD_REGNO_NREGS): Redefine.
4504         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
4505         (CLASS_MAX_NREGS): Update comment.
4506         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
4507         (ia64_hard_regno_nregs): New function.
4508         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
4509         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
4510         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
4511         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
4512         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
4513         an unsigned int.
4514         (m32c_hard_regno_nregs): Likewise.  Make static.
4515         (TARGET_HARD_REGNO_NREGS): Redefine.
4516         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
4517         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
4518         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
4519         (m68k_hard_regno_nregs): New function.
4520         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
4521         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
4522         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
4523         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
4524         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
4525         Take and return an unsigned int.
4526         (TARGET_HARD_REGNO_NREGS): Redefine.
4527         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
4528         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
4529         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
4530         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
4531         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
4532         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
4533         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
4534         (msp430_hard_regno_nregs): Make static.  Take and return an
4535         unsigned int.
4536         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
4537         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
4538         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
4539         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
4540         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
4541         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
4542         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
4543         (TARGET_HARD_REGNO_NREGS): Redefine.
4544         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
4545         (PA_HARD_REGNO_NREGS): ...this.
4546         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
4547         (PA_HARD_REGNO_NREGS): ...this.
4548         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
4549         (pa_hard_regno_nregs): New function.
4550         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
4551         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
4552         (pdp11_hard_regno_nregs): New function.
4553         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
4554         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
4555         (rs6000_hard_regno_nregs_hook): New function.
4556         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
4557         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
4558         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
4559         Take and return an unsigned int.  Move earlier in file.
4560         (TARGET_HARD_REGNO_NREGS): Redefine.
4561         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
4562         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
4563         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
4564         (rl78_hard_regno_nregs): Make static.  Take and return an
4565         unsigned int.
4566         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
4567         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
4568         (rs6000_hard_regno_nregs_hook): New function.
4569         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
4570         * config/rx/rx.c (rx_hard_regno_nregs): New function.
4571         (TARGET_HARD_REGNO_NREGS): Redefine.
4572         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
4573         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
4574         instead of HARD_REGNO_NREGS.
4575         (s390_hard_regno_nregs): New function.
4576         (s390_hard_regno_mode_ok): Add comment from s390.h.
4577         (TARGET_HARD_REGNO_NREGS): Redefine.
4578         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
4579         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
4580         (sh_hard_regno_nregs): New function.
4581         (sh_pass_in_reg_p): Use it.
4582         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
4583         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
4584         (sparc_hard_regno_nregs): New function.
4585         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
4586         * config/spu/spu.c (spu_hard_regno_nregs): New function.
4587         (spu_function_arg_advance): Use it, supplying a valid register number.
4588         (TARGET_HARD_REGNO_NREGS): Redefine.
4589         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
4590         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
4591         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
4592         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
4593         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
4594         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
4595         (CLASS_MAX_NREGS): Remove copy of old documentation.
4596         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
4597         (visium_hard_regno_nregs): New function.
4598         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
4599         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
4600         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
4601         xtensa_hard_regno_nregs): New function.
4602         * system.h (HARD_REGNO_NREGS): Poison.
4604 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4606         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
4607         hard_regno_nregs instead of HARD_REGNO_NREGS.
4608         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
4609         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
4610         (c6x_expand_epilogue): Likewise.
4611         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
4612         (frv_read_iacc_argument): Likewise.
4613         * config/sh/sh.c: Include regs.h.
4614         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
4615         (regs_used): Likewise.
4616         (output_stack_adjust): Likewise.
4617         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
4618         * expmed.c: Include regs.h.
4619         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
4620         * ree.c: Include regs.h.
4621         (combine_reaching_defs): Use hard_regno_nregs instead of
4622         HARD_REGNO_NREGS.
4623         (add_removable_extension): Likewise.
4625 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4627         * regs.h (hard_regno_nregs): Turn into a function.
4628         (end_hard_regno): Update accordingly.
4629         * caller-save.c (setup_save_areas): Likewise.
4630         (save_call_clobbered_regs): Likewise.
4631         (replace_reg_with_saved_mem): Likewise.
4632         (insert_restore): Likewise.
4633         (insert_save): Likewise.
4634         * combine.c (can_change_dest_mode): Likewise.
4635         (move_deaths): Likewise.
4636         (distribute_notes): Likewise.
4637         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
4638         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
4639         (rs6000_split_multireg_move): Likewise.
4640         (rs6000_register_move_cost): Likewise.
4641         (rs6000_memory_move_cost): Likewise.
4642         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
4643         (rs6000_split_multireg_move): Likewise.
4644         (rs6000_register_move_cost): Likewise.
4645         (rs6000_memory_move_cost): Likewise.
4646         * cselib.c (cselib_reset_table): Likewise.
4647         (cselib_lookup_1): Likewise.
4648         * emit-rtl.c (set_mode_and_regno): Likewise.
4649         * function.c (aggregate_value_p): Likewise.
4650         * ira-color.c (setup_profitable_hard_regs): Likewise.
4651         (check_hard_reg_p): Likewise.
4652         (calculate_saved_nregs): Likewise.
4653         (assign_hard_reg): Likewise.
4654         (improve_allocation): Likewise.
4655         (calculate_spill_cost): Likewise.
4656         * ira-emit.c (modify_move_list): Likewise.
4657         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
4658         (ira_hard_reg_in_set_p): Likewise.
4659         * ira.c (setup_reg_mode_hard_regset): Likewise.
4660         (clarify_prohibited_class_mode_regs): Likewise.
4661         (check_allocation): Likewise.
4662         * lra-assigns.c (find_hard_regno_for_1): Likewise.
4663         (lra_setup_reg_renumber): Likewise.
4664         (setup_try_hard_regno_pseudos): Likewise.
4665         (spill_for): Likewise.
4666         (assign_hard_regno): Likewise.
4667         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
4668         * lra-constraints.c (in_class_p): Likewise.
4669         (lra_constraint_offset): Likewise.
4670         (simplify_operand_subreg): Likewise.
4671         (lra_constraints): Likewise.
4672         (split_reg): Likewise.
4673         (split_if_necessary): Likewise.
4674         (invariant_p): Likewise.
4675         (inherit_in_ebb): Likewise.
4676         * lra-lives.c (process_bb_lives): Likewise.
4677         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
4678         (get_hard_regs): Likewise.
4679         (do_remat): Likewise.
4680         * lra-spills.c (assign_spill_hard_regs): Likewise.
4681         * mode-switching.c (create_pre_exit): Likewise.
4682         * postreload.c (reload_combine_recognize_pattern): Likewise.
4683         * recog.c (peep2_find_free_register): Likewise.
4684         * regcprop.c (kill_value_regno): Likewise.
4685         (set_value_regno): Likewise.
4686         (copy_value): Likewise.
4687         (maybe_mode_change): Likewise.
4688         (find_oldest_value_reg): Likewise.
4689         (copyprop_hardreg_forward_1): Likewise.
4690         * regrename.c (check_new_reg_p): Likewise.
4691         (regrename_do_replace): Likewise.
4692         * reload.c (push_reload): Likewise.
4693         (combine_reloads): Likewise.
4694         (find_dummy_reload): Likewise.
4695         (operands_match_p): Likewise.
4696         (find_reloads): Likewise.
4697         (find_equiv_reg): Likewise.
4698         (reload_adjust_reg_for_mode): Likewise.
4699         * reload1.c (count_pseudo): Likewise.
4700         (count_spilled_pseudo): Likewise.
4701         (find_reg): Likewise.
4702         (clear_reload_reg_in_use): Likewise.
4703         (free_for_value_p): Likewise.
4704         (allocate_reload_reg): Likewise.
4705         (choose_reload_regs): Likewise.
4706         (reload_adjust_reg_for_temp): Likewise.
4707         (emit_reload_insns): Likewise.
4708         (delete_output_reload): Likewise.
4709         * rtlanal.c (subreg_get_info): Likewise.
4710         * sched-deps.c (sched_analyze_reg): Likewise.
4711         * sel-sched.c (init_regs_for_mode): Likewise.
4712         (mark_unavailable_hard_regs): Likewise.
4713         (choose_best_reg_1): Likewise.
4714         (verify_target_availability): Likewise.
4715         * valtrack.c (dead_debug_insert_temp): Likewise.
4716         * var-tracking.c (track_loc_p): Likewise.
4717         (emit_note_insn_var_location): Likewise.
4718         * varasm.c (make_decl_rtl): Likewise.
4719         * reginfo.c (choose_hard_reg_mode): Likewise.
4720         (init_reg_modes_target): Refer directly to
4721         this_target_regs->x_hard_regno_nregs.
4723 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4725         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
4726         instead of hard_regno_nregs.
4728 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4730         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
4731         end_hard_regno instead of hard_regno_nregs.
4732         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
4733         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
4734         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
4735         * ira-color.c (improve_allocation): Likewise.
4736         * lra-assigns.c (find_hard_regno_for_1): Likewise.
4737         * lra-lives.c (mark_regno_live): Likewise.
4738         (mark_regno_dead): Likewise.
4739         * lra-remat.c (operand_to_remat): Likewise.
4740         * lra.c (collect_non_operand_hard_regs): Likewise.
4741         * postreload.c (reload_combine_note_store): Likewise.
4742         (move2add_valid_value_p): Likewise.
4743         * reload.c (regno_clobbered_p): Likewise.
4745 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4747         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
4748         hard_regno_nregs.
4749         * config/v850/v850.c (v850_reorg): Likewise.
4750         * reload.c (refers_to_regno_for_reload_p): Likewise.
4751         (find_equiv_reg): Likewise.
4752         * reload1.c (reload_reg_reaches_end_p): Likewise.
4754 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4756         * caller-save.c (add_used_regs): Use REG_NREGS instead of
4757         hard_regno_nregs.
4758         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
4759         * config/arm/arm.c (output_move_neon): Likewise.
4760         (arm_attr_length_move_neon): Likewise.
4761         (neon_split_vcombine): Likewise.
4762         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
4763         (c6x_mark_reg_written): Likewise.
4764         (c6x_dwarf_register_span): Likewise.
4765         * config/i386/i386.c (ix86_save_reg): Likewise.
4766         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
4767         (rws_access_reg): Likewise.
4768         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
4769         * mode-switching.c (create_pre_exit): Likewise.
4770         * ree.c (combine_reaching_defs): Likewise.
4771         (add_removable_extension): Likewise.
4772         * regcprop.c (find_oldest_value_reg): Likewise.
4773         (copyprop_hardreg_forward_1): Likewise.
4774         * reload.c (reload_inner_reg_of_subreg): Likewise.
4775         (push_reload): Likewise.
4776         (combine_reloads): Likewise.
4777         (find_dummy_reload): Likewise.
4778         (reload_adjust_reg_for_mode): Likewise.
4779         * reload1.c (find_reload_regs): Likewise.
4780         (forget_old_reloads_1): Likewise.
4781         (reload_reg_free_for_value_p): Likewise.
4782         (reload_adjust_reg_for_temp): Likewise.
4783         (emit_reload_insns): Likewise.
4784         (delete_output_reload): Likewise.
4785         * sel-sched.c (choose_best_reg_1): Likewise.
4786         (choose_best_pseudo_reg): Likewise.
4788 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4789             Alan Hayward  <alan.hayward@arm.com>
4790             David Sherwood <david.sherwood@arm.com>
4792         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
4793         * target.def (slow_unaligned_access): New hook.
4794         * targhooks.h (default_slow_unaligned_access): Declare.
4795         * targhooks.c (default_slow_unaligned_access): New function.
4796         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
4797         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
4798         * doc/tm.texi: Regenerate.
4799         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
4800         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
4801         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
4802         definition.
4803         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
4804         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
4805         Redefine.
4806         (rs6000_slow_unaligned_access): New function.
4807         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
4808         (expand_block_compare): Likewise.
4809         (expand_strn_compare): Likewise.
4810         (rs6000_rtx_costs): Likewise.
4811         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
4812         (riscv_slow_unaligned_access): Likewise.
4813         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
4814         (riscv_slow_unaligned_access_p): ...this and make static.
4815         (riscv_option_override): Update accordingly.
4816         (riscv_slow_unaligned_access): New function.
4817         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
4818         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
4819         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
4820         (rs6000_slow_unaligned_access): New function.
4821         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
4822         (rs6000_rtx_costs): Likewise.
4823         * config/rs6000/rs6000-string.c (expand_block_compare)
4824         (expand_strn_compare): Use targetm.slow_unaligned_access instead
4825         of SLOW_UNALIGNED_ACCESS.
4826         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
4827         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
4828         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
4829         of SLOW_UNALIGNED_ACCESS.
4830         * expmed.c (simple_mem_bitfield_p): Likewise.
4831         * expr.c (alignment_for_piecewise_move): Likewise.
4832         (emit_group_load_1): Likewise.
4833         (emit_group_store): Likewise.
4834         (copy_blkmode_from_reg): Likewise.
4835         (emit_push_insn): Likewise.
4836         (expand_assignment): Likewise.
4837         (store_field): Likewise.
4838         (expand_expr_real_1): Likewise.
4839         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4840         * lra-constraints.c (simplify_operand_subreg): Likewise.
4841         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
4842         * gimple-ssa-store-merging.c: Likewise in block comment at start
4843         of file.
4844         * tree-ssa-strlen.c: Include target.h.
4845         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
4846         of SLOW_UNALIGNED_ACCESS.
4847         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
4849 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4851         PR rtl-optimization/82185
4852         * expmed.c (emit_store_flag_int): Only test tem if it has been
4853         initialized.
4855 2017-09-12  Richard Biener  <rguenther@suse.de>
4857         PR middle-end/82149
4858         * match.pd ((FTYPE) N CMP CST): Fix typo.
4860 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
4862         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
4863         attribute.
4864         (mips_near_type_p): Add 'short_call' attribute as a synonym
4865         for 'near'.
4866         * doc/extend.texi (short_call): Document new function attribute.
4868 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
4870         PR target/82112
4871         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
4872         assertion check that in the condition.
4873         (get_atomic_generic_size): Likewise.  Before testing if parameter
4874         has pointer type, if it has array type, call for C++
4875         default_conversion to perform array-to-pointer conversion.
4877 2017-09-12  Richard Biener  <rguenther@suse.de>
4879         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
4880         for operations we cannot scalarize.
4882 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
4884         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
4885         vectors heap vectors.  Clean up comments.
4886         Make visited_bbs a reference.
4887         (profitable_jump_thread_path): Make GC
4888         vectors heap vectors.  Clean up comments.
4889         Misc cleanups.
4890         (convert_and_register_jump_thread_path): Make GC vectors heap
4891         vectors.
4892         (check_subpath_and_update_thread_path): Same.  Clean up comments.
4893         Make visited_bbs a reference.
4894         (handle_phi): Abstract common code to to
4895         register_jump_thread_path_if_profitable.
4896         Rename VAR_BB to DEF_BB.
4897         Update comments.
4898         Make GC vectors heap vectors.
4899         Make visited_bbs a reference.
4900         (handle_assignment): Same.
4901         (register_jump_thread_path_if_profitable): New.
4902         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
4903         DEF_BB.
4904         Make GC vectors heap vectors.  Clean up comments.
4905         Make visited_bbs a reference.
4906         (find_jump_threads_backwards): Make visited_bbs live in the stack.
4907         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
4908         comment.
4910 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
4912         PR target/82181
4913         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
4914         words of E_DImode object are reachable by xtensa_uimm8x4 access.
4916 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
4918         Revert r251800 and r251799.
4920 2017-09-11  Martin Jambor  <mjambor@suse.cz>
4922         PR hsa/82119
4923         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
4924         arguments in advance.
4925         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
4926         use it to find predecessor edges.
4927         (naive_outof_ssa): Collect vector of predecessors.
4929 2017-09-08  Jason Merrill  <jason@redhat.com>
4931         PR c++/70029 - ICE with ref-qualifier and -flto
4932         * langhooks.h (struct lang_hooks_for_types): Add
4933         copy_lang_qualifiers.
4934         * attribs.c (build_type_attribute_qual_variant): Use it.
4935         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
4936         NULL.
4937         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
4938         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
4940 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
4942         PR target/81988
4943         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
4944         (*mulsi3_sp64): New instruction.
4945         (mulsi3): New expander.
4947 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
4949         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
4951 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4953         * sancov.c: Include memmodel.h.
4955 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
4957         PR target/80897
4958         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
4959         large offsets.
4961 2017-09-07  Carl Love  <cel@us.ibm.com>
4963         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
4964         the sldi instruction.
4966 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
4968         * sancov.c: Include tm_p.h.
4970 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
4972         PR target/81979
4973         * output.h (switch_to_other_text_partition): New declaration.
4974         * varasm.c (switch_to_other_text_partition): New function.
4975         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
4976         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
4977         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
4978         to the other text partition before emitting LCL label and switch back
4979         after emitting the word after it.
4981 2017-09-07  Richard Biener  <rguenther@suse.de>
4983         * passes.def (pass_split_crit_edges): Remove instance before PRE.
4984         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
4985         critical edges here, after loop init.
4986         (pass_data_pre): Remove PROP_no_crit_edges flags.
4987         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
4988         for valueization of call args to avoid leaking VN_TOP.
4989         (visit_use): Assert we do not visit default defs.
4990         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
4991         Use error_mark_node to more easily detect leaking VN_TOP.
4992         All default-defs are varying, not VN_TOP.  Mark them visited.
4993         (run_scc_vn): Make code match comment.
4995 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
4997         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
4998         OPTION_MASK_FLOAT128_KEYWORD.
4999         (POWERPC_MASKS): Likewise.
5000         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
5001         support for the -mfloat128-type option, and make -mfloat128
5002         default on PowerPC Linux systems.  Define or undefine
5003         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
5004         Define __float128 to be __ieee128 if IEEE 128-bit support is
5005         enabled, or undefine it.
5006         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
5007         Delete defining __FLOAT128_TYPE__.
5008         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
5009         -mfloat128-type option and make -mfloat128 default on PowerPC
5010         Linux systems.
5011         (TARGET_FLOAT128_TYPE): Likewise.
5012         (-mfloat128-type): Likewise.
5013         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5014         Delete the -mfloat128-type option and make -mfloat128 default on
5015         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
5016         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
5017         128-bit floating point is enabled.  Change tests from using
5018         -mfloat128-type to -mfloat128.
5019         (rs6000_mangle_type): Use the correct mangling for the __float128
5020         type even if normal long double is restricted to 64-bits.
5021         (floatn_mode): Enable the _Float128 type by default on VSX Linux
5022         systems.
5023         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
5024         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
5025         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
5026         -mfloat128-type.
5027         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
5028         documentation for -mfloat128.
5030 2017-09-06  Olivier Hainque  <hainque@adacore.com>
5032         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
5034 2017-09-06  Wish Wu  <wishwu007@gmail.com>
5035             Jakub Jelinek  <jakub@redhat.com>
5037         * asan.c (initialize_sanitizer_builtins): Add
5038         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
5039         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
5040         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
5041         BT_FN_VOID_UINT64_PTR variables.
5042         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
5043         (BT_FN_VOID_UINT16_UINT16): Likewise.
5044         (BT_FN_VOID_UINT32_UINT32): Likewise.
5045         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
5046         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
5047         (BT_FN_VOID_UINT64_PTR): Likewise.
5048         * common.opt (flag_sanitize_coverage): New variable.
5049         (fsanitize-coverage=trace-pc): Remove.
5050         (fsanitize-coverage=): Add.
5051         * flag-types.h (enum sanitize_coverage_code): New enum.
5052         * fold-const.c (fold_range_test): Disable non-short-circuit
5053         optimization if flag_sanitize_coverage.
5054         (fold_truth_andor): Likewise.
5055         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
5056         * opts.c (COVERAGE_SANITIZER_OPT): Define.
5057         (coverage_sanitizer_opts): New array.
5058         (get_closest_sanitizer_option): Add OPTS argument, handle also
5059         OPT_fsanitize_coverage_.
5060         (parse_sanitizer_options): Adjusted to also handle
5061         OPT_fsanitize_coverage_.
5062         (common_handle_option): Add OPT_fsanitize_coverage_.
5063         * sancov.c (instrument_comparison, instrument_switch): New function.
5064         (sancov_pass): Add trace-cmp support.
5065         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
5066         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
5067         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
5068         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
5069         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
5070         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
5071         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
5072         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
5073         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
5074         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
5076 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
5078         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
5079         error.  Only quit immediately if parsing is complete.
5080         (BEGIN): Initialize fatal_err and parse_done.
5081         (begin fpu, end fpu): Check number of arguments.
5082         (begin arch, end arch): Likewise.
5083         (begin cpu, end cpu): Likewise.
5084         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
5085         (optalias): Likewise.
5087 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
5089         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
5090         * config/arm/arm-isa.h: Delete.  Move definitions to ...
5091         * arm-cpus.in: ... here.  Use new feature and fgroup values.
5092         * config/arm/arm.c (arm_option_override): Use lower case for feature
5093         bit names.
5094         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
5095         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
5096         * config/arm/parsecpu.awk (END): Add new command 'isa'.
5097         (isa_pfx): Delete.
5098         (print_isa_bits_for): New function.
5099         (gen_isa): New function.
5100         (gen_comm_data): Use print_isa_bits_for.
5101         (define feature): New keyword.
5102         (define fgroup): New keyword.
5103         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
5104         (arm-isa.h): Add rule to generate file.
5105         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
5106         case for feature bit names.
5108 2017-09-06  Richard Biener  <rguenther@suse.de>
5110         * tree-ssa-pre.c (NECESSARY): Remove.
5111         (create_expression_by_pieces): Do not touch pass-local flags.
5112         (insert_into_preds_of_block): Likewise.
5113         (do_pre_regular_insertion): Likewise.
5114         (eliminate_insert): Likewise.
5115         (eliminate_dom_walker::before_dom_children): Likewise.
5116         (fini_eliminate): Do not look at inserted_exprs.
5117         (mark_operand_necessary): Remove.
5118         (remove_dead_inserted_code): Replace with simple work-list
5119         algorithm based on inserted_exprs and SSA uses.
5120         (pass_pre::execute): Re-order fini_eliminate and
5121         remove_dead_inserted_code.
5123 2017-09-06  Olivier Hainque  <hainque@adacore.com>
5125         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
5126         for VxWorks 7.  Adjust surrounding comments.
5128 2017-09-06  Richard Biener  <rguenther@suse.de>
5130         * gimple-ssa-strength-reduction.c
5131         (find_candidates_dom_walker::before_dom_children): Also allow
5132         pointer types.
5134 2017-09-06  Richard Biener  <rguenther@suse.de>
5136         PR tree-optimization/82108
5137         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
5138         for gap in the non-permutation SLP case.
5140 2017-09-06  Martin Jambor  <mjambor@suse.cz>
5142         PR tree-optimization/82078
5143         * tree-sra.c (sort_and_splice_var_accesses): Move call to
5144         add_access_to_work_queue...
5145         (build_accesses_from_assign): ...here.
5146         (propagate_all_subaccesses): Make sure racc is the group
5147         representative, if there is one.
5149 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
5151         PR middle-end/82095
5152         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
5153         NULL DECL_INITIAL.
5155 2017-09-06  Richard Biener  <rguenther@suse.de>
5157         * gimple-ssa-strength-reduction.c
5158         (find_candidates_dom_walker::before_doom_children): Use a
5159         type and not a mode check.
5161 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5163         PR target/77308
5164         * config/arm/predicates.md (arm_general_adddi_operand): Create new
5165         non-vfp predicate.
5166         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
5168 2017-09-05  Jeff Law  <law@redhat.com>
5170         PR tree-optimization/64910
5171         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
5172         cases where we have 3 or more operands.
5174 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
5176         PR middle-end/81768
5177         * omp-low.c (lower_omp_for): Recompute tree invariant if
5178         gimple_omp_for_initial/final is ADDR_EXPR.
5180         PR middle-end/81768
5181         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
5182         into gimple val before gimplification fo the COND_EXPR.
5184 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
5186         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
5187         REGION_COPY argument.
5188         (thread_through_all_blocks): Remove unused argument to
5189         duplicate_thread_path.
5191 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5192             Alan Hayward  <alan.hayward@arm.com>
5193             David Sherwood  <david.sherwood@arm.com>
5195         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
5196         Take a scalar_mode rather than a machine_mode.
5197         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
5198         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
5199         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
5200         (aarch64_gen_adjusted_ldpstp): Likewise.
5201         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
5203 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5204             Alan Hayward  <alan.hayward@arm.com>
5205             David Sherwood  <david.sherwood@arm.com>
5207         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
5208         Take a scalar_int_mode instead of a machine_mode.
5209         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
5210         (aarch64_output_scalar_simd_mov_immediate): Likewise.
5211         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
5212         (aarch64_simd_attr_length_rglist): Delete.
5213         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
5214         a scalar_int_mode instead of a machine_mode.
5215         (aarch64_add_offset): Likewise.
5216         (aarch64_internal_mov_immediate): Likewise
5217         (aarch64_add_constant_internal): Likewise.
5218         (aarch64_add_constant): Likewise.
5219         (aarch64_movw_imm): Likewise.
5220         (aarch64_rtx_arith_op_extract_p): Likewise.
5221         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
5222         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
5223         Remove assert that the mode isn't a vector.
5224         (aarch64_output_scalar_simd_mov_immediate): Likewise.
5225         (aarch64_expand_mov_immediate): Update calls after above changes.
5226         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
5227         (aarch64_and_bitmask_imm): Check for scalar integer modes.
5228         (aarch64_move_imm): Likewise.
5229         (aarch64_can_const_movi_rtx_p): Likewise.
5230         (aarch64_strip_extend): Likewise.
5231         (aarch64_extr_rtx_p): Likewise.
5232         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
5233         a CONST_INT when the mode parameter is VOIDmode.
5234         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
5236 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5238         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
5239         * stor-layout.c (bitwise_mode_for_mode): Likewise.
5240         (bitwise_type_for_mode): Update accordingly.
5242 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5244         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
5245         * stor-layout.c (mode_for_size_tree): Likewise.
5246         (mode_for_array): Update accordingly.
5247         (layout_decl): Likewise.
5248         (compute_record_mode): Likewise.  Only set the mode once.
5250 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5252         * target.def (get_mask_mode): Change return type to opt_mode.
5253         Expand commentary.
5254         * doc/tm.texi: Regenerate.
5255         * targhooks.h (default_get_mask_mode): Return an opt_mode.
5256         * targhooks.c (default_get_mask_mode): Likewise.
5257         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
5258         * optabs-query.c (can_vec_mask_load_store_p): Update use of
5259         targetm.get_mask_mode.
5260         * tree.c (build_truth_vector_type): Likewise.
5262 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5264         * machmode.h (mode_for_vector): Return an opt_mode.
5265         * stor-layout.c (mode_for_vector): Likewise.
5266         (mode_for_int_vector): Update accordingly.
5267         (layout_type): Likewise.
5268         * config/i386/i386.c (emit_memmov): Likewise.
5269         (ix86_expand_set_or_movmem): Likewise.
5270         (ix86_expand_vector_init): Likewise.
5271         (ix86_get_mask_mode): Likewise.
5272         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
5273         Likewise.
5274         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
5275         * expmed.c (extract_bit_field_1): Likewise.
5276         * expr.c (expand_expr_real_2): Likewise.
5277         * optabs-query.c (can_vec_perm_p): Likewise.
5278         (can_vec_mask_load_store_p): Likewise.
5279         * optabs.c (expand_vec_perm): Likewise.
5280         * targhooks.c (default_get_mask_mode): Likewise.
5281         * tree-vect-stmts.c (vectorizable_store): Likewise.
5282         (vectorizable_load): Likewise.
5283         (get_vectype_for_scalar_type_and_size): Likewise.
5285 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5287         * machmode.h (mode_for_int_vector): New function.
5288         * stor-layout.c (mode_for_int_vector): Likewise.
5289         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
5290         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
5291         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
5292         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
5293         (s390_expand_vcond): Likewise.
5295 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5297         * machmode.h (opt_machine_mode): New type.
5298         (opt_mode<T>): Allow construction from anything that can be
5299         converted to a T.
5300         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
5301         (mode_for_size): Return an opt_machine_mode.
5302         * stor-layout.c (mode_for_size): Likewise.
5303         (mode_for_size_tree): Update call accordingly.
5304         (bitwise_mode_for_mode): Likewise.
5305         (make_fract_type): Likewise.
5306         (make_accum_type): Likewise.
5307         * caller-save.c (replace_reg_with_saved_mem): Update call
5308         accordingly.
5309         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5310         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5311         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5312         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5313         * expmed.c (extract_bit_field_1): Likewise.
5314         * reload.c (get_secondary_mem): Likewise.
5315         * varasm.c (assemble_integer): Likewise.
5316         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
5317         early-out.
5319 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5321         * machmode.h (decimal_float_mode_for_size): New function.
5322         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
5323         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
5324         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
5325         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
5326         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
5327         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
5329 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5331         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
5332         (get_builtin_sync_mode): Likewise.
5333         (expand_ifn_atomic_compare_exchange): Likewise.
5334         (expand_builtin_atomic_clear): Likewise.
5335         (expand_builtin_atomic_test_and_set): Likewise.
5336         (fold_builtin_atomic_always_lock_free): Likewise.
5337         * calls.c (compute_argument_addresses): Likewise.
5338         (emit_library_call_value_1): Likewise.
5339         (store_one_arg): Likewise.
5340         * combine.c (combine_instructions): Likewise.
5341         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
5342         * config/arm/arm.c (arm_function_value): Likewise.
5343         (aapcs_allocate_return_reg): Likewise.
5344         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
5345         * config/i386/i386.c (construct_container): Likewise.
5346         (ix86_gimplify_va_arg): Likewise.
5347         (ix86_expand_sse_cmp): Likewise.
5348         (emit_memmov): Likewise.
5349         (emit_memset): Likewise.
5350         (expand_small_movmem_or_setmem): Likewise.
5351         (ix86_expand_pextr): Likewise.
5352         (ix86_expand_pinsr): Likewise.
5353         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
5354         * config/microblaze/microblaze.c (microblaze_block_move_straight):
5355         Likewise.
5356         * config/mips/mips.c (mips_function_value_1) Likewise.
5357         (mips_block_move_straight): Likewise.
5358         (mips_expand_ins_as_unaligned_store): Likewise.
5359         * config/powerpcspe/powerpcspe.c
5360         (rs6000_darwin64_record_arg_advance_flush): Likewise.
5361         (rs6000_darwin64_record_arg_flush): Likewise.
5362         * config/rs6000/rs6000.c
5363         (rs6000_darwin64_record_arg_advance_flush): Likewise.
5364         (rs6000_darwin64_record_arg_flush): Likewise.
5365         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
5366         (sparc_function_value_1): Likewise.
5367         * config/spu/spu.c (adjust_operand): Likewise.
5368         (spu_emit_branch_or_set): Likewise.
5369         (arith_immediate_p): Likewise.
5370         * emit-rtl.c (gen_lowpart_common): Likewise.
5371         * expr.c (expand_expr_real_1): Likewise.
5372         * function.c (assign_parm_setup_block): Likewise.
5373         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
5374         * reload1.c (alter_reg): Likewise.
5375         * stor-layout.c (mode_for_vector): Likewise.
5376         (layout_type): Likewise.
5378 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5380         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
5381         (spu_convert_move): Likewise.
5382         * lower-subreg.c (resolve_simple_move): Likewise.
5384 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5386         PR target/81833
5387         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
5388         define_insn to a define_expand.
5389         (altivec_vsum2sws_direct): New define_insn.
5390         (altivec_vsumsws): Convert from a define_insn to a define_expand.
5392 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
5394         * config/arm/arm.c (arm_option_params_internal): Improve setting of
5395         max_insns_skipped.
5397 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
5399         PR target/59501
5400         PR target/81624
5401         PR target/81769
5402         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
5403         realign stack if stack alignment needed is less than incoming
5404         stack boundary.
5406 2017-09-05  Marek Polacek  <polacek@redhat.com>
5408         PR sanitizer/82072
5409         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
5410         check earlier.
5412 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
5414         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
5416 2017-09-05  Richard Biener  <rguenther@suse.de>
5418         PR tree-optimization/82084
5419         * fold-const.c (can_native_encode_string_p): Handle wide characters.
5421 2017-09-05  Richard Biener  <rguenther@suse.de>
5423         PR tree-optimization/82102
5424         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
5426 2017-09-05  Martin Liska  <mliska@suse.cz>
5428         PR tree-optimization/82032
5429         * tree-cfg.c (generate_range_test): New function.
5430         * tree-cfg.h (generate_range_test): Declared here.
5431         * tree-cfgcleanup.c (convert_single_case_switch): New function.
5432         (cleanup_control_expr_graph): Use it.
5433         * tree-switch-conversion.c (try_switch_expansion): Remove
5434         assert.
5435         (emit_case_nodes): Use generate_range_test.
5437 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
5439         PR target/82098
5440         * config/i386/i386.md (*<btsc><mode>_mask): Add
5441         TARGET_USE_BT to insn constraint.
5442         (*btr<mode>_mask): Ditto.
5444 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
5446         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
5447         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
5449 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5451         PR target/77308
5452         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
5453         TARGET_NEON and TARGET_IWMMXT.
5454         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
5455         TARGET_NEON and TARGET_IWMMXT.
5456         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
5458 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
5460         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
5461         (ix86_rewrite_tls_address): Ditto.
5462         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
5463         (ix86_rewrite_tls_address_1): Ditto.
5464         (ix86_rewrite_tls_address): Ditto.
5465         * config/i386/predicates.md (tls_address_pattern): New predicate.
5466         * config/i386/i386.md (TLS address splitter): New splitter.
5468 2017-09-04  Richard Biener  <rguenther@suse.de>
5470         PR tree-optimization/82084
5471         * fold-const.h (can_native_encode_string_p): Declare.
5472         * fold-const.c (can_native_encode_string_p): Factor out from ...
5473         (native_encode_string): ... here.
5474         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
5475         vectorizing stores from constants we later cannot handle.
5477 2017-09-04  Marek Polacek  <polacek@redhat.com>
5479         PR c/81783
5480         * doc/invoke.texi: Update -Wtautological-compare documentation.
5482 2017-09-04  Jeff Law  <law@redhat.com>
5484         PR tree-optimization/64910
5485         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
5486         swap the first and last operand if the last is a constant.
5488 2017-09-04  Marek Polacek  <polacek@redhat.com>
5490         PR sanitizer/82072
5491         * convert.c (do_narrow): When sanitizing signed integer overflows,
5492         bail out for signed types.
5493         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
5495 2017-09-04  Richard Biener  <rguenther@suse.de>
5497         PR tree-optimization/82060
5498         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
5499         Move devirtualization after stmt folding and before EH/AB/noreturn
5500         cleanup to get the stmt refs canonicalized.  Use a bool instead
5501         of gimple_modified_p since that doesn't work for NOPs.  Schedule
5502         NOPs generated by folding for removal.
5504 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5505             Alan Hayward  <alan.hayward@arm.com>
5506             David Sherwood  <david.sherwood@arm.com>
5508         * coretypes.h (pad_direction): New enum.
5509         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
5510         (FUNCTION_ARG_PADDING): Likewise.
5511         * target.def (function_arg_padding): New hook.
5512         * targhooks.h (default_function_arg_padding): Declare.
5513         * targhooks.c (default_function_arg_padding): New function.
5514         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
5515         (TARGET_FUNCTION_ARG_PADDING): ...this.
5516         * doc/tm.texi: Regenerate.
5517         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
5518         instead of direction.
5519         (compute_argument_addresses): Likewise.
5520         (load_register_parameters): Likewise.
5521         (emit_library_call_value_1): Likewise.
5522         (store_one_arg): Use targetm.calls.function_arg_padding instead
5523         of FUNCTION_ARG_PADDING.
5524         (must_pass_in_stack_var_size_or_pad): Likewise.
5525         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
5526         (emit_group_store): Likewise.
5527         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
5528         instead of FUNCTION_ARG_PADDING.
5529         (emit_push_insn): Likewise, and propagate enum change throughout
5530         function.
5531         * function.h (direction): Delete.
5532         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
5533         of direction.
5534         * function.c (assign_parm_find_stack_rtl): Likewise.
5535         (assign_parm_setup_block_p): Likewise.
5536         (assign_parm_setup_block): Likewise.
5537         (gimplify_parameters): Likewise.
5538         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
5539         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
5540         function.
5541         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
5542         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5543         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
5544         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
5545         (aarch64_function_arg_padding): ...this new function.
5546         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
5547         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5548         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
5549         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5550         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
5551         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5552         (arm_pad_arg_upward): Replace with...
5553         (arm_function_arg_padding): ...this new function.
5554         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
5555         of direction.
5556         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
5557         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
5558         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5559         (ia64_hpux_function_arg_padding): Replace with...
5560         (ia64_function_arg_padding): ...this new function.  Use pad_direction
5561         instead of direction.  Check for TARGET_HPUX.
5562         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
5563         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5564         (iq2000_function_arg_padding): New function.
5565         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
5566         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
5567         (mips_function_arg_padding): ...this new function.
5568         (mips_pad_reg_upward): Update accordingly.
5569         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5570         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
5571         targetm.calls.function_arg_padding.
5572         (FUNCTION_ARG_PADDING): Delete.
5573         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5574         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
5575         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5576         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
5577         (nios2_block_reg_padding): Return pad_direction instead of direction.
5578         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
5579         instead of direction.
5580         (nios2_function_arg_padding): Likewise.  Make static.
5581         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5582         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
5583         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
5584         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
5585         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5586         (pa_function_arg_padding): Make static.  Return pad_direction instead
5587         of direction.
5588         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
5589         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5590         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
5591         instead of direction.  Use targetm.calls.function_arg_padding.
5592         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
5593         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
5594         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
5595         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
5596         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
5597         Redefine.
5598         (function_arg_padding): Rename to...
5599         (rs6000_function_arg_padding): ...this.  Make static.  Return
5600         pad_direction instead of direction.
5601         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
5602         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
5603         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5604         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
5605         instead of direction.  Use targetm.calls.function_arg_padding.
5606         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
5607         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
5608         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
5609         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
5610         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5611         (function_arg_padding): Rename to...
5612         (rs6000_function_arg_padding): ...this.  Make static.  Return
5613         pad_direction instead of direction.
5614         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
5615         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
5616         * config/s390/s390.c (s390_function_arg_padding): New function.
5617         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5618         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
5619         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
5620         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5621         (function_arg_padding): Rename to...
5622         (sparc_function_arg_padding): ...this.  Make static.  Return
5623         pad_direction instead of direction.
5624         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
5625         * config/spu/spu.c (spu_function_arg_padding): New function.
5626         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5627         * system.h (FUNCTION_ARG_PADDING): Poison.
5629 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5630             Alan Hayward  <alan.hayward@arm.com>
5631             David Sherwood  <david.sherwood@arm.com>
5633         * target.def (modes_tieable_p): New hook.
5634         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
5635         (TARGET_MODES_TIEABLE_P): ...this.
5636         * doc/tm.texi.in: Regenerate.
5637         * hooks.h (hook_bool_mode_mode_true): Declare.
5638         * hooks.c (hook_bool_mode_mode_true): New function.
5639         * combine.c (subst): Use targetm.modes_tieable_p instead of
5640         MODES_TIEABLE_P.
5641         * dse.c (find_shift_sequence): Likewise.
5642         * expmed.c (extract_low_bits): Likewise.
5643         * lower-subreg.c: Include target.h.
5644         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
5645         MODES_TIEABLE_P.
5646         * rtlanal.c (rtx_cost): Likewise.
5647         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
5648         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
5649         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
5650         (TARGET_MODES_TIEABLE_P): Redefine.
5651         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
5652         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
5653         (TARGET_MODES_TIEABLE_P): Redefine.
5654         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
5655         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
5656         (arc_modes_tieable_p): New function.
5657         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
5658         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
5659         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
5660         (arm_modes_tieable_p): Make static.
5661         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
5662         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
5663         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
5664         (TARGET_MODES_TIEABLE_P): Redefine.
5665         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
5666         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
5667         (TARGET_MODES_TIEABLE_P): Redefine.
5668         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
5669         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
5670         (cr16_modes_tieable_p): New function.
5671         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
5672         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
5673         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
5674         (TRULY_NOOP_TRUNCATION): Update comment.
5675         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
5676         (TRULY_NOOP_TRUNCATION): Update comment.
5677         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
5678         (frv_modes_tieable_p): New function.
5679         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
5680         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
5681         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
5682         (TARGET_MODES_TIEABLE_P): Redefine.
5683         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
5684         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
5685         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
5686         (TARGET_MODES_TIEABLE_P): Redefine.
5687         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
5688         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
5689         (ia64_modes_tieable_p): New function.
5690         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
5691         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
5692         (iq2000_modes_tieable_p): New function.
5693         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
5694         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
5695         (lm32_modes_tieable_p): New function.
5696         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
5697         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
5698         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
5699         (TARGET_MODES_TIEABLE_P): Redefine.
5700         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
5701         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
5702         (m32r_modes_tieable_p): New function.
5703         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
5704         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
5705         (m68k_modes_tieable_p): New function.
5706         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
5707         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
5708         (mcore_modes_tieable_p): New function.
5709         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
5710         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
5711         function.
5712         (TARGET_MODES_TIEABLE_P): Redefine.
5713         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
5714         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
5715         * config/mips/mips.c (mips_modes_tieable_p): Make static.
5716         (TARGET_MODES_TIEABLE_P): Redefine.
5717         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
5718         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
5719         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
5720         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
5721         (mn10300_modes_tieable_p): ...this and make static.
5722         (TARGET_MODES_TIEABLE_P): Redefine.
5723         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
5724         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
5725         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
5726         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
5727         (msp430_modes_tieable_p): Make static.
5728         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
5729         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
5730         (TARGET_MODES_TIEABLE_P): Redefine.
5731         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
5732         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
5733         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
5734         (TARGET_MODES_TIEABLE_P): Redefine.
5735         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
5736         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
5737         * config/pa/pa.c (pa_modes_tieable_p): Make static.
5738         (TARGET_MODES_TIEABLE_P): Redefine.
5739         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
5740         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
5741         (pdp11_modes_tieable_p): New function.
5742         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
5743         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
5744         (rs6000_modes_tieable_p): New function.
5745         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
5746         * config/powerpcspe/powerpcspe.md: Update comment.
5747         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
5748         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
5749         (TARGET_MODES_TIEABLE_P): Redefine.
5750         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
5751         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
5752         (rl78_modes_tieable_p): New function.
5753         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
5754         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
5755         (rs6000_modes_tieable_p): New function.
5756         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
5757         * config/rs6000/rs6000.md: Update comment.
5758         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
5759         * config/rx/rx.c (rx_modes_tieable_p): New function.
5760         (TARGET_MODES_TIEABLE_P): Redefine.
5761         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
5762         * config/s390/s390.c (s390_modes_tieable_p): New function.
5763         (TARGET_MODES_TIEABLE_P): Redefine.
5764         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
5765         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
5766         (sh_modes_tieable_p): New function.
5767         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
5768         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
5769         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
5770         (sparc_modes_tieable_p): Make static.
5771         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
5772         * config/spu/spu.c (spu_modes_tieable_p): New function.
5773         (TARGET_MODES_TIEABLE_P): Redefine.
5774         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
5775         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
5776         (TARGET_MODES_TIEABLE_P): Redefine.
5777         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
5778         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
5779         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
5780         * config/v850/v850.c (v850_modes_tieable_p): New function.
5781         (TARGET_MODES_TIEABLE_P): Redefine.
5782         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
5783         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
5784         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
5785         (visium_modes_tieable_p): New function.
5786         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
5787         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
5788         (xtensa_modes_tieable_p): New function.
5789         * system.h (MODES_TIEABLE_P): Poison.
5791 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5792             Alan Hayward  <alan.hayward@arm.com>
5793             David Sherwood  <david.sherwood@arm.com>
5795         * target.def (hard_regno_mode_ok): New hook.
5796         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
5797         (TARGET_HARD_REGNO_MODE_OK): ...this.
5798         * doc/tm.texi.in: Regenerate.
5799         * hooks.h (hook_bool_uint_mode_true): Declare.
5800         * hooks.c (hook_bool_uint_mode_true): New function.
5801         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
5802         HARD_REGNO_MODE_OK.
5803         * genpreds.c (write_insn_preds_c): Add an include of target.h.
5804         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
5805         instead of HARD_REGNO_MODE_OK.
5806         * caller-save.c: Include target.h.
5807         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
5808         HARD_REGNO_MODE_OK.
5809         * combine.c (can_combine_p): Likewise.
5810         (combinable_i3pat): Likewise.
5811         (can_change_dest_mode): Likewise.
5812         * expr.c (init_expr_target): Likewise.
5813         (convert_move): Likewise.
5814         (convert_modes): Likewise.
5815         * ira.c (setup_prohibited_class_mode_regs): Likewise.
5816         (setup_prohibited_mode_move_regs): Likewise.
5817         * ira.h (target_ira): Likewise.
5818         * lra-assigns.c (find_hard_regno_for_1): Likewise.
5819         * lra-constraints.c (process_alt_operands): Likewise.
5820         (split_reg): Likewise.
5821         * recog.c (peep2_find_free_register): Likewise.
5822         * ree.c (combine_reaching_defs): Likewise.
5823         * regcprop.c (maybe_mode_change): Likewise.
5824         * reginfo.c (init_reg_sets_1): Likewise.
5825         (choose_hard_reg_mode): Likewise.
5826         (simplifiable_subregs): Likewise.
5827         * regrename.c (check_new_reg_p): Likewise.
5828         * reload.c (find_valid_class): Likewise.
5829         (find_valid_class_1): Likewise.
5830         (reload_inner_reg_of_subreg): Likewise.
5831         (push_reload): Likewise.
5832         (combine_reloads): Likewise.
5833         (find_dummy_reload): Likewise.
5834         (find_reloads): Likewise.
5835         * reload1.c (find_reg): Likewise.
5836         (set_reload_reg): Likewise.
5837         (allocate_reload_reg): Likewise.
5838         (choose_reload_regs): Likewise.
5839         (reload_adjust_reg_for_temp): Likewise.
5840         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
5841         (simplify_subreg_regno): Likewise.
5842         * sel-sched.c (init_regs_for_mode): Likewise.
5843         * varasm.c (make_decl_rtl): Likewise.
5844         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
5845         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
5846         HARD_REGNO_MODE_OK.
5847         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
5848         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
5849         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5850         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
5851         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
5852         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5853         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
5854         (arc_mode_class): Delete.
5855         (HARD_REGNO_MODE_OK): Delete.
5856         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5857         (arc_hard_regno_mode_ok): Rename old array to...
5858         (arc_hard_regno_mode_ok_modes): ...this.
5859         (arc_conditional_register_usage): Update accordingly.
5860         (arc_mode_class): Make static.
5861         (arc_hard_regno_mode_ok): New function.
5862         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
5863         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
5864         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5865         (arm_hard_regno_mode_ok): Make static.
5866         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
5867         HARD_REGNO_MODE_OK.
5868         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
5869         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
5870         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
5871         return a bool.
5872         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5873         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
5874         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
5875         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
5876         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
5877         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5878         * config/bfin/predicates.md (valid_reg_operand): Use
5879         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
5880         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
5881         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
5882         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5883         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
5884         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
5885         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5886         (cr16_hard_regno_mode_ok): Make static and return a bool.
5887         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
5888         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5889         (cris_hard_regno_mode_ok): New function.
5890         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
5891         (epiphany_mode_class): Delete.
5892         (HARD_REGNO_MODE_OK): Delete.
5893         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
5894         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5895         (hard_regno_mode_ok): Rename to...
5896         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
5897         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
5898         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
5899         HARD_REGNO_MODE_OK.
5900         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
5901         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
5902         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5903         (frv_hard_regno_mode_ok): Make static and return a bool.
5904         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
5905         HARD_REGNO_MODE_OK.
5906         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
5907         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
5908         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
5909         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
5910         and return a bool.
5911         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5912         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
5913         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
5914         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
5915         return a bool.
5916         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5917         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
5918         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5919         (ia64_hard_regno_mode_ok): New function.
5920         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
5921         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5922         (iq2000_hard_regno_mode_ok): New function.
5923         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
5924         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5925         (lm32_hard_regno_mode_ok): New function.
5926         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
5927         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
5928         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
5929         instead of HARD_REGNO_MODE_OK.
5930         (m32c_hard_regno_ok): Rename to...
5931         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
5932         (m32c_cannot_change_mode_class): Update accordingly.
5933         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5934         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
5935         (m32r_mode_class): Delete.
5936         (HARD_REGNO_MODE_OK): Delete.
5937         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5938         (m32r_hard_regno_mode_ok): Rename to...
5939         (m32r_hard_regno_modes): ...this.
5940         (m32r_mode_class): Make static.
5941         (m32r_hard_regno_mode_ok): New function.
5942         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
5943         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
5944         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5945         (m68k_hard_regno_mode_ok): Make static.
5946         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
5947         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5948         (mcore_hard_regno_mode_ok): New function.
5949         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
5950         (HARD_REGNO_MODE_OK): Delete.
5951         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
5952         Rename to...
5953         (microblaze_hard_regno_mode_ok_p): ...this and make static.
5954         (microblaze_hard_regno_mode_ok): New function.
5955         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5956         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
5957         (mips_hard_regno_mode_ok): Delete.
5958         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
5959         (mips_hard_regno_mode_ok_p): ...this and make static.
5960         (mips_hard_regno_mode_ok_p): Rename to...
5961         (mips_hard_regno_mode_ok_uncached): ...this.
5962         (mips_hard_regno_mode_ok): New function.
5963         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
5964         of HARD_REGNO_MODE_OK.
5965         (mips_option_override): Update after above name changes.
5966         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5967         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
5968         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
5969         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
5970         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
5971         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5972         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
5973         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
5974         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
5975         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5976         (msp430_hard_regno_mode_ok): Make static and return a bool.
5977         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
5978         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
5979         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
5980         and return a bool.
5981         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5982         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
5983         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
5984         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
5985         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
5986         (PA_HARD_REGNO_MODE_OK): ...this
5987         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
5988         (PA_HARD_REGNO_MODE_OK): ...this.
5989         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5990         (pa_hard_regno_mode_ok): New function.
5991         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
5992         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5993         (pdp11_hard_regno_mode_ok): New function.
5994         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
5995         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
5996         Delete.
5997         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
5998         Make static.
5999         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6000         (rs6000_hard_regno_mode_ok): Rename to...
6001         (rs6000_hard_regno_mode_ok_uncached): ...this.
6002         (rs6000_init_hard_regno_mode_ok): Update accordingly.
6003         (rs6000_hard_regno_mode_ok): New function.
6004         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
6005         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
6006         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
6007         (riscv_hard_regno_mode_ok): ...this and make static.
6008         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6009         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
6010         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
6011         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6012         (rl78_hard_regno_mode_ok): Make static and return bool.
6013         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
6014         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
6015         Delete.
6016         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
6017         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6018         (rs6000_hard_regno_mode_ok): Rename to...
6019         (rs6000_hard_regno_mode_ok_uncached): ...this.
6020         (rs6000_init_hard_regno_mode_ok): Update accordingly.
6021         (rs6000_hard_regno_mode_ok): New function.
6022         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
6023         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
6024         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6025         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
6026         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
6027         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
6028         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6029         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
6030         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
6031         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6032         (sh_hard_regno_mode_ok): Make static.
6033         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
6034         instead of HARD_REGNO_MODE_OK.
6035         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
6036         (sparc_mode_class): Delete.
6037         (HARD_REGNO_MODE_OK): Delete.
6038         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6039         (hard_regno_mode_classes): Make static.
6040         (sparc_mode_class): Likewise.
6041         (sparc_hard_regno_mode_ok): New function.
6042         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
6043         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
6044         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
6045         function.
6046         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6047         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
6048         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
6049         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
6050         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
6051         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6052         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
6053         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
6054         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6055         (visium_hard_regno_mode_ok): New function.
6056         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
6057         instead of HARD_REGNO_MODE_OK.
6058         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
6059         (HARD_REGNO_MODE_OK): Delete.
6060         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
6061         (xtensa_hard_regno_mode_ok_p): ...this and make static.
6062         (xtensa_option_override): Update accordingly.
6063         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6064         (xtensa_hard_regno_mode_ok): New function.
6065         * system.h (HARD_REGNO_MODE_OK): Poison.
6067 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6068             Alan Hayward  <alan.hayward@arm.com>
6069             David Sherwood  <david.sherwood@arm.com>
6071         * target.def (hard_regno_call_part_clobbered): New hook.
6072         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
6073         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
6074         * doc/tm.texi: Regenerate.
6075         * hooks.h (hook_bool_uint_mode_false): Declare.
6076         * hooks.c (hook_bool_uint_mode_false): New function.
6077         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6078         * cselib.c (cselib_process_insn): Use
6079         targetm.hard_regno_call_part_clobbered instead of
6080         HARD_REGNO_CALL_PART_CLOBBERED.
6081         * ira-conflicts.c (ira_build_conflicts): Likewise.
6082         * ira-costs.c (ira_tune_allocno_costs): Likewise.
6083         * lra-constraints.c (need_for_call_save_p): Likewise.
6084         * lra-lives.c: Include target.h.
6085         (check_pseudos_live_through_calls): Use
6086         targetm.hard_regno_call_part_clobbered instead of
6087         HARD_REGNO_CALL_PART_CLOBBERED.
6088         * regcprop.c: Include target.h.
6089         (copyprop_hardreg_forward_1): Use
6090         targetm.hard_regno_call_part_clobbered instead of
6091         HARD_REGNO_CALL_PART_CLOBBERED.
6092         * reginfo.c (choose_hard_reg_mode): Likewise.
6093         * regrename.c (check_new_reg_p): Likewise.
6094         * reload.c (find_equiv_reg): Likewise.
6095         * reload1.c (emit_reload_insns): Likewise.
6096         * sched-deps.c (deps_analyze_insn): Likewise.
6097         * sel-sched.c (init_regs_for_mode): Likewise.
6098         (mark_unavailable_hard_regs): Likewise.
6099         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
6100         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6101         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
6102         New function.
6103         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6104         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6105         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
6106         Delete.
6107         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
6108         and return a bool.
6109         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6110         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6111         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
6112         function.
6113         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6114         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6115         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
6116         function.
6117         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6118         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
6119         Delete.
6120         * config/powerpcspe/powerpcspe.c
6121         (rs6000_hard_regno_call_part_clobbered): New function.
6122         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6123         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6124         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
6125         New function.
6126         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6127         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6128         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
6129         function.
6130         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6131         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6132         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
6134 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6135             Alan Hayward  <alan.hayward@arm.com>
6136             David Sherwood  <david.sherwood@arm.com>
6138         * rtl.h (subreg_memory_offset): Declare.
6139         * emit-rtl.c (subreg_memory_offset): New function.
6140         * expmed.c (store_bit_field_1): Use it.
6141         * expr.c (undefined_operand_subword_p): Likewise.
6142         * simplify-rtx.c (simplify_subreg): Likewise.
6144 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
6146         PR rtl-optimization/57448
6147         PR target/67458
6148         PR target/81316
6149         * optabs.c (expand_atomic_load): Place compiler memory barriers if
6150         using atomic_load pattern.
6151         (expand_atomic_store): Likewise.
6153 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
6155         PR sanitizer/81981
6156         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
6157         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
6158         handling.  Use replace_call_with_value with NULL instead of
6159         gsi_replace, unlink_stmt_vdef and release_defs.
6161         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
6162         instead of tab.
6164         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
6166 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6168         PR bootstrap/82045
6169         * rtl.h (emit_library_call_value_1): Declare.
6170         (emit_library_call): Replace declaration with a series of overloads.
6171         Remove the parameter count argument.
6172         (emit_library_call_value): Likewise.
6173         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
6174         with an "rtx_mode_t *".
6175         (emit_library_call_value): Delete.
6176         (emit_library_call): Likewise.
6177         * asan.c (asan_emit_stack_protection): Update calls accordingly.
6178         (asan_emit_allocas_unpoison): Likewise.
6179         * builtins.c (expand_builtin_powi): Likewise.
6180         (expand_asan_emit_allocas_unpoison): Likewise.
6181         * cfgexpand.c (expand_main_function): Likewise.
6182         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
6183         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
6184         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
6185         * config/arm/arm.c (arm_trampoline_init): Likewise.
6186         (arm_call_tls_get_addr): Likewise.
6187         (arm_expand_divmod_libfunc): Likewise.
6188         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
6189         (smulsi3_highpart): Likewise.
6190         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
6191         (c6x_expand_compare): Likewise.
6192         (c6x_expand_movmem): Likewise.
6193         * config/frv/frv.c (frv_trampoline_init): Likewise.
6194         * config/i386/i386.c (ix86_trampoline_init): Likewise.
6195         (ix86_expand_divmod_libfunc): Likewise.
6196         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
6197         (ia64_expand_compare): Likewise.
6198         (ia64_profile_hook): Likewise.
6199         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
6200         (nonlocal_goto): Likewise.
6201         (restore_stack_nonlocal): Likewise.
6202         * config/m32r/m32r.c (block_move_call): Likewise.
6203         (m32r_trampoline_init): Likewise.
6204         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
6205         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
6206         (m68k_call_m68k_read_tp): Likewise.
6207         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
6208         (microblaze_expand_divide): Likewise.
6209         * config/mips/mips.h (mips_args): Likewise.
6210         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
6211         (MIPS_ICACHE_SYNC): Likewise.
6212         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
6213         (nios2_trampoline_init): Likewise.
6214         * config/pa/pa.c (hppa_tls_call): Likewise.
6215         (pa_trampoline_init): Likewise.
6216         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
6217         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
6218         (expand_strn_compare): Likewise.
6219         (rs6000_generate_compare): Likewise.
6220         (rs6000_expand_float128_convert): Likewise.
6221         (output_profile_hook): Likewise.
6222         (rs6000_trampoline_init): Likewise.
6223         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
6224         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
6225         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
6226         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
6227         (rs6000_generate_compare): Likewise.
6228         (rs6000_expand_float128_convert): Likewise.
6229         (output_profile_hook): Likewise.
6230         (rs6000_trampoline_init): Likewise.
6231         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
6232         * config/sh/sh.c (sh_trampoline_init): Likewise.
6233         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
6234         (sparc_emit_float_lib_cmp): Likewise.
6235         (sparc32_initialize_trampoline): Likewise.
6236         (sparc64_initialize_trampoline): Likewise.
6237         (sparc_profile_hook): Likewise.
6238         * config/spu/spu.c (ea_load_store): Likewise.
6239         * config/spu/spu.md (floatunssidf2): Likewise.
6240         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
6241         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
6242         * config/visium/visium.c (expand_block_move_4): Likewise.
6243         (expand_block_move_2): Likewise.
6244         (expand_block_move_1): Likewise.
6245         (expand_block_set_4): Likewise.
6246         (expand_block_set_2): Likewise.
6247         (expand_block_set_1): Likewise.
6248         (visium_trampoline_init): Likewise.
6249         (visium_profile_hook): Likewise.
6250         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
6251         (xtensa_setup_frame_addresses): Likewise.
6252         (xtensa_trampoline_init): Likewise.
6253         * except.c (sjlj_emit_function_enter): Likewise.
6254         (sjlj_emit_function_exit): Likewise.
6255         * explow.c (allocate_dynamic_stack_space): Likewise.
6256         (probe_stack_range): Likewise.
6257         * expr.c (convert_mode_scalar): Likewise.
6258         * optabs.c (expand_binop): Likewise.
6259         (expand_twoval_binop_libfunc): Likewise.
6260         (expand_unop): Likewise.
6261         (prepare_cmp_insn): Likewise.
6262         (prepare_float_lib_cmp): Likewise.
6263         (expand_float): Likewise.
6264         (expand_fix): Likewise.
6265         (expand_fixed_convert): Likewise.
6266         (maybe_emit_sync_lock_test_and_set): Likewise.
6267         (expand_atomic_compare_and_swap): Likewise.
6268         (expand_mem_thread_fence): Likewise.
6269         (expand_atomic_fetch_op): Likewise.
6271 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
6273         * doc/generic.texi (OpenACC): Adjust URL.
6274         * doc/invoke.texi (C Dialect Options): Ditto.
6276 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
6278         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
6279         predicate for operand 1.  Add (m,<S>) constraint.
6280         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
6281         Prevent memory operand 1 with register operand 2.
6283 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
6285         PR rtl-optimization/82024
6286         * combine.c (try_combine): If the combination result is a PARALLEL,
6287         and we only need to retain the SET in there that would be placed
6288         at I2, check that we can place that at I3 instead, before doing so.
6290 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
6292         PR target/81766
6293         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
6294         instead of void.
6295         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
6296         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
6297         and label.
6299 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
6300             Jeff Law  <law@redhat.com>
6302         * varasm.c (bss_initializer_p): Do not put constants into .bss
6303         (categorize_decl_for_section): Handle bss_initializer_p returning
6304         false when DECL_INITIAL is NULL.
6306 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6308         PR target/82012
6309         * config/s390/s390.c (s390_can_inline_p): New function.
6311 2017-09-01  Jeff Law  <law@redhat.com>
6313         PR tree-optimization/82052
6314         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
6315         Always initialize the returned slot after a hash table miss
6316         when INSERT is true.
6318 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
6320         * config/s390/s390.md (mem_signal_fence): Remove.
6321         * doc/md.texi (mem_signal_fence): Remove.
6322         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
6323         Update comments.
6324         * target-insns.def (mem_signal_fence): Remove.
6326 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
6328         PR sanitizer/81902
6329         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
6331         PR sanitizer/81923
6332         * asan.c (create_odr_indicator): Strip name encoding from assembler
6333         name before appending it after __odr_asan_.
6335 2017-09-01  Martin Liska  <mliska@suse.cz>
6337         PR tree-optimization/82059
6338         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
6339         frequency only when an edge is redirected.
6341 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6343         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
6344         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
6345         (arc_conditional_register_usage): Remove ARC600 lp_count
6346         exception.
6347         (arc_file_start): Emit Tag_ARC_CPU_variation.
6348         (arc_can_use_doloop_p): New conditions to use ZOLs.
6349         (hwloop_fail): New function.
6350         (hwloop_optimize): Likewise.
6351         (hwloop_pattern_reg): Likewise.
6352         (arc_doloop_hooks): New struct, to be used with reorg_loops.
6353         (arc_reorg_loops): New function, calls reorg_loops.
6354         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
6355         (arc600_corereg_hazard): Remove ZOL checking, case handled by
6356         hwloop_optimize.
6357         (arc_loop_hazard): Remove function, functionality moved into
6358         hwloop_optimize.
6359         (arc_hazard): Remove arc_loop_hazard call.
6360         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
6361         into hwloop_optimize.
6362         (arc_label_align): Remove ZOL handling.
6363         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
6364         * config/arc/arc.md (doloop_begin): Remove pattern.
6365         (doloop_begin_i): Likewise.
6366         (doloop_end_i): Likewise.
6367         (doloop_fallback): Likewise.
6368         (doloop_fallback_m): Likewise.
6369         (doloop_end): Reimplement expand.
6370         (arc_lp): New pattern for LP instruction.
6371         (loop_end): New pattern.
6372         (loop_fail): Likewise.
6373         (decrement_and_branch_until_zero): Likewise.
6374         * config/arc/arc.opt (mlpc-width): New option.
6375         * doc/invoke.texi (mlpc-width): Document option.
6377 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6379         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
6380         (arc_ccfsm_advance): Fix checking for delay slots.
6381         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
6383 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6385         * config/arc/arc.md (movqi_insn): Add stores to save constant long
6386         immediates.
6387         (movhi_insn): Update store instruction constraint which are saving
6388         6-bit short immediates.
6389         (movsi_insn): Consider also short scaled load operations.
6390         (zero_extendhisi2_i): Use Usd constraint instead of T.
6391         (extendhisi2_i): Add q constraint.
6392         (arc_clzsi2): Add type and length attributes.
6393         (arc_ctzsi2): Likewise.
6394         * config/arc/constraints.md (Usc): Update constraint, the
6395         assembler can parse two relocations for a single instruction.
6397 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6399         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
6400         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
6402 2017-08-31  Olivier Hainque  <hainque@adacore.com>
6404         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
6405         match as powerpc-wrs-vxworks*.
6407 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
6409         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
6410         register constraint for by-element operand.
6411         (aarch64_mls_elt_merge<mode>): Likewise.
6413 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6415         * config/arc/arc.c (arc_can_follow_jump): Check for short
6416         branches.
6418 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6420         * config.gcc: Use g.opt for arc.
6421         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
6422         functionality moved to ...
6423         (legitimate_scaled_address_p): New function, ...here.
6424         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
6425         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
6426         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
6427         condition.
6428         (arc_override_options): Handle G option.
6429         (arc_output_pic_addr_const): Correct function definition.
6430         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
6431         (arc_decl_anon_ns_mem_p): Delete.
6432         (arc_in_small_data_p): Overhaul this function to take into
6433         consideration the value given via G option.
6434         (arc_rewrite_small_data_1): Renamed and corrected old
6435         arc_rewrite_small_data function.
6436         (arc_rewrite_small_data): New function.
6437         (small_data_pattern): Don't use pic_offset_table_rtx.
6438         * config/arc/arc.h (CC1_SPEC): Recognize G option.
6439         * config/arc/simdext.md (movmisalignv2hi): Use
6440         prepare_move_operands function.
6441         (mov*): Likewise.
6442         (movmisalign*): Likewise.
6443         * doc/invoke.texi (ARC options): Document -G option.
6445 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6447         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
6448         prototype.
6449         * config/arc/arc.c (arc_print_operand): Output scalled address for
6450         sdata whenever is possible.
6451         (arc_in_small_data_p): Allow sdata for 64bit datum when double
6452         load/stores are available.
6453         (compact_sda_memory_operand): Check for the alignment required by
6454         code density instructions.
6455         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
6456         constraint.
6457         * config/arc/constraints.md (Usd): Update constraint.
6458         (Us0): New constraint.
6459         (Usc): Update constraint.
6461 2017-08-31  Richard Biener  <rguenther@suse.de>
6463         PR middle-end/82054
6464         * dwarf2out.c (dwarf2out_early_global_decl): Process each
6465         function only once.
6467 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
6469         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
6470         Resize type_signature.
6472 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6473             Alan Hayward  <alan.hayward@arm.com>
6474             David Sherwood  <david.sherwood@arm.com>
6476         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
6477         subregs whose inner modes can be stored in GPRs.
6478         (aarch64_classify_index): Likewise.
6480 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6481             Alan Hayward  <alan.hayward@arm.com>
6482             David Sherwood  <david.sherwood@arm.com>
6484         * config/aarch64/iterators.md (V_cmp_result): Rename to...
6485         (V_INT_EQUIV): ...this.
6486         (v_cmp_result): Rename to...
6487         (v_int_equiv): ...this.
6488         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
6489         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
6490         (copysign<mode>3): Likewise.
6491         (aarch64_simd_bsl<mode>_internal): Likewise.
6492         (aarch64_simd_bsl<mode>): Likewise.
6493         (vec_cmp<mode><mode>): Likewise.
6494         (vcond<mode><mode>): Likewise.
6495         (vcond<v_cmp_mixed><mode>): Likewise.
6496         (vcondu<mode><v_cmp_mixed>): Likewise.
6497         (aarch64_cm<optab><mode>): Likewise.
6498         (aarch64_cmtst<mode>): Likewise.
6499         (aarch64_fac<optab><mode>): Likewise.
6500         (vec_perm_const<mode>): Likewise.
6501         (vcond_mask_<mode><v_cmp_result>): Rename to...
6502         (vcond_mask_<mode><v_int_equiv>): ...this.
6503         (vec_cmp<mode><v_cmp_result>): Rename to...
6504         (vec_cmp<mode><v_int_equiv>): ...this.
6506 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6507             Alan Hayward  <alan.hayward@arm.com>
6508             David Sherwood  <david.sherwood@arm.com>
6510         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
6511         vector modes.
6512         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
6513         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
6514         (UNSPEC_LD4_DREG): New unspecs.
6515         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
6516         (aarch64_ld2<mode>_dreg_be): Replace with...
6517         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
6518         unspec.
6519         (aarch64_ld3<mode>_dreg_le)
6520         (aarch64_ld3<mode>_dreg_be): Replace with...
6521         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
6522         unspec.
6523         (aarch64_ld4<mode>_dreg_le)
6524         (aarch64_ld4<mode>_dreg_be): Replace with...
6525         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
6526         unspec.
6528 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6530         PR tree-optimization/81987
6531         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
6532         insert an initializer in a location not dominated by the stride
6533         definition.
6535 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
6537         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
6538         on the entire header of the finally block in the fallthru case.
6540 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
6542         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
6544 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
6546         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
6547         rs6000_emit_move_from_cr and call renamed function.
6548         (rs6000_emit_prologue): Call renamed functions.
6549         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
6550         movesi_from_cr, remove volatile CRs.
6552 2017-08-30  Jon Beniston  <jon@beniston.com>
6553             Richard Biener  <rguenther@suse.de>
6555         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
6556         of VECTOR_MODE_P check.
6557         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
6558         element vector types.
6560 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6562         * df.h (df_read_modify_subreg_p): Remove in favor of...
6563         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
6564         const_rtx instead of an rtx.
6565         * cprop.c (local_cprop_find_used_regs): Update accordingly.
6566         * df-problems.c (df_word_lr_mark_ref): Likewise.
6567         * ira-lives.c (mark_pseudo_reg_live): Likewise.
6568         (mark_pseudo_reg_dead): Likewise.
6569         (mark_ref_dead): Likewise.
6570         * reginfo.c (init_subregs_of_mode): Likewise.
6571         * sched-deps.c (sched_analyze_1): Likewise.
6572         * df-scan.c (df_def_record_1): Likewise.
6573         (df_uses_record): Likewise.
6574         (df_read_modify_subreg_p): Remove in favor of...
6575         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
6576         const_rtx instead of an rtx.
6578 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6579             Alan Hayward  <alan.hayward@arm.com>
6580             David Sherwood  <david.sherwood@arm.com>
6582         * rtl.h (partial_subreg_p): New function.
6583         * caller-save.c (save_call_clobbered_regs): Use it.
6584         * calls.c (expand_call): Likewise.
6585         * combine.c (combinable_i3pat): Likewise.
6586         (simplify_set): Likewise.
6587         (make_extraction): Likewise.
6588         (make_compound_operation_int): Likewise.
6589         (gen_lowpart_or_truncate): Likewise.
6590         (force_to_mode): Likewise.
6591         (make_field_assignment): Likewise.
6592         (reg_truncated_to_mode): Likewise.
6593         (record_truncated_value): Likewise.
6594         (move_deaths): Likewise.
6595         * cse.c (record_jump_cond): Likewise.
6596         (cse_insn): Likewise.
6597         * cselib.c (cselib_lookup_1): Likewise.
6598         * expmed.c (extract_bit_field_using_extv): Likewise.
6599         * function.c (assign_parm_setup_reg): Likewise.
6600         * ifcvt.c (noce_convert_multiple_sets): Likewise.
6601         * ira-build.c (create_insn_allocnos): Likewise.
6602         * lra-coalesce.c (merge_pseudos): Likewise.
6603         * lra-constraints.c (match_reload): Likewise.
6604         (simplify_operand_subreg): Likewise.
6605         (curr_insn_transform): Likewise.
6606         * lra-lives.c (process_bb_lives): Likewise.
6607         * lra.c (new_insn_reg): Likewise.
6608         (lra_substitute_pseudo): Likewise.
6609         * regcprop.c (mode_change_ok): Likewise.
6610         (maybe_mode_change): Likewise.
6611         (copyprop_hardreg_forward_1): Likewise.
6612         * reload.c (push_reload): Likewise.
6613         (find_reloads): Likewise.
6614         (find_reloads_subreg_address): Likewise.
6615         * reload1.c (alter_reg): Likewise.
6616         (eliminate_regs_1): Likewise.
6617         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
6619 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
6621         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
6622         back to if statements, including unpack.
6624 2017-08-30  Martin Liska  <mliska@suse.cz>
6626         PR inline-asm/82001
6627         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
6628         Rename to ...
6629         (func_checker::compare_asm_inputs_outputs): ... this function.
6630         (func_checker::compare_gimple_asm): Use the function to compare
6631         also ASM constrains.
6632         * ipa-icf-gimple.h: Rename the function.
6634 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6635             Alan Hayward  <alan.hayward@arm.com>
6636             David Sherwood  <david.sherwood@arm.com>
6638         * coretypes.h (complex_mode): New type.
6639         * gdbhooks.py (build_pretty_printer): Handle it.
6640         * machmode.h (complex_mode): New class.
6641         (complex_mode::includes_p): New function.
6642         (is_complex_int_mode): Likewise.
6643         (is_complex_float_mode): Likewise.
6644         * genmodes.c (get_mode_class): Handle complex mode classes.
6645         * function.c (expand_function_end): Use is_complex_int_mode.
6647 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6648             Alan Hayward  <alan.hayward@arm.com>
6649             David Sherwood  <david.sherwood@arm.com>
6651         * coretypes.h (scalar_mode_pod): New typedef.
6652         * gdbhooks.py (build_pretty_printer): Handle it.
6653         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
6654         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
6655         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
6656         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
6657         as_a <scalar_mode>.
6659 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6660             Alan Hayward  <alan.hayward@arm.com>
6661             David Sherwood  <david.sherwood@arm.com>
6663         * machmode.h (mode_for_vector): Take a scalar_mode instead
6664         of a machine_mode.
6665         * stor-layout.c (mode_for_vector): Likewise.
6666         * explow.c (promote_mode): Use as_a <scalar_mode>.
6667         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
6669 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6670             Alan Hayward  <alan.hayward@arm.com>
6671             David Sherwood  <david.sherwood@arm.com>
6673         * target.def (preferred_simd_mode): Take a scalar_mode
6674         instead of a machine_mode.
6675         * targhooks.h (default_preferred_simd_mode): Likewise.
6676         * targhooks.c (default_preferred_simd_mode): Likewise.
6677         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
6678         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
6679         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
6680         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
6681         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
6682         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
6683         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
6684         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
6685         Likewise.
6686         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
6687         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
6688         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
6689         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
6690         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
6691         * doc/tm.texi: Regenerate.
6692         * optabs-query.c (can_vec_mask_load_store_p): Return false for
6693         non-scalar modes.
6695 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6696             Alan Hayward  <alan.hayward@arm.com>
6697             David Sherwood  <david.sherwood@arm.com>
6699         * target.def (scalar_mode_supported_p): Take a scalar_mode
6700         instead of a machine_mode.
6701         * targhooks.h (default_scalar_mode_supported_p): Likewise.
6702         * targhooks.c (default_scalar_mode_supported_p): Likewise.
6703         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
6704         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
6705         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
6706         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
6707         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
6708         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
6709         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
6710         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
6711         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
6712         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
6713         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
6714         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
6715         Likewise.
6716         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
6717         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
6718         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
6719         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
6720         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
6721         Likewise.
6722         * doc/tm.texi: Regenerate.
6724 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6725             Alan Hayward  <alan.hayward@arm.com>
6726             David Sherwood  <david.sherwood@arm.com>
6728         * coretypes.h (opt_scalar_mode): New typedef.
6729         * gdbhooks.py (build_pretty_printers): Handle it.
6730         * machmode.h (mode_iterator::get_2xwider): Add overload for
6731         opt_mode<T>.
6732         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
6733         over scalar modes.
6734         * expr.c (convert_mode_scalar): Likewise.
6735         * omp-low.c (omp_clause_aligned_alignment): Likewise.
6736         * optabs.c (expand_float): Likewise.
6737         (expand_fix): Likewise.
6738         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
6740 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6741             Alan Hayward  <alan.hayward@arm.com>
6742             David Sherwood  <david.sherwood@arm.com>
6744         * optabs.c (expand_float): Explicitly check for scalars before
6745         using a branching expansion.
6746         (expand_fix): Likewise.
6748 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6749             Alan Hayward  <alan.hayward@arm.com>
6750             David Sherwood  <david.sherwood@arm.com>
6752         * expr.c (convert_mode): Split scalar handling out into...
6753         (convert_mode_scalar): ...this new function.  Treat the modes
6754         as scalar_modes.
6756 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6757             Alan Hayward  <alan.hayward@arm.com>
6758             David Sherwood  <david.sherwood@arm.com>
6760         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
6761         and scalar_mode.
6762         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
6764 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6765             Alan Hayward  <alan.hayward@arm.com>
6766             David Sherwood  <david.sherwood@arm.com>
6768         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
6769         rather than a machine_mode.
6770         (fixed_from_string): Likewise.
6771         (fixed_convert): Likewise.
6772         (fixed_convert_from_int): Likewise.
6773         (fixed_convert_from_real): Likewise.
6774         (real_convert_from_fixed): Likewise.
6775         * fixed-value.c (fixed_from_double_int): Likewise.
6776         (fixed_from_string): Likewise.
6777         (fixed_convert): Likewise.
6778         (fixed_convert_from_int): Likewise.
6779         (fixed_convert_from_real): Likewise.
6780         (real_convert_from_fixed): Likewise.
6781         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
6783 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6784             Alan Hayward  <alan.hayward@arm.com>
6785             David Sherwood  <david.sherwood@arm.com>
6787         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
6788         of separate mode class checks.  Do not allow vector modes here.
6789         (immed_wide_int_const): Use as_a <scalar_mode>.
6790         * explow.c (trunc_int_for_mode): Likewise.
6791         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
6792         (wi::shwi): Likewise.
6793         (wi::min_value): Likewise.
6794         (wi::max_value): Likewise.
6795         * dwarf2out.c (loc_descriptor): Likewise.
6796         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
6797         for CONST_WIDE_INT.
6799 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6800             Alan Hayward  <alan.hayward@arm.com>
6801             David Sherwood  <david.sherwood@arm.com>
6803         * tree.h (SCALAR_TYPE_MODE): New macro.
6804         * expr.c (expand_expr_addr_expr_1): Use it.
6805         (expand_expr_real_2): Likewise.
6806         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
6807         (fold_convert_const_fixed_from_int): Likewise.
6808         (fold_convert_const_fixed_from_real): Likewise.
6809         (native_encode_fixed): Likewise
6810         (native_encode_complex): Likewise
6811         (native_encode_vector): Likewise.
6812         (native_interpret_fixed): Likewise.
6813         (native_interpret_real): Likewise.
6814         (native_interpret_complex): Likewise.
6815         (native_interpret_vector): Likewise.
6816         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
6817         (simd_clone_adjust_argument_types): Likewise.
6818         (simd_clone_init_simd_arrays): Likewise.
6819         (simd_clone_adjust): Likewise.
6820         * stor-layout.c (layout_type): Likewise.
6821         * tree.c (build_minus_one_cst): Likewise.
6822         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6823         * tree-inline.c (estimate_move_cost): Likewise.
6824         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
6825         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
6826         (vectorizable_reduction): Likewise.
6827         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
6828         (vect_recog_mixed_size_cond_pattern): Likewise.
6829         (check_bool_pattern): Likewise.
6830         (adjust_bool_pattern): Likewise.
6831         (search_type_for_mask_1): Likewise.
6832         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6833         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
6834         (vectorizable_load): Likewise.
6835         (vectorizable_store): Likewise.
6836         * ubsan.c (ubsan_encode_value): Likewise.
6837         * varasm.c (output_constant): Likewise.
6839 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6840             Alan Hayward  <alan.hayward@arm.com>
6841             David Sherwood  <david.sherwood@arm.com>
6843         * coretypes.h (scalar_mode): New class.
6844         * machmode.h (scalar_mode): Likewise.
6845         (scalar_mode::includes_p): New function.
6846         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
6847         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
6848         * genmodes.c (get_mode_class): Handle remaining scalar modes.
6849         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
6850         * expmed.c (store_bit_field_1): Likewise.
6851         (extract_bit_field_1): Likewise.
6852         * expr.c (write_complex_part): Likewise.
6853         (read_complex_part): Likewise.
6854         (emit_move_complex_push): Likewise.
6855         (expand_expr_real_2): Likewise.
6856         * function.c (assign_parm_setup_reg): Likewise.
6857         (assign_parms_unsplit_complex): Likewise.
6858         * optabs.c (expand_binop): Likewise.
6859         * rtlanal.c (subreg_get_info): Likewise.
6860         * simplify-rtx.c (simplify_immed_subreg): Likewise.
6861         * varasm.c (output_constant_pool_2): Likewise.
6863 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6864             Alan Hayward  <alan.hayward@arm.com>
6865             David Sherwood  <david.sherwood@arm.com>
6867         * expmed.c (extract_high_half): Use scalar_int_mode and remove
6868         assertion.
6869         (expmed_mult_highpart_optab): Likewise.
6870         (expmed_mult_highpart): Likewise.
6872 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6873             Alan Hayward  <alan.hayward@arm.com>
6874             David Sherwood  <david.sherwood@arm.com>
6876         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
6877         instead of a machine_mode.
6878         (builtin_memset_read_str): Likewise.
6879         * builtins.c (c_readstr): Likewise.
6880         (builtin_memcpy_read_str): Likewise.
6881         (builtin_strncpy_read_str): Likewise.
6882         (builtin_memset_read_str): Likewise.
6883         (builtin_memset_gen_str): Likewise.
6884         (expand_builtin_signbit): Use scalar_int_mode for local variables.
6885         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
6886         instead of a machine_mode.
6887         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
6888         variables.
6889         (make_extraction): Likewise.
6890         (try_widen_shift_mode): Take and return scalar_int_modes instead
6891         of machine_modes.
6892         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
6893         a scalar_int_mode instead of a machine_mode.
6894         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
6895         (avr_addr_space_pointer_mode): Likewise.
6896         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
6897         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
6898         (msp430_unwind_word_mode): Likewise.
6899         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
6900         (spu_addr_space_pointer_mode): Likewise.
6901         (spu_addr_space_address_mode): Likewise.
6902         (spu_libgcc_cmp_return_mode): Likewise.
6903         (spu_libgcc_shift_count_mode): Likewise.
6904         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
6905         (rl78_addr_space_pointer_mode): Likewise.
6906         (fl78_unwind_word_mode): Likewise.
6907         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
6908         machine_mode.
6909         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
6910         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
6911         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
6912         (mips_valid_pointer_mode): Likewise.
6913         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
6914         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
6915         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
6916         of a machine_mode.
6917         (ft32_addr_space_address_mode): Likewise.
6918         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
6919         scalar_int_mode instead of a machine_mode.
6920         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
6921         of a machine_mode.
6922         (m32c_addr_space_address_mode): Likewise.
6923         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
6924         (rs6000_eh_return_filter_mode): Likewise.
6925         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
6926         (rs6000_eh_return_filter_mode): Likewise.
6927         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
6928         (s390_libgcc_shift_count_mode): Likewise.
6929         (s390_unwind_word_mode): Likewise.
6930         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
6931         machine_mode.
6932         * target.def (mode_rep_extended): Likewise.
6933         (valid_pointer_mode): Likewise.
6934         (addr_space.valid_pointer_mode): Likewise.
6935         (eh_return_filter_mode): Return a scalar_int_mode rather than
6936         a machine_mode.
6937         (libgcc_cmp_return_mode): Likewise.
6938         (libgcc_shift_count_mode): Likewise.
6939         (unwind_word_mode): Likewise.
6940         (addr_space.pointer_mode): Likewise.
6941         (addr_space.address_mode): Likewise.
6942         * doc/tm.texi: Regenerate.
6943         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
6944         a machine_mode.
6945         (do_jump): Use scalar_int_mode for local variables.
6946         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
6947         rather than a machine_mode.
6948         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
6949         (scompare_loc_descriptor_wide): Likewise.
6950         (scompare_loc_descriptor_narrow): Likewise.
6951         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
6952         variables.
6953         * except.c (sjlj_emit_dispatch_table): Likewise.
6954         (expand_builtin_eh_copy_values): Likewise.
6955         * explow.c (convert_memory_address_addr_space_1): Likewise.
6956         Take a scalar_int_mode rather than a machine_mode.
6957         (convert_memory_address_addr_space): Take a scalar_int_mode rather
6958         than a machine_mode.
6959         (memory_address_addr_space): Use scalar_int_mode for local variables.
6960         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
6961         rather than a machine_mode.
6962         * expmed.c (mask_rtx): Likewise.
6963         (init_expmed_one_conv): Likewise.
6964         (expand_mult_highpart_adjust): Likewise.
6965         (extract_high_half): Likewise.
6966         (expmed_mult_highpart_optab): Likewise.
6967         (expmed_mult_highpart): Likewise.
6968         (expand_smod_pow2): Likewise.
6969         (expand_sdiv_pow2): Likewise.
6970         (emit_store_flag_int): Likewise.
6971         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
6972         variables.
6973         (extract_low_bits): Likewise.
6974         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
6975         a machine_mode.
6976         * expr.c (pieces_addr::adjust):  Likewise.
6977         (can_store_by_pieces): Likewise.
6978         (store_by_pieces): Likewise.
6979         (clear_by_pieces_1): Likewise.
6980         (expand_expr_addr_expr_1): Likewise.
6981         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
6982         (expand_expr_real_1): Likewise.
6983         (try_casesi): Likewise.
6984         * final.c (shorten_branches): Likewise.
6985         * fold-const.c (fold_convert_const_int_from_fixed): Change the
6986         type of "mode" to machine_mode.
6987         * internal-fn.c (expand_arith_overflow_result_store): Take a
6988         scalar_int_mode rather than a machine_mode.
6989         (expand_mul_overflow): Use scalar_int_mode for local variables.
6990         * loop-doloop.c (doloop_modify): Likewise.
6991         (doloop_optimize): Likewise.
6992         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
6993         than a machine_mode.
6994         (expand_doubleword_shift_condmove): Likewise.
6995         (expand_doubleword_shift): Likewise.
6996         (expand_doubleword_clz): Likewise.
6997         (expand_doubleword_popcount): Likewise.
6998         (expand_doubleword_parity): Likewise.
6999         (expand_absneg_bit): Use scalar_int_mode for local variables.
7000         (prepare_float_lib_cmp): Likewise.
7001         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
7002         rather than a machine_mode.
7003         (convert_memory_address_addr_space): Likewise.
7004         (get_mode_bounds): Likewise.
7005         (get_address_mode): Return a scalar_int_mode rather than a
7006         machine_mode.
7007         * rtlanal.c (get_address_mode): Likewise.
7008         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
7009         than a machine_mode.
7010         * targhooks.c (default_mode_rep_extended): Likewise.
7011         (default_valid_pointer_mode): Likewise.
7012         (default_addr_space_valid_pointer_mode): Likewise.
7013         (default_eh_return_filter_mode): Return a scalar_int_mode rather
7014         than a machine_mode.
7015         (default_libgcc_cmp_return_mode): Likewise.
7016         (default_libgcc_shift_count_mode): Likewise.
7017         (default_unwind_word_mode): Likewise.
7018         (default_addr_space_pointer_mode): Likewise.
7019         (default_addr_space_address_mode): Likewise.
7020         * targhooks.h (default_eh_return_filter_mode): Likewise.
7021         (default_libgcc_cmp_return_mode): Likewise.
7022         (default_libgcc_shift_count_mode): Likewise.
7023         (default_unwind_word_mode): Likewise.
7024         (default_addr_space_pointer_mode): Likewise.
7025         (default_addr_space_address_mode): Likewise.
7026         (default_mode_rep_extended): Take a scalar_int_mode rather than
7027         a machine_mode.
7028         (default_valid_pointer_mode): Likewise.
7029         (default_addr_space_valid_pointer_mode): Likewise.
7030         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
7031         local variables.
7032         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
7033         rather than a machine_mode.
7034         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
7035         for local variables.
7036         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7037         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
7038         than a machine_mode.
7040 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7041             Alan Hayward  <alan.hayward@arm.com>
7042             David Sherwood  <david.sherwood@arm.com>
7044         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
7045         the mode argument to scalar_int_mode.
7046         (do_jump_by_parts_zero_rtx): Likewise.
7047         (do_jump_by_parts_equality_rtx): Likewise.
7048         (do_jump_by_parts_greater): Take a mode argument.
7049         (do_jump_by_parts_equality): Likewise.
7050         (do_jump_1): Update calls accordingly.
7052 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7053             Alan Hayward  <alan.hayward@arm.com>
7054             David Sherwood  <david.sherwood@arm.com>
7056         * is-a.h (safe_dyn_cast): New function.
7057         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
7058         (jump_table_for_label): Likewise.
7059         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
7060         instead of an rtx_insn *.
7061         (shorten_branches): Use dyn_cast instead of LABEL_P and
7062         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
7063         rtx_jump_table_data::get_data_mode.
7064         (final_scan_insn): Likewise.
7066 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7067             Alan Hayward  <alan.hayward@arm.com>
7068             David Sherwood  <david.sherwood@arm.com>
7070         * combine.c (try_combine): Use is_a <scalar_int_mode> when
7071         trying to combine a full-register integer set with a subreg
7072         integer set.
7074 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7075             Alan Hayward  <alan.hayward@arm.com>
7076             David Sherwood  <david.sherwood@arm.com>
7078         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
7079         that is always either address_mode or pointer_mode.
7081 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7082             Alan Hayward  <alan.hayward@arm.com>
7083             David Sherwood  <david.sherwood@arm.com>
7085         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
7086         when the two are known to be equal.
7088 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7089             Alan Hayward  <alan.hayward@arm.com>
7090             David Sherwood  <david.sherwood@arm.com>
7092         * simplify-rtx.c (simplify_const_unary_operation): Use
7093         is_a <scalar_int_mode> instead of checking for a nonzero
7094         precision.  Forcibly convert op_mode to a scalar_int_mode
7095         in that case.  More clearly differentiate the operand and
7096         result modes and use the former when deciding what the value
7097         of a count-bits operation should be.  Use is_int_mode instead
7098         of checking for a MODE_INT.  Remove redundant check for whether
7099         this mode has a zero precision.
7101 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7102             Alan Hayward  <alan.hayward@arm.com>
7103             David Sherwood  <david.sherwood@arm.com>
7105         * optabs.c (widen_leading): Change the type of the mode argument
7106         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
7107         (widen_bswap): Likewise.
7108         (expand_parity): Likewise.
7109         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
7110         (expand_ffs): Likewise.
7111         (epand_unop): Check for scalar integer modes before calling the
7112         above routines.
7114 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7115             Alan Hayward  <alan.hayward@arm.com>
7116             David Sherwood  <david.sherwood@arm.com>
7118         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
7119         Expand commentary.
7120         (expand_expr_real_1): Update call accordingly.
7122 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7123             Alan Hayward  <alan.hayward@arm.com>
7124             David Sherwood  <david.sherwood@arm.com>
7126         * expmed.c (store_bit_field_using_insv): Add op0_mode and
7127         value_mode arguments.  Use scalar_int_mode internally.
7128         (store_bit_field_1): Rename the new integer mode from imode
7129         to op0_mode and use it instead of GET_MODE (op0).  Update calls
7130         to store_split_bit_field, store_bit_field_using_insv and
7131         store_fixed_bit_field.
7132         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
7133         Use scalar_int_mode internally.  Use a bit count rather than a mode
7134         when calculating the largest bit size for get_best_mode.
7135         Update calls to store_split_bit_field and store_fixed_bit_field_1.
7136         (store_fixed_bit_field_1): Add mode and value_mode arguments.
7137         Remove assertion that OP0 has a scalar integer mode.
7138         (store_split_bit_field): Add op0_mode and value_mode arguments.
7139         Update calls to extract_fixed_bit_field.
7140         (extract_bit_field_using_extv): Add an op0_mode argument.
7141         Use scalar_int_mode internally.
7142         (extract_bit_field_1): Rename the new integer mode from imode to
7143         op0_mode and use it instead of GET_MODE (op0).  Update calls to
7144         extract_split_bit_field, extract_bit_field_using_extv and
7145         extract_fixed_bit_field.
7146         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
7147         to extract_split_bit_field and extract_fixed_bit_field_1.
7148         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
7149         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
7150         on the target mode.
7151         (extract_split_bit_field): Add an op0_mode argument.  Update call
7152         to extract_fixed_bit_field.
7154 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7155             Alan Hayward  <alan.hayward@arm.com>
7156             David Sherwood  <david.sherwood@arm.com>
7158         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
7159         * explow.c (hard_function_value): Likewise.
7160         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
7161         convert_to_mode call outside the loop.
7162         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
7163         for the mode iterator.  Require the mode specified by max_pieces
7164         to exist.
7165         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
7166         mode iterator.
7167         (copy_blkmode_to_reg): Likewise.
7168         (set_storage_via_setmem): Likewise.
7169         * optabs.c (prepare_cmp_insn): Likewise.
7170         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
7171         * stor-layout.c (finish_bitfield_representative): Likewise.
7173 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7174             Alan Hayward  <alan.hayward@arm.com>
7175             David Sherwood  <david.sherwood@arm.com>
7177         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
7178         * expr.c (convert_move): Use them.
7179         (convert_modes): Likewise.
7180         (store_expr_with_bounds): Likewise.
7182 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7183             Alan Hayward  <alan.hayward@arm.com>
7184             David Sherwood  <david.sherwood@arm.com>
7186         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
7187         parameter for the mode of "x".  Remove the "known_x", "known_mode"
7188         and "known_ret" arguments.  Change the type of the mode argument
7189         to scalar_int_mode.
7190         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
7191         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
7192         (reg_num_sign_bit_copies_for_combine): Likewise.
7193         * rtlanal.c (nonzero_bits1): Likewise.
7194         (num_sign_bit_copies1): Likewise.
7195         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
7196         (reg_num_sign_bit_copies_general): Likewise.
7197         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
7198         (reg_nonzero_bits_general): Likewise.
7200 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7201             Alan Hayward  <alan.hayward@arm.com>
7202             David Sherwood  <david.sherwood@arm.com>
7204         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
7205         than in subroutines.  Return 1 for non-integer modes.
7206         (cached_num_sign_bit_copies): Change the type of the mode parameter
7207         to scalar_int_mode.
7208         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
7209         classes.  Handle CONST_INT_P first and then check whether X also
7210         has a scalar integer mode.  Check the same thing for inner registers
7211         of a SUBREG and for values that are being extended or truncated.
7213 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7214             Alan Hayward  <alan.hayward@arm.com>
7215             David Sherwood  <david.sherwood@arm.com>
7217         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
7218         in subroutines.  Return the mode mask for non-integer modes.
7219         (cached_nonzero_bits): Change the type of the mode parameter
7220         to scalar_int_mode.
7221         (nonzero_bits1): Likewise.  Remove early exit for other mode
7222         classes.  Handle CONST_INT_P first and then check whether X
7223         also has a scalar integer mode.
7225 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7226             Alan Hayward  <alan.hayward@arm.com>
7227             David Sherwood  <david.sherwood@arm.com>
7229         * expr.c (widest_int_mode_for_size): Make the comment match the code.
7230         Return a scalar_int_mode and assert that the size is greater than
7231         one byte.
7232         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
7233         (op_by_pieces_d::op_by_pieces_d): Likewise.
7234         (op_by_pieces_d::run): Likewise.
7235         (can_store_by_pieces): Likewise.
7237 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7238             Alan Hayward  <alan.hayward@arm.com>
7239             David Sherwood  <david.sherwood@arm.com>
7241         * combine.c (extract_left_shift): Add a mode argument and update
7242         recursive calls.
7243         (make_compound_operation_int): Change the type of the mode parameter
7244         to scalar_int_mode and update the call to extract_left_shift.
7246 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7247             Alan Hayward  <alan.hayward@arm.com>
7248             David Sherwood  <david.sherwood@arm.com>
7250         * combine.c (simplify_and_const_int): Change the type of the mode
7251         parameter to scalar_int_mode.
7252         (simplify_and_const_int_1): Likewise.  Update recursive call.
7254 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7255             Alan Hayward  <alan.hayward@arm.com>
7256             David Sherwood  <david.sherwood@arm.com>
7258         * combine.c (simplify_compare_const): Check that the mode is a
7259         scalar_int_mode (rather than VOIDmode) before testing its
7260         precision.
7261         (simplify_comparison): Move COMPARISON_P handling out of the
7262         loop and restrict the latter part of the loop to scalar_int_modes.
7263         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
7264         and when considering SUBREG_REGs.  Use is_int_mode instead of
7265         checking GET_MODE_CLASS against MODE_INT.
7267 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7268             Alan Hayward  <alan.hayward@arm.com>
7269             David Sherwood  <david.sherwood@arm.com>
7271         * combine.c (try_widen_shift_mode): Move check for equal modes to...
7272         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
7273         shift_unit_mode and for modes involved in scalar shifts.
7275 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7276             Alan Hayward  <alan.hayward@arm.com>
7277             David Sherwood  <david.sherwood@arm.com>
7279         * combine.c (force_int_to_mode): New function, split out from...
7280         (force_to_mode): ...here.  Keep xmode up-to-date and use it
7281         instead of GET_MODE (x).
7283 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7284             Alan Hayward  <alan.hayward@arm.com>
7285             David Sherwood  <david.sherwood@arm.com>
7287         * optabs-query.h (extraction_insn::struct_mode): Change type to
7288         opt_scalar_int_mode and update comment.
7289         (extraction_insn::field_mode): Change type to scalar_int_mode.
7290         (extraction_insn::pos_mode): Likewise.
7291         * combine.c (make_extraction): Update accordingly.
7292         * optabs-query.c (get_traditional_extraction_insn): Likewise.
7293         (get_optab_extraction_insn): Likewise.
7294         * recog.c (simplify_while_replacing): Likewise.
7295         * expmed.c (narrow_bit_field_mem): Change the type of the mode
7296         parameter to opt_scalar_int_mode.
7298 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7299             Alan Hayward  <alan.hayward@arm.com>
7300             David Sherwood  <david.sherwood@arm.com>
7302         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
7303         to a scalar_int_mode instead of a machine_mode.
7304         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
7305         (get_best_mode): Return a boolean and use a pointer argument to store
7306         the selected mode.  Replace the limit mode parameter with a bit limit.
7307         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
7308         for the values returned by bit_field_mode_iterator::next_mode.
7309         (store_bit_field): Update call to get_best_mode.
7310         (store_fixed_bit_field): Likewise.
7311         (extract_fixed_bit_field): Likewise.
7312         * expr.c (optimize_bitfield_assignment_op): Likewise.
7313         * fold-const.c (optimize_bit_field_compare): Likewise.
7314         (fold_truth_andor_1): Likewise.
7315         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
7316         Update for new type of m_mode.
7317         (get_best_mode): As above.
7319 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7320             Alan Hayward  <alan.hayward@arm.com>
7321             David Sherwood  <david.sherwood@arm.com>
7323         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
7324         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
7325         (store_bit_field): Check is_a <scalar_int_mode> before calling
7326         strict_volatile_bitfield_p.
7327         (extract_bit_field): Likewise.
7329 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7330             Alan Hayward  <alan.hayward@arm.com>
7331             David Sherwood  <david.sherwood@arm.com>
7333         * target.def (cstore_mode): Return a scalar_int_mode.
7334         * doc/tm.texi: Regenerate.
7335         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
7336         * targhooks.h (default_cstore_mode): Likewise.
7337         * targhooks.c (default_cstore_mode): Likewise, using a forced
7338         conversion.
7339         * expmed.c (emit_cstore): Expect the target of the cstore to be
7340         a scalar_int_mode.
7342 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7343             Alan Hayward  <alan.hayward@arm.com>
7344             David Sherwood  <david.sherwood@arm.com>
7346         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
7347         scalar_int_mode.
7348         (niter_desc): Likewise mode.
7349         (iv_analyze): Add a mode parameter.
7350         (biv_p): Likewise.
7351         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
7352         and change its type to scalar_int_mode.
7353         * loop-iv.c: Update commentary at head of file.
7354         (iv_constant): Pass the mode paraeter before the rtx it describes
7355         and change its type to scalar_int_mode.  Remove VOIDmode handling.
7356         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
7357         (iv_extend): Likewise.
7358         (shorten_into_mode): Likewise.
7359         (iv_add): Use scalar_int_mode.
7360         (iv_mult): Likewise.
7361         (iv_shift): Likewise.
7362         (canonicalize_iv_subregs): Likewise.
7363         (get_biv_step_1): Pass the outer_mode parameter before the rtx
7364         it describes and change its mode to scalar_int_mode.   Also change
7365         the type of the returned inner_mode to scalar_int_mode.
7366         (get_biv_step): Likewise, turning outer_mode from a pointer
7367         into a direct parameter.  Update call to get_biv_step_1.
7368         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
7369         iv_constant and get_biv_step.
7370         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
7371         and change its type to scalar_int_mode.  Don't initialise iv->mode
7372         to VOIDmode and remove later checks for its still being VOIDmode.
7373         Update calls to iv_analyze_op and iv_analyze_expr.  Check
7374         is_a <scalar_int_mode> when changing the mode under consideration.
7375         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
7376         Update call to iv_analyze_expr.
7377         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
7378         inner register is not also a scalar_int_mode.  Update call to
7379         iv_analyze_biv.
7380         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
7381         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
7382         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
7383         separate mode class checks.  Update calls to iv_analyze.  Remove
7384         fix-up of VOIDmodes after iv_analyze_biv.
7385         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
7386         don't have a scalar_int_mode.  Update call to biv_p.
7388 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7389             Alan Hayward  <alan.hayward@arm.com>
7390             David Sherwood  <david.sherwood@arm.com>
7392         * cfgexpand.c (convert_debug_memory_address): Use
7393         as_a <scalar_int_mode>.
7394         * combine.c (expand_compound_operation): Likewise.
7395         (make_extraction): Likewise.
7396         (change_zero_ext): Likewise.
7397         (simplify_comparison): Likewise.
7398         * cse.c (cse_insn): Likewise.
7399         * dwarf2out.c (minmax_loc_descriptor): Likewise.
7400         (mem_loc_descriptor): Likewise.
7401         (loc_descriptor): Likewise.
7402         * expmed.c (init_expmed_one_mode): Likewise.
7403         (synth_mult): Likewise.
7404         (emit_store_flag_1): Likewise.
7405         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
7406         of a comparison with size.
7407         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
7408         (reduce_to_bit_field_precision): Likewise.
7409         * function.c (expand_function_end): Likewise.
7410         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
7411         * loop-doloop.c (doloop_modify): Likewise.
7412         * optabs.c (expand_binop): Likewise.
7413         (expand_unop): Likewise.
7414         (expand_copysign_absneg): Likewise.
7415         (prepare_cmp_insn): Likewise.
7416         (maybe_legitimize_operand): Likewise.
7417         * recog.c (const_scalar_int_operand): Likewise.
7418         * rtlanal.c (get_address_mode): Likewise.
7419         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7420         (simplify_cond_clz_ctz): Likewise.
7421         * tree-nested.c (get_nl_goto_field): Likewise.
7422         * tree.c (build_vector_type_for_mode): Likewise.
7423         * var-tracking.c (use_narrower_mode): Likewise.
7425 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7426             Alan Hayward  <alan.hayward@arm.com>
7427             David Sherwood  <david.sherwood@arm.com>
7429         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
7430         * builtins.c (expand_builtin_signbit): Use it.
7431         * cfgexpand.c (expand_debug_expr): Likewise.
7432         * dojump.c (do_jump): Likewise.
7433         (do_compare_and_jump): Likewise.
7434         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
7435         * expmed.c (make_tree): Likewise.
7436         * expr.c (expand_expr_real_2): Likewise.
7437         (expand_expr_real_1): Likewise.
7438         (try_casesi): Likewise.
7439         * fold-const-call.c (fold_const_call_ss): Likewise.
7440         * fold-const.c (unextend): Likewise.
7441         (extract_muldiv_1): Likewise.
7442         (fold_single_bit_test): Likewise.
7443         (native_encode_int): Likewise.
7444         (native_encode_string): Likewise.
7445         (native_interpret_int): Likewise.
7446         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
7447         * internal-fn.c (expand_addsub_overflow): Likewise.
7448         (expand_neg_overflow): Likewise.
7449         (expand_mul_overflow): Likewise.
7450         (expand_arith_overflow): Likewise.
7451         * match.pd: Likewise.
7452         * stor-layout.c (layout_type): Likewise.
7453         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7454         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
7455         * tree-ssanames.c (get_range_info): Likewise.
7456         * tree-switch-conversion.c (array_value_type) Likewise.
7457         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
7458         (vect_recog_divmod_pattern): Likewise.
7459         (vect_recog_mixed_size_cond_pattern): Likewise.
7460         * tree-vrp.c (extract_range_basic): Likewise.
7461         (simplify_float_conversion_using_ranges): Likewise.
7462         * tree.c (int_fits_type_p): Likewise.
7463         * ubsan.c (instrument_bool_enum_load): Likewise.
7464         * varasm.c (mergeable_string_section): Likewise.
7465         (narrowing_initializer_constant_valid_p): Likewise.
7466         (output_constant): Likewise.
7468 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7469             Alan Hayward  <alan.hayward@arm.com>
7470             David Sherwood  <david.sherwood@arm.com>
7472         * machmode.h (NARROWEST_INT_MODE): New macro.
7473         * expr.c (alignment_for_piecewise_move): Use it instead of
7474         GET_CLASS_NARROWEST_MODE (MODE_INT).
7475         (push_block): Likewise.
7476         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
7477         Likewise.
7478         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7480 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7481             Alan Hayward  <alan.hayward@arm.com>
7482             David Sherwood  <david.sherwood@arm.com>
7484         * postreload.c (move2add_valid_value_p): Change the type of the
7485         mode parameter to scalar_int_mode.
7486         (move2add_use_add2_insn): Add a mode parameter and use it instead
7487         of GET_MODE (reg).
7488         (move2add_use_add3_insn): Likewise.
7489         (reload_cse_move2add): Update accordingly.
7491 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7492             Alan Hayward  <alan.hayward@arm.com>
7493             David Sherwood  <david.sherwood@arm.com>
7495         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
7496         double-word mode.
7497         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
7498         * optabs.c (expand_unop): Likewise.
7500 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7501             Alan Hayward  <alan.hayward@arm.com>
7502             David Sherwood  <david.sherwood@arm.com>
7504         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
7505         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
7506         (popcount_loc_descriptor): Likewise.
7507         (bswap_loc_descriptor): Likewise.
7508         (rotate_loc_descriptor): Likewise.
7509         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
7510         calling the functions above.
7512 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7513             Alan Hayward  <alan.hayward@arm.com>
7514             David Sherwood  <david.sherwood@arm.com>
7516         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
7517         checks.
7518         (try_combine): Likewise.
7519         (simplify_if_then_else): Likewise.
7520         * cse.c (cse_insn): Likewise.
7521         * dwarf2out.c (mem_loc_descriptor): Likewise.
7522         * emit-rtl.c (gen_lowpart_common): Likewise.
7523         * simplify-rtx.c (simplify_truncation): Likewise.
7524         (simplify_binary_operation_1): Likewise.
7525         (simplify_const_relational_operation): Likewise.
7526         (simplify_ternary_operation): Likewise.
7527         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
7529 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7530             Alan Hayward  <alan.hayward@arm.com>
7531             David Sherwood  <david.sherwood@arm.com>
7533         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
7534         * reload.c (push_reload): Likewise.
7535         (find_reloads): Likewise.
7537 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7538             Alan Hayward  <alan.hayward@arm.com>
7539             David Sherwood  <david.sherwood@arm.com>
7541         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
7542         (make_compound_operation_int): Likewise.
7543         (change_zero_ext): Likewise.
7544         * expr.c (convert_move): Likewise.
7545         (convert_modes): Likewise.
7546         * fwprop.c (forward_propagate_subreg): Likewise.
7547         * loop-iv.c (get_biv_step_1): Likewise.
7548         * optabs.c (widen_operand): Likewise.
7549         * postreload.c (move2add_valid_value_p): Likewise.
7550         * recog.c (simplify_while_replacing): Likewise.
7551         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7552         (simplify_binary_operation_1): Likewise.  Remove redundant
7553         mode equality check.
7555 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7556             Alan Hayward  <alan.hayward@arm.com>
7557             David Sherwood  <david.sherwood@arm.com>
7559         * combine.c (combine_simplify_rtx): Add checks for
7560         is_a <scalar_int_mode>.
7561         (simplify_if_then_else): Likewise.
7562         (make_field_assignment): Likewise.
7563         (simplify_comparison): Likewise.
7564         * ifcvt.c (noce_try_bitop): Likewise.
7565         * loop-invariant.c (canonicalize_address_mult): Likewise.
7566         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7568 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7569             Alan Hayward  <alan.hayward@arm.com>
7570             David Sherwood  <david.sherwood@arm.com>
7572         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
7573         is_a <scalar_int_mode> instead of != BLKmode.
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         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
7580         instead of != VOIDmode.
7581         * combine.c (if_then_else_cond): Likewise.
7582         (change_zero_ext): Likewise.
7583         * dwarf2out.c (mem_loc_descriptor): Likewise.
7584         (loc_descriptor): Likewise.
7585         * rtlanal.c (canonicalize_condition): Likewise.
7586         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
7588 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7589             Alan Hayward  <alan.hayward@arm.com>
7590             David Sherwood  <david.sherwood@arm.com>
7592         * simplify-rtx.c (simplify_binary_operation_1): Use
7593         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
7595 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7596             Alan Hayward  <alan.hayward@arm.com>
7597             David Sherwood  <david.sherwood@arm.com>
7599         * wide-int.h (int_traits<unsigned char>) New class.
7600         (int_traits<unsigned short>) Likewise.
7601         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
7602         Use GET_MODE_UNIT_PRECISION and remove redundant test for
7603         SCALAR_INT_MODE_P.
7604         * combine.c (set_nonzero_bits_and_sign_copies): Use
7605         is_a <scalar_int_mode>.
7606         (find_split_point): Likewise.
7607         (combine_simplify_rtx): Likewise.
7608         (simplify_logical): Likewise.
7609         (expand_compound_operation): Likewise.
7610         (expand_field_assignment): Likewise.
7611         (make_compound_operation): Likewise.
7612         (extended_count): Likewise.
7613         (change_zero_ext): Likewise.
7614         (simplify_comparison): Likewise.
7615         * dwarf2out.c (scompare_loc_descriptor): Likewise.
7616         (ucompare_loc_descriptor): Likewise.
7617         (minmax_loc_descriptor): Likewise.
7618         (mem_loc_descriptor): Likewise.
7619         (loc_descriptor): Likewise.
7620         * expmed.c (init_expmed_one_mode): Likewise.
7621         * lra-constraints.c (lra_constraint_offset): Likewise.
7622         * optabs.c (prepare_libcall_arg): Likewise.
7623         * postreload.c (move2add_note_store): Likewise.
7624         * reload.c (operands_match_p): Likewise.
7625         * rtl.h (load_extend_op): Likewise.
7626         * rtlhooks.c (gen_lowpart_general): Likewise.
7627         * simplify-rtx.c (simplify_truncation): Likewise.
7628         (simplify_unary_operation_1): Likewise.
7629         (simplify_binary_operation_1): Likewise.
7630         (simplify_const_binary_operation): Likewise.
7631         (simplify_const_relational_operation): Likewise.
7632         (simplify_subreg): Likewise.
7633         * stor-layout.c (bitwise_mode_for_mode): Likewise.
7634         * var-tracking.c (adjust_mems): Likewise.
7635         (prepare_call_arguments): Likewise.
7637 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7638             Alan Hayward  <alan.hayward@arm.com>
7639             David Sherwood  <david.sherwood@arm.com>
7641         * machmode.h (is_int_mode): New fuction.
7642         * combine.c (find_split_point): Use it.
7643         (combine_simplify_rtx): Likewise.
7644         (simplify_if_then_else): Likewise.
7645         (simplify_set): Likewise.
7646         (simplify_shift_const_1): Likewise.
7647         (simplify_comparison): Likewise.
7648         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
7649         * cse.c (notreg_cost): Likewise.
7650         (cse_insn): Likewise.
7651         * cselib.c (cselib_lookup_1): Likewise.
7652         * dojump.c (do_jump_1): Likewise.
7653         (do_compare_rtx_and_jump): Likewise.
7654         * dse.c (get_call_args): Likewise.
7655         * dwarf2out.c (rtl_for_decl_init): Likewise.
7656         (native_encode_initializer): Likewise.
7657         * expmed.c (emit_store_flag_1): Likewise.
7658         (emit_store_flag): Likewise.
7659         * expr.c (convert_modes): Likewise.
7660         (store_field): Likewise.
7661         (expand_expr_real_1): Likewise.
7662         * fold-const.c (fold_read_from_constant_string): Likewise.
7663         * gimple-ssa-sprintf.c (get_format_string): Likewise.
7664         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
7665         * optabs.c (expand_binop): Likewise.
7666         (expand_unop): Likewise.
7667         (expand_abs_nojump): Likewise.
7668         (expand_one_cmpl_abs_nojump): Likewise.
7669         * simplify-rtx.c (mode_signbit_p): Likewise.
7670         (val_signbit_p): Likewise.
7671         (val_signbit_known_set_p): Likewise.
7672         (val_signbit_known_clear_p): Likewise.
7673         (simplify_relational_operation_1): Likewise.
7674         * tree.c (vector_type_mode): Likewise.
7676 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7677             Alan Hayward  <alan.hayward@arm.com>
7678             David Sherwood  <david.sherwood@arm.com>
7680         * machmode.h (smallest_mode_for_size): Fix formatting.
7681         (smallest_int_mode_for_size): New function.
7682         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
7683         instead of smallest_mode_for_size.
7684         * combine.c (make_extraction): Likewise.
7685         * config/arc/arc.c (arc_expand_movmem): Likewise.
7686         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
7687         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
7688         * config/s390/s390.c (s390_expand_insv): Likewise.
7689         * config/sparc/sparc.c (assign_int_registers): Likewise.
7690         * config/spu/spu.c (spu_function_value): Likewise.
7691         (spu_function_arg): Likewise.
7692         * coverage.c (get_gcov_type): Likewise.
7693         (get_gcov_unsigned_t): Likewise.
7694         * dse.c (find_shift_sequence): Likewise.
7695         * expmed.c (store_bit_field_1): Likewise.
7696         * expr.c (convert_move): Likewise.
7697         (store_field): Likewise.
7698         * internal-fn.c (expand_arith_overflow): Likewise.
7699         * optabs-query.c (get_best_extraction_insn): Likewise.
7700         * optabs.c (expand_twoval_binop_libfunc): Likewise.
7701         * stor-layout.c (layout_type): Likewise.
7702         (initialize_sizetypes): Likewise.
7703         * targhooks.c (default_get_mask_mode): Likewise.
7704         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
7706 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7707             Alan Hayward  <alan.hayward@arm.com>
7708             David Sherwood  <david.sherwood@arm.com>
7710         * machmode.h (opt_mode::else_blk): New function.
7711         (int_mode_for_mode): Declare.
7712         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
7713         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
7714         return type.
7715         * cfgexpand.c (expand_debug_expr): Likewise.
7716         * combine.c (gen_lowpart_or_truncate): Likewise.
7717         (gen_lowpart_for_combine): Likewise.
7718         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
7719         * config/avr/avr.c (avr_to_int_mode): Likewise.
7720         (avr_out_plus_1): Likewise.
7721         (avr_out_plus): Likewise.
7722         (avr_out_round): Likewise.
7723         * config/i386/i386.c (ix86_split_to_parts): Likewise.
7724         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
7725         (s390_expand_vcond): Likewise.
7726         * config/spu/spu.c (spu_split_immediate): Likewise.
7727         (spu_expand_mov): Likewise.
7728         * dse.c (get_stored_val): Likewise.
7729         * expmed.c (store_bit_field_1): Likewise.
7730         (convert_extracted_bit_field): Use int_mode_for_mode instead of
7731         int_mode_for_size.
7732         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
7733         (extract_low_bits): Likewise.
7734         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
7735         handling rather than repeating the check.
7736         (emit_group_store): Likewise.
7737         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
7738         * optabs.c (expand_absneg_bit): Likewise.
7739         (expand_copysign_absneg): Likewise.
7740         (expand_copysign_bit): Likewise.
7741         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
7742         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
7743         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
7744         * var-tracking.c (prepare_call_arguments):  Likewise.
7745         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
7746         int_mode_for_mode instead of mode_for_size.
7747         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
7749 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7750             Alan Hayward  <alan.hayward@arm.com>
7751             David Sherwood  <david.sherwood@arm.com>
7753         * machmode.h (int_mode_for_size): New function.
7754         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
7755         instead of mode_for_size.
7756         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
7757         explicit.
7758         * combine.c (expand_field_assignment): Use int_mode_for_size
7759         instead of mode_for_size.
7760         (make_extraction): Likewise.
7761         (simplify_shift_const_1): Likewise.
7762         (simplify_comparison): Likewise.
7763         * dojump.c (do_jump): Likewise.
7764         * dwarf2out.c (mem_loc_descriptor): Likewise.
7765         * emit-rtl.c (init_derived_machine_modes): Likewise.
7766         * expmed.c (flip_storage_order): Likewise.
7767         (convert_extracted_bit_field): Likewise.
7768         * expr.c (copy_blkmode_from_reg): Likewise.
7769         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
7770         * internal-fn.c (expand_mul_overflow): Likewise.
7771         * lower-subreg.c (simple_move): Likewise.
7772         * optabs-libfuncs.c (init_optabs): Likewise.
7773         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7774         * tree.c (vector_type_mode): Likewise.
7775         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
7776         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
7777         * tree-vect-generic.c (expand_vector_parallel): Likewise.
7778         * tree-vect-stmts.c (vectorizable_load): Likewise.
7779         (vectorizable_store): Likewise.
7781 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7782             Alan Hayward  <alan.hayward@arm.com>
7783             David Sherwood  <david.sherwood@arm.com>
7785         * coretypes.h (pod_mode): New type.
7786         (scalar_int_mode_pod): New typedef.
7787         * machmode.h (pod_mode): New class.
7788         (int_n_data_t::m): Change type to scalar_int_mode_pod.
7789         * genmodes.c (emit_mode_int_n): Update accordingly.
7790         * lower-subreg.h (target_lower_subreg): Change type to
7791         scalar_int_mode_pod.
7792         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
7793         scalar_int_mode_pod.
7795 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7796             Alan Hayward  <alan.hayward@arm.com>
7797             David Sherwood  <david.sherwood@arm.com>
7799         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
7800         machine_mode to scalar_int_mode.
7801         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
7802         (rs6000_option_override_internal): Remove cast to int.
7803         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
7804         machine_mode to scalar_int_mode.
7805         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
7806         (rs6000_option_override_internal): Remove cast to int.
7807         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
7808         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
7809         to machine_mode.
7810         * config/s390/s390.c (s390_expand_builtin): Likewise.
7811         * coretypes.h (scalar_int_mode): New type.
7812         (opt_scalar_int_mode): New typedef.
7813         * machmode.h (scalar_int_mode): New class.
7814         (scalar_int_mode::includes_p): New function.
7815         (byte_mode): Change type to scalar_int_mode.
7816         (word_mode): Likewise.
7817         (ptr_mode): Likewise.
7818         * emit-rtl.c (byte_mode): Likewise.
7819         (word_mode): Likewise.
7820         (ptr_mode): Likewise.
7821         (init_derived_machine_modes): Update accordingly.
7822         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
7823         and MODE_PARTIAL_INT.
7824         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
7825         opt_scalar_int_mode.
7827 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7828             Alan Hayward  <alan.hayward@arm.com>
7829             David Sherwood  <david.sherwood@arm.com>
7831         * target.def (libgcc_floating_mode_supported_p): Take a
7832         scalar_float_mode.
7833         * doc/tm.texi: Regenerate.
7834         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
7835         scalar_float_mode.
7836         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
7837         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
7838         Likewise.
7840 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7841             Alan Hayward  <alan.hayward@arm.com>
7842             David Sherwood  <david.sherwood@arm.com>
7844         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
7845         * doc/tm.texi: Regenerate.
7846         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
7847         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
7848         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
7849         * targhooks.h (default_floatn_mode): Likewise.
7850         * targhooks.c (default_floatn_mode): Likewise.
7851         * tree.c (build_common_tree_nodes): Update accordingly.
7853 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7854             Alan Hayward  <alan.hayward@arm.com>
7855             David Sherwood  <david.sherwood@arm.com>
7857         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
7858         (mode_iterator::iterate_p): Likewise.
7859         (mode_iterator::get_wider): Likewise.
7860         * expr.c (init_expr_target): Use opt_scalar_float_mode.
7862 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7863             Alan Hayward  <alan.hayward@arm.com>
7864             David Sherwood  <david.sherwood@arm.com>
7866         * coretypes.h (opt_scalar_float_mode): New typedef.
7867         * machmode.h (float_mode_for_size): New function.
7868         * emit-rtl.c (double_mode): Delete.
7869         (init_emit_once): Use float_mode_for_size.
7870         * stor-layout.c (layout_type): Likewise.
7871         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
7873 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7874             Alan Hayward  <alan.hayward@arm.com>
7875             David Sherwood  <david.sherwood@arm.com>
7877         * output.h (assemble_real): Take a scalar_float_mode.
7878         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
7879         * config/arm/arm.md (consttable_4): Likewise.
7880         (consttable_8): Likewise.
7881         (consttable_16): Likewise.
7882         * config/mips/mips.md (consttable_float): Likewise.
7883         * config/s390/s390.c (s390_output_pool_entry): Likewise.
7884         * varasm.c (assemble_real): Take a scalar_float_mode.
7885         (output_constant_pool_2): Update accordingly.
7886         (output_constant): Likewise.
7888 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7889             Alan Hayward  <alan.hayward@arm.com>
7890             David Sherwood  <david.sherwood@arm.com>
7892         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
7893         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
7894         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
7895         (native_encode_real): Likewise.
7896         (native_interpret_real): Likewise.
7897         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
7898         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7900 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7901             Alan Hayward  <alan.hayward@arm.com>
7902             David Sherwood  <david.sherwood@arm.com>
7904         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
7905         <scalar_float_mode>.  Simplify.
7906         (gen_extend_conv_libfunc): Likewise.
7908 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7909             Alan Hayward  <alan.hayward@arm.com>
7910             David Sherwood  <david.sherwood@arm.com>
7912         * coretypes.h (scalar_float_mode): New type.
7913         * machmode.h (mode_traits::from_int): Use machine_mode if
7914         USE_ENUM_MODES is defined.
7915         (is_a): New function.
7916         (as_a): Likewise.
7917         (dyn_cast): Likewise.
7918         (scalar_float_mode): New class.
7919         (scalar_float_mode::includes_p): New function.
7920         (is_float_mode): Likewise.
7921         * gdbhooks.py (MachineModePrinter): New class.
7922         (build_pretty_printer): Use it for scalar_float_mode.
7923         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
7924         (format_helper::format_helper): Turn into a template.
7925         * genmodes.c (get_mode_class): New function.
7926         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
7927         or machine_mode if none.
7928         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
7929         as_a <scalar_float_mode>.
7930         * dwarf2out.c (mem_loc_descriptor): Likewise.
7931         (insert_float): Likewise.
7932         (add_const_value_attribute): Likewise.
7933         * simplify-rtx.c (simplify_immed_subreg): Likewise.
7934         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
7935         (expand_unop): Update accordingly.
7936         (expand_abs_nojump): Likewise.
7937         (expand_copysign_absneg): Take a scalar_float_mode.
7938         (expand_copysign_bit): Likewise.
7939         (expand_copysign): Update accordingly.
7941 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7942             Alan Hayward  <alan.hayward@arm.com>
7943             David Sherwood  <david.sherwood@arm.com>
7945         * coretypes.h (opt_mode): New class.
7946         * machmode.h (opt_mode): Likewise.
7947         (opt_mode::else_void): New function.
7948         (opt_mode::require): Likewise.
7949         (opt_mode::exists): Likewise.
7950         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
7951         (GET_MODE_2XWIDER_MODE): Likewise.
7952         (mode_iterator::get_wider): Update accordingly.
7953         (mode_iterator::get_2xwider): Likewise.
7954         (mode_iterator::get_known_wider): Likewise, turning into a template.
7955         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
7956         forcing a wider mode to exist.
7957         * config/cr16/cr16.h (LONG_REG_P): Likewise.
7958         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
7959         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
7960         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
7961         * lower-subreg.c (init_lower_subreg): Likewise.
7962         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
7963         on the final iteration.
7964         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
7965         a wider mode exists before asking for a move pattern.
7966         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
7967         forcing a wider mode to exist.
7968         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
7969         returning false if no such mode exists.
7970         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
7971         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
7972         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
7973         Avoid checking for a MODE_INT if we already know the mode is not a
7974         SCALAR_INT_MODE_P.
7975         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
7976         forcing a wider mode to exist.
7977         (expmed_mult_highpart_optab): Likewise.
7978         (expmed_mult_highpart): Likewise.
7979         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
7980         using else_void.
7981         * lto-streamer-in.c (lto_input_mode_table): Likewise.
7982         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
7983         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
7984         * internal-fn.c (expand_mul_overflow): Update use of
7985         GET_MODE_2XWIDER_MODE.
7986         * omp-low.c (omp_clause_aligned_alignment): Likewise.
7987         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
7988         GET_MODE_WIDER_MODE.
7989         (convert_plusminus_to_widen): Likewise.
7990         * tree-switch-conversion.c (array_value_type): Likewise.
7991         * var-tracking.c (emit_note_insn_var_location): Likewise.
7992         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7993         Return false inside rather than outside the loop if no wider mode
7994         exists
7995         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
7996         and GET_MODE_2XWIDER_MODE
7997         (can_compare_p): Use else_void.
7998         * gdbhooks.py (OptMachineModePrinter): New class.
7999         (build_pretty_printer): Use it for opt_mode.
8001 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8002             Alan Hayward  <alan.hayward@arm.com>
8003             David Sherwood  <david.sherwood@arm.com>
8005         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
8006         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
8008 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8009             Alan Hayward  <alan.hayward@arm.com>
8010             David Sherwood  <david.sherwood@arm.com>
8012         * machmode.h (mode_traits): New structure.
8013         (get_narrowest_mode): New function.
8014         (mode_iterator::start): Likewise.
8015         (mode_iterator::iterate_p): Likewise.
8016         (mode_iterator::get_wider): Likewise.
8017         (mode_iterator::get_known_wider): Likewise.
8018         (mode_iterator::get_2xwider): Likewise.
8019         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
8020         (FOR_EACH_MODE): Likewise.
8021         (FOR_EACH_MODE_FROM): Likewise.
8022         (FOR_EACH_MODE_UNTIL): Likewise.
8023         (FOR_EACH_WIDER_MODE): Likewise.
8024         (FOR_EACH_2XWIDER_MODE): Likewise.
8025         * builtins.c (expand_builtin_strlen): Use new mode iterators.
8026         * combine.c (simplify_comparison): Likewise
8027         * config/i386/i386.c (type_natural_mode): Likewise.
8028         * cse.c (cse_insn): Likewise.
8029         * dse.c (find_shift_sequence): Likewise.
8030         * emit-rtl.c (init_derived_machine_modes): Likewise.
8031         (init_emit_once): Likewise.
8032         * explow.c (hard_function_value): Likewise.
8033         * expmed.c (extract_fixed_bit_field_1): Likewise.
8034         (extract_bit_field_1): Likewise.
8035         (expand_divmod): Likewise.
8036         (emit_store_flag_1): Likewise.
8037         * expr.c (init_expr_target): Likewise.
8038         (convert_move): Likewise.
8039         (alignment_for_piecewise_move): Likewise.
8040         (widest_int_mode_for_size): Likewise.
8041         (emit_block_move_via_movmem): Likewise.
8042         (copy_blkmode_to_reg): Likewise.
8043         (set_storage_via_setmem): Likewise.
8044         (compress_float_constant): Likewise.
8045         * omp-low.c (omp_clause_aligned_alignment): Likewise.
8046         * optabs-query.c (get_best_extraction_insn): Likewise.
8047         * optabs.c (expand_binop): Likewise.
8048         (expand_twoval_unop): Likewise.
8049         (expand_twoval_binop): Likewise.
8050         (widen_leading): Likewise.
8051         (widen_bswap): Likewise.
8052         (expand_parity): Likewise.
8053         (expand_unop): Likewise.
8054         (prepare_cmp_insn): Likewise.
8055         (prepare_float_lib_cmp): Likewise.
8056         (expand_float): Likewise.
8057         (expand_fix): Likewise.
8058         (expand_sfix_optab): Likewise.
8059         * postreload.c (move2add_use_add2_insn): Likewise.
8060         * reg-stack.c (reg_to_stack): Likewise.
8061         * reginfo.c (choose_hard_reg_mode): Likewise.
8062         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
8063         * stor-layout.c (mode_for_size): Likewise.
8064         (smallest_mode_for_size): Likewise.
8065         (mode_for_vector): Likewise.
8066         (finish_bitfield_representative): Likewise.
8067         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
8068         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
8069         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
8070         * var-tracking.c (prepare_call_arguments): Likewise.
8072 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8073             Alan Hayward  <alan.hayward@arm.com>
8074             David Sherwood  <david.sherwood@arm.com>
8076         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
8077         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
8078         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
8079         * machmode.h (mode_size): Move earlier in file.
8080         (mode_precision): Likewise.
8081         (mode_inner): Likewise.
8082         (mode_nunits): Likewise.
8083         (mode_unit_size): Likewise.
8084         (unit_unit_precision): Likewise.
8085         (mode_wider): Likewise.
8086         (mode_2xwider): Likewise.
8087         (machine_mode): New class.
8088         (mode_to_bytes): New function.
8089         (mode_to_bits): Likewise.
8090         (mode_to_precision): Likewise.
8091         (mode_to_inner): Likewise.
8092         (mode_to_unit_size): Likewise.
8093         (mode_to_unit_precision): Likewise.
8094         (mode_to_nunits): Likewise.
8095         (GET_MODE_SIZE): Use mode_to_bytes.
8096         (GET_MODE_BITSIZE): Use mode_to_bits.
8097         (GET_MODE_PRECISION): Use mode_to_precision.
8098         (GET_MODE_INNER): Use mode_to_inner.
8099         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
8100         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
8101         (GET_MODE_NUNITS): Use mode_to_nunits.
8102         * system.h (ALWAYS_INLINE): New macro.
8103         * config/powerpcspe/powerpcspe-c.c
8104         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
8105         int for arg1_mode and arg2_mode.
8107 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8108             Alan Hayward  <alan.hayward@arm.com>
8109             David Sherwood  <david.sherwood@arm.com>
8111         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
8112         Prefix mode names with E_ in case statements.
8113         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8114         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
8115         (aarch64_split_simd_move): Likewise.
8116         (aarch64_gen_storewb_pair): Likewise.
8117         (aarch64_gen_loadwb_pair): Likewise.
8118         (aarch64_gen_store_pair): Likewise.
8119         (aarch64_gen_load_pair): Likewise.
8120         (aarch64_get_condition_code_1): Likewise.
8121         (aarch64_constant_pool_reload_icode): Likewise.
8122         (get_rsqrte_type): Likewise.
8123         (get_rsqrts_type): Likewise.
8124         (get_recpe_type): Likewise.
8125         (get_recps_type): Likewise.
8126         (aarch64_gimplify_va_arg_expr): Likewise.
8127         (aarch64_simd_container_mode): Likewise.
8128         (aarch64_emit_load_exclusive): Likewise.
8129         (aarch64_emit_store_exclusive): Likewise.
8130         (aarch64_expand_compare_and_swap): Likewise.
8131         (aarch64_gen_atomic_cas): Likewise.
8132         (aarch64_emit_bic): Likewise.
8133         (aarch64_emit_atomic_swap): Likewise.
8134         (aarch64_emit_atomic_load_op): Likewise.
8135         (aarch64_evpc_trn): Likewise.
8136         (aarch64_evpc_uzp): Likewise.
8137         (aarch64_evpc_zip): Likewise.
8138         (aarch64_evpc_ext): Likewise.
8139         (aarch64_evpc_rev): Likewise.
8140         (aarch64_evpc_dup): Likewise.
8141         (aarch64_gen_ccmp_first): Likewise.
8142         (aarch64_gen_ccmp_next): Likewise.
8143         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
8144         (alpha_emit_xfloating_libcall): Likewise.
8145         (emit_insxl): Likewise.
8146         (alpha_arg_type): Likewise.
8147         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
8148         (arc_preferred_simd_mode): Likewise.
8149         (arc_secondary_reload): Likewise.
8150         (get_arc_condition_code): Likewise.
8151         (arc_print_operand): Likewise.
8152         (arc_legitimate_constant_p): Likewise.
8153         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8154         * config/arc/arc.md (casesi_load): Likewise.
8155         (casesi_compact_jump): Likewise.
8156         * config/arc/predicates.md (proper_comparison_operator): Likewise.
8157         (cc_use_register): Likewise.
8158         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8159         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
8160         (arm_init_iwmmxt_builtins): Likewise.
8161         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
8162         (neon_expand_vector_init): Likewise.
8163         (arm_attr_length_move_neon): Likewise.
8164         (maybe_get_arm_condition_code): Likewise.
8165         (arm_emit_vector_const): Likewise.
8166         (arm_preferred_simd_mode): Likewise.
8167         (arm_output_iwmmxt_tinsr): Likewise.
8168         (thumb1_output_casesi): Likewise.
8169         (thumb2_output_casesi): Likewise.
8170         (arm_emit_load_exclusive): Likewise.
8171         (arm_emit_store_exclusive): Likewise.
8172         (arm_expand_compare_and_swap): Likewise.
8173         (arm_evpc_neon_vuzp): Likewise.
8174         (arm_evpc_neon_vzip): Likewise.
8175         (arm_evpc_neon_vrev): Likewise.
8176         (arm_evpc_neon_vtrn): Likewise.
8177         (arm_evpc_neon_vext): Likewise.
8178         (arm_validize_comparison): Likewise.
8179         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
8180         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
8181         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
8182         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
8183         (c6x_preferred_simd_mode): Likewise.
8184         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
8185         (epiphany_rtx_costs): Likewise.
8186         * config/epiphany/predicates.md (proper_comparison_operator):
8187         Likewise.
8188         * config/frv/frv.c (condexec_memory_operand): Likewise.
8189         (frv_emit_move): Likewise.
8190         (output_move_single): Likewise.
8191         (output_condmove_single): Likewise.
8192         (frv_hard_regno_mode_ok): Likewise.
8193         (frv_matching_accg_mode): Likewise.
8194         * config/h8300/h8300.c (split_adds_subs): Likewise.
8195         (h8300_rtx_costs): Likewise.
8196         (h8300_print_operand): Likewise.
8197         (compute_mov_length): Likewise.
8198         (output_logical_op): Likewise.
8199         (compute_logical_op_length): Likewise.
8200         (compute_logical_op_cc): Likewise.
8201         (h8300_shift_needs_scratch_p): Likewise.
8202         (output_a_shift): Likewise.
8203         (compute_a_shift_length): Likewise.
8204         (compute_a_shift_cc): Likewise.
8205         (expand_a_rotate): Likewise.
8206         (output_a_rotate): Likewise.
8207         * config/i386/i386.c (classify_argument): Likewise.
8208         (function_arg_advance_32): Likewise.
8209         (function_arg_32): Likewise.
8210         (function_arg_64): Likewise.
8211         (function_value_64): Likewise.
8212         (ix86_gimplify_va_arg): Likewise.
8213         (ix86_legitimate_constant_p): Likewise.
8214         (put_condition_code): Likewise.
8215         (split_double_mode): Likewise.
8216         (ix86_avx256_split_vector_move_misalign): Likewise.
8217         (ix86_expand_vector_logical_operator): Likewise.
8218         (ix86_split_idivmod): Likewise.
8219         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
8220         (ix86_build_const_vector): Likewise.
8221         (ix86_build_signbit_mask): Likewise.
8222         (ix86_match_ccmode): Likewise.
8223         (ix86_cc_modes_compatible): Likewise.
8224         (ix86_expand_branch): Likewise.
8225         (ix86_expand_sse_cmp): Likewise.
8226         (ix86_expand_sse_movcc): Likewise.
8227         (ix86_expand_int_sse_cmp): Likewise.
8228         (ix86_expand_vec_perm_vpermi2): Likewise.
8229         (ix86_expand_vec_perm): Likewise.
8230         (ix86_expand_sse_unpack): Likewise.
8231         (ix86_expand_int_addcc): Likewise.
8232         (ix86_split_to_parts): Likewise.
8233         (ix86_vectorize_builtin_gather): Likewise.
8234         (ix86_vectorize_builtin_scatter): Likewise.
8235         (avx_vpermilp_parallel): Likewise.
8236         (inline_memory_move_cost): Likewise.
8237         (ix86_tieable_integer_mode_p): Likewise.
8238         (x86_maybe_negate_const_int): Likewise.
8239         (ix86_expand_vector_init_duplicate): Likewise.
8240         (ix86_expand_vector_init_one_nonzero): Likewise.
8241         (ix86_expand_vector_init_one_var): Likewise.
8242         (ix86_expand_vector_init_concat): Likewise.
8243         (ix86_expand_vector_init_interleave): Likewise.
8244         (ix86_expand_vector_init_general): Likewise.
8245         (ix86_expand_vector_set): Likewise.
8246         (ix86_expand_vector_extract): Likewise.
8247         (emit_reduc_half): Likewise.
8248         (ix86_emit_i387_round): Likewise.
8249         (ix86_mangle_type): Likewise.
8250         (ix86_expand_round_sse4): Likewise.
8251         (expand_vec_perm_blend): Likewise.
8252         (canonicalize_vector_int_perm): Likewise.
8253         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
8254         (expand_vec_perm_1): Likewise.
8255         (expand_vec_perm_interleave3): Likewise.
8256         (expand_vec_perm_even_odd_pack): Likewise.
8257         (expand_vec_perm_even_odd_1): Likewise.
8258         (expand_vec_perm_broadcast_1): Likewise.
8259         (ix86_vectorize_vec_perm_const_ok): Likewise.
8260         (ix86_expand_vecop_qihi): Likewise.
8261         (ix86_expand_mul_widen_hilo): Likewise.
8262         (ix86_expand_sse2_abs): Likewise.
8263         (ix86_expand_pextr): Likewise.
8264         (ix86_expand_pinsr): Likewise.
8265         (ix86_preferred_simd_mode): Likewise.
8266         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
8267         * config/i386/sse.md (*andnot<mode>3): Likewise.
8268         (<mask_codefor><code><mode>3<mask_name>): Likewise.
8269         (*<code><mode>3): Likewise.
8270         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
8271         (ia64_expand_atomic_op): Likewise.
8272         (ia64_arg_type): Likewise.
8273         (ia64_mode_to_int): Likewise.
8274         (ia64_scalar_mode_supported_p): Likewise.
8275         (ia64_vector_mode_supported_p): Likewise.
8276         (expand_vec_perm_broadcast): Likewise.
8277         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
8278         (iq2000_function_arg_advance): Likewise.
8279         (iq2000_function_arg): Likewise.
8280         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
8281         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
8282         (m68k_libcall_value): Likewise.
8283         (m68k_function_value): Likewise.
8284         (sched_attr_op_type): Likewise.
8285         * config/mcore/mcore.c (mcore_output_move): Likewise.
8286         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
8287         Likewise.
8288         (microblaze_function_arg): Likewise.
8289         * config/mips/mips.c (mips16_build_call_stub): Likewise.
8290         (mips_print_operand): Likewise.
8291         (mips_mode_ok_for_mov_fmt_p): Likewise.
8292         (mips_vector_mode_supported_p): Likewise.
8293         (mips_preferred_simd_mode): Likewise.
8294         (mips_expand_vpc_loongson_even_odd): Likewise.
8295         (mips_expand_vec_unpack): Likewise.
8296         (mips_expand_vi_broadcast): Likewise.
8297         (mips_expand_vector_init): Likewise.
8298         (mips_expand_vec_reduc): Likewise.
8299         (mips_expand_msa_cmp): Likewise.
8300         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
8301         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
8302         (cc_flags_for_mode): Likewise.
8303         * config/msp430/msp430.c (msp430_print_operand): Likewise.
8304         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
8305         (nds32_output_casesi_pc_relative): Likewise.
8306         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8307         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
8308         (nvptx_gen_unpack): Likewise.
8309         (nvptx_gen_pack): Likewise.
8310         (nvptx_gen_shuffle): Likewise.
8311         (nvptx_gen_wcast): Likewise.
8312         (nvptx_preferred_simd_mode): Likewise.
8313         * config/pa/pa.c (pa_secondary_reload): Likewise.
8314         * config/pa/predicates.md (base14_operand): Likewise.
8315         * config/powerpcspe/powerpcspe-c.c
8316         (altivec_resolve_overloaded_builtin): Likewise.
8317         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
8318         Likewise.
8319         (rs6000_preferred_simd_mode): Likewise.
8320         (output_vec_const_move): Likewise.
8321         (rs6000_expand_vector_extract): Likewise.
8322         (rs6000_split_vec_extract_var): Likewise.
8323         (reg_offset_addressing_ok_p): Likewise.
8324         (rs6000_legitimate_offset_address_p): Likewise.
8325         (rs6000_legitimize_address): Likewise.
8326         (rs6000_emit_set_const): Likewise.
8327         (rs6000_const_vec): Likewise.
8328         (rs6000_emit_move): Likewise.
8329         (spe_build_register_parallel): Likewise.
8330         (rs6000_darwin64_record_arg_recurse): Likewise.
8331         (swap_selector_for_mode): Likewise.
8332         (spe_init_builtins): Likewise.
8333         (paired_init_builtins): Likewise.
8334         (altivec_init_builtins): Likewise.
8335         (do_load_for_compare): Likewise.
8336         (rs6000_generate_compare): Likewise.
8337         (rs6000_expand_float128_convert): Likewise.
8338         (emit_load_locked): Likewise.
8339         (emit_store_conditional): Likewise.
8340         (rs6000_output_function_epilogue): Likewise.
8341         (rs6000_handle_altivec_attribute): Likewise.
8342         (rs6000_function_value): Likewise.
8343         (emit_fusion_gpr_load): Likewise.
8344         (emit_fusion_p9_load): Likewise.
8345         (emit_fusion_p9_store): Likewise.
8346         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
8347         (fusion_gpr_mem_load): Likewise.
8348         (fusion_addis_mem_combo_load): Likewise.
8349         (fusion_addis_mem_combo_store): Likewise.
8350         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
8351         (fusion_gpr_mem_load): Likewise.
8352         (fusion_addis_mem_combo_load): Likewise.
8353         (fusion_addis_mem_combo_store): Likewise.
8354         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8355         Likewise.
8356         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
8357         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
8358         (rs6000_preferred_simd_mode): Likewise.
8359         (output_vec_const_move): Likewise.
8360         (rs6000_expand_vector_extract): Likewise.
8361         (rs6000_split_vec_extract_var): Likewise.
8362         (reg_offset_addressing_ok_p): Likewise.
8363         (rs6000_legitimate_offset_address_p): Likewise.
8364         (rs6000_legitimize_address): Likewise.
8365         (rs6000_emit_set_const): Likewise.
8366         (rs6000_const_vec): Likewise.
8367         (rs6000_emit_move): Likewise.
8368         (rs6000_darwin64_record_arg_recurse): Likewise.
8369         (swap_selector_for_mode): Likewise.
8370         (paired_init_builtins): Likewise.
8371         (altivec_init_builtins): Likewise.
8372         (rs6000_expand_float128_convert): Likewise.
8373         (emit_load_locked): Likewise.
8374         (emit_store_conditional): Likewise.
8375         (rs6000_output_function_epilogue): Likewise.
8376         (rs6000_handle_altivec_attribute): Likewise.
8377         (rs6000_function_value): Likewise.
8378         (emit_fusion_gpr_load): Likewise.
8379         (emit_fusion_p9_load): Likewise.
8380         (emit_fusion_p9_store): Likewise.
8381         * config/rx/rx.c (rx_gen_move_template): Likewise.
8382         (flags_from_mode): Likewise.
8383         * config/s390/predicates.md (s390_alc_comparison): Likewise.
8384         (s390_slb_comparison): Likewise.
8385         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
8386         (s390_vector_mode_supported_p): Likewise.
8387         (s390_cc_modes_compatible): Likewise.
8388         (s390_match_ccmode_set): Likewise.
8389         (s390_canonicalize_comparison): Likewise.
8390         (s390_emit_compare_and_swap): Likewise.
8391         (s390_branch_condition_mask): Likewise.
8392         (s390_rtx_costs): Likewise.
8393         (s390_secondary_reload): Likewise.
8394         (__SECONDARY_RELOAD_CASE): Likewise.
8395         (s390_expand_cs): Likewise.
8396         (s390_preferred_simd_mode): Likewise.
8397         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
8398         * config/sh/sh.c (sh_print_operand): Likewise.
8399         (dump_table): Likewise.
8400         (sh_secondary_reload): Likewise.
8401         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8402         * config/sh/sh.md (casesi_worker_1): Likewise.
8403         (casesi_worker_2): Likewise.
8404         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
8405         (fcc_comparison_operator): Likewise.
8406         * config/sparc/sparc.c (sparc_expand_move): Likewise.
8407         (emit_soft_tfmode_cvt): Likewise.
8408         (sparc_preferred_simd_mode): Likewise.
8409         (output_cbranch): Likewise.
8410         (sparc_print_operand): Likewise.
8411         (sparc_expand_vec_perm_bmask): Likewise.
8412         (vector_init_bshuffle): Likewise.
8413         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
8414         (spu_vector_mode_supported_p): Likewise.
8415         (spu_expand_insv): Likewise.
8416         (spu_emit_branch_or_set): Likewise.
8417         (spu_handle_vector_attribute): Likewise.
8418         (spu_builtin_splats): Likewise.
8419         (spu_builtin_extract): Likewise.
8420         (spu_builtin_promote): Likewise.
8421         (spu_expand_sign_extend): Likewise.
8422         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
8423         (tilegx_simd_int): Likewise.
8424         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
8425         (tilepro_simd_int): Likewise.
8426         * config/v850/v850.c (const_double_split): Likewise.
8427         (v850_print_operand): Likewise.
8428         (ep_memory_offset): Likewise.
8429         * config/vax/vax.c (vax_rtx_costs): Likewise.
8430         (vax_output_int_move): Likewise.
8431         (vax_output_int_add): Likewise.
8432         (vax_output_int_subtract): Likewise.
8433         * config/visium/predicates.md (visium_branch_operator): Likewise.
8434         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
8435         (visium_print_operand_address): Likewise.
8436         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8437         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
8438         (xtensa_expand_conditional_branch): Likewise.
8439         (xtensa_copy_incoming_a7): Likewise.
8440         (xtensa_output_literal): Likewise.
8441         * dfp.c (decimal_real_maxval): Likewise.
8442         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
8444 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8445             Alan Hayward  <alan.hayward@arm.com>
8446             David Sherwood  <david.sherwood@arm.com>
8448         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
8449         (mode_nunits_inline): Likewise.
8450         (mode_inner_inline): Likewise.
8451         (mode_unit_size_inline): Likewise.
8452         (mode_unit_precision_inline): Likewise.
8453         (emit_insn_modes_h): Likewise.  Also emit a #define of the
8454         unprefixed name.
8455         (emit_mode_wider): Add an E_ prefix to mode names.
8456         (emit_mode_complex): Likewise.
8457         (emit_mode_inner): Likewise.
8458         (emit_mode_adjustments): Likewise.
8459         (emit_mode_int_n): Likewise.
8460         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
8461         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
8462         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
8463         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
8464         (CRC32_BUILTIN, ENTRY): Likewise.
8465         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
8466         (aarch64_pop_regs): Likewise.
8467         (aarch64_process_components): Likewise.
8468         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
8469         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
8470         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
8471         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
8472         * config/arm/arm.c (arm_init_libfuncs): Likewise.
8473         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
8474         Likewise.
8475         * config/i386/i386-builtin.def (pcmpestr): Likewise.
8476         (pcmpistr): Likewise.
8477         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
8478         * config/mmix/mmix.c (mmix_output_condition): Likewise.
8479         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
8480         Likewise.
8481         * config/rl78/rl78.c (mduc_regs): Likewise.
8482         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
8483         (htm_expand_builtin): Likewise.
8484         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
8485         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
8486         * config/xtensa/xtensa.c (print_operand): Likewise.
8487         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
8488         (NUM_MODE_VECTOR_INT): Likewise.
8489         * genoutput.c (null_operand): Likewise.
8490         (output_operand_data): Likewise.
8491         * genrecog.c (print_parameter_value): Likewise.
8492         * lra.c (debug_operand_data): Likewise.
8494 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8496         * dwarf2out.c (scompare_loc_descriptor_wide)
8497         (scompare_loc_descriptor_narrow): New functions, split out from...
8498         (scompare_loc_descriptor): ...here.
8499         * expmed.c (emit_store_flag_int): New function, split out from...
8500         (emit_store_flag): ...here.
8502 2017-08-30  Richard Biener  <rguenther@suse.de>
8504         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
8505         (dwarf2out_early_finish): Move setting of AT_pubnames from
8506         early debug output to early finish.
8508 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8510         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
8511         and -mdata-region to the assembler.
8513 2017-08-30  Richard Biener  <rguenther@suse.de>
8515         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
8516         attributes.
8517         (gen_subprogram_die): Add DW_AT_object_pointer only early.
8518         (dwarf2out_early_global_decl): Only generate a DIE for the
8519         abstract origin if it doesn't already exist or is a declaration DIE.
8520         (resolve_addr): Do not add the linkage name twice when
8521         generating a stub DIE for the DW_TAG_GNU_call_site target.
8523 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8525         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8526         Use machine_mode rather than int for arg1_mode.
8528 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8530         PR target/82015
8531         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
8532         that the second argument of the built-in functions to unpack
8533         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
8534         switch statement instead a lot of if statements.
8535         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
8536         Allow 64-bit values to be in Altivec registers as well as
8537         traditional floating point registers.
8538         (pack<mode>, FMOVE128_VSX iterator): Likewise.
8540 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
8542         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
8543         MAX_REGS_PER_ADDRESS == 1.
8545 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
8547         * config/i386/i386.opt (flag_fentry): Do not init to -1.
8548         * config/i386/i386.c (ix86_option_override_internal): Simplify
8549         setting of opts->x_flag_entry.
8551 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8552             Jakub Jelinek  <jakub@redhat.com>
8553             Richard Biener  <rguenther@suse.de>
8555         PR tree-optimization/81503
8556         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
8557         folded constant fits in the target type; reorder tests for clarity.
8559 2017-08-29  Martin Liska  <mliska@suse.cz>
8561         * passes.def: Include pass_lower_switch.
8562         * stmt.c (dump_case_nodes): Remove and move to
8563         tree-switch-conversion.
8564         (case_values_threshold): Likewise.
8565         (expand_switch_as_decision_tree_p): Likewise.
8566         (emit_case_decision_tree): Likewise.
8567         (expand_case): Likewise.
8568         (balance_case_nodes): Likewise.
8569         (node_has_low_bound): Likewise.
8570         (node_has_high_bound): Likewise.
8571         (node_is_bounded): Likewise.
8572         (emit_case_nodes): Likewise.
8573         (struct simple_case_node): New struct.
8574         (add_case_node): Remove.
8575         (emit_case_dispatch_table): Use vector instead of case_list.
8576         (reset_out_edges_aux): Remove.
8577         (compute_cases_per_edge): Likewise.
8578         (expand_case): Build list of simple_case_node.
8579         (expand_sjlj_dispatch_table): Use it.
8580         * tree-switch-conversion.c (struct case_node): Moved from
8581         stmt.c and adjusted.
8582         (emit_case_nodes): Likewise.
8583         (node_has_low_bound): Likewise.
8584         (node_has_high_bound): Likewise.
8585         (node_is_bounded): Likewise.
8586         (case_values_threshold): Likewise.
8587         (reset_out_edges_aux): Likewise.
8588         (compute_cases_per_edge): Likewise.
8589         (add_case_node): Likewise.
8590         (dump_case_nodes): Likewise.
8591         (balance_case_nodes): Likewise.
8592         (expand_switch_as_decision_tree_p): Likewise.
8593         (emit_jump): Likewise.
8594         (emit_case_decision_tree): Likewise.
8595         (try_switch_expansion): Likewise.
8596         (do_jump_if_equal): Likewise.
8597         (emit_cmp_and_jump_insns): Likewise.
8598         (fix_phi_operands_for_edge): New function.
8599         (record_phi_operand_mapping): Likewise.
8600         (class pass_lower_switch): New pass.
8601         (pass_lower_switch::execute): New function.
8602         (make_pass_lower_switch): Likewise.
8603         (conditional_probability):
8604         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
8605         * tree-pass.h: Add make_pass_lower_switch.
8607 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8609         PR target/80993
8610         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
8611         handlers as used.
8613 2017-08-29  Richard Biener  <rguenther@suse.de>
8615         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
8616         we do not add a DW_AT_inline attribute twice.
8617         (gen_subprogram_die): Remove code setting DW_AT_inline on
8618         DECL_ABSTRACT_P nodes.
8620 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
8622         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
8623         calls to internal functions.
8624         (gimplify_modify_expr): Likewise.
8625         * tree-call-cdce.c (use_internal_fn): Likewise.
8626         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8627         (convert_to_divmod): Set the nothrow flag.
8628         * tree-if-conv.c (predicate_mem_writes):  Likewise.
8629         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
8630         (vectorizable_call): Likewise.
8631         (vectorizable_store): Likewise.
8632         (vectorizable_load): Likewise.
8633         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
8634         (vect_recog_mask_conversion_pattern): Likewise.
8636 2017-08-29  Martin Liska  <mliska@suse.cz>
8638         PR other/39851
8639         * gcc.c (driver_handle_option): Add new argument.
8640         * opts-common.c (handle_option): Pass
8641         target_option_override_hook.
8642         * opts-global.c (lang_handle_option): Add new option.
8643         (set_default_handlers):  Add new argument.
8644         (decode_options): Likewise.
8645         * opts.c (target_handle_option): Likewise.
8646         (common_handle_option): Call target_option_override_hook.
8647         * opts.h (struct cl_option_handler_func): Add hook for
8648         target option override.
8649         (struct cl_option_handlers): Likewise.
8650         (set_default_handlers): Add new argument.
8651         (decode_options): Likewise.
8652         (common_handle_option): Likewise.
8653         (target_handle_option): Likewise.
8654         * toplev.c (toplev::main): Pass targetm.target_option.override
8655         hook.
8657 2017-08-29  Richard Biener  <rguenther@suse.de>
8658         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
8660         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
8661         life to the active subtree.
8663 2017-08-28  Jeff Law  <law@redhat.com>
8665         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
8666         derive_equivalences.
8667         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
8668         Code moved into....
8669         (edge_info::derive_equivalences): New private member function
8671         * tree-ssa-dom.c (class edge_info): Changed from a struct
8672         to a class.  Add ctor/dtor, methods and data members.
8673         (edge_info::edge_info): Renamed from allocate_edge_info.
8674         Initialize additional members.
8675         (edge_info::~edge_info): New.
8676         (free_dom_edge_info): Delete the edge info.
8677         (record_edge_info): Use new class & associated member functions.
8678         Tighten forms for testing for edge equivalences.
8679         (record_temporary_equivalences): Iterate over the simple
8680         equivalences rather than assuming there's only one per edge.
8681         (cprop_into_successor_phis): Iterate over the simple
8682         equivalences rather than assuming there's only one per edge.
8683         (optimize_stmt): Use operand_equal_p rather than pointer
8684         equality for mini-DSE code.
8686 2017-08-28  Nathan Sidwell  <nathan@acm.org>
8688         * gcc.c (execute): Fold SIGPIPE handling into switch
8689         statement.  Adjust internal error message.
8691 2017-08-28  Richard Biener  <rguenther@suse.de>
8693         PR debug/81993
8694         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
8695         Do nothing for removed DIEs.
8697 2017-08-28  Richard Biener  <rguenther@suse.de>
8699         PR tree-optimization/81977
8700         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
8701         memcpy.
8703 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
8705         PR target/80640
8706         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
8707         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
8708         using targetm.gen_mem_thread_fence.
8710 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
8712         PR target/81995
8713         * config/i386/i386.md (*<btsc><mode>): Change operand 2
8714         predicate to register_operand.  Reorder operands.
8715         (*btr<mode>): Ditto.
8716         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
8717         (*btr<mode>_mask): Ditto.
8719 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
8721         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
8722         * config/rs6000/xmmintrin.h: New file.
8723         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
8725 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8727         PR target/81504
8728         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
8729         parameter and_insn and return it.
8730         (recombine_lvx_pattern): Insert a copy to ensure availability of
8731         the base register of the copied masking operation at the point of
8732         the instruction replacement.
8733         (recombine_stvx_pattern): Likewise.
8735 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
8737         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
8738         undocumented switches.
8739         (-mpower9-dform-vector): Likewise.
8740         (-mpower9-dform): Likewise.
8741         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8742         comments to delete references to -mpower9-dform* switches.
8743         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
8744         Delete reference to -mpower9-dform* switches, test for
8745         -mpower9-vector instead.
8746         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
8747         (OTHER_P9_VECTOR_MASKS): Likewise.
8748         (POWERPC_MASKS): Likewise.
8749         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
8750         tests against -mpower9-dform* to -mpower9-vector.  Delete code
8751         that checked for -mpower9-dform* consistancy with other options.
8752         Add test for -mpower9-misc to enable other power9 switches.
8753         (rs6000_init_hard_regno_mode_ok): Likewise.
8754         (rs6000_option_override_internal): Likewise.
8755         (rs6000_emit_prologue): Likewise.
8756         (rs6000_emit_epilogue): Likewise.
8757         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
8758         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
8759         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
8760         -mpower9-vector.
8761         (emit_fusion_p9_store): Likewise.
8762         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
8763         resetting these macros if the assembler does not support ISA 3.0
8764         instructions.
8765         (TARGET_P9_DFORM_VECTOR): Likewise.
8766         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
8767         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
8769 2017-08-25  Alan Modra  <amodra@gmail.com>
8771         PR rtl-optimization/81747
8772         * cse.c (cse_extended_basic_block): Don't attempt to record
8773         equivalences for degenerate conditional branches that branch
8774         to their fall-through.
8776 2017-08-24  Martin Sebor  <msebor@redhat.com>
8778         PR middle-end/81908
8779         * gimple-fold.c (size_must_be_zero_p): New function.
8780         (gimple_fold_builtin_memory_op): Call it.
8782 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
8784         * config/rs6000/mm_malloc.h: New file.
8786 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
8788         PR tree-optimization/81913
8789         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
8790         analysis when either IVs in condition can wrap.
8792 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
8794         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
8795         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
8797 2017-08-24  Richard Biener  <rguenther@suse.de>
8799         PR target/81921
8800         * targhooks.c (default_target_can_inline_p): Properly
8801         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
8802         is present and always compare.
8803         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
8804         infer -mfpmath=sse from TARGET_SSE_P.
8805         (ix86_can_inline_p): Properly use target_option_default_node when
8806         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
8808 2017-08-24  Richard Biener  <rguenther@suse.de>
8810         PR debug/81936
8811         * dwarf2out.c (output_die): Handle flag_generate_offload like
8812         flag_generate_lto.
8813         (output_comp_unit): Likewise.
8814         (gen_array_type_die): Likewise.
8815         (dwarf2out_early_finish): Likewise.
8816         (note_variable_value_in_expr): Likewise.
8817         (dwarf2out_finish): Likewise.  Adjust assert.
8818         * cgraphunit.c (symbol_table::compile): Move setting of
8819         flag_generate_offload earlier ...
8820         (symbol_table::finalize_compilation_unit): ... here, before
8821         early debug finalization.
8823 2017-08-24  Richard Biener  <rguenther@suse.de>
8825         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
8826         and ipa-fnsummary.h.
8827         (ix86_can_inline_p): When ix86_fpmath flags do not match
8828         check whether the callee uses FP math at all.
8830 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
8832         PR middle-end/81931
8833         * tree-ssanames.c (get_nonzero_bits): Use element_precision
8834         instead of TYPE_PRECISION.
8836 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
8837             Alan Hayward  <alan.hayward@arm.com>
8838             David Sherwood  <david.sherwood@arm.com>
8840         * combine.c (make_extraction): Use subreg_offset_from_lsb.
8842 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
8844         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
8845         Remove field.
8846         (ix86_frame::stack_realign_allocate): New field.
8847         (struct machine_frame_state): Modify comments.
8848         (machine_frame_state::sp_realigned_fp_end): New field.
8849         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
8850         layout calculation.
8851         (sp_valid_at): Add assertion to assure no attempt to access invalid
8852         offset of a realigned stack.
8853         (fp_valid_at): Likewise.
8854         (choose_baseaddr): Modify comments.
8855         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
8856         ix86_expand_prologue.
8857         (ix86_expand_prologue): Modify stack realignment and allocation.
8858         (ix86_expand_epilogue): Modify comments.
8859         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
8860         avx2_runtime, avx512f, and avx512f_runtime.
8862 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
8864         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
8865         (mstackrealign): Do not init to -1.
8866         * config/i386/i386.c (ix86_option_override_internal):
8867         Check opts_set, not opts when setting default value of
8868         opts->x_ix86_force_align_arg_pointer.
8870 2017-08-23  Richard Biener  <rguenther@suse.de>
8872         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
8873         lang_hooks.decl_printable_name.
8874         * print-rtl-function.c (print_rtx_function): Likewise.
8875         * tree-pretty-print.c (dump_function_header): Likewise.
8877 2017-08-23  Richard Biener  <rguenther@suse.de>
8879         PR lto/81940
8880         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
8881         -g0 at compile-time.
8883 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
8885         PR middle-end/19706
8886         * doc/sourcebuild.texi (Other hardware attributes):
8887         Document xorsign.
8889 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
8891         PR middle-end/19706
8892         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
8893         Fix single-use check.
8895 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8897         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
8899 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
8901         * doc/install.texi: Modify to add more details on running selected
8902         tests.
8904 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
8906         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
8907         is combined with -mabi=ms.
8908         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
8909         ms_abi.
8911 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8913         PR tree-optimization/81488
8914         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
8915         and cached_basis fields.
8916         (MAX_SPREAD): New constant.
8917         (alloc_cand_and_find_basis): Initialize new fields.
8918         (clear_visited): New function.
8919         (create_phi_basis_1): Rename from create_phi_basis, set visited
8920         and cached_basis fields.
8921         (create_phi_basis): New wrapper function.
8922         (phi_add_costs_1): Rename from phi_add_costs, add spread
8923         parameter, set visited field, short-circuit when limits reached.
8924         (phi_add_costs): New wrapper function.
8925         (record_phi_increments_1): Rename from record_phi_increments, set
8926         visited field.
8927         (record_phi_increments): New wrapper function.
8928         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
8929         (phi_incr_cost): New wrapper function.
8930         (all_phi_incrs_profitable_1): Rename from
8931         all_phi_incrs_profitable, set visited field.
8932         (all_phi_incrs_profitable): New wrapper function.
8934 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
8935             Alan Hayward  <alan.hayward@arm.com>
8936             David Sherwood  <david.sherwood@arm.com>
8938         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
8939         that takes the outer and inner modes.
8940         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
8941         comparison as the canonical test for a paradoxical subreg.
8942         * combine.c (simplify_set): Use paradoxical_subreg_p.
8943         (make_extraction): Likewise.
8944         (force_to_mode): Likewise.
8945         (rtx_equal_for_field_assignment_p): Likewise.
8946         (gen_lowpart_for_combine): Likewise.
8947         (simplify_comparison): Likewise.
8948         * cse.c (equiv_constant): Likewise.
8949         * expmed.c (store_bit_field_1): Likewise.
8950         * final.c (alter_subreg): Likewise.
8951         * fwprop.c (propagate_rtx): Likewise.
8952         (forward_propagate_subreg): Likewise.
8953         * ira-conflicts.c (ira_build_conflicts): Likewise.
8954         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
8955         * lra-constraints.c (curr_insn_transform): Likewise.
8956         (split_reg): Likewise.
8957         * lra-eliminations.c (move_plus_up): Likewise.
8958         (lra_eliminate_regs_1): Likewise.
8959         * recog.c (general_operand): Likewise.
8960         * ree.c (combine_reaching_defs): Likewise.
8961         * reload.c (push_reload): Likewise.
8962         (find_reloads): Likewise.
8963         * reload1.c (elimination_effects): Likewise.
8964         (compute_reload_subreg_offset): Likewise.
8965         (choose_reload_regs): Likewise.
8966         * rtlanal.c (subreg_lsb_1): Likewise.
8967         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
8968         (simplify_subreg): Likewise.
8969         * var-tracking.c (track_loc_p): Likewise.
8970         * emit-rtl.c (byte_lowpart_offset): Likewise.
8971         (paradoxical_subreg_p): Delete out-of-line definition.
8973 2017-08-22  Jeff Law  <law@redhat.com>
8975         PR tree-optimization/81741
8976         PR tree-optimization/71947
8977         * tree-ssa-dom.c: Include tree-inline.h.
8978         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
8979         equivalences if one is more expensive to compute than the other.
8980         * tree-ssa-scopedtables.h (class const_or_copies): Make
8981         record_const_or_copy_raw method private.
8982         (class avail_exprs_stack): New method simplify_binary_operation.
8983         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
8984         avail_exprs_stack::simplify_binary_operation as needed.
8985         (avail_exprs_stack::simplify_binary_operation): New function.
8987 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8989         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
8990         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
8991         (DOT_SYMBOLS): Likewise.
8992         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
8993         (RELOCATABLE_NEEDS_FIXUP): Likewise.
8994         (RS6000_ABI_NAME): Likewise.
8995         (TARGET_CMODEL): Likewise.
8996         (TOC_SECTION_ASM_OP): Likewise.
8997         (SET_CMODEL): New macro.
8998         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
9000 2017-08-22  Richard Biener  <rguenther@suse.de>
9002         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
9003         to allow for free-lang-data replacements similar to verify_type_variant.
9005 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
9006             Alan Hayward  <alan.hayward@arm.com>
9007             David Sherwood  <david.sherwood@arm.com>
9009         * config/aarch64/aarch64.md (casesi): Use DImode rather than
9010         VOIDmode for the LABEL_REF.
9012 2017-08-22  Richard Biener  <rguenther@suse.de>
9014         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
9016 2017-08-22  Richard Biener  <rguenther@suse.de>
9018         * common.opt (feliminate-dwarf2-dups): Ignore.
9019         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
9020         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
9021         same_die_p_wrap, compute_section_prefix,
9022         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
9023         (comdat_symbol_id, comdat_symbol_number): Likewise.
9024         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
9025         Likewise.
9026         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
9027         (output_die): Mark unreachable path unreachable.
9028         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
9029         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
9030         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
9031         (dwarf2out_early_finish): Likewise.
9033 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
9035         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
9037 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
9039         PR target/81910
9040         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
9041         not VAR_P. Filter attribute warnings with OPT_Wattributes.
9042         (avr_attribute_table) <io, io_low, address>: Initialize
9043         .decl_required with true.
9045 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
9047         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
9048         undocumented debugging options.
9049         (-mvsx-scalar-double): Likewise.
9050         (-mallow-df-permute): Likewise.
9051         (-mvectorize-builtins): Likewise.
9052         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
9053         (rs6000_builtin_vectorized_function): Likewise.
9054         (rs6000_builtin_md_vectorized_function): Likewise.
9055         (rs6000_opt_vars): Likewise.
9057 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
9059         PR target/46091
9060         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
9061         (*btrq_imm): Rename from *btrq.
9062         (*btcq_imm): Rename from *btcq.
9063         (btsc): New code attribute.
9064         (*<btsc><mode>): New insn pattern.
9065         (*btr<mode>): Ditto.
9066         (*<btsc><mode>_mask): New insn_and_split pattern.
9067         (*btr<mode>_mask): Ditto.
9069 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9070             Alan Hayward  <alan.hayward@arm.com>
9071             David Sherwood  <david.sherwood@arm.com>
9073         * function.c (pad_below): Simplify padding calculation.
9075 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9076             Alan Hayward  <alan.hayward@arm.com>
9077             David Sherwood  <david.sherwood@arm.com>
9079         * target.def (function_prologue): Remove frame size argument.
9080         (function_epilogue): Likewise.
9081         * doc/tm.texi: Regenerate.
9082         * final.c (final_start_function): Update call to function_prologue.
9083         (final_end_function): Update call to function_epilogue.
9084         (default_function_pro_epilogue): Remove frame size argument.
9085         * output.h (default_function_pro_epilogue): Likewise.
9086         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
9087         (arm_output_function_prologue): Likewise.
9088         * config/frv/frv.c (frv_function_prologue): Likewise.
9089         (frv_function_epilogue): Likewise.
9090         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
9091         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
9092         (ia64_output_function_epilogue): Likewise.
9093         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
9094         (m32r_output_function_epilogue): Likewise.
9095         * config/microblaze/microblaze.c (microblaze_function_prologue)
9096         (microblaze_function_epilogue): Likewise.
9097         * config/mips/mips.c (mips_output_function_prologue): Likewise.
9098         (mips_output_function_epilogue): Likewise.
9099         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
9100         (mmix_target_asm_function_epilogue): Likewise.
9101         * config/msp430/msp430.c (msp430_start_function): Likewise.
9102         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
9103         (nds32_asm_function_epilogue): Likewise.
9104         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
9105         * config/pa/pa.c (pa_output_function_prologue): Likewise.
9106         (pa_output_function_epilogue): Likewise.
9107         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
9108         (rs6000_output_function_epilogue): Likewise.
9109         * config/rl78/rl78.c (rl78_start_function): Likewise.
9110         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
9111         (rs6000_output_function_epilogue): Likewise.
9112         * config/rx/rx.c (rx_output_function_prologue): Likewise.
9113         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
9114         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
9115         (sparc_asm_function_epilogue): Likewise.
9117 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9119         * tree.h (type_has_mode_precision_p): New function.
9120         * convert.c (convert_to_integer_1): Use it.
9121         * expr.c (expand_expr_real_2): Likewise.
9122         (expand_expr_real_1): Likewise.
9123         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
9124         * match.pd: Likewise.
9125         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
9126         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
9127         * tree-tailcall.c (process_assignment): Likewise.
9128         * tree-vect-loop.c (vectorizable_reduction): Likewise.
9129         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
9130         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
9131         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
9132         (vectorizable_assignment): Likewise.
9133         (vectorizable_shift): Likewise.
9134         (vectorizable_operation): Likewise.
9135         * tree-vrp.c (register_edge_assert_for_2): Likewise.
9137 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
9139         * match.pd: Add pow (C, x) simplification.
9141 2017-08-21  Richard Biener  <rguenther@suse.de>
9143         PR tree-optimization/81900
9144         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
9145         for blocks with abnormal predecessors.
9146         (compute_antic): Do not set visited flag prematurely.
9148 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
9150         PR target/79883
9151         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
9153 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9155         * stor-layout.h (vector_type_mode): Move to...
9156         * tree.h (vector_type_mode): ...here.
9157         * stor-layout.c (vector_type_mode): Move to...
9158         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
9160 2017-08-21  Richard Biener  <rguenther@suse.de>
9162         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
9163         register_external_die hooks.
9164         (debug_false_tree_charstarstar_uhwistar): Declare.
9165         (debug_nothing_tree_charstar_uhwi): Likewise.
9166         * debug.c (do_nothing_debug_hooks): Adjust.
9167         (debug_false_tree_charstarstar_uhwistar): New do nothing.
9168         (debug_nothing_tree_charstar_uhwi): Likewise.
9169         * dbxout.c (dbx_debug_hooks): Adjust.
9170         (xcoff_debug_hooks): Likewise.
9171         * sdbout.c (sdb_debug_hooks): Likewise.
9172         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
9173         * dwarf2out.c (macinfo_label_base): New global.
9174         (dwarf2out_register_external_die): New function for the
9175         register_external_die hook.
9176         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
9177         (dwarf2_debug_hooks): Use them.
9178         (dwarf2_lineno_debug_hooks): Adjust.
9179         (struct die_struct): Add with_offset flag.
9180         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
9181         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
9182         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
9183         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
9184         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
9185         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
9186         defining section names for the early LTO debug variants.
9187         (reset_indirect_string): New helper.
9188         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
9189         (print_dw_val): Add support for offsetted symbol references.
9190         (get_ultimate_context): Split out from is_cxx.
9191         (is_cxx): Use get_ultimate_context.
9192         (is_fortran): Add decl overload.
9193         (compute_comp_unit_symbol): Split out worker from
9194         compute_section_prefix.
9195         (compute_section_prefix): Call compute_comp_unit_symbol and
9196         set comdat_type_p here.
9197         (output_die): Skip DIE symbol output for the LTO added one.
9198         Handle DIE symbol references with offset.
9199         (output_comp_unit): Guard section name mangling properly.
9200         For LTO debug sections emit a symbol at the section beginning
9201         which we use to refer to its DIEs.
9202         (add_abstract_origin_attribute): For DIEs registered via
9203         dwarf2out_register_external_die directly refer to the early
9204         DIE rather than indirectly through the shadow one we created.
9205         Remove obsolete call to dwarf2out_abstract_function for
9206         non-function/block origins.
9207         (gen_array_type_die): When generating early LTO debug do
9208         not emit DW_AT_string_length.
9209         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
9210         late when in LTO.  As suggested place a gcc_unreachable for
9211         the DECL_ABSTRACT_P case.
9212         (gen_subprogram_die): Avoid another specification DIE
9213         for early built declarations/definitions for the late LTO case.
9214         (gen_variable_die): Add type references for late duplicated VLA dies
9215         when in late LTO.
9216         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
9217         we have the abstract instance already.
9218         (process_scope_var): Adjust decl DIE contexts in LTO which
9219         first puts them in limbo.
9220         (gen_decl_die): Do not generate type DIEs late apart from
9221         types for VLAs or for decls we do not yet have a DIE.  Do not
9222         call dwarf2out_abstract_function late.
9223         (dwarf2out_early_global_decl): Make sure to create DIEs
9224         for abstract instances of a decl first.
9225         (dwarf2out_late_global_decl): Adjust comment.
9226         (output_macinfo_op): With multiple macro sections use
9227         macinfo_label_base to distinguish labels.
9228         (output_macinfo): Likewise.  Update macinfo_label_base.
9229         Pass in the line info label.
9230         (note_variable_value_in_expr): When generating LTO resolve
9231         all variable values here by generating DIEs as needed.
9232         (init_sections_and_labels): Add early LTO debug flag parameter
9233         and generate different sections and names if set.  Add generation
9234         counter for the labels so we can have multiple of them.
9235         (reset_dies): Helper to allow DIEs to be output multiple times.
9236         (dwarf2out_finish): When outputting DIEs to the fat part of an
9237         LTO object first reset DIEs.
9238         (dwarf2out_early_finish): Output early DIEs when generating LTO.
9239         (modified_type_die): Check for decl_ultimate_origin being self
9240         before recursing.
9241         (gen_type_die_with_usage): Likewise.
9242         (gen_typedef_die): Allow decl_ultimate_origin being self.
9243         (set_decl_abstract_flags): Remove.
9244         (set_block_abstract_flags): Likewise.
9245         (dwarf2out_abstract_function): Treat the early generated DIEs
9246         as the abstract copy and only add DW_AT_inline and
9247         DW_AT_artificial here and call set_decl_origin_self.
9248         If the DIE has an abstract origin don't do anything.
9249         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
9250         if we have none yet (Go fails to build one, PR78628).
9251         (variably_modified_type_p): Prevent endless recursion for Ada
9252         cyclic pointer types.
9253         * lto-streamer-in.c: Include debug.h.
9254         (dref_queue): New global.
9255         (lto_read_tree_1): Stream in DIE references.
9256         (lto_input_tree): Register DIE references.
9257         (input_function): Stream DECL_DEBUG_ARGS.
9258         * lto-streamer-out.c: Include debug.h.
9259         (lto_write_tree_1): Output DIE references.
9260         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
9261         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
9262         (output_function): Stream DECL_DEBUG_ARGS.
9263         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
9264         Stream DECL_ABSTRACT_ORIGIN.
9265         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
9266         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
9267         DECL_CONTEXT for file-scope decls.
9268         * lto-streamer.h (struct dref_entry): Declare.
9269         (dref_queue): Likewise.
9270         * cfgexpand.c (pass_expand::execute): Do not call the
9271         outlining_inline_function hook here.
9272         * lto-wrapper.c (debug_obj): New global.
9273         (tool_cleanup): Unlink it if required.
9274         (debug_objcopy): New function.
9275         (run_gcc): Handle early debug sections in the IL files by
9276         extracting them to separate files, partially linkin them and
9277         feeding the result back as result to the linker.
9278         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
9279         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
9280         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
9281         sections into a separate segment.
9282         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
9283         segments.
9284         (darwin_asm_dwarf_section): Likewise.
9285         (darwin_asm_output_dwarf_offset): Likewise.
9286         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
9288 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9289             Alan Hayward  <alan.hayward@arm.com>
9290             David Sherwood  <david.sherwood@arm.com>
9292         * read-md.h (md_reader::record_potential_iterator_use): Replace
9293         pointer argument with an rtx and an index.
9294         * read-rtl.c (iterator_group::apply_iterator): Likewise.
9295         (apply_mode_iterator): Likewise.
9296         (apply_code_iterator): Likewise.
9297         (apply_int_iterator): Likewise.
9298         (apply_subst_iterator): Likewise.
9299         (record_iterator_use): Likewise.
9300         (record_attribute_use): Likewise.
9301         (md_reader::record_potential_iterator_use): Likewise.  Update calls
9302         to record_iterator_use and apply_iterator.
9303         (iterator_use): Replace ptr with x and index.
9304         (attribute_use): Likewise.
9305         (apply_attribute_uses): Update calls to apply_iterator.
9306         (apply_iterators): Likewise.  Update initialization of iterator_use.
9307         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
9308         and record_potential_iterator_use.
9309         (rtx_reader::read_rtx_operand): Likewise.
9311 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9312             Alan Hayward  <alan.hayward@arm.com>
9313             David Sherwood  <david.sherwood@arm.com>
9315         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
9316         CONST_WIDE_INT.
9318 2017-08-21  Richard Biener  <rguenther@suse.de>
9320         PR middle-end/81884
9321         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
9322         at struct end conservatively when comparing common bases.
9324 2017-08-21  Richard Biener  <rguenther@suse.de>
9326         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
9327         (mem_ref_in_stmt): Remove.
9328         (determine_max_movement): Use ref index to get at the reference.
9329         (invariantness_dom_walker::before_dom_children): Deal with
9330         lim data already initialized.
9331         (gather_mem_refs_stmt): Initialize lim data and record ref index.
9333 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
9335         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
9336         (TARGET_ISA_ROUND): Ditto.
9337         (TARGET_ROUND): Ditto.
9338         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
9339         * config/i386/i386.md: Ditto.
9340         * config/i386/sse.md: Ditto.
9341         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
9342         with OPTION_MASK_ISA_SSE4_1.
9344 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
9346         PR target/81894
9347         * doc/extend.texi (x86 Built-in Functions): Correct the name of
9348         __builtin_ia32_lzcnt_u16.
9350 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
9352         PR target/80210
9353         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
9354         (rs6000_set_current_function): Rewrite function to use it.
9356 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
9358         PR c/53037
9359         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
9360         and TYPE_WARN_IF_NOT_ALIGN.
9361         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
9362         (handle_warn_if_not_align): New.
9363         (place_union_field): Call handle_warn_if_not_align.
9364         (place_field): Call handle_warn_if_not_align.
9365         Copy TYPE_WARN_IF_NOT_ALIGN.
9366         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
9367         (layout_type): Likewise.
9368         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
9369         spare to 18.
9370         (tree_decl_common): Add warn_if_not_align.
9371         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
9372         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
9373         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
9374         (DECL_WARN_IF_NOT_ALIGN): Likewise.
9375         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
9376         * doc/extend.texi: Document warn_if_not_aligned attribute.
9377         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
9379 2017-08-17  Martin Liska  <mliska@suse.cz>
9381         PR bootstrap/81864
9382         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
9383         (get_data_dependence): Use it as pointer type.
9384         (distribute_loop): Likewise.
9386 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9388         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
9389         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
9390         (p8_vmrgow_<mode>_direct): New define_insn.
9391         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
9392         handle endianness for vmrgew and vmrgow permute patterns.
9394 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
9396         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
9397         * config/rs6000/rs6000-cpus.def: Remove comment.
9398         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
9399         (POWERPC_MASKS): Likewise.
9400         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
9401         use of TARGET_VSX_TIMODE.
9402         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
9403         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
9404         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
9405         (rs6000_option_override_internal): Remove dead code.
9406         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
9407         (rs6000_legitimize_reload_address): Likewise.
9408         (rs6000_legitimate_address_p): Likewise.
9409         (rs6000_opt_masks): Delete "vsx-timode".
9410         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
9411         from function comment.
9412         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
9413         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
9414         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
9415         condition.
9416         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
9417         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
9418         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
9419         (VSX_TI): Likewise.
9420         (VSX_M): Likewise.
9421         (define_peephole2): Likewise.
9423 2017-08-17  Martin Sebor  <msebor@redhat.com>
9425         PR c/81859
9426         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
9427         past the end of an array.
9428         (test_pp_format): Add test cases.
9430 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
9432         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
9433         missing ECF_NOTHROW flags.
9435 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
9437         PR target/72804
9438         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
9439         operands residing in integer registers.
9440         (*vsx_le_perm_load_<mode>): Likewise.
9441         (*vsx_le_perm_store_<mode>): Likewise.
9442         (define_peephole2): Add peepholes to optimize the above.
9444 2017-08-17  Marek Polacek  <polacek@redhat.com>
9446         PR middle-end/81814
9447         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
9448         to mimic what shorten_compare did.  Change the return type to bool.
9449         (fold_cond_expr_with_comparison): Update call to
9450         operand_equal_for_comparison_p.
9451         (fold_ternary_loc): Likewise.
9453 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
9455         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
9456         register.
9457         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
9459 2017-08-17  Richard Biener  <rguenther@suse.de>
9461         * tree-ssa-structalias.c (solve_graph): When propagating
9462         to successors update the graphs succ edges and avoid duplicate work.
9464 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
9466         PR target/81861
9467         * config/i386/i386.c (ix86_option_override_internal): Save target
9468         specific options after ix86_stack_protector_guard_reg was changed.
9470 2017-08-17  Richard Biener  <rguenther@suse.de>
9472         PR tree-optimization/81827
9473         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
9474         (new_var_info): Initialize it conservatively.
9475         (get_call_vi): Mark register vars.
9476         (new_scalar_tmp_constraint_exp): Likewise.
9477         (handle_rhs_call): Likewise.
9478         (handle_const_call): Likewise.
9479         (create_function_info_for): Likewise.
9480         (solve_constraints): Sort varinfos to separate register from
9481         non-register vars to pack points-to solution bitmaps during
9482         iteration.
9484 2017-08-17  Marek Polacek  <polacek@redhat.com>
9486         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
9488 2017-08-17  Richard Biener  <rguenther@suse.de>
9490         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
9491         to true when overflow is undefined and we saturated the result.
9493 2017-08-17  Alan Modra  <amodra@gmail.com>
9495         PR target/80938
9496         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
9497         Don't use store multiple if only one reg needs saving.
9498         (interesting_frame_related_regno): New function.
9499         (rs6000_frame_related): Don't emit frame info for regs that
9500         don't need saving.
9501         (rs6000_emit_epilogue): Likewise.
9503 2017-08-16  Nathan Sidwell  <nathan@acm.org>
9505         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
9506         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
9507         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
9508         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
9509         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
9510         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
9511         (verify_type): Adjust for TYPE_BINFO move.
9512         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
9513         process TYPE_BINFO directly.
9514         (hash_tree): Likewise.
9515         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
9516         Likewise.
9517         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
9518         Likewise.
9520 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
9522         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
9524 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
9526         PR target/46091
9527         * config/i386/i386.md (*anddi_1_btr): Change predicates of
9528         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
9529         Add ix86_binary_operator_ok to insn constraint.
9530         (*iordi_1_bts): Ditto.
9531         (*xordi_1_btc): Ditto.
9532         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
9533         Update corresponding peephole2 pattern.
9534         (*btrq): Ditto.
9535         (*btcq): Ditto.
9537 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
9539         PR tree-optimization/81832
9540         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
9541         copy loop header which has IFN_LOOP_DIST_ALIAS call.
9543 2017-08-16  Marek Polacek  <polacek@redhat.com>
9545         PR middle/81695
9546         * fold-const.c (fold_indirect_ref_1): Restore original behavior
9547         regarding size_zero_node.
9549 2017-08-16  Martin Liska  <mliska@suse.cz>
9551         PR target/81753
9552         * config.gcc: Respect previously set extra_objs in case
9553         of darwin target.
9555 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
9557         PR tree-optimization/81835
9558         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
9559         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
9560         not depend on the phi.
9562 2017-08-16  Alan Modra  <amodra@gmail.com>
9564         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
9565         dead code.
9567 2017-08-16  Alan Modra  <amodra@gmail.com>
9569         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
9570         (save_reg_p): ..into this.  Update all callers.
9571         (first_reg_to_save): Simplify.
9573 2017-08-16  Alan Modra  <amodra@gmail.com>
9575         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
9576         fixed regs.
9578 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
9580         PR target/78460
9581         PR target/67712
9582         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
9583         constant count if that count is less than 32.
9585 2017-08-15  Nathan Sidwell  <nathan@acm.org>
9587         * gcc.c (execute): Emit friendlier message if inferior is killed
9588         by an external cause.
9590 2017-08-15  Richard Biener  <rguenther@suse.de>
9592         PR tree-optimization/81790
9593         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
9594         CONSTRUCTORs from simplifying and VN.
9596 2017-08-14  Martin Sebor  <msebor@redhat.com>
9598         * builtin-attrs.def: Add comments.
9600 2017-08-14  Martin Sebor  <msebor@redhat.com>
9602         PR c/81117
9603         * doc/extend.texi (attribute nonstring): Document new attribute.
9605 2017-08-14  Martin Sebor  <msebor@redhat.com>
9607         PR c/81117
9608         * tree-diagnostic.c (default_tree_printer): Handle %G.
9609         * gimple-pretty-print.h (percent_G_format): Declare new function.
9610         * gimple-pretty-print.c (percent_G_format): Define.
9611         * tree-pretty-print.c (percent_K_format): Add argument.
9613 2017-08-14  Martin Sebor  <msebor@redhat.com>
9615         PR translation/79998
9616         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
9617         Remove a stray space.
9619 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
9621         PR target/46091
9622         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
9623         (*iordi_1_bts): Ditto.
9624         (*xordi_1_btc): Ditto.
9626 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9628         PR target/79845
9629         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
9630         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9631         Likewise.
9632         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
9633         quoted strings, and make more translator-friendly.
9634         (darwin_rs6000_override_options): Likewise.
9635         (rs6000_option_override_internal): Likewise.
9636         (rs6000_return_in_memory): Fix overlong line.
9637         (init_cmulative_args): Use quoted strings, and make more
9638         translator-friendly.
9639         (rs6000_pass_by_reference): Fix overlong line.
9640         (def_builtin): Use quoted strings.
9641         (altivec_expand_predicate_builtin): Use quoted strings, and make
9642         more translator-friendly.
9643         (htm_expand_builtin): Use quoted strings.
9644         (cpu_expand_builtin): Use quoted strings, and make more
9645         translator-friendly.
9646         (altivec_expand_builtin): Likewise.
9647         (paired_expand_predicate_builtin): Likewise.
9648         (rs6000_invalid_builtin): Likewise.
9649         (builtin_function_type): Use quoted strings.
9650         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
9651         more translator-friendly.
9652         (rs6000_trampoline_init): Likewise.
9653         (rs6000_handle_altivec_attribute): Likewise.
9654         (rs6000_inner_target_options): Use quoted strings.
9655         (rs6000_disable_incompatible_switches): Likewise.
9656         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
9657         strings, and make more translator-friendly.
9658         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
9660 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
9662         PR tree-optimization/81799
9663         * tree-loop-distribution.c (version_loop_by_alias_check): Force
9664         cond_expr to simple gimple operand.
9666 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
9668         PR middle-end/46932
9669         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
9671 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
9673         PR target/81754
9674         PR target/81268
9675         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
9676         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
9677         TARGET_GASISR_PROLOGUES.
9678         * config/avr/avr.c (avr_option_override): Same.
9679         (avr_pass_pre_proep::execute): Same.
9681 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
9683         PR target/81820
9684         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
9685         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
9687 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
9689         * config/i386/i386.md (*load_tp_<mode>): Redefine as
9690         define_insn_and_split.  Split to a memory load from 0 in
9691         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
9692         using PTR mode iterator.
9693         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
9694         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
9695         (*add_tp_<mode>): Redefine as define_insn_and_split.
9696         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
9697         address space.  Merge with *add_tp_x32 using PTR mode iterator.
9698         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
9699         Split to an add with a  memory load from 0 in
9700         DEFAULT_TLS_SEG_REG address space.
9702 2017-08-12  Andrew Pinski  <apinski@cavium.com>
9704         * config/aarch64/aarch64-option-extensions.def (rdma):
9705         Fix feature string to what Linux prints out in /proc/cpuinfo.
9707 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
9709         PR ada/79542
9710         * dwarf2out.c (modified_type_die): For C typedef types that have
9711         an ultimate origin, process the ultimate origin instead of the
9712         input type.
9713         (gen_typedef_die): Assert that input DECLs have no ultimate
9714         origin.
9715         (gen_type_die_with_usage): For typedef variants that have an
9716         ultimate origin, just call gen_decl_die on the original DECL.
9717         (process_scope_var): Avoid creating DIEs for local typedefs and
9718         concrete static variables.
9720 2017-08-12  Alan Modra  <amodra@gmail.com>
9722         PR target/81170
9723         PR target/81295
9724         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
9725         match gnu-user.h startfile.
9726         (ENDFILE_LINUX_SPEC): Similarly.
9728 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
9730         PR lto/81430
9731         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
9732         Remove function.
9733         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
9735 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
9736         * config/aarch64/aarch64.md (mov<mode>): Change.
9737         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
9738         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
9739         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
9741 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
9743         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
9744         for storage order barriers.
9746 2017-08-11  Martin Liska  <mliska@suse.cz>
9748         PR tree-opt/79987
9749         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
9750         variables of void type.
9752 2017-08-11  Martin Liska  <mliska@suse.cz>
9754         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
9755         TARGET_SUPPORTS_ALIASES.
9756         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
9757         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
9758         (optimize_weakref): Likewise.
9759         * symtab.c (symtab_node::noninterposable_alias): Likewise.
9760         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
9761         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
9763 2017-08-11  Martin Liska  <mliska@suse.cz>
9765         PR ipa/81213
9766         * config/i386/i386.c (make_resolver_func): Do complete
9767         refactoring of the function.
9769 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
9771         PR target/81708
9772         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
9773         * config/i386/i386.c (ix86_stack_protect_guard): Use
9774         ix86_stack_protect_guard_symbol_str to generate varible declaration.
9775         * doc/invoke.texi (x86 Options): Document
9776         -mstack-protector-guard-symbol= option.
9778 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
9780         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
9781         * config/i386/i386.c (ix86_split_stack_guard): New function.
9782         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
9783         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
9784         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
9785         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
9786         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
9787         (split_stack_space_check): Call ix86_split_stack_guard.
9789 2017-08-10  Martin Sebor  <msebor@redhat.com>
9791         * print-tree.c (print_node): Print location using the established
9792         format %s:%i%i.
9793         Replace spaces with colons.
9794         (debug_raw, debug): Ditto.
9796 2017-08-10  Martin Sebor  <msebor@redhat.com>
9798         PR c++/81586
9799         * pretty-print.c (pp_format): Correct the handling of %s precision.
9801 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
9803         PR target/81736
9804         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
9805         to ...
9806         (ix86_finalize_stack_frame_flags): This.  Also clear
9807         frame_pointer_needed if -fno-omit-frame-pointer is used without
9808         stack access.
9809         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
9810         with ix86_finalize_stack_frame_flags.
9811         (ix86_expand_epilogue): Likewise.
9812         (ix86_expand_split_stack_prologue): Likewise.
9813         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
9815 2017-08-10  Martin Liska  <mliska@suse.cz>
9817         PR c++/81355
9818         * c-attribs.c (handle_target_attribute):
9819         Report warning for an empty string argument of target attribute.
9821 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
9823         PR c/81687
9824         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
9825         LABEL_DECLs.
9826         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
9827         or DECL_NONLOCAL labels.
9828         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
9829         or DECL_NONLOCAL labels here.
9831 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
9833         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
9834         to indicate when early gimple folding has been disabled.
9835         (rs6000_gimple_fold_builtin): Add debug content.
9836         (rs6000_invalid_builtin): Fix whitespace.
9837         (rs6000_expand_builtin): Fix whitespace.
9838         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
9840 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
9842         PR target/80938
9843         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
9844         SAVE_MULTIPLE if not all the registers that saves, should be saved.
9846 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
9848         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
9849         (qdf24xx): Likewise.
9850         * config/aarch64/aarch64.md: Include falkor.md.
9851         * config/aarch64/falkor.md: New.
9853 2017-08-09  Marek Polacek  <polacek@redhat.com>
9855         PR c/81233
9856         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
9857         * diagnostic.c (emit_diagnostic): Add a comment.
9858         (emit_diagnostic_valist): New function.
9860 2017-08-09  Marek Polacek  <polacek@redhat.com>
9862         PR c/81417
9863         * input.c (make_location): New overload.
9864         * input.h (make_location): Declare.
9866 2017-08-08  Alan Modra  <amodra@gmail.com>
9867             H.J. Lu  <hongjiu.lu@intel.com>
9869         PR driver/81523
9870         * gcc.c (NO_PIE_SPEC): Delete.
9871         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
9872         exclusion..
9873         (LINK_PIE_SPEC): ..to here.
9874         (LINK_COMMAND_SPEC): Support -no-pie.
9875         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
9876         chain of crtbegin*.o selection, update for PIE_SPEC changes and
9877         format.
9878         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
9879         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
9880         (ENDFILE_CRTEND_SPEC): Similarly.
9882 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
9884         PR target/81708
9885         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
9886         (mstack-protector-guard-offset=): Ditto.
9887         * config/i386/i386.c (ix86_option_override): Handle
9888         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
9889         options.
9890         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
9891         ix86_stack_protect_guard_offset variables.
9892         (TARGET_STACK_PROTECT_GUARD): Always define.
9893         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
9894         and -mstack-protector-guard-offset= options.
9896 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
9898         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
9899         boundary case for the last candidate.
9901 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
9903         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
9904         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
9906 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
9908         PR middle-end/19706
9909         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
9910         * config/aarch64/aarch64-builtins.c
9911         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
9912         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
9913         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
9915 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
9916             Andrew Pinski <pinskia@gmail.com>
9918         PR middle-end/19706
9919         * internal-fn.def (XORSIGN): New.
9920         * optabs.def (xorsign_optab): New.
9921         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
9922         (convert_expand_mult_copysign): New.
9923         (pass_optimize_widening_mul::execute): Call
9924         convert_expand_mult_copysign.
9926 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9928         PR tree-optimization/81354
9929         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
9930         Insert on edges rather than explicitly creating landing pads.
9931         (analyze_candidates_and_replace): Commit edge inserts.
9933 2017-08-08  Richard Biener  <rguenther@suse.de>
9935         PR middle-end/81719
9936         * tree-ssa-loop-niter.c: Include tree-dfa.h.
9937         (expand_simple_operations): Also look through ADDR_EXPRs with
9938         MEM_REF bases treating them as POINTER_PLUS_EXPR.
9940 2017-08-08  Richard Biener  <rguenther@suse.de>
9942         PR tree-optimization/81723
9943         * tree-vect-slp.c (struct bst_traits): New hash traits.
9944         (bst_fail): New global.
9945         (vect_build_slp_tree_2): New worker, split out from ...
9946         (vect_build_slp_tree): ... this now wrapping it with using
9947         bst_fail set to cache SLP tree build fails.  Properly handle
9948         max_tree_size.
9949         (vect_analyze_slp_instance): Allocate and free bst_fail.
9951 2017-08-08  Martin Liska  <mliska@suse.cz>
9953         PR tree-opt/81696
9954         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
9955         LABEL_DECLs that can be from a different function.
9957 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
9959         PR tree-optimization/81744
9960         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
9961         loop's number of iterations.
9963 2017-08-08  Martin Liska  <mliska@suse.cz>
9965         * asan.c: Include header files.
9966         * attribs.c (build_decl_attribute_variant): New function moved
9967         from tree.[ch].
9968         (build_type_attribute_qual_variant): Likewise.
9969         (cmp_attrib_identifiers): Likewise.
9970         (simple_cst_list_equal): Likewise.
9971         (omp_declare_simd_clauses_equal): Likewise.
9972         (attribute_value_equal): Likewise.
9973         (comp_type_attributes): Likewise.
9974         (build_type_attribute_variant): Likewise.
9975         (lookup_ident_attribute): Likewise.
9976         (remove_attribute): Likewise.
9977         (merge_attributes): Likewise.
9978         (merge_type_attributes): Likewise.
9979         (merge_decl_attributes): Likewise.
9980         (merge_dllimport_decl_attributes): Likewise.
9981         (handle_dll_attribute): Likewise.
9982         (attribute_list_equal): Likewise.
9983         (attribute_list_contained): Likewise.
9984         * attribs.h (lookup_attribute): New function moved from tree.[ch].
9985         (lookup_attribute_by_prefix): Likewise.
9986         * bb-reorder.c: Include header files.
9987         * builtins.c: Likewise.
9988         * calls.c: Likewise.
9989         * cfgexpand.c: Likewise.
9990         * cgraph.c: Likewise.
9991         * cgraphunit.c: Likewise.
9992         * convert.c: Likewise.
9993         * dwarf2out.c: Likewise.
9994         * final.c: Likewise.
9995         * fold-const.c: Likewise.
9996         * function.c: Likewise.
9997         * gimple-expr.c: Likewise.
9998         * gimple-fold.c: Likewise.
9999         * gimple-pretty-print.c: Likewise.
10000         * gimple.c: Likewise.
10001         * gimplify.c: Likewise.
10002         * hsa-common.c: Likewise.
10003         * hsa-gen.c: Likewise.
10004         * internal-fn.c: Likewise.
10005         * ipa-chkp.c: Likewise.
10006         * ipa-cp.c: Likewise.
10007         * ipa-devirt.c: Likewise.
10008         * ipa-fnsummary.c: Likewise.
10009         * ipa-inline.c: Likewise.
10010         * ipa-visibility.c: Likewise.
10011         * ipa.c: Likewise.
10012         * lto-cgraph.c: Likewise.
10013         * omp-expand.c: Likewise.
10014         * omp-general.c: Likewise.
10015         * omp-low.c: Likewise.
10016         * omp-offload.c: Likewise.
10017         * omp-simd-clone.c: Likewise.
10018         * opts-global.c: Likewise.
10019         * passes.c: Likewise.
10020         * predict.c: Likewise.
10021         * sancov.c: Likewise.
10022         * sanopt.c: Likewise.
10023         * symtab.c: Likewise.
10024         * toplev.c: Likewise.
10025         * trans-mem.c: Likewise.
10026         * tree-chkp.c: Likewise.
10027         * tree-eh.c: Likewise.
10028         * tree-into-ssa.c: Likewise.
10029         * tree-object-size.c: Likewise.
10030         * tree-parloops.c: Likewise.
10031         * tree-profile.c: Likewise.
10032         * tree-ssa-ccp.c: Likewise.
10033         * tree-ssa-live.c: Likewise.
10034         * tree-ssa-loop.c: Likewise.
10035         * tree-ssa-sccvn.c: Likewise.
10036         * tree-ssa-structalias.c: Likewise.
10037         * tree-ssa.c: Likewise.
10038         * tree-streamer-in.c: Likewise.
10039         * tree-vectorizer.c: Likewise.
10040         * tree-vrp.c: Likewise.
10041         * tsan.c: Likewise.
10042         * ubsan.c: Likewise.
10043         * varasm.c: Likewise.
10044         * varpool.c: Likewise.
10045         * tree.c: Remove functions moved to attribs.[ch].
10046         * tree.h: Likewise.
10047         * config/aarch64/aarch64.c: Add attrs.h header file.
10048         * config/alpha/alpha.c: Likewise.
10049         * config/arc/arc.c: Likewise.
10050         * config/arm/arm.c: Likewise.
10051         * config/avr/avr.c: Likewise.
10052         * config/bfin/bfin.c: Likewise.
10053         * config/c6x/c6x.c: Likewise.
10054         * config/cr16/cr16.c: Likewise.
10055         * config/cris/cris.c: Likewise.
10056         * config/darwin.c: Likewise.
10057         * config/epiphany/epiphany.c: Likewise.
10058         * config/fr30/fr30.c: Likewise.
10059         * config/frv/frv.c: Likewise.
10060         * config/ft32/ft32.c: Likewise.
10061         * config/h8300/h8300.c: Likewise.
10062         * config/i386/winnt.c: Likewise.
10063         * config/ia64/ia64.c: Likewise.
10064         * config/iq2000/iq2000.c: Likewise.
10065         * config/lm32/lm32.c: Likewise.
10066         * config/m32c/m32c.c: Likewise.
10067         * config/m32r/m32r.c: Likewise.
10068         * config/m68k/m68k.c: Likewise.
10069         * config/mcore/mcore.c: Likewise.
10070         * config/microblaze/microblaze.c: Likewise.
10071         * config/mips/mips.c: Likewise.
10072         * config/mmix/mmix.c: Likewise.
10073         * config/mn10300/mn10300.c: Likewise.
10074         * config/moxie/moxie.c: Likewise.
10075         * config/msp430/msp430.c: Likewise.
10076         * config/nds32/nds32-isr.c: Likewise.
10077         * config/nds32/nds32.c: Likewise.
10078         * config/nios2/nios2.c: Likewise.
10079         * config/nvptx/nvptx.c: Likewise.
10080         * config/pa/pa.c: Likewise.
10081         * config/pdp11/pdp11.c: Likewise.
10082         * config/powerpcspe/powerpcspe.c: Likewise.
10083         * config/riscv/riscv.c: Likewise.
10084         * config/rl78/rl78.c: Likewise.
10085         * config/rx/rx.c: Likewise.
10086         * config/s390/s390.c: Likewise.
10087         * config/sh/sh.c: Likewise.
10088         * config/sol2.c: Likewise.
10089         * config/sparc/sparc.c: Likewise.
10090         * config/spu/spu.c: Likewise.
10091         * config/stormy16/stormy16.c: Likewise.
10092         * config/tilegx/tilegx.c: Likewise.
10093         * config/tilepro/tilepro.c: Likewise.
10094         * config/v850/v850.c: Likewise.
10095         * config/vax/vax.c: Likewise.
10096         * config/visium/visium.c: Likewise.
10097         * config/xtensa/xtensa.c: Likewise.
10099 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
10101         PR target/81593
10102         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
10103         constraints since the -mupper-regs-* switches have been
10104         eliminated.
10105         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
10106         into a vector from a double word element that was extracted from
10107         another vector, and eliminate extra XXPERMDI instructions.
10108         (vsx_concat_<mode>_2): Likewise.
10109         (vsx_concat_<mode>_3): Likewise.
10110         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
10111         concat to allow optimizing inserts from previous extracts.
10113 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
10115         * config/i386/i386.c (ix86_stack_protect_guard): Generate
10116         memory reference to a SSP offset in TLS address space.
10117         (ix86_print_operand) <case '@'>: Remove.
10118         (ix86_print_operand_punct_valid_p): Remove '@' code.
10119         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
10120         UNSPEC_SP_TLS_TEST.
10121         (stack_tls_protect_set_<mode>): Remove.
10122         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
10123         (stack_tls_protect_test_<mode>): Remove.
10124         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
10126 2017-08-07  Olivier Hainque  <hainque@adacore.com>
10128         PR target/81755
10129         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
10131 2017-08-07  Douglas Rupp  <rupp@adacore.com>
10133         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
10134         variable was referenced as multidir in command.
10136 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
10138         PR c/69389
10139         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
10140         BIT_FIELD_REF.
10142 2017-08-07  Martin Liska  <mliska@suse.cz>
10144         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
10145         * config/rl78/rl78.c: Add include of attribs.h.
10146         * config/sh/sh.c: Likewise.
10147         * config/v850/v850.c: Likewise.
10149 2017-08-07  Tom de Vries  <tom@codesourcery.com>
10151         PR middle-end/78266
10152         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
10154 2017-08-07  Martin Liska  <mliska@suse.cz>
10156         * config/mips/mips.c: Include attribs.h.
10158 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
10160         PR fortran/68829
10161         * doc/invoke.texi: Document change in behvaior for -Ofast for
10162         Fortran.
10164 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
10166         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
10167         Use gen_frame_mem.
10168         (aarch64_pop_regs): Likewise.
10169         (aarch64_gen_load_pair): Likewise.
10170         (aarch64_save_callee_saves): Likewise.
10171         (aarch64_restore_callee_saves): Likewise.
10173 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10175         * config/i386/i386.c: Revert the last change.
10177 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10179         PR target/81736
10180         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
10181         to ...
10182         (ix86_finalize_stack_frame_flags): This.  Also clear
10183         frame_pointer_needed if -fno-omit-frame-pointer is used without
10184         stack access.
10185         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
10186         with ix86_finalize_stack_frame_flags.
10187         (ix86_expand_epilogue): Likewise.
10188         (ix86_expand_split_stack_prologue): Likewise.
10190 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10192         PR target/81743
10193         * config/i386/i386.c (get_builtin_code_for_version): Set priority
10194         to P_AES for Westmere.
10196 2017-08-07  Jonathan Yong  <10walls@gmail.com>
10198         * config/i386/mingw.opt (fset-stack-executable): Removed.
10199         * config/i386/cygming.opt (fset-stack-executable): Moved
10200         from mingw.opt.
10201         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
10203 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
10205         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
10207 2017-08-07  Marek Polacek  <polacek@redhat.com>
10209         PR middle-end/81737
10210         * fold-const.c (fold_indirect_ref_1): Check type_domain.
10212 2017-08-07  Martin Liska  <mliska@suse.cz>
10214         * attribs.h (canonicalize_attr_name): New function.
10215         (cmp_attribs): Move from c-format.c and adjusted.
10216         (is_attribute_p): Moved from tree.h.
10217         * tree-inline.c: Add new includes.
10218         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
10219         (private_is_attribute_p): Remove.
10220         (private_lookup_attribute): Likewise.
10221         (private_lookup_attribute_by_prefix): Simplify.
10222         (remove_attribute): Use is_attribute_p.
10223         * tree.h: Remove removed declarations.
10225 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
10227         PR middle-end/81698
10228         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
10229         instead of computing it in the function.  Formatting fix.
10230         (expand_case): Don't rely on default_edge being the first edge,
10231         clear it if removing it, pass default_edge to
10232         emit_case_dispatch_table.
10233         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
10234         fix.
10236 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
10238         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
10239         insn in the function, emit NOP after the insn.
10241 2017-08-06  Tom de Vries  <tom@codesourcery.com>
10243         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
10244         and element loops.
10246 2017-08-06  Tom de Vries  <tom@codesourcery.com>
10248         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
10249         loop.
10251 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
10253         PR tree-optimization/57371
10254         * match.pd: New pattern.
10256 2017-08-04  Marek Polacek  <polacek@redhat.com>
10258         PR middle-end/81695
10259         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
10260         perform the computation in offset_int.
10262 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10264         PR tree-optimization/81136
10265         * tree-vectorizer.h: Include tree-hash-traits.h.
10266         (vec_base_alignments): New typedef.
10267         (vec_info): Add a base_alignments field.
10268         (vect_record_base_alignments): Declare.
10269         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
10270         field.
10271         (DR_IS_CONDITIONAL_IN_STMT): New macro.
10272         (create_data_ref): Add an is_conditional_in_stmt argument.
10273         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
10274         the is_conditional_in_stmt field.
10275         (data_ref_loc): Add an is_conditional_in_stmt field.
10276         (get_references_in_stmt): Set the is_conditional_in_stmt field.
10277         (find_data_references_in_stmt): Update call to create_data_ref.
10278         (graphite_find_data_references_in_stmt): Likewise.
10279         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
10280         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
10281         (vect_record_base_alignment): New function.
10282         (vect_record_base_alignments): Likewise.
10283         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
10284         for nested statements even if we fail to compute a misalignment.
10285         Use pooled base alignments for unconditional references.
10286         (vect_find_same_alignment_drs): Compare base addresses instead
10287         of base objects.
10288         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
10289         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
10291 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10293         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
10294         Add an explicit name for the enum.  Use auto_vec for slp_instances
10295         and grouped_stores.
10296         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
10297         for all vectors.
10298         (_bb_vec_info): Add a constructor and destructor.
10299         (vinfo_for_stmt): Return NULL for uids of -1 as well.
10300         (destroy_loop_vec_info): Delete.
10301         (vect_destroy_datarefs): Likewise.
10302         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
10303         (vec_info::vec_info): New function.
10304         (vec_info::~vec_info): Likewise.
10305         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
10306         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
10307         destroy_loop_vec_info.
10308         * tree-vect-loop.c (new_loop_vec_info): Replace with...
10309         (_loop_vec_info::_loop_vec_info): ...this.
10310         (destroy_loop_vec_info): Replace with...
10311         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
10312         the stmt_vec_infos.  Leave handling of vec_info information to its
10313         destructor.  Remove explicit vector releases.
10314         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
10315         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
10316         * tree-vect-slp.c (new_bb_vec_info): Replace with...
10317         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
10318         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
10319         (destroy_bb_vec_info): Replace with...
10320         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
10321         information to its destructor.
10322         (vect_slp_analyze_bb_1): Use new and delete instead of
10323         new_bb_vec_info and destroy_bb_vec_info.
10324         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
10325         single delete.
10327 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10329         * tree-data-ref.h (subscript): Add access_fn field.
10330         (data_dependence_relation): Add could_be_independent_p.
10331         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
10332         (same_access_functions): Move to tree-data-ref.c.
10333         * tree-data-ref.c (ref_contains_union_access_p): New function.
10334         (access_fn_component_p): Likewise.
10335         (access_fn_components_comparable_p): Likewise.
10336         (dr_analyze_indices): Add a reference to access_fn_component_p.
10337         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
10338         DR_ACCESS_FN.
10339         (constant_access_functions): Likewise.
10340         (add_other_self_distances): Likewise.
10341         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
10342         (initialize_data_dependence_relation): Use XCNEW and remove
10343         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
10344         of access functions that have the same type.  Allow the
10345         subsequence to end with different bases in some circumstances.
10346         Record the chosen access functions in SUB_ACCESS_FN.
10347         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
10348         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
10349         (subscript_dependence_tester_1): Likewise dra and drb.
10350         (build_classic_dist_vector): Update calls accordingly.
10351         (subscript_dependence_tester): Likewise.
10352         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
10353         DDR_COULD_BE_INDEPENDENT_P.
10354         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
10355         comp_alias_ddrs instead of may_alias_ddrs.
10356         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10357         New function.
10358         (vect_analyze_data_ref_dependence): Use it if
10359         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
10360         distance vectors if that fails.
10361         (dependence_distance_ge_vf): New function.
10362         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
10363         LOOP_VINFO_MAY_ALIAS_DDRS.
10365 2017-08-04  Richard Biener  <rguenther@suse.de>
10367         PR middle-end/81705
10368         * fold-const.c (fold_binary_loc): Properly restrict
10369         minus_var0 && minus_var1 case when associating undefined overflow
10370         entities.
10372 2017-08-04  Tom de Vries  <tom@codesourcery.com>
10374         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
10376 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10378         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10379         Don't start diagnostic messages with a capital letter.
10380         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10381         Likewise.
10382         (rs6000_invalid_builtin): Likewise.
10383         (rs6000_trampoline_init): Likewise.
10385 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
10387         PR target/81621
10388         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
10389         after setting changeable df flags.
10391 2017-08-03  Richard Biener  <rguenther@suse.de>
10393         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
10394         up if the use is in USE - X.
10396 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
10398         * toplev.c (dumpfile.h): New include.
10399         (internal_error_reentered): New static function.  Use it...
10400         (internal_error_function): ...here to handle reentered internal_error.
10402 2017-08-03  Richard Biener  <rguenther@suse.de>
10404         PR middle-end/81148
10405         * fold-const.c (split_tree): Add minus_var and minus_con
10406         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
10407         here but always use minus_*.
10408         (associate_trees): Assert we never associate with MINUS_EXPR
10409         and NULL first operand.  Do not recurse for PLUS_EXPR operands
10410         when associating as MINUS_EXPR either.
10411         (fold_binary_loc): Track minus_var and minus_con.
10413 2017-08-03  Tom de Vries  <tom@codesourcery.com>
10415         PR lto/81430
10416         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
10417         ACCEL_COMPILER, apply finish_options on
10418         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
10420 2017-08-03  Tom de Vries  <tom@codesourcery.com>
10422         PR target/81662
10423         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
10424         function_entry_patch_area_size > 0.
10426 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
10428         PR driver/81650
10429         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
10430         instead of 10??LU, perform unit multiplication in wide_int,
10431         don't change alloc_object_size_limit if the limit is larger
10432         than SSIZE_MAX.
10434         PR tree-optimization/81655
10435         PR tree-optimization/81588
10436         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
10437         the case when ranges[i].low and high are 1 for unsigned type with
10438         precision 1.
10440         PR middle-end/81052
10441         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
10442         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
10444 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10446         * tree-vrp.h: Add include guard.
10448 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
10450         PR target/81644
10451         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
10452         (ud2): New insn pattern.
10453         * config/i386/i386.c (ix86_expand_epilogue):
10454         For naked functions, generate ud2 instead of trap insn.
10456 2017-08-02  Marek Polacek  <polacek@redhat.com>
10458         PR other/81667
10459         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
10461 2017-08-02  Tom de Vries  <tom@codesourcery.com>
10462             Cesar Philippidis  <cesar@codesourcery.com>
10464         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
10465         Add missing edge probabilities.
10467 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
10469         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
10470         Correct endianness.
10472 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
10474         PR middle-end/79499
10475         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
10476         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
10477         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
10478         prologue_seq sequences - if any.
10480 2017-08-02  Richard Biener  <rguenther@suse.de>
10482         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
10483         via vectors if supported, integer extracts via punning if supported
10484         or otherwise vector extracts.
10486 2017-08-02  Richard Biener  <rguenther@suse.de>
10488         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
10489         into ...
10490         (bitmap_insert_into_set): ... this.
10492 2017-08-02  Richard Biener  <rguenther@suse.de>
10494         PR tree-optimization/81633
10495         Revert
10496         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
10498         PR tree-optimization/71752
10499         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
10501 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
10503         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
10504         (machine_function::call_ms2sysv_pad_out): Remove field.
10505         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
10506         (ix86_compute_frame_layout): Likewise.
10508 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
10510         PR target/81654
10511         * config/i386/i386.c (ix86_set_func_type): Disallow naked
10512         attribute with interrupt attribute.
10514 2017-08-01  Andrew Pinski  <apinski@cavium.com>
10516         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
10517         BIT_INSERT_EXPR's operand 1
10518         to see if the types precision matches.
10520 2017-08-01  Martin Liska  <mliska@suse.cz>
10522         PR middle-end/70140
10523         * builtins.c (expand_builtin_memcpy_args): Remove.
10524         (expand_builtin_memcpy): Call newly added function
10525         expand_builtin_memory_copy_args.
10526         (expand_builtin_memcpy_with_bounds): Likewise.
10527         (expand_builtin_mempcpy): Remove last argument.
10528         (expand_builtin_mempcpy_with_bounds): Likewise.
10529         (expand_builtin_memory_copy_args): New function created from
10530         expand_builtin_mempcpy_args with small modifications.
10531         (expand_builtin_mempcpy_args): Remove.
10532         (expand_builtin_stpcpy): Remove unused argument.
10533         (expand_builtin): Likewise.
10534         (expand_builtin_with_bounds): Likewise.
10536 2017-08-01  Martin Liska  <mliska@suse.cz>
10538         Revert r250771
10539         Make mempcpy more optimal (PR middle-end/70140).
10541 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
10543         PR target/81622
10544         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
10545         __builtin_vec_cmpne verify both arguments are compatible vectors
10546         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
10547         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
10548         move computation of aligned to after checking the argument types.
10549         Formatting fixes.
10551         PR target/80846
10552         * config/rs6000/vsx.md (vextract_fp_from_shorth,
10553         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
10554         calls.
10556 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
10557             Doug Rupp  <rupp@adacore.com>
10558             Olivier Hainque  <hainque@adacore.com>
10560         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
10561         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
10562         arm8 (arch v4).
10563         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
10564         for TARGET_OS_CPP_BUILTIN.
10565         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
10566         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
10567         arm_arch7.
10568         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
10569         passing required abi options to the assembler for EABI configurations.
10570         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
10571         of .text.hot and .text.unlikely sections for kernel modules when
10572         using ARM style exceptions.
10573         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
10574         options. Add EXTRA_CC1_SPEC.
10575         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
10576         toolchain options.
10577         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
10578         transition.
10579         (ARM_TARGET2_DWARF_FORMAT): Define.
10580         * config/arm/t-vxworks: Adjust multilib control to removal of the
10581         Diab command line options.
10583 2017-08-01  Martin Liska  <mliska@suse.cz>
10585         PR gcov-profile/81561
10586         * gcov.c (unblock): Make unblocking safe as we need to preserve
10587         index correspondence of blocks and block_lists.
10589 2017-08-01  Richard Biener  <rguenther@suse.de>
10591         PR tree-optimization/81181
10592         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
10593         (compute_antic): ... end of iteration here.
10595 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
10597         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
10598         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
10599         (ftree-slp-vectorize): Likewise.
10600         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
10601         can no longer be set independent of flag_tree_loop_vectorize.
10602         * omp-general.c (emp_max_vf): Likewise.
10603         * opts.c (enable_fdo_optimizations): Remove references to
10604         flag_tree_vectorize, these are now implicit.
10605         (common_handle_option): Remove handling for OPT_ftree_vectorize,
10606         and leave it for the options machinery.
10608 2017-08-01  Martin Liska  <mliska@suse.cz>
10610         PR middle-end/70140
10611         * builtins.c (expand_builtin_memcpy_args): Remove.
10612         (expand_builtin_memcpy): Call newly added function
10613         expand_builtin_memory_copy_args.
10614         (expand_builtin_memcpy_with_bounds): Likewise.
10615         (expand_builtin_mempcpy): Remove last argument.
10616         (expand_builtin_mempcpy_with_bounds): Likewise.
10617         (expand_builtin_memory_copy_args): New function created from
10618         expand_builtin_mempcpy_args with small modifications.
10619         (expand_builtin_mempcpy_args): Remove.
10620         (expand_builtin_stpcpy): Remove unused argument.
10621         (expand_builtin): Likewise.
10622         (expand_builtin_with_bounds): Likewise.
10624 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
10626         PR target/81641
10627         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
10628         print "ds:" only for immediates in generic address space.
10630 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
10632         PR target/81639
10633         * config/i386/i386.c (ix86_funciton_naked): New prototype.
10634         (ix86_function_ok_for_sibcall): Return false for naked functions.
10636 2017-08-01  Richard Biener  <rguenther@suse.de>
10638         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
10639         (compute_antic): Seed worklist with exit block predecessors.
10640         * cfganal.c (dfs_find_deadend): For a cycle return the source
10641         of the edge closing it.
10643 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
10645         * config/aarch64/aarch64.c
10646         (aarch64_can_const_movi_rtx_p): Move 0 check.
10648 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10650         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
10651         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
10652         above macro.
10653         * match.pd: Ditto in address comparison pattern.
10655 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10657         PR tree-optimization/81627
10658         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
10659         closed ssa form for store-store chain.
10661 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10663         PR tree-optimization/81620
10664         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
10665         for store-store chain.
10667 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
10669         PR tree-optimization/81588
10670         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
10671         ranges[i].in_p, invert comparison code ccode.  For >/>=,
10672         swap rhs1 and rhs2 and comparison code unconditionally,
10673         for </<= don't do that.  Don't swap rhs1/rhs2 again if
10674         ranges[i].in_p, instead invert comparison code ccode if
10675         opcode or oe->rank is BIT_IOR_EXPR.
10677         PR target/80846
10678         * optabs.def (vec_extract_optab, vec_init_optab): Change from
10679         a direct optab to conversion optab.
10680         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
10681         with GET_MODE_INNER as last argument instead of optab_handler.
10682         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
10683         vector extraction if possible and optab is available.
10684         * expr.c (store_constructor): Use convert_optab_handler instead
10685         of optab_handler.  Use vector initialization from smaller
10686         vectors if possible and optab is available.
10687         * tree-vect-stmts.c (vectorizable_load): Likewise.
10688         * doc/md.texi (vec_extract, vec_init): Document that the optabs
10689         now have two modes.
10690         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
10691         of vec_init from half-sized vectors with the same element mode.
10692         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
10693         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
10694         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
10695         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
10696         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
10697         after mode in gen_vec_extract* calls.
10698         (vec_extract<mode>): Renamed to ...
10699         (vec_extract<mode><ssescalarmodelower>): ... this.
10700         (vec_extract<mode><ssehalfvecmodelower>): New expander.
10701         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
10702         element mode after mode in gen_vec_init* calls.
10703         (VEC_INIT_HALF_MODE): New mode iterator.
10704         (vec_init<mode>): Renamed to ...
10705         (vec_init<mode><ssescalarmodelower>): ... this.
10706         (vec_init<mode><ssehalfvecmodelower>): New expander.
10707         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
10708         (vec_extractv2sfsf): ... this.
10709         (vec_initv2sf): Renamed to ...
10710         (vec_initv2sfsf): ... this.
10711         (vec_extractv2si): Renamed to ...
10712         (vec_extractv2sisi): ... this.
10713         (vec_initv2si): Renamed to ...
10714         (vec_initv2sisi): ... this.
10715         (vec_extractv4hi): Renamed to ...
10716         (vec_extractv4hihi): ... this.
10717         (vec_initv4hi): Renamed to ...
10718         (vec_initv4hihi): ... this.
10719         (vec_extractv8qi): Renamed to ...
10720         (vec_extractv8qiqi): ... this.
10721         (vec_initv8qi): Renamed to ...
10722         (vec_initv8qiqi): ... this.
10723         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
10724         (vec_init<mode>): Renamed to ...
10725         (vec_init<mode><VEC_base_l>): ... this.
10726         (vec_extract<mode>): Renamed to ...
10727         (vec_extract<mode><VEC_base_l>): ... this.
10728         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
10729         (vec_initv2sfsf): ... this.
10730         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
10731         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
10732         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
10733         element mode after mode in gen_vec_init* calls.
10734         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
10735         (vec_init<mode><Vel>): ... this.
10736         (vec_extract<mode>): Renamed to ...
10737         (vec_extract<mode><Vel>): ... this.
10738         * config/aarch64/iterators.md (Vel): New mode attribute.
10739         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
10740         Add element mode after mode in gen_vec_extract* calls.
10741         * config/s390/vector.md (non_vec_l): New mode attribute.
10742         (vec_extract<mode>): Renamed to ...
10743         (vec_extract<mode><non_vec_l>): ... this.
10744         (vec_init<mode>): Renamed to ...
10745         (vec_init<mode><non_vec_l>): ... this.
10746         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
10747         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
10748         vec_extract mode.
10749         * config/arm/iterators.md (V_elem_l): New mode attribute.
10750         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
10751         (vec_extract<mode><V_elem_l>): ... this.
10752         (vec_extractv2di): Renamed to ...
10753         (vec_extractv2didi): ... this.
10754         (vec_init<mode>): Renamed to ...
10755         (vec_init<mode><V_elem_l>): ... this.
10756         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
10757         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
10758         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
10759         Add element mode after gen_vec_extract* calls.
10760         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
10761         (vec_init<mode><unitmode>): ... this.
10762         (vec_extract<mode>): Renamed to ...
10763         (vec_extract<mode><unitmode>): ... this.
10764         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
10765         (vec_init<mode><unitmode>): ... this.
10766         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
10767         (vec_initv2sfsf): ... this.
10768         (vec_extractv2sf): Renamed to ...
10769         (vec_extractv2sfsf): ... this.
10770         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
10771         Add element mode after gen_vec_extract* calls.
10772         * config/mips/mips.md (unitmode): New mode iterator.
10773         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
10774         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
10775         * config/spu/spu.md (inner_l): New mode attribute.
10776         (vec_init<mode>): Renamed to ...
10777         (vec_init<mode><inner_l>): ... this.
10778         (vec_extract<mode>): Renamed to ...
10779         (vec_extract<mode><inner_l>): ... this.
10780         * config/sparc/sparc.md (veltmode): New mode iterator.
10781         (vec_init<VMALL:mode>): Renamed to ...
10782         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
10783         * config/ia64/vect.md (vec_initv2si): Renamed to ...
10784         (vec_initv2sisi): ... this.
10785         (vec_initv2sf): Renamed to ...
10786         (vec_initv2sfsf): ... this.
10787         (vec_extractv2sf): Renamed to ...
10788         (vec_extractv2sfsf): ... this.
10789         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
10790         (vec_init<mode>): Renamed to ...
10791         (vec_init<mode><VEC_base_l>): ... this.
10792         (vec_extract<mode>): Renamed to ...
10793         (vec_extract<mode><VEC_base_l>): ... this.
10794         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
10795         (vec_initv2sfsf): ... this.
10796         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
10797         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
10798         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
10799         gen_vec_init* calls.
10801 2017-08-01  Richard Biener  <rguenther@suse.de>
10803         PR tree-optimization/81297
10804         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
10805         TREE_OVERFLOW from INTEGER_CSTs.
10807 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
10809         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
10811 2017-07-31  Carl Love  <cel@us.ibm.com>
10813         * config/rs6000/rs6000-c: Add support for built-in functions
10814         vector signed char vec_xl_be (signed long long, signed char *);
10815         vector unsigned char vec_xl_be (signed long long, unsigned char *);
10816         vector signed int vec_xl_be (signed long long, signed int *);
10817         vector unsigned int vec_xl_be (signed long long, unsigned int *);
10818         vector signed long long vec_xl_be (signed long long, signed long long *);
10819         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
10820         vector signed short vec_xl_be (signed long long, signed short *);
10821         vector unsigned short vec_xl_be (signed long long, unsigned short *);
10822         vector double vec_xl_be (signed long long, double *);
10823         vector float vec_xl_be (signed long long, float *);
10824         * config/rs6000/altivec.h (vec_xl_be): Add #define.
10825         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
10826         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
10827         for the builtins.
10828         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
10829         (altivec_expand_builtin): Add switch statement to call
10830         altivec_expand_xl_be for each builtin.
10831         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
10832         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
10833         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
10834         __builtin_vsx_le_be_v16qi.
10835         * doc/extend.texi: Update the built-in documentation file for the
10836         new built-in functions.
10838 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
10840         PR target/25967
10841         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
10842         New function.
10843         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
10845 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10847         * config.gcc: Add z14.
10848         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
10849         CPU model numbers for z13s and z14.
10850         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
10851         arch12 with z14.
10852         * config/s390/s390-opts.h (enum processor_type): Rename
10853         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
10854         * config/s390/s390.c (processor_table): Add field for CPU name to
10855         be passed to Binutils.
10856         (s390_asm_output_machine_for_arch): Use the new field in
10857         processor_table for Binutils.
10858         (s390_expand_builtin): Replace arch12 with z14.
10859         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
10860         (s390_get_sched_attrmask): Likewise.
10861         (s390_get_unit_mask): Likewise.
10862         * config/s390/s390.opt: Add z14 to processor_type enum.
10864 2017-07-31  Martin Jambor  <mjambor@suse.cz>
10866         PR hsa/81477
10867         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
10868         regardless of optimization level.
10870 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
10871             Martin Liska  <mliska@suse.cz>
10873         * predict.def: Remove old comment and adjust probability.
10874         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
10875         PREDICT statements.
10877 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
10879         PR target/25967
10880         * config/i386/i386.c (ix86_function_naked): New function.
10881         (ix86_can_use_return_insn_p): Return false for naked functions.
10882         (ix86_expand_prologue): Skip prologue for naked functions.
10883         (ix86_expand_epilogue): Skip epilogue for naked functions
10884         and emit trap instruction.
10885         (ix86_warn_func_return): New function.
10886         (ix86_attribute_table): Add "naked" attribute specification.
10887         (TARGET_WARN_FUNC_RETURN): Define.
10888         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
10890 2017-07-31  Martin Liska  <mliska@suse.cz>
10892         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
10893         (dump_gimple_bb_header): Always dump BB info.
10894         (pp_cfg_jump): Do not append info about BB when dumping a jump.
10896 2017-07-31  Martin Liska  <mliska@suse.cz>
10898         PR sanitize/81530
10899         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
10900         also with current_function_decl non-null equality.
10902 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
10904         PR sanitizer/81604
10905         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
10906         change type to the element type, instead add eltype variable and
10907         use it where we are interested in the element type.
10909         PR tree-optimization/81603
10910         * ipa-polymorphic-call.c
10911         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
10912         offset arithmetic in offset_int, bail out if the resulting bit offset
10913         doesn't fit into shwi.
10915 2017-07-31  Martin Liska  <mliska@suse.cz>
10917         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
10918         (gimplify_save_expr): Fix comment.
10920 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
10922         PR target/79793
10923         * config/i386/i386.c (ix86_function_arg): Update arguments for
10924         exception handler.
10925         (ix86_compute_frame_layout): Set the initial stack offset to
10926         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
10927         INCOMING_FRAME_SP_OFFSET.
10928         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
10929         stack before exception handler returns.
10930         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
10931         the 'ERROR_CODE' for exception handler.
10933 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
10935         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
10936         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
10937         (ASM_OUTPUT_REG_POP): Ditto.
10938         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
10939         instead of asm_fprintf to output pure string.
10941 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
10943         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
10944         to imported_module_or_decl hook.
10945         (debug_nothing_tree_tree_tree_bool): Remove.
10946         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
10947         * debug.c (do_nothing_debug_hooks): Use
10948         debug_nothing_tree_tree_tree_bool_bool instead of
10949         debug_nothing_tree_tree_tree_bool.
10950         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
10951         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
10952         * sdbout.c (sdb_debug_hooks): Likewise.
10953         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
10954         (gen_namespace_die): Add DW_AT_export_symbols attribute if
10955         langhook wants it.
10956         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
10957         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
10958         attribute, don't add anything.
10960 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
10962         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
10963         (fold_build2_stat_loc): Likewise.
10964         (fold_build3_stat_loc): Likewise.
10965         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
10966         (fold_build1_loc): Remove macro.
10967         (fold_build2_loc): Likewise.
10968         (fold_build3_loc): Likewise.
10970 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
10972         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
10973         (gimple_build_debug_bind_source_stat): Likewise.
10974         * gimple.h (gimple_build_debug_bind): Remove macro.
10975         (gimple_build_debug_bind_source): Likewise.
10977 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
10979         * bitmap.c (bitmap_alloc): Adjust.
10980         (bitmap_gc_alloc): Likewise.
10981         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
10983 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
10985         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
10986         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
10987         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
10988         (bitmap_gc_alloc_stat): Likewise.
10989         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
10991 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
10993         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
10994         * rtl.h (shallow_copy_rtx): Remove macro.
10996 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
10998         * emit-rtl.c (gen_raw_REG): Adjust.
10999         * gengenrtl.c (gendef): Likewise.
11000         * rtl.c (rtx_alloc_stat): Remove _stat from name.
11001         * rtl.h (rtx_alloc): Remove macro.
11003 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11005         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
11006         (build_tree_list_stat): Likewise.
11007         * tree.h (build_tree_list): Remove macro.
11008         (build_tree_list_vec): Likewise.
11010 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11012         * tree.c (make_vector_stat): Remove _stat from name.
11013         (build_vector_stat): Likewise.
11014         * tree.h (make_vector_stat): Remove macro.
11015         (build_vector_stat): Likewise.
11017 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11019         * tree.h (build_var_debug_value): Remove prototype.
11021 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11023         * tree.c (tree_cons_stat): Remove _stat from name.
11024         * tree.h (tree_cons): Remove macro.
11026 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11028         * tree.c (build_vl_exp_stat): Remove _stat from name.
11029         * tree.h (build_vl_exp): Remove macro.
11031 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11033         * tree.c (build_decl_stat): Remove _stat from name.
11034         * tree.h (build_decl): Remove macro.
11036 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11038         * gimple.c (gimple_build_with_ops_stat): Adjust.
11039         (gimple_alloc_stat): Remove _stat from name.
11040         * gimple.h (gimple_alloc): Remove macro.
11042 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11044         * tree.c (make_tree_vec_stat): Remove _stat from name.
11045         (grow_tree_vec_stat): Likewise.
11046         * tree.h (make_tree_vec_stat): Adjust prototype.
11047         (grow_tree_vec_stat): Likewise.
11048         (make_tree_vec): Remove macro.
11049         (grow_tree_vec): Likewise.
11051 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11053         * fold-const.c (fold_build1_stat_loc): Adjust.
11054         (fold_build2_stat_loc): Likewise.
11055         (fold_build3_stat_loc): Likewise.
11056         * tree.c (build0_stat): Remove _stat from name.
11057         (build1_stat): Likewise.
11058         (build2_stat): Likewise.
11059         (build3_stat): Likewise.
11060         (build4_stat): Likewise.
11061         (build5_stat): Likewise.
11062         * tree.h (build1_loc): Remove macro, and rename _stat function
11063         to this.
11064         (build2_loc): Likewise.
11065         (build3_loc): Likewise.
11066         (build4_loc): Likewise.
11067         (build5_loc): Likewise.
11069 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11071         * tree.c (make_int_cst_stat): Remove _stat from name.
11072         * tree.h (make_int_cst_stat): Adjust prototype.
11073         (make_int_cst): Remove macro.
11075 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11077         * tree.c (make_tre_binfo_stat): Remove _stat from name.
11078         * tree.h (make_tree_binfo_stat): Adjust prototype.
11079         (make_tree_binfo): Remove.
11081 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11083         * tree.c (copy_node_stat): Rename to copy_node.
11084         (build_distinct_type_copy): Adjust.
11085         * tree.h (copy_node_stat): Adjust prototype.
11086         (copy_node): Remove macro.
11088 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11090         * tree.c (make_node_stat): rename to make_node.
11091         (build_tree_list_stat): Adjust.
11092         (build0_stat): Likewise.
11093         (build2_stat): Likewise.
11094         (build3_stat): Likewise.
11095         (build4_stat): Likewise.
11096         (build5_stat): Likewise.
11097         (build_decl_stat): Likewise.
11098         * tree.h (make_node_stat): Adjust prototype.
11099         (make_node): remove macro.
11101 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
11103         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
11104         (PPC_FEATURE2_SCV): Likewise.
11105         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
11107 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11109         * config/aarch64/aarch64.c
11110         (aarch64_internal_mov_immediate): Add new special pattern.
11111         * config/aarch64/aarch64.md (*movdi_aarch64):
11112         Add reg/32bit const mov case.
11114 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11115             Richard Sandiford <richard.sandiford@linaro.org>
11117         * config/aarch64/aarch64.md (mov<mode>): Generalize.
11118         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
11119         Add integer and movi cases.
11120         (movi-split-hf-df-sf split, fp16): New.
11121         (enabled): Added TARGET_FP_F16INST.
11122         * config/aarch64/iterators.md (GPF_HF): New.
11123         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
11125 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11127         * config/aarch64/aarch64.c
11128         (aarch64_simd_container_mode): Add prototype.
11129         (aarch64_expand_mov_immediate): Add HI support.
11130         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
11131         (aarch64_can_const_movi_rtx_p): New.
11132         (aarch64_preferred_reload_class):
11133         Remove restrictions of using FP registers for certain SIMD operations.
11134         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
11135         (aarch64_valid_floating_const): Add integer move validation.
11136         (aarch64_simd_imm_scalar_p): Remove.
11137         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
11138         (aarch64_legitimate_constant_p): Expand list of supported cases.
11139         * config/aarch64/aarch64-protos.h
11140         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
11141         (aarch64_reinterpret_float_as_int): New.
11142         (aarch64_simd_imm_scalar_p): Remove.
11143         * config/aarch64/constraints.md (Uvi): New.
11144         (Dd): Split into Ds and new Dd.
11145         * config/aarch64/aarch64.md (*movsi_aarch64):
11146         Add SIMD mov case.
11147         (*movdi_aarch64): Add SIMD mov case.
11149 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11151         * tree-predcom.c: (struct chain): Handle store-store chain in which
11152         stores for elimination only store loop invariant values.
11153         (execute_pred_commoning_chain): Ditto.
11154         (prepare_initializers_chain_store_elim): Ditto.
11155         (prepare_finalizers): Ditto.
11156         (is_inv_store_elimination_chain): New function.
11157         (initialize_root_vars_store_elim_1): New function.
11159 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11161         * tree-predcom.c: Revise general description of the pass.
11162         (enum chain_type): New enum type for store elimination.
11163         (struct chain): New field supporting store elimination.
11164         (struct component): Ditto.
11165         (dump_chain): Dump store-stores chain.
11166         (release_chain): Release resources.
11167         (split_data_refs_to_components): Compute and create component
11168         contains only stores for elimination.
11169         (get_chain_last_ref_at): New function.
11170         (make_invariant_chain): Initialization.
11171         (make_rooted_chain): Specify chain type in parameter and record it.
11172         (add_looparound_copies): Skip for store-stores chain.
11173         (determine_roots_comp): Compute type of chain and pass it to
11174         make_rooted_chain.
11175         (initialize_root_vars_store_elim_2): New function.
11176         (finalize_eliminated_stores): New function.
11177         (remove_stmt): Handle store for elimination.
11178         (execute_pred_commoning_chain): Execute predictive commoning on
11179         store-store chains.
11180         (determine_unroll_factor): Skip unroll for store-stores chain.
11181         (prepare_initializers_chain_store_elim): New function.
11182         (prepare_initializers_chain): Hanlde store-store chain.
11183         (prepare_finalizers_chain, prepare_finalizers): New function.
11184         (tree_predictive_commoning_loop): Return integer value indicating
11185         if loop is unrolled or lcssa form is corrupted.
11186         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
11188 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11190         * tree-predcom.c (initialize_root): Delete.
11191         (execute_pred_commoning_chain): Initialize root vars and replace
11192         reference of non-combined chain directly, rather than call above
11193         function.
11195 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11197         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
11198         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
11200 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11202         * tree-predcom.c (struct chain): New field init_seq.
11203         (release_chain): Release init_seq.
11204         (prepare_initializers_chain): Record intialization stmts in above
11205         field.
11206         (insert_init_seqs): New function.
11207         (tree_predictive_commoning_loop): Call insert_init_seqs.
11209 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11211         * tree-predcom.c (determine_roots_comp): Skip trivial components.
11213 2017-07-28  Richard Biener  <rguenther@suse.de>
11215         * match.pd: Remove superfluous :c.
11216         * genmatch.c (simplify::id): Add member.
11217         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
11218         Copy id.
11219         (current_id): New global.
11220         (dt_node::parent): Move from ...
11221         (dt_operand::parent): ... here.  Add for_id member.
11222         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
11223         (decision_tree::find_node): Relax order requirement when
11224         merging DT_TRUE nodes to ones inbetween the current simplify
11225         and the one we try to merge with.  Add diagnostic whenever
11226         we need to enforce pattern order by not merging.
11227         (decision_tree::insert): Set current_id.
11228         (decision_tree::print_node): Dump parent node and for_id.
11229         (parser::last_id): Add member.
11230         (parser::push_simplify): Assign unique id.
11231         (parser::parser): Initialize last_id.
11233 2017-07-28  Martin Liska  <mliska@suse.cz>
11235         PR sanitizer/81340
11236         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
11237         gimple_build_debug_bind.
11239 2017-07-28  Richard Biener  <rguenther@suse.de>
11241         PR tree-optimization/81502
11242         * match.pd: Add pattern combining BIT_INSERT_EXPR with
11243         BIT_FIELD_REF.
11244         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
11245         size/pos operands.
11246         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
11247         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
11248         for BIT_FIELD_REF args.
11249         * fold-const.c (make_bit_field_ref): Likewise.
11250         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
11252 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
11254         PR sanitizer/80998
11255         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
11256         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
11257         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
11258         Or it into SANITIZER_UNDEFINED.
11259         * ubsan.c: Include gimple-fold.h and varasm.h.
11260         (ubsan_expand_ptr_ifn): New function.
11261         (instrument_pointer_overflow): New function.
11262         (maybe_instrument_pointer_overflow): New function.
11263         (instrument_object_size): Formatting fix.
11264         (pass_ubsan::execute): Call instrument_pointer_overflow
11265         and maybe_instrument_pointer_overflow.
11266         * internal-fn.c (expand_UBSAN_PTR): New function.
11267         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
11268         * sanitizer.def (__ubsan_handle_pointer_overflow,
11269         __ubsan_handle_pointer_overflow_abort): New builtins.
11270         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
11271         * internal-fn.def (UBSAN_PTR): New internal function.
11272         * opts.c (sanitizer_opts): Add pointer-overflow.
11273         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
11274         * fold-const.c (build_range_check): Compute pointer range check in
11275         integral type if pointer arithmetics would be needed.  Formatting
11276         fixes.
11278 2017-07-28  Martin Liska  <mliska@suse.cz>
11280         PR sanitizer/81460
11281         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
11282         parameters that are of a variable-length.
11284 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11286         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
11287         rs6000/biarch64.h.
11288         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
11289         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
11290         (CRT_CALL_STATIC_FUNCTION): Likewise.
11291         (ASM_DEFAULT_SPEC): New define.
11292         (ASM_SPEC32): Likewise.
11293         (ASM_SPEC64): Likewise.
11294         (ASM_SPEC_COMMON): Likewise.
11295         (ASM_SPEC): Likewise.
11296         (INVALID_64BIT): Likewise.
11297         (LINK_OS_DEFAULT_SPEC): Likewise.
11298         (LINK_OS_SPEC32): Likewise.
11299         (LINK_OS_SPEC64): Likewise.
11300         (POWERPC_LINUX): Likewise.
11301         (PTRDIFF_TYPE): Likewise.
11302         (RESTORE_FP_PREFIX): Likewise.
11303         (RESTORE_FP_SUFFIX): Likewise.
11304         (SAVE_FP_PREFIX): Likewise.
11305         (SAVE_FP_SUFFIX): Likewise.
11306         (SIZE_TYPE): Likewise.
11307         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
11308         (TARGET_64BIT): Likewise.
11309         (TARGET_64BIT): Likewise.
11310         (TARGET_AIX): Likewise.
11311         (WCHAR_TYPE_SIZE): Likewise.
11312         (WCHAR_TYPE): Undefine.
11313         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
11314         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
11315         (CPP_OS_RTEMS_SPEC): Delete.
11316         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
11317         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
11318         link_os_spec64.
11319         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
11321 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
11323         PR tree-optimization/81578
11324         * tree-parloops.c (build_new_reduction): Bail out if
11325         reduction_code isn't one of the standard OpenMP reductions.
11326         Move the details printing after that decision.
11328 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11330         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
11331         related to reload_in_progress.
11332         (splat_input_operand): Likewise.
11333         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
11334         Delete prototype.
11335         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
11336         field.
11337         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
11338         (TARGET_INSTANTIATE_DECLS): Likewise.
11339         (legitimate_indexed_address_p): Delete reload_in_progress code.
11340         (rs6000_debug_legitimate_address_p): Likewise.
11341         (rs6000_eliminate_indexed_memrefs): Likewise.
11342         (rs6000_emit_le_vsx_store): Likewise.
11343         (rs6000_emit_move_si_sf_subreg): Likewise.
11344         (rs6000_emit_move): Likewise.
11345         (register_to_reg_type): Likewise.
11346         (rs6000_pre_atomic_barrier): Likewise.
11347         (rs6000_machopic_legitimize_pic_address): Likewise.
11348         (rs6000_allocate_stack_temp): Likewise.
11349         (rs6000_address_for_fpconvert): Likewise.
11350         (rs6000_address_for_altivec): Likewise.
11351         (rs6000_secondary_memory_needed_rtx): Delete function.
11352         (rs6000_check_sdmode): Likewise.
11353         (rs6000_alloc_sdmode_stack_slot): Likewise.
11354         (rs6000_instantiate_decls): Likewise.
11355         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
11356         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
11357         Delete reload_in_progress.
11358         (*vec_reload_and_plus_<mptrsize>): Likewise.
11359         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
11360         (vsx_div_v2di): Likewise.
11361         (vsx_udiv_v2di): Likewise.
11363 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11365         * config/rs6000/rs6000.opt (mlra): Replace with stub.
11366         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
11367         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
11368         (rs6000_debug_reg_global): Delete print of LRA status.
11369         (rs6000_option_override_internal): Delete dead LRA related code.
11370         (rs6000_lra_p): Delete function.
11371         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
11373 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11375         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
11376         * config/riscv/rtems.h: New file.
11378 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11379             Sudakshina Das  <sudi.das@arm.com>
11381         * config/aarch64/aarch64.md
11382         (define_split for and<mode>3nr_compare): Move
11383         non aarch64_logical_operand to a register.
11384         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
11385         register immediate operand to a register.
11386         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
11388 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11390         PR middle-end/81564
11391         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
11393 2017-07-27  Richard Biener  <rguenther@suse.de>
11395         PR tree-optimization/81573
11396         PR tree-optimization/81494
11397         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
11398         multi defuse cycle case.
11400 2017-07-27  Richard Biener  <rguenther@suse.de>
11402         PR tree-optimization/81571
11403         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
11404         PHIs.
11406 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
11408         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
11409         earlier and only if MASK_FPU is set.  Adjust formatting.
11411 2017-07-27  Martin Liska  <mliska@suse.cz>
11413         * opt-functions.awk: Add validation of value of Init.
11414         * optc-gen.awk: Pass new argument.
11416 2017-07-27  Martin Liska  <mliska@suse.cz>
11418         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
11419         Fix wrong condition.
11421 2017-07-27  Martin Liska  <mliska@suse.cz>
11423         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
11424         BBs and edges seen by autoFDO.
11426 2017-07-27  Richard Biener  <rguenther@suse.de>
11428         PR tree-optimization/81502
11429         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
11430         with incompatible but same sized type.
11431         (execute_update_addresses_taken): Likewise.
11433 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
11435         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
11436         flag_tree_loop_vectorize rather than flag_tree_vectorize.
11438 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11440         PR target/81534
11441         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
11442         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
11443         Change s_operand to memory_operand.
11445 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
11447         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
11448         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
11449         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
11450         Emit instructions rather than returning an expression.  Handle TFmode
11451         and KFmode by casting to TImode.
11452         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
11453         (rs6000_emit_le_vsx_store): Likewise.
11454         * config/rs6000/vsx.md (VSX_TI): New iterator.
11455         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
11456         (*vsx_le_undo_permute_<mode>): Likewise.
11457         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
11458         emit the split sequence.
11459         (*vsx_le_perm_store_<mode>): Likewise.
11461 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
11463         PR tree-optimization/81555
11464         PR tree-optimization/81556
11465         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
11466         if true, force CHANGED for the recursive invocation.
11467         (reassociate_bb): Remember original length of ops array, pass
11468         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
11470         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
11471         attributes for noipa attribute.  For naked attribute use
11472         lookup_attribute first before lookup_attribute_spec.
11473         * final.c (rest_of_handle_final): Disable IPA RA for functions with
11474         noipa attribute.
11475         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
11476         for functions with noipa attribute.
11477         (cgraph_externally_visible_p): Return true for functions with noipa
11478         attribute.
11479         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
11480         for functions with noipa attribute.
11481         * doc/extend.texi: Document noipa function attribute.
11482         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
11483         also for functions with noipa attribute.
11484         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
11486 2017-07-26  Andrew Pinski  <apinski@cavium.com>
11488         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
11489         vec_unalign_load_cost and vec_unalign_store_cost.
11491 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
11493         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
11494         -mvsx-small-integer option.
11495         (ISA_3_0_MASKS_IEEE): Likewise.
11496         (OTHER_VSX_VECTOR_MASKS): Likewise.
11497         (POWERPC_MASKS): Likewise.
11498         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
11499         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
11500         code, only testing for DImode being allowed in non-VSX floating
11501         point registers.
11502         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
11503         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
11504         another VSX test.
11505         (rs6000_option_override_internal): Delete -mvsx-small-integer.
11506         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
11507         TARGET_P8_VECTOR test.
11508         (rs6000_secondary_reload_simple_move): Likewise.
11509         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
11510         since TARGET_P9_VECTOR was already tested.
11511         (rs6000_opt_masks): Remove -mvsx-small-integer.
11512         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
11513         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11514         used.
11515         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
11516         test for TARGET_VEXTRACTUB was used, and that uses
11517         TARGET_P9_VECTOR.
11518         (p9 extract splitter): Likewise.
11519         (vsx_extract_<mode>_di_p9): Likewise.
11520         (vsx_extract_<mode>_store_p9): Likewise.
11521         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
11522         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
11523         the elimination of TARGET_VSX_SMALL_INTEGER.
11524         (vsx_extract_<mode>_p8): Likewise.
11525         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
11526         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
11527         (vsx_set_<mode>_p9): Likewise.
11528         (vsx_set_v4sf_p9): Likewise.
11529         (vsx_set_v4sf_p9_zero): Likewise.
11530         (vsx_insert_extract_v4sf_p9): Likewise.
11531         (vsx_insert_extract_v4sf_p9_2): Likewise.
11532         * config/rs6000/rs6000.md (sign extend splitter): Change
11533         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
11534         (floatsi<mode>2_lfiwax_mem): Likewise.
11535         (floatunssi<mode>2_lfiwzx_mem): Likewise.
11536         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
11537         since a test for TARGET_P9_VECTOR was used.
11538         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11539         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
11540         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11541         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
11542         TARGET_P8_VECTOR test.
11543         (fix_trunc<mode>si2_stfiwx): Likewise.
11544         (fix_trunc<mode>si2_internal): Likewise.
11545         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
11546         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11547         used.
11548         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11549         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
11550         TARGET_P8_VECTOR test.
11551         (fixuns_trunc<mode>si2_stfiwx): Likewise.
11552         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
11553         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11554         used.
11555         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11556         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
11557         since a test for TARGET_P9_VECTOR was used.
11558         (splitter for loading small constants): Likewise.
11560 2017-07-26  Andrew Pinski  <apinski@cavium.com>
11562         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
11563         vec_fp_stmt_cost.
11565 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
11567         PR target/81563
11568         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
11569         (fp_valid_at): Likewise.
11571 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
11573         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
11574         (qdf24xx_addrcost_table): Likewise.
11575         (cortexa57_tunings): Update to use generic_branch_cost.
11576         (cortexa72_tunings): Likewise.
11577         (cortexa73_tunings): Likewise.
11578         (qdf24xx_tunings): Likewise.
11580 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
11582         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
11583         (thunderx2t99_branch_cost): Likewise.
11584         (cortexa35_tunings): Update to use generic_branch_cost.
11585         (cortexa53_tunings): Likewise.
11586         (cortexa57_tunings): Likewise.
11587         (cortexa72_tunings): Likewise.
11588         (cortexa73_tunings): Likewise.
11589         (thunderx2t99_tunings): Likewise.
11591 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11593         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
11594         (sparc_option_override): Honour MASK_FSMULD.
11595         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
11596         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
11597         * config/sparc/sparc.opt (mfsmuld): New option.
11598         * doc/invoke.texi (mfsmuld): Document option.
11600 2017-07-26  Marek Polacek  <polacek@redhat.com>
11602         PR middle-end/70992
11603         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
11605 2017-07-26  Richard Biener  <rguenther@suse.de>
11607         * gimple-match-head.c (do_valueize): Return OP if valueize
11608         returns NULL_TREE.
11609         (get_def): New helper to get at the def stmt of a SSA name
11610         if valueize allows.
11611         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
11612         do_valueize to get at the def stmt.
11613         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
11615 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
11617         PR middle-end/46932
11618         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
11620 2017-07-26  Martin Liska  <mliska@suse.cz>
11622         PR sanitize/81186
11623         * function.c (expand_function_start): Make expansion of
11624         nonlocal_goto_save_area after parm_birth_insn.
11626 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11628         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
11629         from all CPU target flags enable members.
11631 2017-07-26  Richard Biener  <rguenther@suse.de>
11633         * genmatch.c (dt_simplify::gen): Make iterator vars const.
11634         (decision_tree::gen): Make 'type' const.
11635         (write_predicate): Likewise.
11637 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
11639         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
11640         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
11641         (rs6000_option_override_internal): Likewise.
11642         (rs6000_expand_vector_set): Likewise.
11643         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
11644         (TARGET_UPPER_REGS_SF): Likewise.
11645         (TARGET_UPPER_REGS_DI): Likewise.
11646         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
11647         (TARGET_DIRECT_MOVE_64BIT): Likewise.
11648         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
11649         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11650         (Splitters for DI constants in Altivec registers): Likewise.
11651         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
11652         (vsx_set_v4sf_p9): Likewise.
11653         (vsx_set_v4sf_p9_zero): Likewise.
11654         (vsx_insert_extract_v4sf_p9): Likewise.
11655         (vsx_insert_extract_v4sf_p9_2): Likewise.
11657 2017-07-25  Carl Love  <cel@us.ibm.com>
11659         * doc/extend.texi: Update the built-in documentation file for the
11660         existing built-in functions
11661         vector signed char vec_cnttz (vector signed char);
11662         vector unsigned char vec_cnttz (vector unsigned char);
11663         vector signed short vec_cnttz (vector signed short);
11664         vector unsigned short vec_cnttz (vector unsigned short);
11665         vector signed int vec_cnttz (vector signed int);
11666         vector unsigned int vec_cnttz (vector unsigned int);
11667         vector signed long long vec_cnttz (vector signed long long);
11668         vector unsigned long long vec_cnttz (vector unsigned long long);
11670 2017-07-25  Andrew Pinski  <apinski@cavium.com>
11672         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
11673         accesses where the use is for the first operand of a BIT_INSERT.
11675 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
11677         PR bootstrap/81521
11678         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
11679         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
11681 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
11683         * config/i386/gstabs.h: Delete.
11684         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
11686 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
11688         * config/i386/i386.c (ix86_decompose_address): Do not check for
11689         register RTX when looking at index_reg or base_reg.
11690         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
11692 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
11694         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
11695         to update EH info here.
11697 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
11699         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
11701 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
11703         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
11705 2017-07-25  Torsten Duwe  <duwe@suse.de>
11707         * common.opt: Introduce -fpatchable-function-entry
11708         command line option, and its variables function_entry_patch_area_size
11709         and function_entry_patch_area_start.
11710         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
11711         including a two-value parser.
11712         * target.def (print_patchable_function_entry): New target hook.
11713         * targhooks.h (default_print_patchable_function_entry): New function.
11714         * targhooks.c (default_print_patchable_function_entry): Likewise.
11715         * toplev.c (process_options): Switch off IPA-RA if
11716         patchable function entries are being generated.
11717         * varasm.c (assemble_start_function): Look at the
11718         patchable-function-entry command line switch and current
11719         function attributes and maybe generate NOP instructions by
11720         calling the print_patchable_function_entry hook.
11721         * doc/extend.texi: Document patchable_function_entry attribute.
11722         * doc/invoke.texi: Document -fpatchable_function_entry
11723         command line option.
11724         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
11725         New target hook.
11726         * doc/tm.texi: Re-generate.
11728 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
11730         PR target/81532
11731         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
11732         TARGET_AVX512DQ rather than TARGET_AVX512BW.
11734 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
11736         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
11738 2017-07-25  Richard Biener  <rguenther@suse.de>
11740         PR tree-optimization/81455
11741         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
11742         not walk in cycles when looking for guards.
11744 2017-07-25  Richard Biener  <rguenther@suse.de>
11746         PR tree-optimization/81529
11747         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
11748         when optimizing backedge uses.
11750 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
11752         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
11753         character for AIX.
11754         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
11755         to dl_section_ref.  On AIX, append an expression to subtract
11756         the size of the section length to dl_section_ref.
11758 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
11760         * configure.ac: If any of the config.* scripts fail, exit 1.
11761         * configure: Regenerate.
11763 2017-07-25  Richard Biener  <rguenther@suse.de>
11765         PR middle-end/81546
11766         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
11767         of immediate uses, be more verbose on errors.
11769 2017-07-25  Richard Biener  <rguenther@suse.de>
11771         PR tree-optimization/81510
11772         * tree-vect-loop.c (vect_is_simple_reduction): When the
11773         reduction stmt is not inside the loop bail out.
11775 2017-07-25  Richard Biener  <rguenther@suse.de>
11777         PR tree-optimization/81303
11778         * tree-vect-loop-manip.c (vect_loop_versioning): Build
11779         profitability check against LOOP_VINFO_NITERSM1.
11781 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
11783         * domwalk.c (cmp_bb_postorder): Simplify.
11784         (sort_bbs_postorder): New function.  Use it...
11785         (dom_walker::walk): ...here to optimize common cases.
11787 2017-07-25  Martin Liska  <mliska@suse.cz>
11789         PR ipa/81520
11790         * ipa-visibility.c (function_and_variable_visibility): Make the
11791         redirection just on target that supports aliasing.
11792         Fix GNU coding style.
11794 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11796         PR libgcc/61152
11797         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
11798         Format changes.
11799         * config/arm/rtems.h: Likewise.
11800         * config/bfin/rtems.h: Likewise.
11801         * config/i386/rtemself.h: Likewise.
11802         * config/lm32/rtems.h: Likewise.
11803         * config/m32c/rtems.h: Likewise.
11804         * config/m68k/rtemself.h: Likewise.
11805         * config/microblaze/rtems.h: Likewise.
11806         * config/mips/rtems.h: Likewise.
11807         * config/moxie/rtems.h: Likewise.
11808         * config/nios2/rtems.h: Likewise.
11809         * config/powerpcspe/rtems.h: Likewise.
11810         * config/rs6000/rtems.h: Likewise.
11811         * config/rtems.h: Likewise.
11812         * config/sh/rtems.h: Likewise.
11813         * config/sh/rtemself.h: Likewise.
11814         * config/sparc/rtemself.h: Likewise.
11816 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
11818         PR 81487
11819         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
11820         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
11821         * tree-ssa-structalias.c (alias_get_name): Same.
11823 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
11825         PR target/81414
11826         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
11827         instructions if no du chain is found.
11829 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
11831         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
11833 2017-07-25  Richard Biener  <rguenther@suse.de>
11835         PR middle-end/81505
11836         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
11837         sticky.
11839 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
11841         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
11842         upper-regs options.
11843         (ISA_2_7_MASKS_SERVER): Likewise.
11844         (ISA_3_0_MASKS_IEEE): Likewise.
11845         (OTHER_P8_VECTOR_MASKS): Likewise.
11846         (OTHER_VSX_VECTOR_MASKS): Likewise.
11847         (POWERPC_MASKS): Likewise.
11848         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
11849         duplicate list of options.
11850         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
11851         explicit -mupper-regs options.
11852         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
11853         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
11854         alias for -mupper-regs-df.
11855         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
11856         (rs6000_init_hard_regno_mode_ok): Likewise.
11857         (rs6000_option_override_internal): Likewise.
11858         (rs6000_opt_masks): Likewise.
11859         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
11860         options in terms of whether -mvsx or -mpower8-vector was used.
11861         (TARGET_UPPER_REGS_DI): Likewise.
11862         (TARGET_UPPER_REGS_SF): Likewise.
11863         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
11864         -mupper-regs-* options.
11866 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
11868         * passes.c (emergency_dump_function): Print some empty lines and a
11869         header before the RTL dump.
11871 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
11873         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
11875 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
11877         PR target/79041
11878         * config/aarch64/aarch64.c (aarch64_classify_symbol):
11879         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
11881 2017-07-24  Carl Love  <cel@us.ibm.com>
11883         * config/rs6000/rs6000-c.c: Add support for built-in functions
11884         vector float vec_extract_fp32_from_shorth (vector unsigned short);
11885         vector float vec_extract_fp32_from_shortl (vector unsigned short);
11886         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
11887         vec_extract_fp_from_shortl): Add defines for the two builtins.
11888         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
11889         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
11890         new builtins.
11891         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
11892         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
11893         * doc/extend.texi: Update the built-in documentation file for the
11894         new built-in function.
11896 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
11898         PR bootstrap/81521
11899         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
11900         documentation.
11901         * doc/generic.texi: Likewise.
11902         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
11903         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
11905 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
11907         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
11908         (aarch64_mls_elt_merge<mode>): Likewise.
11910 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
11912         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
11913         having __cxa_atexit.
11915 2017-07-23  Michael Collison  <michael.collison@arm.com>
11917         * config/arm/arm.c (arm_option_override): Deprecate
11918         use of -mstructure-size-boundary.
11919         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
11920         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
11922 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11924         PR target/80695
11925         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
11926         Reduce cost estimate for direct moves.
11928 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
11930         PR target/80569
11931         * config/i386/i386.c (ix86_option_override_internal): Disable
11932         BMI, BMI2 and TBM instructions for -m16.
11934 2017-07-21  Carl Love  <cel@us.ibm.com>
11936         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11937         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
11938         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
11939         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
11940         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
11941         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
11942         VMULOSW): New enum "unspec" values.
11943         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
11944         altivec_vmulosw): New patterns.
11945         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
11946         VMULOSW): Add definitions.
11948 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
11950         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
11951         (qdf24xx): Likewise.
11952         * config/aarch64/aarch64-options-extensions.def (rdma); New.
11953         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
11954         (AARCH64_FL_V8_1): Renumber.
11955         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
11956         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
11957         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
11958         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
11959         rdma to feature modifiers list.
11961 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
11963         PR middle-end/56727
11964         * ipa-visibility (function_and_variable_visibility): Convert
11965         recursive PLT call to direct call if appropriate.
11967 2017-07-21  Andrew Pinski  <apinski@cavium.com>
11969         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
11970         operand 1 to see if the types precision matches.
11971         * fold-const.c (operand_equal_p): Likewise.
11973 2017-07-21  Richard Biener  <rguenther@suse.de>
11975         PR tree-optimization/81303
11976         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
11977         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
11978         (vect_peeling_hash_get_lowest_cost): Adjust.
11979         (vect_enhance_data_refs_alignment): Likewise.  Use
11980         vect_get_peeling_costs_all_drs to compute the penalty for no
11981         peeling to match up costs.
11983 2017-07-21  Richard Biener  <rguenther@suse.de>
11985         PR tree-optimization/81500
11986         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
11987         we didn't identify a reduction path.
11989 2017-07-21  Tom de Vries  <tom@codesourcery.com>
11990             Cesar Philippidis  <cesar@codesourcery.com>
11992         PR gcov-profile/81442
11993         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
11994         probabilities.
11996 2017-07-21  Tom de Vries  <tom@codesourcery.com>
11998         PR lto/81430
11999         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
12000         function.
12001         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
12002         nvptx_override_options_after_change.
12004 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
12006         * dwarf2out.c (output_file_names): Avoid double testing for
12007         dwarf_version >= 5.
12009 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
12011         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
12013 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
12015         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
12016         hot/cold regions.
12017         (try_crossjump_to_edge): Do not punt on partitioned functions.
12019 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
12021         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
12022         Put all BBs reachable only via paths crossing cold region to cold
12023         region.
12024         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
12026 2016-07-21  Richard Biener  <rguenther@suse.de>
12028         PR tree-optimization/81303
12029         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
12030         into account prologue and epilogue iterations when raising
12031         min_profitable_iters to sth at least covering one vector iteration.
12033 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
12035         * config/arm/arm.c (arm_test_cpu_arch_dat):
12036         Check for overlap.
12038 2017-07-20  Nathan Sidwell  <nathan@acm.org>
12040         Remove TYPE_METHODS.
12041         * tree.h (TYPE_METHODS): Delete.
12042         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
12043         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
12044         (dbxout_type_methods): Scan TYPE_FIELDS.
12045         (dbxout_type): Don't check TYPE_METHODS here.
12046         * function.c (use_register_for_decl): Always ignore register for
12047         class types when not optimizing.
12048         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
12049         * tree.c (free_lang_data_in_type): Stitch out member functions and
12050         templates from TYPE_FIELDS.
12051         (build_distinct_type_copy, verify_type_variant,
12052         verify_type): Member fns are on TYPE_FIELDS.
12053         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
12054         * tree-pretty-print.c (dump_generic_node): Likewise.
12056 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
12058         PR target/80846
12059         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
12060         V2TImode and V4TImode.
12061         (ix86_expand_vector_extract): Likewise.
12062         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
12063         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
12064         (ssescalarmode): Handle V4TImode and V2TImode.
12065         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
12066         (*vec_extractv2ti, *vec_extractv4ti): New insns.
12067         (VEXTRACTI128_MODE): New mode iterator.
12068         (splitter for *vec_extractv?ti first element): New.
12069         (VEC_INIT_MODE): New mode iterator.
12070         (vec_init<mode>): Consolidate 3 expanders into one using
12071         VEC_INIT_MODE mode iterator.
12073 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
12075         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
12076         non_spilled_static_chain_regno_p.
12078 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
12080         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
12082 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
12084         * bb-reorder.c (connect_traces): Allow copying of blocks within
12085         single partition.
12087 2017-07-20  Richard Biener  <rguenther@suse.de>
12089         * gimple.h (gimple_phi_result): Add gphi * overload.
12090         (gimple_phi_result_ptr): Likewise.
12091         (gimple_phi_arg): Likewise.  Adjust index assert to only
12092         allow actual argument accesses rather than all slots available
12093         by capacity.
12094         (gimple_phi_arg_def): Add gphi * overload.
12095         * tree-phinodes.c (make_phi_node): Initialize only actual
12096         arguments.
12097         (resize_phi_node): Clear memory not covered by old node,
12098         do not initialize excess argument slots.
12099         (reserve_phi_args_for_new_edge): Initialize new argument slot
12100         completely.
12102 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
12104         PR tree-optimization/81388
12105         Revert r238585:
12106         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
12108         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
12109         by removing computation of may_be_zero.
12111 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12112             Tom de Vries  <tom@codesourcery.com>
12114         PR middle-end/81030
12115         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
12116         when gimple level profile disagrees with what RTL expander did.
12118 2017-07-20  Richard Biener  <rguenther@suse.de>
12120         PR tree-optimization/61171
12121         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
12122         (vect_analyze_stmt): Add slp instance parameter.
12123         (vectorizable_reduction): Likewise.
12124         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
12125         (vect_is_simple_reduction): Deal with chains not detected
12126         as SLP reduction chain, specifically not properly associated
12127         chains containing a mix of plus/minus.
12128         (get_reduction_op): Remove.
12129         (get_initial_defs_for_reduction): Simplify, pass in whether
12130         this is a reduction chain, pass in the SLP node for the PHIs.
12131         (vect_create_epilog_for_reduction): Get the SLP instance as
12132         arg and adjust.
12133         (vectorizable_reduction): Get the SLP instance as arg.
12134         During analysis remember the SLP node with the PHIs in the
12135         instance.  Simplify getting at the vectorized reduction PHIs.
12136         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
12137         through SLP instance.
12138         (vect_slp_analyze_operations): Likewise.
12139         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
12140         (vect_transform_stmt): Likewise.
12142 2017-07-20  Tom de Vries  <tom@codesourcery.com>
12144         PR tree-optimization/81489
12145         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
12146         read of phi arg location to before loop that modifies phi.
12148 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
12150         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
12151         New pattern.
12153 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12155         PR middle-end/81331
12156         * except.c (execute): Fix ordering issue.
12158 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
12160         PR rtl-optimization/81423
12161         * combine.c (make_compound_operation_int): Don't try to optimize
12162         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
12164 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
12166         PR rtl-optimization/81423
12167         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
12168         with a constant that is -1 in the truncated to mode.
12170 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12172         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
12173         (determine_unlikely_bbs): ... here.
12174         * predict.h (propagate_unlikely_bbs_forward): Declare.
12175         * cfgexpand.c (pass_expand::execute): Use it.
12176         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
12177         unlikely edges.
12178         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
12179         propagate_unlikely_bbs_forward.
12181 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12183         PR middle-end/81331
12184         * except.c (maybe_add_nop_after_section_switch): New function.
12185         (execute): Use it.
12187 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12189         * gimple.h (gimple_phi_set_arg): Make assert more strict.
12191 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12193         * gimple.h (gimple_phi_arg): Make assert more strict.
12195 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
12197         * config.gcc (powerpc*-*-*): Add mmintrin.h.
12198         * config/rs6000/mmintrin.h: New file.
12199         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
12201 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
12203         PR tree-optimization/81346
12204         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
12206 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12208         * config/nvptx/nvptx.md (VECIM): Add V2DI.
12210 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12212         * config/nvptx/nvptx-modes.def: Add V2DImode.
12213         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
12214         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
12215         (nvptx_output_mov_insn): Handle lack of mov.b128.
12216         (nvptx_print_operand): Handle 'H' and 'L' codes.
12217         (nvptx_vector_mode_supported): Allow V2DImode.
12218         (nvptx_preferred_simd_mode): New function.
12219         (nvptx_data_alignment): New function.
12220         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
12221         nvptx_preferred_simd_mode.
12222         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
12223         64 to 128 bits.
12224         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
12226 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12228         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
12229         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
12230         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
12231         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
12232         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
12233         (mov<VECIM>_insn): New define_insn.
12234         (define_expand "mov<VECIM>): New define_expand.
12236 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12238         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
12240 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
12242         PR tree-optimization/81346
12243         * fold-const.h (fold_div_compare, range_check_type): Declare.
12244         * fold-const.c (range_check_type): New function.
12245         (build_range_check): Use range_check_type.
12246         (fold_div_compare): No longer static, rewritten into
12247         a match.pd helper function.
12248         (fold_comparison): Don't call fold_div_compare here.
12249         * match.pd (X / C1 op C2): New optimization using fold_div_compare
12250         as helper function.
12252 2017-07-19  Nathan Sidwell  <nathan@acm.org>
12254         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
12255         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
12256         * tree.c (find_decls_types_r, verify_type): Use
12257         TYPE_{MIN,MAX}_VALUE_RAW.
12258         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
12259         (hash_tree): Likewise.
12260         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
12261         Likewise.
12262         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
12263         Likewise.
12265 2017-07-18  Tom de Vries  <tom@codesourcery.com>
12267         PR middle-end/81464
12268         * omp-expand.c (expand_omp_for_static_chunk): Handle
12269         equal-argument loop exit phi.
12271 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
12273         PR target/81471
12274         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
12275         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
12276         operand 2 predicate.
12277         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
12278         operand 2 predicate.
12279         (ror,rol -> rorx splitters): Use const_int_operand as
12280         operand 2 predicate.
12282 2017-06-18  Richard Biener  <rguenther@suse.de>
12284         PR tree-optimization/81410
12285         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
12286         the gap in the ! slp_perm SLP case after each group.
12288 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12290         PR middle-end/81463
12291         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
12292         again.
12294 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12296         PR middle-end/81462
12297         * predict.c (set_even_probabilities): Cleanup; do not affect
12298         probabilities that are already known.
12299         (combine_predictions_for_bb): Call even when count is set.
12301 2017-07-18  Nathan Sidwell  <nathan@acm.org>
12303         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
12304         TYPE_MAX_VALUE.
12306 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
12308         PR target/81408
12309         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
12310         optimization for loop niter analysis.
12312 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
12314         PR target/81473
12315         * config/avr/avr.c (avr_optimize_casesi): Don't use
12316         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
12318 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
12320         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
12321         body_cost_vec from _vect_peel_extended_info.
12322         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
12323         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
12324         npeel.
12326 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
12328         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
12330 2017-07-18  Richard Biener  <rguenther@suse.de>
12332         PR tree-optimization/80620
12333         PR tree-optimization/81403
12334         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
12335         info when re-using a VN table entry.
12337 2017-07-18  Richard Biener  <rguenther@suse.de>
12339         PR tree-optimization/81418
12340         * tree-vect-loop.c (vectorizable_reduction): Properly compute
12341         vectype_in.  Verify that with lane-reducing reduction operations
12342         we have a single def-use cycle.
12344 2017-07-17  Carl Love  <cel@us.ibm.com>
12346         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
12348         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12349         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
12350         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
12351         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
12352         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
12353         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
12354         VMULOSW): New enum "unspec" values.
12355         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12356         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
12357         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
12358         altivec_vmulosw): New patterns.
12359         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
12360         VMULOSW): Add definitions.
12361 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
12363         * config/alpha/alpha.c: Include predict.h.
12365 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
12367         * tree-vrp.c (compare_assert_loc): Fix comparison function
12368         to return predictable results.
12370 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12372         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
12373         option.
12374         (subdi3): Likewise.
12375         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
12376         * doc/invoke.texi (mexpand-adddi): Update text.
12378 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12380         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
12381         that also clobbers the CC register. The old expand code is moved
12382         to ...
12383         (*arc_clzsi2): ... here.
12384         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
12385         the CC register. The old expand code is moved to ...
12386         (arc_ctzsi2): ... here.
12388 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12390         * config/arc/arc.opt (mindexed-loads): Use initial value
12391         TARGET_INDEXED_LOADS_DEFAULT.
12392         (mauto-modify-reg): Use initial value
12393         TARGET_AUTO_MODIFY_REG_DEFAULT.
12394         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
12395         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
12396         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
12397         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
12399 2017-07-17  Martin Liska  <mliska@suse.cz>
12401         PR sanitizer/81302
12402         * opts.c (finish_options): Do not allow -fgnu-tm
12403         w/ -fsanitize={kernel-,}address.  Say sorry.
12405 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12407         PR target/81369
12408         * tree-loop-distribution.c (classify_partition): Only assert on
12409         numer of iterations.
12410         (merge_dep_scc_partitions): Delete prameter.  Update function call.
12411         (distribute_loop): Remove code handling loop with unknown niters.
12412         (pass_loop_distribution::execute): Skip loop with unknown niters.
12414 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12416         PR target/81369
12417         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
12418         function sort_partitions_by_post_order.
12420 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12422         PR tree-optimization/81374
12423         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
12424         the max index of basic blocks, rather than number of basic blocks.
12426 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12428         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
12429         proto.
12430         (arc_legitimate_pic_operand_p): Likewise.
12431         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
12432         function.
12433         (arc_needs_pcl_p): Likewise.
12434         (arc_legitimate_pc_offset_p): Likewise.
12435         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
12436         function is also used in constrains.md.
12437         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
12438         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
12439         PLUS.  Only return true/false in known cases, otherwise assert.
12440         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
12441         is already called in arc_legitimate_constant_p.
12442         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
12443         pic addresses.
12444         (LEGITIMATE_PIC_OPERAND_P): Use
12445         arc_raw_symbolic_reference_mentioned_p function.
12446         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
12447         function.
12448         (Cal): Likewise.
12449         (C32): Likewise.
12451 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12452         Andrew Burgess  <andrew.burgess@embecosm.com>
12454         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
12455         (arc_return_address_register): New function.
12456         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
12457         (arc_handle_fndecl_attribute): Add naked attribute.
12458         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
12459         (TARGET_WARN_FUNC_RETURN): Likewise.
12460         (arc_allocate_stack_slots_for_args): New function.
12461         (arc_warn_func_return): Likewise.
12462         (machine_function): Change type fn_type.
12463         (arc_compute_function_type): Consider new naked function type,
12464         change function return type.
12465         (arc_must_save_register): Adapt to handle new
12466         arc_compute_function_type's return type.
12467         (arc_expand_prologue): Likewise.
12468         (arc_expand_epilogue): Likewise.
12469         (arc_return_address_regs): Delete.
12470         (arc_return_address_register): New function.
12471         (arc_epilogue_uses): Use above function.
12472         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
12473         (arc_function_type): Change encoding, add naked type.
12474         (ARC_INTERRUPT_P): Change to handle the new encoding.
12475         (ARC_FAST_INTERRUPT_P): Likewise.
12476         (ARC_NORMAL_P): Define.
12477         (ARC_NAKED_P): Likewise.
12478         (arc_compute_function_type): Delete prototype.
12479         * config/arc/arc.md (in_ret_delay_slot): Use
12480         arc_return_address_register function.
12481         (simple_return): Likewise.
12482         (p_return_i): Likewise.
12484 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12486         PR tree-optimization/81428
12487         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
12488         can't be built for those types.
12490 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
12492         Remove stuff dead since r239246.
12494         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
12495         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
12496         (avr_inform_devices): Remove dead stuff.
12498 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
12500         * config/arm/arm_neon.h: Fix softp typo.
12502 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12504         PR tree-optimization/81365
12505         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
12506         aggregate moves onto bb predecessor edges, make sure there are no
12507         loads that could alias the lhs in between the start of bb and the
12508         loads from *phi.
12510 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
12512         PR 80929
12513         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
12514         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
12515         [LSHIFTRT, outer_code = TRUNCATE]: Same.
12517 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12519         PR tree-optimization/81396
12520         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
12521         (init_symbolic_number): Initialize it to 1.
12522         (perform_symbolic_merge): Add n_ops from both operands into the new
12523         n_ops.
12524         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
12525         without base_addr as useless if they need more than one operation.
12526         (bswap_replace): Handle !bswap case for NULL base_addr.
12528 2017-07-17  Tom de Vries  <tom@codesourcery.com>
12530         PR target/81069
12531         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
12532         as possible.
12534 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12536         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
12537         conditional builtin define __FIX_LEON3FT_B2BST.
12539 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
12541         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
12542         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
12543         with -mfix-ut700.
12545 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12547         PR rtl-optimization/81424
12548         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
12549         to remove potential trapping from operands if -fnon-call-exceptions.
12551 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12553         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
12554         profile_proability for scalling.
12555         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
12557 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12559         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
12561 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12563         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
12564         fixpoint arithmetics.
12566 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12568         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
12569         fixpoint arithmetics.
12571 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12573         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
12574         fixpoint arithmetics.
12576 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12578         * profile-count.h (profile_probability::from_reg_br_prob_note,
12579         profile_probability::to_reg_br_prob_note): New functions.
12580         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
12581         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
12582         * predict.c (probability_reliable_p): Update.
12583         (edge_probability_reliable_p): Update.
12584         (br_prob_note_reliable_p): Update.
12585         (invert_br_probabilities): Update.
12586         (add_reg_br_prob_note): New function.
12587         (combine_predictions_for_insn): Update.
12588         * asan.c (asan_clear_shadow): Update.
12589         * cfgbuild.c (compute_outgoing_frequencies): Update.
12590         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
12591         (update_br_prob_note): Update.
12592         (rtl_verify_edges): Update.
12593         (purge_dead_edges): Update.
12594         (fixup_reorder_chain): Update.
12595         * emit-rtl.c (try_split): Update.
12596         * ifcvt.c (cond_exec_process_insns): Update.
12597         (cond_exec_process_if_block): Update.
12598         (dead_or_predicable): Update.
12599         * internal-fn.c (expand_addsub_overflow): Update.
12600         (expand_neg_overflow): Update.
12601         (expand_mul_overflow): Update.
12602         * loop-doloop.c (doloop_modify): Update.
12603         * loop-unroll.c (compare_and_jump_seq): Update.
12604         * optabs.c (emit_cmp_and_jump_insn_1): Update.
12605         * predict.h: Update.
12606         * reorg.c (mostly_true_jump): Update.
12607         * rtl.h: Update.
12608         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
12609         * config/alpha/alpha.c (emit_unlikely_jump): Update.
12610         * config/arc/arc.c: (emit_unlikely_jump): Update.
12611         * config/arm/arm.c: (emit_unlikely_jump): Update.
12612         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
12613         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
12614         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
12615         (ix86_print_operand): Update.
12616         (ix86_split_fp_branch): Update.
12617         (predict_jump): Update.
12618         * config/ia64/ia64.c (ia64_print_operand): Update.
12619         * config/mmix/mmix.c (mmix_print_operand): Update.
12620         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
12621         (rs6000_expand_split_stack_prologue): Update.
12622         * config/rs6000/rs6000.c: Update.
12623         * config/s390/s390.c (s390_expand_vec_strlen): Update.
12624         (s390_expand_vec_movstr): Update.
12625         (s390_expand_cs_tdsi): Update.
12626         (s390_expand_split_stack_prologue): Update.
12627         * config/sh/sh.c (sh_print_operand): Update.
12628         (expand_cbranchsi4): Update.
12629         (expand_cbranchdi4): Update.
12630         * config/sparc/sparc.c (output_v9branch): Update.
12631         * config/spu/spu.c (get_branch_target): Update.
12632         (ea_load_store_inline): Update.
12633         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
12634         * config/tilepro/tilepro.c: Update.
12636 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12638         * gimplify.c (mostly_copy_tree_r): Revert latest change.
12639         (gimplify_save_expr): Likewise.
12641 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12643         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
12645 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12647         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
12648         TV_IPA_FNSUMMARY.
12649         * timevar.def (TV_IPA_FNSUMMARY): Define.
12651 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
12653         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
12654         to back store errata sensitive sequence from being generated.
12655         (sqrtdf2_fix): Likewise.
12657 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12659         * tree-ssa-threadupdate.c (compute_path_counts,
12660         update_joiner_offpath_counts): Use profile_probability.
12662 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12664         Revert:
12665         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12667         * config/arm/arm-c.c (arm_cpu_builtins): Define
12668         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
12670 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12672         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12673         array entries to represent __ieee128 versions of the
12674         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
12675         scalar_extract_sig, and scalar_insert_exp built-in functions.
12676         (altivec_resolve_overloaded_builtin): Add special case handling
12677         for the __builtin_scalar_insert_exp function, as represented by
12678         the P9V_BUILTIN_VEC_VSIEDP constant.
12679         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
12680         exponent support for __ieee128 argument.
12681         (VSESQP): Add scalar extract signature support for __ieee128
12682         argument.
12683         (VSTDCNQP): Add scalar test negative support for __ieee128
12684         argument.
12685         (VSIEQP): Add scalar insert exponent support for __int128 argument
12686         with __ieee128 result.
12687         (VSIEQPF): Add scalar insert exponent support for __ieee128
12688         argument with __ieee128 result.
12689         (VSTDCQP): Add scalar test data class support for __ieee128
12690         argument.
12691         (VSTDCNQP): Add overload support for scalar test negative with
12692         __ieee128 argument.
12693         (VSTDCQP): Add overload support for scalar test data class
12694         __ieee128 argument.
12695         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
12696         UNSPEC_VSX_SXSIGDP.
12697         (UNSPEC_VSX_SIEXPQP): New constant.
12698         (xsxexpqp): New insn for VSX scalar extract exponent quad
12699         precision.
12700         (xsxsigqp): New insn for VSX scalar extract significand quad
12701         precision.
12702         (xsiexpqpf): New insn for VSX scalar insert exponent quad
12703         precision with floating point argument.
12704         (xststdcqp): New expand for VSX scalar test data class quad
12705         precision.
12706         (xststdcnegqp): New expand for VSX scalar test negative quad
12707         precision.
12708         (xststdcqp): New insn to match expansions for VSX scalar test data
12709         class quad precision and VSX scalar test negative quad precision.
12710         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
12711         special case operand checking to enforce that second operand of
12712         VSX scalar test data class with quad precision argument is a 7-bit
12713         unsigned literal.
12714         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
12715         prototypes and descriptions of __ieee128 versions of
12716         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
12717         scalar_test_data_class, and scalar_test_neg built-in functions.
12719 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12721         PR tree-optimization/81162
12722         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
12723         replace a negate with an add.
12725 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
12727         * doc/invoke.texi (arm/-mcpu): Document +crypto.
12729 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12731         * config/arm/arm-c.c (arm_cpu_builtins): Define
12732         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
12734 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12736         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
12737         (armv8-r): Set ARM Cortex-R52 as default CPU.
12738         * config/arm/arm-tables.opt: Regenerate.
12739         * config/arm/arm-tune.md: Regenerate.
12740         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
12741         Cortex-R52.
12742         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
12743         extension for -mcpu=cortex-r52.
12745 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12747         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
12748         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
12749         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
12750         (fp-armv8): Define it as FP_ARMv8 only.
12751         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
12752         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
12753         TARGET_FPU_ARMV8.
12754         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
12755         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
12756         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
12757         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
12758         than TARGET_FPU_ARMV8.
12759         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
12760         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
12761         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
12762         TARGET_FPU_ARMV8.
12763         * config/arm/neon.md (neon_vrint): Likewise.
12764         (neon_vcvt): Likewise.
12765         (neon_<fmaxmin_op><mode>): Likewise.
12766         (<fmaxmin><mode>3): Likewise.
12767         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
12768         * config/arm/predicates.md (arm_cond_move_operator): Check against
12769         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
12771 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
12773         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
12774         to top of function.
12776 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12778         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
12779         loop in comment with memset.
12781 2017-07-14  Martin Liska  <mliska@suse.cz>
12783         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
12784         * dwarf2out.c (is_java): Remove the function.
12785         (output_pubname): Remove usage of the function.
12786         (lower_bound_default): Remove usage of DW_LANG_Java.
12787         (gen_compile_unit_die): Likewise.
12788         * gcc.c: Remove compiler defaults for .java and .zip files.
12789         * gimple-expr.c (remove_suffix): Change as there's no longer
12790         extension than 4-letter one.
12791         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
12792         (gimplify_save_expr): Likewise.
12793         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
12794         as it's possible even for other languages than Java.
12795         * langhooks.h (struct lang_hooks): Remove Java from a comment.
12796         * lto-opts.c (lto_write_options): Remove reference to Java.
12797         * opts.c (strip_off_ending): Update file extension handling.
12798         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
12799         * tree-eh.c (lower_resx): Likewise.
12800         * tree.c (free_lang_data_in_type): Remove dead code.
12801         (find_decls_types_r): Likewise.
12802         (build_common_builtin_nodes): Remove Java from a comment.
12803         (verify_type): Remove dead code.
12804         * varasm.c (assemble_external): Remove Java from a comment.
12806 2017-07-14  Martin Liska  <mliska@suse.cz>
12808         * opts.c (finish_options): Add quotes.
12809         (common_handle_option): Likewise.
12811 2017-07-14  Martin Liska  <mliska@suse.cz>
12813         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
12814         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
12815         Remove N_SO_PASCAL.
12816         * dwarf2out.c (lower_bound_default): Do not handle
12817         DW_LANG_Pascal83.
12818         (gen_compile_unit_die): Likewise.
12819         * gcc.c: Remove default extension binding for GNU Pascal.
12820         * stmt.c: Remove Pascal language from a comment.
12821         * xcoffout.c: Likewise.
12823 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
12825         PR c/81405
12826         * diagnostic-show-locus.c (fixit_cmp): New function.
12827         (layout::layout): Sort m_fixit_hints.
12828         (column_range::column_range): Assert that the values are valid.
12829         (struct char_span): New struct.
12830         (correction::overwrite): New method.
12831         (struct source_line): New struct.
12832         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
12833         calls in terms of classes source_line and char_span, and
12834         correction::overwrite.
12835         (selftest::test_overlapped_fixit_printing_2): New function.
12836         (selftest::diagnostic_show_locus_c_tests): Call it.
12838 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
12840         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
12841         early if there is no lhs.
12843 2017-07-13  Martin Liska  <mliska@suse.cz>
12845         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
12846         (gen_reference_type_die): Likewise.
12847         * stor-layout.c: Remove Pascal-related comment.
12849 2017-07-13  Martin Liska  <mliska@suse.cz>
12851         * opts.c (finish_options): Add quotes to error messages.
12852         (parse_sanitizer_options): Likewise.
12854 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12856         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
12858 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
12860         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
12862 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
12864         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
12865         during expansion.
12866         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
12868 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
12870         PR target/81193
12871         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
12872         provides the hardware capability bits, define the macro
12873         __BUILTIN_CPU_SUPPORTS__.
12874         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
12875         if GLIBC does not provide the hardware capability bits.  Add a
12876         gcc_unreachable call if the built-in cpu function is neither
12877         __builtin_cpu_is nor __builtin_cpu_supports.
12878         (rs6000_get_function_versions_dispatcher): Change the warning
12879         that an old GLIBC is used which does not export the capability
12880         bits to be an error.
12881         * doc/extend.texi (target_clones attribute): Document the
12882         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
12883         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
12884         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
12885         the macros defined by GCC if the newer GLIBC is available.
12887 2017-07-12  Jeff Law  <law@redhat.com>
12889         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
12890         remaining includes slightly.
12891         * config/riscv/riscv-builtins.c: Include profile-count.h.
12893 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
12895         PR target/79883
12896         * config/avr/avr.c (avr_set_current_function): In diagnostic
12897         messages: Quote keywords and (parts of) identifiers.
12898         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
12899         "INTERUPT".
12901 2017-07-12  Carl Love  <cel@us.ibm.com>
12903         * config/rs6000/rs6000-c.c: Add support for built-in functions
12904         vector bool char vec_revb (vector bool char);
12905         vector bool short vec_revb (vector short char);
12906         vector bool int vec_revb (vector bool int);
12907         vector bool long long vec_revb (vector bool long long);
12908         * doc/extend.texi: Update the built-in documentation file for the
12909         new built-in functions.
12911 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12913         * config/s390/s390.md: Remove movcc splitter.
12915 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12917         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
12918         load/store on condition.
12920 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
12922         PR target/81407
12923         * config/avr/avr.c (avr_encode_section_info)
12924         [progmem && !TREE_READONLY]: Error if progmem object needs
12925         constructing.
12927 2017-07-11  Michael Collison  <michael.collison@arm.com>
12929         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
12930         New pattern.
12932 2017-07-11  Carl Love  <cel@us.ibm.com>
12934         * config/rs6000/rs6000-c.c: Add support for builtins
12935         vector unsigned int vec_parity_lsbb (vector signed int);
12936         vector unsigned int vec_parity_lsbb (vector unsigned int);
12937         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
12938         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
12939         vector unsigned long long vec_parity_lsbb (vector signed long long);
12940         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
12941         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
12942         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
12943         * doc/extend.texi: Update the built-in documentation file for the
12944         new built-in functions.
12946 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
12948         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
12949         (layout::m_primary_loc): New field.
12950         (layout::layout): Initialize new field.  Move location filtering
12951         logic from here to...
12952         (layout::maybe_add_location_range): ...this new method.  Add
12953         support for filtering to just the lines already specified by other
12954         locations.
12955         (layout::will_show_line_p): New method.
12956         (gcc_rich_location::add_location_if_nearby): New method.
12957         (selftest::test_add_location_if_nearby): New test function.
12958         (selftest::diagnostic_show_locus_c_tests): Call it.
12959         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
12960         New method.
12962 2017-07-11  Tom de Vries  <tom@codesourcery.com>
12964         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
12965         (bb_first_real_insn): New function.
12966         (nvptx_single): Add extra initialization of broadcasted condition
12967         variables.
12969 2017-07-11  Nathan Sidwell  <nathan@acm.org>
12971         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
12973 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
12975         * doc/extend.texi (AVR Function Attributes): Remove weblink to
12976         Binutils doc as TEXI will mess them up.
12977         * doc/invoke.texi (AVR Options): Same here.
12979 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
12981         * config/sparc/sparc.opt (mfix-ut700): New option.
12982         (mfix-gr712rc): Likewise.
12983         (sparc_fix_b2bst): New variable.
12984         * doc/invoke.texi (SPARC options): Document them.
12985         (ARM options): Fix warnings.
12986         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
12987         instructions to prevent sequences that can trigger the store-store
12988         errata for certain LEON3FT processors.
12989         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
12990         (sparc_option_override): Set sparc_fix_b2bst appropriately.
12991         * config/sparc/sparc.md (fix_b2bst): New attribute.
12992         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
12994 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
12996         PR target/81375
12997         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
12998         (rcpps): Ditto.
12999         (*rsqrtsf2_sse): Ditto.
13000         (rsqrtsf2): Ditto.
13001         (div<mode>3): Macroize insn from divdf3 and divsf3
13002         using MODEF mode iterator.
13004 2017-07-10  Martin Sebor  <msebor@redhat.com>
13006         PR tree-optimization/80397
13007         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
13008         instead of testing for equality to INTEGER_TYPE.
13010 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
13012         * config.gcc: Remove uclibc from arc target spec.
13014 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
13016         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
13018 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
13020         PR lto/80838
13021         * lto-wrapper.c (remove_option): New function.
13022         (merge_and_complain): Merge PIC/PIE options more realistically.
13024 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
13026         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
13028         PR target/20296
13029         PR target/81268
13030         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
13031         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
13032         * config.in: Regenerate.
13033         * configure: Regenerate.
13034         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
13035         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
13036         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
13037         (TARGET_GASISR_PROLOGUES): ...target mask.
13038         * common/config/avr/avr-common.c
13039         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
13040         Set -mgas-isr-prologues.
13041         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
13042         INSERT_PASS_BEFORE for it.
13043         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
13044         * config/avr/avr.c (avr_option_override)
13045         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
13046         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
13047         (avr_attribute_table) <no_gccisr>: Add new function attribute.
13048         (avr_set_current_function) <is_no_gccisr>: Init machine field.
13049         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
13050         and rtl_opt_pass.
13051         (make_avr_pass_pre_proep): New function.
13052         (emit_push_sfr) <treg>: Add argument to function and use it
13053         instead of TMP_REG.
13054         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
13055         and set machine->gasisr.yes.
13056         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
13057         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
13058         __gcc_isr.n_pushed to .L__stack_usage.
13059         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
13060         (avr_asm_final_postscan_insn): ...this new static function.
13061         * config/avr/avr.h (machine_function)
13062         <is_no_gccisr, use_L__stack_usage>: New fields.
13063         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
13064         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
13065         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
13066         (gasisr, *gasisr): New expander and insn.
13067         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
13068         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
13069         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
13071 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
13073         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
13074         in quoted strings.
13076 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
13078         Move jump-tables out of .text again.
13080         PR target/81075
13081         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
13082         (ASM_OUTPUT_ADDR_VEC): New function.
13083         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
13084         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
13085         INSN_ADDRESSes as asm comment.
13086         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
13087         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
13088         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
13089         * config/avr/avr.md (*tablejump): Adjust comment.
13090         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
13091         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
13092         New detail.
13093         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
13094         (avr_output_addr_vec): New proto.
13095         (avr_log_t) <insn_addresses>: New field.
13097 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
13099         PR target/81313
13100         * config/i386/i386.c (ix86_function_arg_advance): Set
13101         outgoing_args_on_stack to true if there are outgoing arguments
13102         on stack.
13103         (ix86_function_arg): Likewise.
13104         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
13105         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
13106         * config/i386/i386.h (machine_function): Add
13107         outgoing_args_on_stack.
13109 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
13111         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
13112         supporting pthreds.
13113         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
13115 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
13117         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
13118         (REAL_H): Remove $(MACHMODE_H).
13119         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
13120         double-int.h.
13121         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
13122         $(MACHMODE_H) and double-int.h.
13123         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
13124         $(MACHMODE_H).
13125         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
13126         double-int.h.
13128 2017-07-07  Andrew Pinski  <apinski@cavium.com>
13130         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
13131         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
13133 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13135         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
13136         Add warning if GCC was not configured to link against a GLIBC that
13137         exports the hardware capability bits.
13138         (make_resolver_func): Make resolver function private and not a
13139         COMDAT function.  Create the name with clone_function_name instead
13140         of make_unique_name.
13142         PR target/81348
13143         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
13144         correct operand in doing the split.
13146 2017-07-07 Carl Love  <cel@us.ibm.com>
13148         * config/rs6000/rs6000-c: Add support for built-in function
13149         vector unsigned short vec_pack_to_short_fp32 (vector float,
13150                                                       vector float).
13151         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
13152         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
13153         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
13154         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
13155         (convert_4f32_8i16): Add define_expand.
13156         * doc/extend.texi: Update the built-in documentation file for the
13157         new built-in function.
13159 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13161         * config/sparc/m8.md: New file.
13162         * config/sparc/sparc.md: Include m8.md.
13164 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13166         * config/sparc/sparc.opt: New option -mvis4b.
13167         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
13168         (sparc_option_override): Handle VIS4B.
13169         (enum sparc_builtins): Define
13170         SPARC_BUILTIN_DICTUNPACK{8,16,32},
13171         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
13172         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
13173         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
13174         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
13175         (check_constant_argument): New function.
13176         (sparc_vis_init_builtins): Define builtins
13177         __builtin_vis_dictunpack{8,16,32},
13178         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
13179         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
13180         __builtin_vis_fpcmpde{8,16,32}shl and
13181         __builtin_vis_fpcmpur{8,16,32}shl.
13182         (sparc_expand_builtin): Check that the constant operands to
13183         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
13184         constant and in range.
13185         * config/sparc/sparc-c.c (sparc_target_macros): Handle
13186         TARGET_VIS4B.
13187         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
13188         (SPARC_IMM5_P): Likewise.
13189         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
13190         (enabled): Handle vis4b.
13191         (UNSPEC_DICTUNPACK): New unspec.
13192         (UNSPEC_FPCMPSHL): Likewise.
13193         (UNSPEC_FPUCMPSHL): Likewise.
13194         (UNSPEC_FPCMPDESHL): Likewise.
13195         (UNSPEC_FPCMPURSHL): Likewise.
13196         (cpu_feature): New CPU feature `vis4b'.
13197         (dictunpack{8,16,32}): New insns.
13198         (FPCSMODE): New mode iterator.
13199         (fpcscond): New code iterator.
13200         (fpcsucond): Likewise.
13201         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
13202         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
13203         (fpcmpde{8,16,32}{si,di}shl): Likewise.
13204         (fpcmpur{8,16,32}{si,di}shl): Likewise.
13205         * config/sparc/constraints.md: Define constraints `q' for unsigned
13206         2-bit integer constants and `t' for unsigned 5-bit integer
13207         constants.
13208         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
13209         predicate.
13210         (imm5_operand_dictunpack16): Likewise.
13211         (imm5_operand_dictunpack32): Likewise.
13212         (imm2_operand): Likewise.
13213         * doc/invoke.texi (SPARC Options): Document -mvis4b.
13214         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
13215         ditunpack* and fpcmp*shl builtins.
13217 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13219         * config.gcc: Handle m8 in --with-{cpu,tune} options.
13220         * config.in: Add HAVE_AS_SPARC6 define.
13221         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
13222         M8.
13223         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
13224         TARGET_CPU_m8.
13225         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
13226         (CPP_CPU_SPEC): Handle m8.
13227         (ASM_CPU_SPEC): Likewise.
13228         * config/sparc/sparc-opts.h (enum processor_type): Add
13229         PROCESSOR_M8.
13230         * config/sparc/sparc.c (m8_costs): New struct.
13231         (sparc_option_override): Handle TARGET_CPU_m8.
13232         (sparc32_initialize_trampoline): Likewise.
13233         (sparc64_initialize_trampoline): Likewise.
13234         (sparc_issue_rate): Likewise.
13235         (sparc_register_move_cost): Likewise.
13236         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
13237         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
13238         (ASM_CPU64_DEFAULT_SPEC): Likewise.
13239         (CPP_CPU_SPEC): Handle M8.
13240         (ASM_CPU_SPEC): Likewise.
13241         (AS_M8_FLAG): Define.
13242         * config/sparc/sparc.md: Add m8 to the cpu attribute.
13243         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
13244         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
13245         M8 instructions.
13246         * configure: Regenerate.
13247         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
13248         -mtune=m8.
13250 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13252         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
13253         subtypes.
13254         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
13255         ("*movdi_insn_sp32"): Do not set v3pipe.
13256         ("*movsi_insn"): Likewise.
13257         ("*movdi_insn_sp64"): Likewise.
13258         ("*movsf_insn"): Likewise.
13259         ("*movdf_insn_sp32"): Likewise.
13260         ("*movdf_insn_sp64"): Likewise.
13261         ("*zero_extendsidi2_insn_sp64"): Likewise.
13262         ("*sign_extendsidi2_insn"): Likewise.
13263         ("*mov<VM32:mode>_insn"): Likewise.
13264         ("*mov<VM64:mode>_insn_sp64"): Likewise.
13265         ("*mov<VM64:mode>_insn_sp32"): Likewise.
13266         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
13267         ("<vlop:code><VL:mode>3"): Likewise.
13268         ("*not_<vlop:code><VL:mode>3"): Likewise.
13269         ("*nand<VL:mode>_vis"): Likewise.
13270         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
13271         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
13272         ("one_cmpl<VL:mode>2"): Likewise.
13273         ("faligndata<VM64:mode>_vis"): Likewise.
13274         ("alignaddrsi_vis"): Likewise.
13275         ("alignaddrdi_vis"): Likweise.
13276         ("alignaddrlsi_vis"): Likewise.
13277         ("alignaddrldi_vis"): Likewise.
13278         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
13279         ("bmaskdi_vis"): Likewise.
13280         ("bmasksi_vis"): Likewise.
13281         ("bshuffle<VM64:mode>_vis"): Likewise.
13282         ("cmask8<P:mode>_vis"): Likewise.
13283         ("cmask16<P:mode>_vis"): Likewise.
13284         ("cmask32<P:mode>_vis"): Likewise.
13285         ("pdistn<P:mode>_vis"): Likewise.
13286         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
13288 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13290         * config/sparc/sparc.md ("subtype"): New insn attribute.
13291         ("*wrgsr_sp64"): Set insn subtype.
13292         ("*rdgsr_sp64"): Likewise.
13293         ("alignaddrsi_vis"): Likewise.
13294         ("alignaddrdi_vis"): Likewise.
13295         ("alignaddrlsi_vis"): Likewise.
13296         ("alignaddrldi_vis"): Likewise.
13297         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
13298         ("fexpand_vis"): Likewise.
13299         ("fpmerge_vis"): Likewise.
13300         ("faligndata<VM64:mode>_vis"): Likewise.
13301         ("bshuffle<VM64:mode>_vis"): Likewise.
13302         ("cmask8<P:mode>_vis"): Likewise.
13303         ("cmask16<P:mode>_vis"): Likewise.
13304         ("cmask32<P:mode>_vis"): Likewise.
13305         ("fchksm16_vis"): Likewise.
13306         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
13307         ("fmean16_vis"): Likewise.
13308         ("fp<plusminus_insn>64_vis"): Likewise.
13309         ("<plusminus_insn>v8qi3"): Likewise.
13310         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
13311         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
13312         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
13313         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
13314         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
13315         ("*movqi_insn"): Likewise.
13316         ("*movhi_insn"): Likewise.
13317         ("*movsi_insn"): Likewise.
13318         ("movsi_pic_gotdata_op"): Likewise.
13319         ("*movdi_insn_sp32"): Likewise.
13320         ("*movdi_insn_sp64"): Likewise.
13321         ("movdi_pic_gotdata_op"): Likewise.
13322         ("*movsf_insn"): Likewise.
13323         ("*movdf_insn_sp32"): Likewise.
13324         ("*movdf_insn_sp64"): Likewise.
13325         ("*zero_extendhisi2_insn"): Likewise.
13326         ("*zero_extendqihi2_insn"): Likewise.
13327         ("*zero_extendqisi2_insn"): Likewise.
13328         ("*zero_extendqidi2_insn"): Likewise.
13329         ("*zero_extendhidi2_insn"): Likewise.
13330         ("*zero_extendsidi2_insn_sp64"): Likewise.
13331         ("ldfsr"): Likewise.
13332         ("prefetch_64"): Likewise.
13333         ("prefetch_32"): Likewise.
13334         ("tie_ld32"): Likewise.
13335         ("tie_ld64"): Likewise.
13336         ("*tldo_ldub_sp32"): Likewise.
13337         ("*tldo_ldub1_sp32"): Likewise.
13338         ("*tldo_ldub2_sp32"): Likewise.
13339         ("*tldo_ldub_sp64"): Likewise.
13340         ("*tldo_ldub1_sp64"): Likewise.
13341         ("*tldo_ldub2_sp64"): Likewise.
13342         ("*tldo_ldub3_sp64"): Likewise.
13343         ("*tldo_lduh_sp32"): Likewise.
13344         ("*tldo_lduh1_sp32"): Likewise.
13345         ("*tldo_lduh_sp64"): Likewise.
13346         ("*tldo_lduh1_sp64"): Likewise.
13347         ("*tldo_lduh2_sp64"): Likewise.
13348         ("*tldo_lduw_sp32"): Likewise.
13349         ("*tldo_lduw_sp64"): Likewise.
13350         ("*tldo_lduw1_sp64"): Likewise.
13351         ("*tldo_ldx_sp64"): Likewise.
13352         ("*mov<VM32:mode>_insn"): Likewise.
13353         ("*mov<VM64:mode>_insn_sp64"): Likewise.
13354         ("*mov<VM64:mode>_insn_sp32"): Likewise.
13356 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13358         * config/sparc/sparc.md ("type"): New insn type viscmp.
13359         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
13360         viscmp.
13361         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
13362         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
13363         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
13364         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
13365         viscmp.
13366         ("n7_vis_logical_11cycle"): Likewise.
13367         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
13368         * config/sparc/niagara2.md ("niag3_vis": Likewise.
13369         * config/sparc/niagara.md ("niag_vis"): Likewise.
13370         * config/sparc/ultra3.md ("us3_fga"): Likewise.
13371         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
13373 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13375         * config/sparc/sparc.md: New instruction type `bmask'.
13376         (bmaskdi_vis): Use the `bmask' type.
13377         (bmasksi_vis): Likewise.
13378         * config/sparc/ultra3.md (us3_array): Likewise.
13379         * config/sparc/niagara7.md (n7_array): Likewise.
13380         * config/sparc/niagara4.md (n4_array): Likewise.
13381         * config/sparc/niagara2.md (niag2_vis): Likewise.
13382         (niag3_vis): Likewise.
13383         * config/sparc/niagara.md (niag_vis): Likewise.
13385 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13387         * ipa-comdats.c: Remove optimize check from gate.
13388         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
13389         for functions not optimized.
13390         (ipa_fn_summary_read): Skip optimize check.
13391         (ipa_fn_summary_write): Likewise.
13392         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
13393         is optimized.
13394         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
13395         uninlinable.
13396         (can_inline_edge_p): Check flag_pcc_struct_return for match.
13397         (check_callers): Give up on caller which is not optimized.
13398         (inline_small_functions): Likewise.
13399         (ipa_inline): Do not give up when not optimizing.
13400         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
13401         away unoptimizes cdtors.
13402         (whole_program_function_and_variable_visibility): Do
13403         ipa_discover_readonly_nonaddressable_vars in LTO mode.
13404         * ipa.c (process_references): Do not check optimize.
13405         (symbol_table::remove_unreachable_nodes): Update optimize check.
13406         (set_writeonly_bit): Update optimize check.
13407         (pass_ipa_cdtor_merge::gate): Do not check optimize.
13408         (pass_ipa_single_use::gate): Remove.
13410 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13412         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
13413         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
13414         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
13415         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
13416         permute_load, permute_store, adjust_extract, adjust_splat,
13417         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
13418         replace_swap_with_copy, dump_swap_insn_table,
13419         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
13420         recombine_lvx_pattern, recombine_stvx_pattern,
13421         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
13422         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
13423         to file rs6000-p8swap.c.
13424         * config/rs6000/rs6000-p8swap.c: New file.
13425         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
13426         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
13427         and rs6000*-*-* targets.
13429 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13431         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
13433 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13435         * lto-wrapper.c (merge_and_complain): Do not merge
13436         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
13437         fsigned_zeros, ftrapping_math, fwrapv.
13438         (append_compiler_options): Do not track these options.
13439         (append_linker_options): Likewie
13441 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13443         * cgraphunit.c (cgraph_node::finalize_function): When
13444         !flag_toplevel_reorde set no_reorder flag.
13445         (varpool_node::finalize_decl): Likewise.
13446         (symbol_table::compile): Drop no toplevel reorder path.
13448 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13450         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
13451         edges; zero probability is not better than uninitialized.
13453 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
13455         * asan.h (asan_sanitize_allocas_p): Declare.
13456         * asan.c (asan_sanitize_allocas_p): New function.
13457         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
13458         (handle_builtin_alloca): Likewise.
13459         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
13460         if !asan_sanitize_allocas_p.
13461         * params.def (asan-instrument-allocas): Add new option.
13462         * params.h (ASAN_PROTECT_ALLOCAS): Define.
13463         * opts.c (common_handle_option): Disable allocas sanitization for
13464         KASan by default.
13466 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
13468         * asan.c: Include gimple-fold.h.
13469         (get_last_alloca_addr): New function.
13470         (handle_builtin_stackrestore): Likewise.
13471         (handle_builtin_alloca): Likewise.
13472         (asan_emit_allocas_unpoison): Likewise.
13473         (get_mem_refs_of_builtin_call): Add new parameter, remove const
13474         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
13475         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
13476         (instrument_builtin_call): Pass gimple iterator to
13477         get_mem_refs_of_builtin_call.
13478         (last_alloca_addr): New global.
13479         * asan.h (asan_emit_allocas_unpoison): Declare.
13480         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
13481         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
13482         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
13483         if function calls alloca.
13484         * gimple-fold.c (replace_call_with_value): Remove static keyword.
13485         * gimple-fold.h (replace_call_with_value): Declare.
13486         * internal-fn.c: Include asan.h.
13487         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
13488         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
13490 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13492         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
13493         (C_SELFTEST_FLAGS): New.
13494         (CPP_SELFTEST_FLAGS): New.
13495         (SELFTEST_DEPS): New, from deps of s-selftest.
13496         (C_SELFTEST_DEPS): New, from deps of s-selftest.
13497         (CPP_SELFTEST_DEPS): New.
13498         (selftest): Add dependency on s-selftest-c++.
13499         (s-selftest): Rename to...
13500         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
13501         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
13502         than SELFTEST_FLAGS.
13503         (selftest-gdb): Rename to...
13504         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
13505         C_SELFTEST_FLAGS.
13506         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
13507         (selftest-valgrind): Rename to...
13508         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
13509         C_SELFTEST_FLAGS.
13510         (selftest-valgrind): Reintroduce as an alias for
13511         selftest-c-valgrind.
13512         (s-selftest-c++): New.
13513         (selftest-c++-gdb): New.
13514         (selftest-c++-valgrind): New.
13516 2017-07-06  Olivier Hainque  <hainque@adacore.com>
13518         * gcc.c (process_command): When deciding if undefined variables
13519         should be ignored when processing specs, accept "gcc -v" as well.
13521 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13523         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
13524         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
13526 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13528         * config/arm/arm-cpus.in (armv8-r): Add new entry.
13529         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
13530         * config/arm/arm-tables.opt: Regenerate.
13531         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
13532         enumerator.
13533         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
13535 2017-07-06  Carl Love  <cel@us.ibm.com>
13537         * ChangeLog: Clean up from mid air collision
13539 2017-07-06  Carl Love  <cel@us.ibm.com>
13541         * config/rs6000/rs6000-c.c: Add support for built-in functions
13542         vector signed int vec_subc (vector signed int, vector signed int);
13543         vector signed __int128 vec_subc (vector signed __int128,
13544                                          vector signed __int128);
13545         vector unsigned __int128 vec_subc (vector unsigned __int128,
13546                                            vector unsigned __int128);
13547         vector signed int vec_sube (vector signed int, vector signed int,
13548                                     vector signed int);
13549         vector unsigned int vec_sube (vector unsigned int,
13550                                       vector unsigned int,
13551                                       vector unsigned int);
13552         vector signed __int128 vec_sube (vector signed __int128,
13553                                          vector signed __int128,
13554                                          vector signed__int128);
13555         vector unsigned __int128 vec_sube (vector unsigned __int128,
13556                                            vector unsigned __int128,
13557                                            vector unsigned __int128);
13558         vector signed int vec_subec (vector signed int, vector signed int,
13559                                      vector signed int);
13560         vector unsigned int vec_subec (vector unsigned int,
13561                                        vector unsigned int,
13562                                        vector unsigned int);
13563         vector signed __int128 vec_subec (vector signed __int128,
13564                                           vector signed __int128,
13565                                           vector signed__int128);
13566         vector unsigned __int128 vec_subec (vector unsigned __int128,
13567                                             vector unsigned __int128,
13568                                             vector unsigned __int128);
13569         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
13570         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
13571         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
13572         BU_ALTIVEC_OVERLOAD_X definitions.
13573         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
13574         * doc/extend.texi: Update the built-in documentation file for the new
13575         built-in functions.
13577 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13579         PR c++/79300
13580         * diagnostic-show-locus.c (layout::layout): Use start and finish
13581         spelling location for the start and finish of each range.
13582         * genmatch.c (linemap_client_expand_location_to_spelling_point):
13583         Add unused aspect param.
13584         * input.c (expand_location_1): Add "aspect" param, and use it
13585         to access the correct part of the location.
13586         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
13587         expand_location_1.
13588         (expand_location_to_spelling_point): Likewise.
13589         (linemap_client_expand_location_to_spelling_point): Add "aspect"
13590         param, and pass it to expand_location_1.
13592 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
13594         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
13595         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
13596         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
13597         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
13598         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
13599         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
13600         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
13601         _mm_maskz_getmant_ss): New intrinsics.
13602         (__builtin_ia32_getexpss128_mask): Changed to ...
13603         __builtin_ia32_getexpss128_round ... this.
13604         (__builtin_ia32_getexpsd128_mask): Changed to ...
13605         __builtin_ia32_getexpsd128_round ... this.
13606         * config/i386/i386-builtin-types.def
13607         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
13608         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
13609         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
13610         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
13611         __builtin_ia32_getmantss_mask_round): New builtins.
13612         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
13613         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
13614         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
13615         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
13616         * config/i386/sse.md
13617         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
13618         avx512f_sgetexp<mode><mask_scalar_name>
13619         <round_saeonly_scalar_name> ... this.
13620         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
13621         %0, %1, %2<round_saeonly_op3>}): Changed to ...
13622         vgetexp<ssescalarmodesuffix>
13623         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13624         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
13625         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
13626         avx512f_vgetmant<mode><mask_scalar_name>
13627         <round_saeonly_scalar_name> ... this.
13628         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13629         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
13630         vgetmant<ssescalarmodesuffix>
13631         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
13632         %0<mask_scalar_operand4>, %1, %2
13633         <round_saeonly_scalar_mask_op4>, %3} ... this.
13634         * config/i386/subst.md (mask_scalar_operand4,
13635         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
13636         round_saeonly_scalar_nimm_predicate): New subst attributes.
13638 2017-07-06  Julia Koval  <julia.koval@intel.com>
13640         * config/i386/i386.c (ix86_erase_embedded_rounding):
13641         Remove code for old rounding pattern.
13643 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
13645         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
13647 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
13649         * doc/sourcebuild.texi (Test Directives, Variants of
13650         dg-require-support): Add documentation for dg-require-stack-check.
13652 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
13654         * config/i386/subst.md (mask_scalar, round_scalar,
13655         round_saeonly_scalar): New meta-templates.
13656         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
13657         round_scalar_mask_operand3, round_scalar_mask_op3,
13658         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
13659         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
13660         round_saeonly_scalar_constraint,
13661         round_saeonly_scalar_prefix): New subst attribute.
13662         * config/i386/sse.md
13663         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
13664         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
13665         <round_scalar_name> ... this.
13666         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
13667         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
13668         <round_scalar_name> ... this.
13669         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
13670         <sse>_vm<code><mode>3<mask_scalar_name>
13671         <round_saeonly_scalar_name> ... this.
13672         (v<plusminus_mnemonic><ssescalarmodesuffix>
13673         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
13674         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
13675         v<plusminus_mnemonic><ssescalarmodesuffix>
13676         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13677         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
13678         (v<multdiv_mnemonic><ssescalarmodesuffix>
13679         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
13680         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
13681         v<multdiv_mnemonic><ssescalarmodesuffix>
13682         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13683         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
13684         (v<maxmin_float><ssescalarmodesuffix>
13685         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
13686         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
13687         v<maxmin_float><ssescalarmodesuffix>
13688         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13689         %0<mask_scalar_operand3>, %1, %<iptr>2
13690         <round_saeonly_scalar_mask_op3>} ... this.
13692 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
13694         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
13695         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
13697 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
13698             Alan Hayward  <alan.hayward@arm.com>
13699             David Sherwood  <david.sherwood@arm.com>
13701         * combine.c (simplify_if_then_else): Remove "enum" before
13702         "machine_mode".
13703         * compare-elim.c (can_eliminate_compare): Likewise.
13704         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
13705         Likewise.
13706         (aarch64_lookup_simd_builtin_type): Likewise.
13707         (aarch64_simd_builtin_type): Likewise.
13708         (aarch64_init_simd_builtin_types): Likewise.
13709         (aarch64_simd_expand_args): Likewise.
13710         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
13711         Likewise.
13712         (aarch64_reverse_mask): Likewise.
13713         (aarch64_simd_emit_reg_reg_move): Likewise.
13714         (aarch64_gen_adjusted_ldpstp): Likewise.
13715         (aarch64_ccmp_mode_to_code): Likewise.
13716         (aarch64_operands_ok_for_ldpstp): Likewise.
13717         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
13718         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13719         Likewise.
13720         (aarch64_min_divisions_for_recip_mul): Likewise.
13721         (aarch64_reassociation_width): Likewise.
13722         (aarch64_get_condition_code_1): Likewise.
13723         (aarch64_simd_emit_reg_reg_move): Likewise.
13724         (aarch64_simd_attr_length_rglist): Likewise.
13725         (aarch64_reverse_mask): Likewise.
13726         (aarch64_operands_ok_for_ldpstp): Likewise.
13727         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
13728         (aarch64_gen_adjusted_ldpstp): Likewise.
13729         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
13730         Likewise.
13731         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
13732         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
13733         (arm_lookup_simd_builtin_type): Likewise.
13734         (arm_simd_builtin_type): Likewise.
13735         (arm_init_simd_builtin_types): Likewise.
13736         (arm_expand_builtin_args): Likewise.
13737         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
13738         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
13739         (ft32_setup_incoming_varargs): Likewise.
13740         (ft32_function_arg): Likewise.
13741         (ft32_function_arg_advance): Likewise.
13742         (ft32_pass_by_reference): Likewise.
13743         (ft32_arg_partial_bytes): Likewise.
13744         (ft32_valid_pointer_mode): Likewise.
13745         (ft32_addr_space_pointer_mode): Likewise.
13746         (ft32_addr_space_legitimate_address_p): Likewise.
13747         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
13748         Likewise.
13749         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
13750         (ix86_emit_outlined_ms2sysv_restore): Likewise.
13751         (iamcu_alignment): Likewise.
13752         (canonicalize_vector_int_perm): Likewise.
13753         (ix86_noce_conversion_profitable_p): Likewise.
13754         (ix86_mpx_bound_mode): Likewise.
13755         (ix86_operands_ok_for_move_multiple): Likewise.
13756         * config/microblaze/microblaze-protos.h
13757         (microblaze_expand_conditional_branch_reg): Likewise.
13758         * config/microblaze/microblaze.c
13759         (microblaze_expand_conditional_branch_reg): Likewise.
13760         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
13761         Likewise.
13762         (rs6000_reassociation_width): Likewise.
13763         (rs6000_invalid_binary_op): Likewise.
13764         (fusion_p9_p): Likewise.
13765         (emit_fusion_p9_load): Likewise.
13766         (emit_fusion_p9_store): Likewise.
13767         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
13768         Likewise.
13769         (riscv_hard_regno_mode_ok_p): Likewise.
13770         (riscv_address_insns): Likewise.
13771         (riscv_split_symbol): Likewise.
13772         (riscv_legitimize_move): Likewise.
13773         (riscv_function_value): Likewise.
13774         (riscv_hard_regno_nregs): Likewise.
13775         (riscv_expand_builtin): Likewise.
13776         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
13777         (riscv_build_integer): Likewise.
13778         (riscv_split_integer): Likewise.
13779         (riscv_legitimate_constant_p): Likewise.
13780         (riscv_cannot_force_const_mem): Likewise.
13781         (riscv_regno_mode_ok_for_base_p): Likewise.
13782         (riscv_valid_base_register_p): Likewise.
13783         (riscv_valid_offset_p): Likewise.
13784         (riscv_valid_lo_sum_p): Likewise.
13785         (riscv_classify_address): Likewise.
13786         (riscv_legitimate_address_p): Likewise.
13787         (riscv_address_insns): Likewise.
13788         (riscv_load_store_insns): Likewise.
13789         (riscv_force_binary): Likewise.
13790         (riscv_split_symbol): Likewise.
13791         (riscv_force_address): Likewise.
13792         (riscv_legitimize_address): Likewise.
13793         (riscv_move_integer): Likewise.
13794         (riscv_legitimize_const_move): Likewise.
13795         (riscv_legitimize_move): Likewise.
13796         (riscv_address_cost): Likewise.
13797         (riscv_subword): Likewise.
13798         (riscv_output_move): Likewise.
13799         (riscv_canonicalize_int_order_test): Likewise.
13800         (riscv_emit_int_order_test): Likewise.
13801         (riscv_function_arg_boundary): Likewise.
13802         (riscv_pass_mode_in_fpr_p): Likewise.
13803         (riscv_pass_fpr_single): Likewise.
13804         (riscv_pass_fpr_pair): Likewise.
13805         (riscv_get_arg_info): Likewise.
13806         (riscv_function_arg): Likewise.
13807         (riscv_function_arg_advance): Likewise.
13808         (riscv_arg_partial_bytes): Likewise.
13809         (riscv_function_value): Likewise.
13810         (riscv_pass_by_reference): Likewise.
13811         (riscv_setup_incoming_varargs): Likewise.
13812         (riscv_print_operand): Likewise.
13813         (riscv_elf_select_rtx_section): Likewise.
13814         (riscv_save_restore_reg): Likewise.
13815         (riscv_for_each_saved_reg): Likewise.
13816         (riscv_register_move_cost): Likewise.
13817         (riscv_hard_regno_mode_ok_p): Likewise.
13818         (riscv_hard_regno_nregs): Likewise.
13819         (riscv_class_max_nregs): Likewise.
13820         (riscv_memory_move_cost): Likewise.
13821         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
13822         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
13823         (rl78_addr_space_address_mode): Likewise.
13824         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13825         Likewise.
13826         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
13827         (rs6000_reassociation_width): Likewise.
13828         (rs6000_invalid_binary_op): Likewise.
13829         (fusion_p9_p): Likewise.
13830         (emit_fusion_p9_load): Likewise.
13831         (emit_fusion_p9_store): Likewise.
13832         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
13833         (ok_for_simple_move_operands): Likewise.
13834         (ok_for_simple_move_strict_operands): Likewise.
13835         (ok_for_simple_arith_logic_operands): Likewise.
13836         (visium_legitimize_reload_address): Likewise.
13837         (visium_select_cc_mode): Likewise.
13838         (output_cbranch): Likewise.
13839         (visium_split_double_move): Likewise.
13840         (visium_expand_copysign): Likewise.
13841         (visium_expand_int_cstore): Likewise.
13842         (visium_expand_fp_cstore): Likewise.
13843         * config/visium/visium.c (visium_pass_by_reference): Likewise.
13844         (visium_function_arg): Likewise.
13845         (visium_function_arg_advance): Likewise.
13846         (visium_libcall_value): Likewise.
13847         (visium_setup_incoming_varargs): Likewise.
13848         (visium_legitimate_constant_p): Likewise.
13849         (visium_legitimate_address_p): Likewise.
13850         (visium_legitimize_address): Likewise.
13851         (visium_secondary_reload): Likewise.
13852         (visium_register_move_cost): Likewise.
13853         (visium_memory_move_cost): Likewise.
13854         (prepare_move_operands): Likewise.
13855         (ok_for_simple_move_operands): Likewise.
13856         (ok_for_simple_move_strict_operands): Likewise.
13857         (ok_for_simple_arith_logic_operands): Likewise.
13858         (visium_function_value_1): Likewise.
13859         (rtx_ok_for_offset_p): Likewise.
13860         (visium_legitimize_reload_address): Likewise.
13861         (visium_split_double_move): Likewise.
13862         (visium_expand_copysign): Likewise.
13863         (visium_expand_int_cstore): Likewise.
13864         (visium_expand_fp_cstore): Likewise.
13865         (visium_split_cstore): Likewise.
13866         (visium_select_cc_mode): Likewise.
13867         (visium_split_cbranch): Likewise.
13868         (output_cbranch): Likewise.
13869         (visium_print_operand_address): Likewise.
13870         * expmed.c (flip_storage_order): Likewise.
13871         * expmed.h (emit_cstore): Likewise.
13872         (flip_storage_order): Likewise.
13873         * genrecog.c (validate_pattern): Likewise.
13874         * hsa-gen.c (gen_hsa_addr): Likewise.
13875         * internal-fn.c (expand_arith_overflow): Likewise.
13876         * ira-color.c (allocno_copy_cost_saving): Likewise.
13877         * lra-assigns.c (find_hard_regno_for_1): Likewise.
13878         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
13879         (process_invariant_for_inheritance): Likewise.
13880         * lra-eliminations.c (move_plus_up): Likewise.
13881         * omp-low.c (lower_oacc_reductions): Likewise.
13882         * simplify-rtx.c (simplify_subreg): Likewise.
13883         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
13884         (TARGET_CHKP_BOUND_MODE): Likewise..
13885         * targhooks.c (default_chkp_bound_mode): Likewise.
13886         (default_setup_incoming_vararg_bounds): Likewise.
13887         * targhooks.h (default_chkp_bound_mode): Likewise.
13888         (default_setup_incoming_vararg_bounds): Likewise.
13889         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
13890         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
13891         (have_whole_vector_shift): Likewise.
13892         * tree-vect-stmts.c (vectorizable_load): Likewise.
13893         * doc/tm.texi: Regenerate.
13895 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
13897         Graceful degrade if Binutils PR21472 is not available.
13899         PR target/81072
13900         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
13901         .rodata in flash test fails.
13902         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
13903         * confgure: Regenerate.
13904         * config.in: Regenerate.
13905         * config/avr/avr.c (avr_asm_named_section)
13906         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
13907         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
13908         (avr_asm_init_sections): Same.
13910 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13912         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
13913         (fma<VH:mode>4_intrinsic): Likewise.
13914         (*fmsub<VCVTF:mode>4): Likewise.
13915         (*fmsub<VH:mode>4_intrinsic): Likewise.
13917 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
13919         PR target/81305
13920         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
13921         Don't depend on "optimize > 0".
13922         (out_movhi_r_mr, out_movqi_mr_r): Same.
13923         (out_movhi_mr_r, out_movqi_r_mr): Same.
13924         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
13925         io_address_operand on "optimize > 0".
13927 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
13929         * tree-loop-distribution.c: Add general explanantion on the pass.
13930         (generate_loops_for_partition): Mark distributed loop.
13931         (pg_add_dependence_edges): New parameter.  Handle alias data
13932         dependence specially and record it in the parameter if asked.
13933         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
13934         (init_partition_graph_vertices, add_partition_graph_edge): New.
13935         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
13936         (free_partition_graph_vdata, build_partition_graph): New.
13937         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
13938         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
13939         (data_ref_segment_size, latch_dominated_by_data_ref): New.
13940         (compute_alias_check_pairs, version_loop_by_alias_check): New.
13941         (version_for_distribution_p, finalize_partitions): New.
13942         (distribute_loop): Handle alias data dependence specially.  Factor
13943         out loop fusion code as functions and call these functions.
13945 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
13947         * tree-loop-distribution.c (classify_partition): New parameter and
13948         better handle reduction statement.
13949         (rdg_build_partitions): Revise comment.
13950         (distribute_loop): Compute statements in all partitions and pass it
13951         to classify_partition.
13953 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
13955         * tree-loop-distribution.c (enum partition_type): New.
13956         (struct partition): New field type.
13957         (partition_merge_into): Add parameter.  Update partition type.
13958         (data_dep_in_cycle_p, update_type_for_merge): New functions.
13959         (build_rdg_partition_for_vertex): Compute partition type.
13960         (rdg_build_partitions): Dump partition type.
13961         (distribute_loop): Update calls to partition_merge_into.
13963 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
13965         * tree-loop-distribution.c (struct ddr_hasher): New.
13966         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
13967         (ddrs_table): New.
13968         (classify_partition): Call get_data_dependence.
13969         (pg_add_dependence_edges): Ditto.
13970         (distribute_loop): Release data dependence hash table.
13972 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
13974         * tree-loop-distribution.c (ref_base_address): Delete.
13975         (similar_memory_accesses): Rename ...
13976         (share_memory_accesses): ... to this.  Check if partitions access
13977         the same memory reference.
13978         (distribute_loop): Call share_memory_accesses.
13980 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
13982         * tree-loop-distribution.c (struct partition): New field recording
13983         its data reference.
13984         (partition_alloc, partition_free): Init and release data refs.
13985         (partition_merge_into): Merge data refs.
13986         (build_rdg_partition_for_vertex): Collect data refs for partition.
13987         (pg_add_dependence_edges): Change parameters from vector to bitmap.
13988         Update uses.
13989         (distribute_loop): Remve data refs from vertice data of partition
13990         graph.
13992 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
13994         * tree-loop-distribution.c (params.h): Include header file.
13995         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
13996         (datarefs_vec): New global var.
13997         (create_rdg_vertices): Use datarefs_vec directly.
13998         (free_rdg): Don't free data references.
13999         (build_rdg): Update use.  Don't free data references.
14000         (distribute_loop): Compute global variable for data references.
14001         Bail out if there are too many data references.
14003 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14005         * tree-loop-distribution.c (loop_nest): New global var.
14006         (build_rdg): Use loop directly, rather than loop nest.
14007         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
14008         variable directly.
14009         (distribute_loop): Compute global variable loop nest.  Update use.
14011 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14013         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
14014         (partition_merge_into): New parameter.  Dump reason for fusion.
14015         (distribute_loop): Update use of partition_merge_into.
14017 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14019         * tree-loop-distribution.c (bb_top_order_index): New.
14020         (bb_top_order_index_size, bb_top_order_cmp): New.
14021         (stmts_from_loop): Use topological order.
14022         (pass_loop_distribution::execute): Compute and release topological
14023         order for basic blocks.
14025 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14027         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
14028         if no loops.
14030 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14032         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
14033         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
14034         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
14035         * internal-fn.def (LOOP_DIST_ALIAS): New.
14036         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
14037         (fold_loop_internal_call): ... this.
14038         (vect_loop_dist_alias_call): New function.
14039         (set_uid_loop_bbs): Call fold_loop_internal_call.
14040         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
14041         internal calls.
14043 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
14045         PR target/81300
14046         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
14047         Require dead FLAGS_REG at the beginning of a peephole.
14049 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
14051         PR target/81294
14052         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
14053         arguments in the call to __builtin_ia32_sbb_u32.
14054         (_subborrow_u64): Swap _X and _Y arguments in the call to
14055         __builtin_ia32_sbb_u64.
14057 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
14059         PR debug/81278
14060         * tree-vrp.c (compare_assert_loc): Turn into a function template
14061         with stable template parameter.  Only test if a->e is NULL,
14062         !a->e == !b->e has been verified already.  Use e == NULL or
14063         e != NULL instead of e or ! e tests.  If stable is true, don't use
14064         iterative_hash_expr, on the other side allow a or b or both NULL
14065         and sort the NULLs last.
14066         (process_assert_insertions): Sort using compare_assert_loc<false>
14067         instead of compare_assert_loc, later sort using
14068         compare_assert_loc<true> before calling process_assert_insertions_for
14069         in a loop.  Use break instead of continue once seen NULL pointer.
14071 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14073         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
14074         Cortex-R7 and Cortex-R8 processors.
14076 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14078         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
14079         uninitialized while src is not.
14081 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
14083         * common/config/arm/arm-common.c: Adjust include path for
14084         arm-cpu-cdata.h
14085         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
14086         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
14087         (arm-cpu-data.h): Likewise.
14088         (arm-cpu-cdata.h): Likewise.
14089         * config/arm/arm-cpu.h: Delete.
14090         * config/arm/arm-cpu-cdata.h: Delete.
14091         * config/arm/arm-cpu-data.h: Delete.
14093 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
14095         * config/arm/arm-cpus.in (cortex-a55): New.
14096         (cortex-a75): Likewise.
14097         (cortex-a75.cortex-a55): Likewise.
14098         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
14099         cortex-a75.
14100         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
14101         * config/arm/arm-cpu-cdata.h: Regenerate.
14102         * config/arm/arm-cpu-data.h: Regenerate.
14103         * config/arm/arm-cpu.h: Regenerate.
14104         * config/arm/arm-tables.opt: Regenerate.
14105         * config/arm/arm-tune.md: Regenerate.
14107 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14109         * haifa-sched.c (sched_create_recovery_edges): Update profile.
14111 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14113         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
14114         probability.
14116 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
14118         PR tree-optimization/81292
14119         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
14120         full_string_p, also call adjust_related_strinfos if the adjustment
14121         is simple, otherwise invalidate related strinfos.
14123 2017-07-04  Martin Liska  <mliska@suse.cz>
14125         PR sanitizer/81040
14126         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
14127         newly created variable as DECL_IGNORED_P.
14129 2017-07-04  Martin Liska  <mliska@suse.cz>
14131         PR ipa/81293
14132         * ipa-inline.c (inline_small_functions):
14133         Use xstrdup_for_dump.
14135 2017-07-04  Tom de Vries  <tom@codesourcery.com>
14137         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
14139 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
14141         PR target/81033
14142         * config/darwin.c (darwin_function_switched_text_sections):
14143         Fix spaces.
14145 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
14147         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
14149 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
14151         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
14153 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14155         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
14156         min_profitable_iters, and th as inclusive lower bounds.
14157         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
14158         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
14159         for min_profitable_iters and min_profitable_estimate.
14160         (vect_transform_loop): Treat th as an inclusive lower bound.
14161         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
14163 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
14165         PR target/81033
14166         * config/darwin.c (darwin_function_switched_text_sections):
14167         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
14168         in two pieces, and suppress the use of buf.
14170 2017-07-03  Nathan Sidwell  <nathan@acm.org>
14172         * hash-table.h (hash_table_mod1): Fix indentation.
14174 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14176         PR middle-end/81290
14177         * predict.c (force_edge_cold): Be more careful about propagation
14178         backward.
14179         * profile-count.h (profile_probability::guessed,
14180         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
14181         New.
14182         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
14184 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
14186         * doc/invoke.texi (rcpc architecture extension): Document it.
14188 2017-07-03  Richard Biener  <rguenther@suse.de>
14190         PR tree-optimization/60510
14191         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
14192         the scalar reduction PHI and use it.
14193         (vectorizable_reduction): Properly guard the single_defuse_cycle
14194         path for non-SLP reduction chains where we cannot use it.
14195         Rework reduc_def/index and vector type deduction.  Rework
14196         vector operand gathering during reduction op code-gen.
14197         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
14198         chains dissolve the chain and leave it to non-SLP reduction
14199         handling.
14201 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14203         * tree-data-ref.h (dr_alignment): Declare.
14204         * tree-data-ref.c (dr_alignment): New function.
14205         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
14206         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14207         set it.
14208         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
14210 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14212         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
14213         and base_misalignment fields.
14214         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
14215         * tree-data-ref.c: Include builtins.h.
14216         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
14217         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
14218         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
14219         * tree-vect-data-refs.c: Include tree-cfg.h.
14220         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
14221         fields instead of calculating an alignment here.
14222         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
14223         innermost_loop_behavior fields.
14225 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14227         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
14228         field.
14229         (DR_STEP_ALIGNMENT): New macro.
14230         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
14231         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
14232         (create_data_ref): Print it.
14233         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
14234         to tell whether the step preserves vector (mis)alignment.
14235         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
14236         Move the check for an integer step and generalise to all INTEGER_CST.
14237         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
14238         Print the outer step alignment.
14240 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14242         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
14243         with offset_alignment.
14244         (DR_ALIGNED_TO): Delete.
14245         (DR_OFFSET_ALIGNMENT): New macro.
14246         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
14247         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
14248         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
14249         (create_data_ref): Likewise.
14250         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
14251         (vect_analyze_data_refs): Likewise.
14252         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
14253         creating dummy innermost behavior.
14255 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14257         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
14258         with a "innermost_loop_behavior *" and refeence tree.
14259         * tree-data-ref.c (dr_analyze_innermost): Likewise.
14260         (create_data_ref): Update call accordingly.
14261         * tree-predcom.c (find_looparound_phi): Likewise.
14263 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14265         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
14266         fields with dr_wrt_vec_loop.
14267         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
14268         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
14269         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
14270         (vect_dr_behavior): New function.
14271         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
14272         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14273         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
14274         track whether the step preserves the misalignment.
14275         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
14276         Use vect_dr_behavior.
14277         (vect_setup_realignment): Update call accordingly.
14278         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
14279         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
14280         call to vect_create_addr_base_for_vector_ref.
14281         (vect_create_cond_for_align_checks): Likewise.
14282         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
14283         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
14284         (vect_recog_mask_conversion_pattern): Likewise.
14285         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
14286         (new_stmt_vec_info): Remove redundant zeroing.
14288 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
14290         * common/config/arm/arm-common.c (arm_be8_option): New function.
14291         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
14292         (ISA_ARMv6): Add isa_bit_be8.
14293         * config/arm/arm.h (arm_be8_option): Add prototype.
14294         (BE8_SPEC_FUNCTION): New define.
14295         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
14296         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
14297         (mlittle-endian): Similarly.
14298         (mbe8, mbe32): New options.
14299         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
14300         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
14302 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14304         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
14306 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14308         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
14309         (cleanup_tree_cfg_bb): Use it.
14310         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
14311         New functions.
14312         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
14314 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14316         PR bootstrap/81285
14317         * loop-doloop.c (add_test): Update profile.
14319 2017-07-03  Martin Liska  <mliska@suse.cz>
14321         PR sanitize/81040
14322         * sanopt.c (rewrite_usage_of_param): New function.
14323         (sanitize_rewrite_addressable_params): Likewise.
14324         (pass_sanopt::execute): Call rewrite_usage_of_param.
14326 2017-07-03  Richard Biener  <rguenther@suse.de>
14328         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
14329         back to using VIEW_CONVERT_EXPR.
14331 2017-07-03  Martin Liska  <mliska@suse.cz>
14333         PR other/78366
14334         * doc/extend.texi: Document when a resolver function is
14335         generated for target_clones.
14337 2017-07-03  Martin Liska  <mliska@suse.cz>
14339         * asan.c (asan_emit_stack_protection): Unpoison just red zones
14340         and shadow memory of auto variables which are subject of
14341         use-after-scope sanitization.
14342         (asan_expand_mark_ifn): Add do set only when is_poison.
14344 2016-07-03  Richard Biener  <rguenther@suse.de>
14346         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
14347         reduction PHIs.
14348         (vect_force_simple_reduction): Record reduction def -> phi mapping.
14349         (vectorizable_reduction): Perform reduction PHI creation when
14350         visiting a reduction PHI and adjust and simplify code generation
14351         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
14352         (vect_transform_loop): Visit reduction PHIs.
14353         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
14354         defs into the SLP tree.
14355         (vect_build_slp_tree): Reduction defs terminate the recursion.
14356         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
14357         of reduction defs.
14358         (vect_get_vec_defs_for_stmt_copy): Export.
14359         (vect_get_vec_defs): Likewise.
14360         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
14361         purpose.
14362         (vect_get_vec_defs_for_stmt_copy): Declare.
14363         (vect_get_vec_defs): Likewise.
14365 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14367         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
14368         parameter with a "loop" parameter and use it instead of the
14369         loop containing DR_STMT.  Don't check simple_iv when doing
14370         BB analysis.  Describe the two analysis modes in the comment.
14372 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14374         PR tree-optimization/69468
14375         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
14376         (find_same_succ_bb): Handle ignore_edge_flags.
14378 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14380         PR tree-optimization/81192
14381         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
14382         hash.
14383         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
14384         differs.
14385         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
14387 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14389         PR tree-optimization/81192
14390         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
14391         BB_SAME_SUCC (bb) == NULL.
14393 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14395         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
14396         consistency.
14398 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14400         * dumpfile.c: Include profile-count.h
14401         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
14402         update profile.
14403         (insert_cond_bb): Update profile.
14404         * tree-cfg.h (insert_cond_bb): Update prototype.
14405         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
14406         * tree-dump.c: Do not include tree-cfg.
14408 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14410         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
14412 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14414         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
14415         bb.
14417 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14419         * tree-complex.c (expand_complex_div_wide): update profile.
14421 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14422             Alan Hayward  <alan.hayward@arm.com>
14423             David Sherwood  <david.sherwood@arm.com>
14425         * Makefile.in (MACHMODE_H): Remove insn-modes.h
14426         (CORETYPES_H): New define.
14427         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
14428         (insn-modes-inline.h, s-modes-inline-h): New rules.
14429         (generated_files): Add insn-modes-inline.h.
14430         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
14431         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
14432         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
14433         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
14434         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
14435         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
14436         (build/gencodes.o, build/genconditions.o): Likewise.
14437         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
14438         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
14439         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
14440         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
14441         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
14442         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
14443         * coretypes.h: Include everything up to real.h for generators.
14444         Include insn-modes.h first.  Include wide-int-print.h after
14445         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
14446         * machmode.h: Don't include insn-modes.h here.
14447         * function-tests.c: Remove includes of signop.h, machmode.h,
14448         double-int.h and wide-int.h.
14449         * rtl.h: Likewise.
14450         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
14451         and wide-int.h.
14452         * optc-save-gen.awk: Likewise.
14453         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
14454         * godump.c: Remove include of wide-int-print.h.
14455         * pretty-print.h: Likewise.
14456         * wide-int-print.cc: Likewise.
14457         * wide-int.cc: Likewise.
14458         * hash-map-tests.c: Remove include of signop.h.
14459         * hash-set-tests.c: Likewise.
14460         * rtl-tests.c: Likewise.
14461         * mkconfig.sh: Remove include of machmode.h.
14462         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
14463         into...
14464         (emit_insn_modes_inline_h): ...this new function.  Emit the code
14465         into an insn-modes-inline.h header file, adding appropriate
14466         include guards and end comments.
14467         (emit_insn_modes_c_header): Remove include of machmode.h.
14468         (emit_min_insn_modes_c_header): Include coretypes.h rather than
14469         machmode.h.
14470         (main): Handle -i flag and call emit_insn_modes_inline_h when
14471         it is passed.
14473 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14475         * tree-ssa-strlen.c (strinfo): Rename the length field to
14476         nonzero_chars.  Add a full_string_p field.
14477         (compare_nonzero_chars, zero_length_string_p): New functions.
14478         (get_addr_stridx): Add an offset_out parameter.
14479         Use compare_nonzero_chars.
14480         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
14481         (new_strinfo): Update after above changes to strinfo.
14482         (set_endptr_and_length): Set full_string_p.
14483         (get_string_length): Update after above changes to strinfo.
14484         (unshare_strinfo): Update call to new_strinfo.
14485         (maybe_invalidate): Likewise.
14486         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
14487         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
14488         as a uhwi instead of an shwi.  Update after above changes to
14489         strinfo and new_strinfo.
14490         (zero_length_string): Assert that chainsi contains full strings.
14491         Use zero_length_string_p.  Update call to new_strinfo.
14492         (adjust_related_strinfos): Update after above changes to strinfo.
14493         Copy full_string_p from origsi.
14494         (adjust_last_stmt): Use zero_length_string_p.
14495         (handle_builtin_strlen): Update after above changes to strinfo and
14496         new_strinfo.  Install the lhs as the string length if the previous
14497         entry didn't describe a full string.
14498         (handle_builtin_strchr): Update after above changes to strinfo
14499         and new_strinfo.
14500         (handle_builtin_strcpy): Likewise.
14501         (handle_builtin_strcat): Likewise.
14502         (handle_builtin_malloc): Likewise.
14503         (handle_pointer_plus): Likewise.
14504         (handle_builtin_memcpy): Likewise.  Track nonzero characters
14505         that aren't necessarily followed by a nul terminator.
14506         (handle_char_store): Likewise.
14508 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14510         PR tree-optimization/80769
14511         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
14512         for malloc and calloc.  Document the new invariant that all related
14513         strinfos have delayed lengths or none do.
14514         (verify_related_strinfos): Move earlier in file.
14515         (set_endptr_and_length): New function, split out from...
14516         (get_string_length): ...here.  Also set the lengths of related
14517         strinfos.
14518         (zero_length_string): Assert that chainsi has known (rather than
14519         delayed) lengths.
14520         (adjust_related_strinfos): Likewise.
14522 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14524         PR tree-optimization/81136
14525         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
14526         assert that two references with the same misalignment have the same
14527         compile-time misalignment if those compile-time misalignments
14528         are known.
14530 2017-07-01  Andi Kleen  <ak@linux.intel.com>
14532         * print-tree.c (print_node): Print all attributes.
14534 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14536         * cfg.c (scale_bbs_frequencies): New function.
14537         * cfg.h (scale_bbs_frequencies): Declare it.
14538         * cfgloopanal.c (single_likely_exit): Cleanup.
14539         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
14540         as parameter.
14541         (scale_loop_profile): Likewise.
14542         (loop_version): Likewise.
14543         (create_empty_loop_on_edge): Update.
14544         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
14545         scale_loop_frequencies, scale_loop_profile, loopify,
14546         loop_version): Update prototypes.
14547         * modulo-sched.c (sms_schedule): Update.
14548         * predict.c (unlikely_executed_edge_p): Also check probability.
14549         (probably_never_executed_edge_p): Fix typo.
14550         * tree-if-conv.c (version_loop_for_if_conversion): Update.
14551         * tree-parloops.c (gen_parallel_loop): Update.
14552         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
14553         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
14554         * tree-ssa-loop-split.c (split_loop): Update.
14555         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
14556         * tree-vect-loop-manip.c (vect_do_peeling): Update.
14557         (vect_loop_versioning): Update.
14558         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
14560 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14562         * trans-mem.c (split_bb_make_tm_edge): Update profile.
14564 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14566         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
14567         to keep profile consistent.
14569 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14571         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
14572         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
14573         * profile-count.h (max_safe_multiplier): Make unsigned.
14574         (profile_count::guessed_zero): New.
14576 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14578         * bb-reorder.c (fix_up_crossing_landing_pad,
14579         fix_crossing_conditional_branches): Use make_single_succ_edge
14580         to keep profile consistent.
14582 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14584         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
14585         to update profile.
14587 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
14589         PR sanitizer/81262
14590         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
14591         the right scopes, make sure cond_jump isn't preserved between multiple
14592         iterations.  Search for fallthru edge whenever there are 3+ edges and
14593         use find_fallthru_edge for it.
14595 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14597         Patch by Alexander Monakov <amonakov@ispras.ru>
14598         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
14599         probabilities consistently.
14601 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14603         * pa.c (pa_expand_compare_and_swap_loop): Update call of
14604         emit_cmp_and_jump_insns.
14606 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14608         PR ipa/81261
14609         * tree-inline.c (expand_call_inline): Combine profile statuses.
14611 2017-06-30  Andrew Pinski  <apinski@cavium.com>
14613         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
14614         fold_stmt returned true.
14616 2017-06-30  Nathan Sidwell  <nathan@acm.org>
14618         * ggc.h (empty_string): Delete.
14619         * cfgexpand.c (expand_asm_stmt): Use plain "".
14620         * optabs.c (expand_asm_memory_barrier): Likewise.
14621         * stringpool.c (empty_string): Delete.
14622         (digit_vector, digit_string): Delete.
14623         (ggc_alloc_string): Use plain "", don't optimize single digit
14624         strings.  Use ggc_alloc_atomic.
14626 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
14628         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
14629         comparison set and one other set, use the cost of the non-comparison
14630         set.
14632 2017-06-30  Nathan Sidwell  <nathan@acm.org>
14634         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
14635         some formatting.
14637 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
14639         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
14640         loops.  Remove now unneeded calls to gimple_switch_set_label() that
14641         just set removed labels to NULL_TREE.
14643 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
14645         * tree-ssanames.c (set_range_info_raw): Abstract from ...
14646         (set_range_info): ...here.  Only call set_range_info_raw if domain
14647         is useful.
14648         (set_nonzero_bits): Call set_range_info_raw.
14649         * tree-ssanames.h (set_range_info_raw): New.
14651 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
14653         PR target/81225
14654         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
14655         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
14656         of nonimmediate_operand and <store_mask_constraint> instead of m
14657         for the input operand.  For V8FI iterator, always split if input
14658         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
14659         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
14660         <store_mask_predicate> instead of register_operand and
14661         <store_mask_constraint> instead of v for the input operand.  Make
14662         sure both operands aren't MEMs for if not <mask_applied>.
14664 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
14666         * lto-wrapper.c (copy_file) Close both file descriptors before
14667         exiting normally.
14669 2017-06-30  Martin Liska  <mliska@suse.cz>
14671         PR ipa/81214
14672         * multiple_target.c (create_dispatcher_calls): Make ifunc
14673         also for function that don't have calls or are not referenced.
14675 2017-06-30  Richard Biener  <rguenther@suse.de>
14677         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
14678         analyze the first scalar stmt.  Move vector type computation
14679         for the BB case here from ...
14680         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
14681         live operation processing in the SLP case properly.
14683 2017-06-30  Richard Biener  <rguenther@suse.de>
14685         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
14687 2017-06-30  Martin Liska  <mliska@suse.cz>
14689         PR sanitizer/81021
14690         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
14691         before BUILT_IN_UNWIND_RESUME when ASAN is used.
14693 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
14695         * doc/invoke.texi (AArch64): Add missing options and remove redundant
14696         ones.
14698 2017-06-30  Richard Biener  <rguenther@suse.de>
14700         PR tree-optimization/81249
14701         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
14702         condition reduction result to original scalar type.
14704 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14706         * profile-count.h (enum profile_quality): Fix typos and whitespace
14707         issues.
14709 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14711         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
14712         type for branch probabilities.
14714 2017-06-29  Julian Brown  <julian@codesourcery.com>
14715             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
14717         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
14718         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
14719         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
14720         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
14722 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
14724         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
14725         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
14726         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
14727         CC usage from generic code to here.
14728         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
14729         CC usage into the target macros.
14731 2017-06-29  Maya Rashish  <coypu@sdf.org>
14733         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
14734         objects.
14736 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14738         * arm/arm-builtins.c: Include profile-count.h
14739         * except.c (sjlj_emit_function_enter): Use
14740         profile_probability::unlikely.
14742 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14744         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
14745         and tocrel_offset be pointer args rather than implicitly using
14746         static versions.
14747         (legitimate_constant_pool_address_p, rs6000_emit_move,
14748         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
14749         tocrel_offset and use in toc_relative_expr_p call.
14750         (print_operand, print_operand_address): Use static tocrel_base_oac
14751         and tocrel_offset_oac.
14752         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
14753         tocrel_offset_oac.
14755 2017-06-29  Maya Rashish  <coypu@sdf.org>
14757         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
14759 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
14761         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
14762         objects, take into account only the alignment of 'op0' and 'mode1' if
14763         'op0' is a MEM.
14765 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
14767         * ccmp.c (ccmp_tree_comparison_p): New function.
14768         (ccmp_candidate_p): Update to use above function.
14769         (get_compare_parts): New function.
14770         (expand_ccmp_next): Update to use new functions.
14771         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
14772         new functions.
14773         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
14774         take mode as argument.
14775         * ccmp.h (expand_ccmp_expr): Add mode as argument.
14776         * expr.c (expand_expr_real_1): Pass mode as argument.
14778 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
14780         * combine.c (combine_instructions): Print insns to dump_file, together
14781         with their costs.
14783 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14785         * asan.c (asan_emit_stack_protection): Update.
14786         (create_cond_insert_point): Update.
14787         * auto-profile.c (afdo_propagate_circuit): Update.
14788         * basic-block.h (struct edge_def): Turn probability to
14789         profile_probability.
14790         (EDGE_FREQUENCY): Update.
14791         * bb-reorder.c (find_traces_1_round): Update.
14792         (better_edge_p): Update.
14793         (sanitize_hot_paths): Update.
14794         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
14795         (make_single_succ_edge): Update.
14796         (check_bb_profile): Update.
14797         (dump_edge_info): Update.
14798         (update_bb_profile_for_threading): Update.
14799         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
14800         probabilitycount to 0.
14801         * cfgbuild.c (compute_outgoing_frequencies): Update.
14802         * cfgcleanup.c (try_forward_edges): Update.
14803         (outgoing_edges_match): Update.
14804         (try_crossjump_to_edge): Update.
14805         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
14806         (expand_gimple_tailcall): Update.
14807         (construct_init_block): Use make_single_succ_edge.
14808         (construct_exit_block): Use make_single_succ_edge.
14809         * cfghooks.c (verify_flow_info): Update.
14810         (redirect_edge_succ_nodup): Update.
14811         (split_edge): Update.
14812         (account_profile_record): Update.
14813         * cfgloopanal.c (single_likely_exit): Update.
14814         * cfgloopmanip.c (scale_loop_profile): Update.
14815         (set_zero_probability): Remove.
14816         (duplicate_loop_to_header_edge): Update.
14817         * cfgloopmanip.h (loop_version): Update prototype.
14818         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
14819         (force_nonfallthru_and_redirect): Update.
14820         (update_br_prob_note): Update.
14821         (rtl_verify_edges): Update.
14822         (purge_dead_edges): Update.
14823         (rtl_lv_add_condition_to_bb): Update.
14824         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
14825         * cgraphunit.c (init_lowered_empty_function): Update.
14826         (cgraph_node::expand_thunk): Update.
14827         * cilk-common.c: Include profile-count.h
14828         * dojump.c (inv): Remove.
14829         (jumpifnot): Update.
14830         (jumpifnot_1): Update.
14831         (do_jump_1): Update.
14832         (do_jump): Update.
14833         (do_jump_by_parts_greater_rtx): Update.
14834         (do_compare_rtx_and_jump): Update.
14835         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
14836         do_jump_1. do_compare_rtx_and_jump): Update prototype.
14837         * dwarf2cfi.c: Include profile-count.h
14838         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
14839         (sjlj_emit_dispatch_table): Likewise.
14840         * explow.c: Include profile-count.h
14841         * expmed.c (emit_store_flag_force): Update.
14842         (do_cmp_and_jump): Update.
14843         * expr.c (compare_by_pieces_d::generate): Update.
14844         (compare_by_pieces_d::finish_mode): Update.
14845         (emit_block_move_via_loop): Update.
14846         (store_expr_with_bounds): Update.
14847         (store_constructor): Update.
14848         (expand_expr_real_2): Update.
14849         (expand_expr_real_1): Update.
14850         * expr.h (try_casesi, try_tablejump): Update prototypes.
14851         * gimple-pretty-print.c (dump_probability): Update.
14852         (dump_profile): New.
14853         (dump_gimple_label): Update.
14854         (dump_gimple_bb_header): Update.
14855         * graph.c (draw_cfg_node_succ_edges): Update.
14856         * hsa-gen.c (convert_switch_statements): Update.
14857         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
14858         (find_if_case_1): Update.
14859         (find_if_case_2): Update.
14860         * internal-fn.c (expand_arith_overflow_result_store): Update.
14861         (expand_addsub_overflow): Update.
14862         (expand_neg_overflow): Update.
14863         (expand_mul_overflow): Update.
14864         (expand_vector_ubsan_overflow): Update.
14865         * ipa-cp.c (good_cloning_opportunity_p): Update.
14866         * ipa-split.c (split_function): Use make_single_succ_edge.
14867         * ipa-utils.c (ipa_merge_profiles): Update.
14868         * loop-doloop.c (add_test): Update.
14869         (doloop_modify): Update.
14870         * loop-unroll.c (compare_and_jump_seq): Update.
14871         (unroll_loop_runtime_iterations): Update.
14872         * lra-constraints.c (lra_inheritance): Update.
14873         * lto-streamer-in.c (input_cfg): Update.
14874         * lto-streamer-out.c (output_cfg): Update.
14875         * mcf.c (adjust_cfg_counts): Update.
14876         * modulo-sched.c (sms_schedule): Update.
14877         * omp-expand.c (expand_omp_for_init_counts): Update.
14878         (extract_omp_for_update_vars): Update.
14879         (expand_omp_ordered_sink): Update.
14880         (expand_omp_for_ordered_loops): Update.
14881         (expand_omp_for_generic): Update.
14882         (expand_omp_for_static_nochunk): Update.
14883         (expand_omp_for_static_chunk): Update.
14884         (expand_cilk_for): Update.
14885         (expand_omp_simd): Update.
14886         (expand_omp_taskloop_for_outer): Update.
14887         (expand_omp_taskloop_for_inner): Update.
14888         * omp-simd-clone.c (simd_clone_adjust): Update.
14889         * optabs.c (expand_doubleword_shift): Update.
14890         (expand_abs): Update.
14891         (emit_cmp_and_jump_insn_1): Update.
14892         (expand_compare_and_swap_loop): Update.
14893         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
14894         * predict.c (predictable_edge_p): Update.
14895         (edge_probability_reliable_p): Update.
14896         (set_even_probabilities): Update.
14897         (combine_predictions_for_insn): Update.
14898         (combine_predictions_for_bb): Update.
14899         (propagate_freq): Update.
14900         (estimate_bb_frequencies): Update.
14901         (force_edge_cold): Update.
14902         * profile-count.c (profile_count::dump): Add missing space into dump.
14903         (profile_count::debug): Add newline.
14904         (profile_count::differs_from_p): Explicitly convert to unsigned.
14905         (profile_count::stream_in): Update.
14906         (profile_probability::dump): New member function.
14907         (profile_probability::debug): New member function.
14908         (profile_probability::differs_from_p): New member function.
14909         (profile_probability::differs_lot_from_p): New member function.
14910         (profile_probability::stream_in): New member function.
14911         (profile_probability::stream_out): New member function.
14912         * profile-count.h (profile_count_quality): Rename to ...
14913         (profile_quality): ... this one.
14914         (profile_probability): New.
14915         (profile_count): Update.
14916         * profile.c (compute_branch_probabilities): Update.
14917         * recog.c (peep2_attempt): Update.
14918         * sched-ebb.c (schedule_ebbs): Update.
14919         * sched-rgn.c (find_single_block_region): Update.
14920         (compute_dom_prob_ps): Update.
14921         (schedule_region): Update.
14922         * sel-sched-ir.c (compute_succs_info): Update.
14923         * stmt.c (struct case_node): Update.
14924         (do_jump_if_equal): Update.
14925         (get_outgoing_edge_probs): Update.
14926         (conditional_probability): Update.
14927         (emit_case_dispatch_table): Update.
14928         (expand_case): Update.
14929         (expand_sjlj_dispatch_table): Update.
14930         (emit_case_nodes): Update.
14931         * targhooks.c: Update.
14932         * tracer.c (better_p): Update.
14933         (find_best_successor): Update.
14934         * trans-mem.c (expand_transaction): Update.
14935         * tree-call-cdce.c: Update.
14936         * tree-cfg.c (gimple_split_edge): Upate.
14937         (move_sese_region_to_fn): Upate.
14938         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
14939         * tree-eh.c (lower_resx): Upate.
14940         (cleanup_empty_eh_move_lp): Upate.
14941         * tree-if-conv.c (version_loop_for_if_conversion): Update.
14942         * tree-inline.c (copy_edges_for_bb): Update.
14943         (copy_cfg_body): Update.
14944         * tree-parloops.c (gen_parallel_loop): Update.
14945         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
14946         (gimple_gen_time_profiler): Update.
14947         * tree-ssa-dce.c (remove_dead_stmt): Update.
14948         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
14949         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
14950         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
14951         (unloop_loops): Update.
14952         (try_peel_loop): Update.
14953         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
14954         * tree-ssa-loop-split.c (connect_loops): Update.
14955         (split_loop): Update.
14956         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
14957         (hoist_guard): Update.
14958         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
14959         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
14960         (value_replacement): Update.
14961         * tree-ssa-reassoc.c (branch_fixup): Update.
14962         * tree-ssa-tail-merge.c (replace_block_by): Update.
14963         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
14964         (create_edge_and_update_destination_phis): Update.
14965         (compute_path_counts): Update.
14966         (recompute_probabilities): Update.
14967         (update_joiner_offpath_counts): Update.
14968         (freqs_to_counts_path): Update.
14969         (duplicate_thread_path): Update.
14970         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
14971         (struct switch_conv_info): Update.
14972         (gen_inbound_check): Update.
14973         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
14974         (vect_do_peeling): Update.
14975         (vect_loop_versioning): Update.
14976         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
14977         (optimize_mask_stores): Update.
14978         * ubsan.c (ubsan_expand_null_ifn): Update.
14979         * value-prof.c (gimple_divmod_fixed_value): Update.
14980         (gimple_divmod_fixed_value_transform): Update.
14981         (gimple_mod_pow2): Update.
14982         (gimple_mod_pow2_value_transform): Update.
14983         (gimple_mod_subtract): Update.
14984         (gimple_mod_subtract_transform): Update.
14985         (gimple_ic): Update.
14986         (gimple_stringop_fixed_value): Update.
14987         (gimple_stringops_transform): Update.
14988         * value-prof.h: Update.
14990 2017-06-29  Carl Love  <cel@us.ibm.com>
14992         * config/rs6000/rs6000-c.c: Add support for built-in functions
14993         vector signed int vec_signed (vector float);
14994         vector signed long long vec_signed (vector double);
14995         vector signed int vec_signed2 (vector double, vector double);
14996         vector signed int vec_signede (vector double);
14997         vector signed int vec_signedo (vector double);
14998         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
14999         instruction generator.
15000         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
15001         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
15002         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
15003         Add define_insn.
15004         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
15005         vunsignede_v2df): Add define_expands.
15006         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
15007         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
15008         VEC_UNSIGNEDO): Add definitions.
15009         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
15010         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
15011         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
15012         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
15013         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
15014         * config/rs6000/altivec.h (vec_signed, vec_signed2,
15015         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
15016         vec_unsignede, vec_unsignedo): Add builtin defines.
15017         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
15018         declaration.
15019         * doc/extend.texi: Update the built-in documentation file for the
15020         new built-in functions.
15022 2017-06-29  Richard Biener  <rguenther@suse.de>
15024         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
15025         reduction chains to LOOP_VINFO_REDUCTIONS.
15026         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
15027         SLP reductions after processing reduction chains.
15029 2017-06-29  Nathan Sidwell  <nathan@acm.org>
15031         * builtins.c (fold_builtin_FUNCTION): Use
15032         lang_hooks.decl_printable_name.
15034 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
15036         PR middle-end/81194
15037         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
15038         with only one label.
15039         * stmt.c (expand_case): Assert NCASES is greater than one.
15041 2017-06-29  Richard Biener  <rguenther@suse.de>
15043         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
15044         anything.
15045         (group_case_labels): Likewise.
15046         (find_taken_edge): Push sanity checking on val to workers...
15047         (find_taken_edge_cond_expr): ... here
15048         (find_taken_edge_switch_expr): ... and here, handle cases
15049         with just a default label.
15050         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
15051         (group_case_labels): Likewise.
15052         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
15053         group_case_labels does anything cleanup the CFG again.
15055 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
15057         PR tree-optimization/81196
15058         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
15059         exit condition comparing two IVs.
15061 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
15063         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
15064         profile to the dummy entry at the end of the list of architectures.
15065         * config/arm/arm-cpu-cdata.h: Regenerated.
15067 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15068             Michael Collison <michael.collison@arm.com>
15070         PR target/70119
15071         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
15072         New pattern.
15073         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
15074         (*aarch64_reg_<mode>3_minus_mask): New pattern.
15075         (*aarch64_<optab>_reg_di3_mask2): New pattern.
15076         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
15077         of shift when the shift amount is masked with constant equal to
15078         the size of the mode.
15079         * config/aarch64/predicates.md (subreg_lowpart_operator): New
15080         predicate.
15082 2017-06-29  Martin Liska  <mliska@suse.cz>
15084         * config/i386/i386.opt: Change range from [1,5] to [0,5].
15086 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
15088         PR bootstrap/80565
15089         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
15090         code.
15091         * ipa-inline.h
15092         (edge_growth_cache_entry::edge_growth_cache_entry): New
15093         function.
15094         (reset_edge_growth_cache): Update to use constructor.
15096 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15098         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
15099         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
15100         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
15102 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
15104         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
15105         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
15107 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
15109         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
15110         (*-linux-uclibc*): Add t-uclibc tmake_file.
15111         * config/t-musl: New.
15112         * config/t-uclibc: New.
15114 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
15116         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
15117         context.
15118         (gen_comm_data): Emit architectural setting of arch_prof.
15119         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
15120         profile.
15121         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
15122         (armv8-m.base, armv8-m.main): Likewise.
15123         * arm-protos.h (arm_build_target): Add profile field.
15124         (arch_option): Likewise.
15125         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
15126         the active target.
15127         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
15128         arm_active_target.profile.
15130 2017-06-28  Richard Biener  <rguenther@suse.de>
15132         PR middle-end/81227
15133         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
15134         TYPE_OVERFLOW_WRAPS.
15135         * match.pd (negate_expr_p): Likewise.
15136         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
15137         fold_build2, not fold_binary.
15139 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
15141         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
15142         Convert memory address to Pmode.
15143         (aarch64_print_operand): Assert MEM operands are always Pmode.
15145 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
15147         PR target/79665
15148         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
15149         Remove redundant if.
15150         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
15151         * config/arm/aarch-common-protos.h
15152         (aarch_forward_to_shift_is_not_shifted_re): Remove.
15153         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
15155 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
15157         PR ipa/81238
15158         * multiple_target.c (create_dispatcher_calls): Set the default
15159         clone to be static, not public.
15161 2017-06-28  Richard Biener  <rguenther@suse.de>
15163         * tree-vect-loop.c (vectorizable_reduction): Move special
15164         cond reduction IV var creation ...
15165         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
15166         parameter.  Use STMT_VINFO_VECTYPE.
15167         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
15168         constant_p.
15170 2017-06-28  Martin Liska  <mliska@suse.cz>
15172         PR ipa/81128
15173         * ipa-visibility.c (non_local_p): Handle visibility.
15175 2017-06-28  Martin Liska  <mliska@suse.cz>
15177         PR driver/79659
15178         * common.opt: Add IntegerRange to various options.
15179         * opt-functions.awk (integer_range_info): New function.
15180         * optc-gen.awk: Add integer_range_info to cl_options struct.
15181         * opts-common.c (decode_cmdline_option): Handle
15182         CL_ERR_INT_RANGE_ARG.
15183         (cmdline_handle_error): Likewise.
15184         * opts.c (print_filtered_help): Show valid interval in
15185         when --help is provided.
15186         * opts.h (struct cl_option): Add range_min and range_max fields.
15187         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
15189 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
15191         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
15192         (x * C EQ/NE y * C): New transformation.
15194 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
15196         * genmultilib (combination_space): Accept '+' in option names.
15198 2017-06-28  Martin Liska  <mliska@suse.cz>
15200         PR sanitizer/81224
15201         * asan.c (instrument_derefs): Bail out inner references
15202         that are hard register variables.
15204 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
15206         PR target/81175
15207         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
15208         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
15210 2017-06-28  Richard Biener  <rguenther@suse.de>
15212         * tree-vectorizer.h (vect_get_vec_defs): Remove.
15213         (vect_get_slp_defs): Adjust.
15214         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
15215         out from ...
15216         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
15217         simplify.
15218         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
15219         get_initial_defs_for_reduction instead of vect_get_vec_defs.
15220         (vectorizable_reduction): Adjust.
15221         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
15222         handling.
15223         (vect_get_slp_defs): Likewise.
15224         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
15225         (vectorizable_bswap): Adjust.
15226         (vectorizable_call): Likewise.
15227         (vectorizable_conversion): Likewise.
15228         (vectorizable_assignment): Likewise.
15229         (vectorizable_shift): Likewise.
15230         (vectorizable_operation): Likewise.
15231         (vectorizable_store): Likewise.
15232         (vectorizable_condition): Likewise.
15233         (vectorizable_comparison): Likewise.
15235 2017-06-28  Michael Collison  <michael.collison@arm.com>
15237         PR target/68535
15238         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
15239         set of base_reg
15240         (arm_gen_movmemqi): Removed unused variable 'i'.
15241         Convert 'for' loop into 'while' loop.
15242         (arm_expand_prologue): Remove last unnecessary set of insn.
15243         (thumb_pop): Remove unused variable 'pushed_words'.
15244         (thumb_exit): Remove last unnecessary set of regs_to_pop.
15246 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15248         * config/s390/predicates.md: Use s390_rel_address_ok_p.
15249         * config/s390/s390-protos.h: Add prototype of
15250         s390_rel_address_ok_p.
15251         * config/s390/s390.c (s390_got_symbol): New function.
15252         (s390_rel_address_ok_p): New function.
15253         (legitimize_pic_address): Use s390_rel_address_ok_p.
15254         (s390_load_got): Use s390_got_symbol.
15255         (s390_option_override): Issue error if
15256         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
15257         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
15258         New macro.
15259         * config/s390/s390.opt: New option mpic-data-is-text-relative.
15261 2017-06-27  Andrew Pinski  <apinski@cavium.com>
15263         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
15264         (X * copysign (1.0, X)): New pattern.
15265         (X * copysign (1.0, -X)): New pattern.
15266         (copysign (-1.0, CST)): New pattern.
15268 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
15270         * genmultilib (combination_space): Remove variable.
15271         Validate reuse rules against regular expression for any sequence
15272         of multilib options in any order.
15274 2017-06-27  Michael Collison  <michael.collison@arm.com>
15276         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
15277         call aarch64_split_simd_combine.
15278         * (aarch64_combine_internal<mode>): Delete pattern.
15279         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
15280         Allow register and subreg operands.
15282 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15284         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
15285         specific need, just fallback on defaults.
15286         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
15288 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15289             Olivier Hainque  <hainque@adacore.com>
15291         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
15292         map for 64bits.
15293         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
15294         targets. Pick a default if no particular attempt applied.
15295         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
15296         larger contexts.
15298 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15300         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
15301         (x86_64-wrs-vxworks7): Likewise.
15303 2017-06-27  Marek Polacek  <polacek@redhat.com>
15305         PR sanitizer/81223
15306         * ubsan.c (instrument_null): Check get_base_address's result for null.
15308 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
15310         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
15312 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
15314         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
15315         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
15316         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
15317         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
15318         New function types.
15319         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
15320         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
15321         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
15322         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
15323         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
15324         BUILT_IN_FEUPDATEENV): New builtins.
15325         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
15326         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
15327         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
15328         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
15329         macros.
15330         (builtin_structptr_types): Adjust size.
15331         * tree.c (builtin_structptr_types): Add four entries.
15333 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15334             Olivier Hainque  <hainque@adacore.com>
15336         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
15337         (TLS_SYM): New local macro, forcing reference to __tls__ on
15338         link command lines for VxWorks 7 RTPs, triggering initialization
15339         of tlsLib.
15340         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
15341         OS features TLS support, true for RTPs on VxWorks 7.
15342         * config/vxworks.c (vxworks_override_options): Setup emutls
15343         accordingly.
15345 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
15347         * predict.c (test_prediction_value_range): Use -1U instead of -1
15348         to avoid narrowing conversion warning.
15349         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
15350         to avoid narrowing conversion warning.
15351         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
15352         -1.
15353         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
15355 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15357         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
15358         64bit configurations.
15359         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
15360         (SIZE_TYPE): Likewise.
15361         * config/vxworks.c (vxworks_emutls_var_fields): Use
15362         long_unsigned_type_node instead of unsigned_type_node as the offset
15363         field type, which is "pointer" mode in emutls.c.
15365 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
15367         PR sanitizer/81209
15368         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
15370         PR middle-end/81207
15371         * gimple-fold.c (replace_call_with_call_and_fold): Handle
15372         gimple_vuse copying separately from gimple_vdef copying.
15374 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15376         * value-prof.c (free_hist): Remove call to memset and the enclosing if
15377         condition.
15379 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
15380             Olivier Hainque  <hainque@adacore.com>
15382         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
15383         for all vxworks7 targets.
15384         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
15385         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
15386         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
15387         variations for VX6/VX7 and 32/64bits later on in ...
15388         (VXWORKS_LIB_SPEC): Leverage new macros.
15389         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
15390         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
15392 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
15394         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
15395         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
15397 2017-06-26  Carl Love  <cel@us.ibm.com>
15399         * config/rs6000/rs6000-c.c: Add support for built-in functions
15400         vector bool char vec_reve (vector bool char);
15401         vector signed char vec_reve (vector signed char);
15402         vector unsigned char vec_reve (vector unsigned char);
15403         vector bool int vec_reve (vector bool int);
15404         vector signed int vec_reve (vector signed int);
15405         vector unsigned int vec_reve (vector unsigned int);
15406         vector bool long long vec_reve (vector bool long long);
15407         vector signed long long vec_reve (vector signed long long);
15408         vector unsigned long long vec_reve (vector unsigned long long);
15409         vector bool short vec_reve (vector bool short);
15410         vector signed short vec_reve (vector signed short);
15411         vector double vec_reve (vector double);
15412         vector float vec_reve (vector float);
15413         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
15414         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
15415         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
15416         (altivec_vreve): New pattern.
15417         * config/rs6000/altivec.h (vec_reve): New define.
15418         * doc/extend.texi (vec_rev): Update the built-in documentation file
15419         for the new built-in functions.
15421 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15423         PR tree-optimization/71815
15424         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
15425         function.
15426         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
15427         has_single_use.
15428         (slsr_process_phi): Likewise.
15429         (replace_uncond_cands_and_profitable_phis): Don't replace a
15430         multiply candidate with a stride of 1 (copy or cast).
15431         (phi_incr_cost): Call uses_consumed_by_stmt rather than
15432         has_single_use.
15433         (lowest_cost_path): Likewise.
15434         (total_savings): Likewise.
15436 2017-06-26  Richard Biener  <rguenther@suse.de>
15438         PR target/81175
15439         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
15440         Use def_builtin_pure for all gather builtins.
15442 2017-06-26  Richard Biener  <rguenther@suse.de>
15444         PR tree-optimization/81203
15445         * tree-tailcall.c (find_tail_calls): Do not move stmts into
15446         non-dominating BBs.
15448 2017-06-26  Marek Polacek  <polacek@redhat.com>
15450         PR c/80116
15451         * doc/invoke.texi: Document -Wmultistatement-macros.
15453 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
15455         * doc/sourcebuild.texi (ARM-specific attributes): Document new
15456         arm_neon_ok_no_float_abi effective target.
15458 2017-06-26  Richard Biener  <rguenther@suse.de>
15460         PR tree-optimization/80928
15461         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
15462         (copy_bbs): Set BB_DUPLICATED flag early.
15463         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
15464         marked blocks.
15465         (execute_on_shrinking_pred): Likewise.
15466         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
15467         BB_DUPLICATED blocks.
15468         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
15469         iterate over all PHIs considering removal of *gsi.
15471 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
15473         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
15474         qdf24xx.
15476 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15478         * config/rs6000/rs6000-string.c: (expand_block_clear,
15479         do_load_for_compare, select_block_compare_mode,
15480         compute_current_alignment, expand_block_compare,
15481         expand_strncmp_align_check, expand_strn_compare,
15482         expand_block_move, rs6000_output_load_multiple)
15483         Move functions related to string/block move/compare
15484         to a separate file.
15485         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
15486         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
15487         for this function which is now used in two files.
15488         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
15489         * config.gcc: Add rs6000-string.o to extra_objs for
15490         targets powerpc*-*-* and rs6000*-*-*.
15492 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
15494         PR target/80510
15495         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
15496         32-bit, since indexed is not valid for DImode.
15497         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
15498         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
15499         (define_peephole2 for Altivec d-form load): Add 32-bit support.
15500         (define_peephole2 for Altivec d-form store): Likewise.
15502         PR ipa/81185
15503         * multiple_target.c (create_dispatcher_calls): Only create the
15504         dispatcher call if the function is the default clone of a
15505         versioned function.
15507 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
15509         PR middle-end/80902
15510         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
15511         a call, force the call to not be a tail call.
15513 2017-06-23  Jeff Law  <law@redhat.com>
15515         * doc/contrib.texi: Add entry for Steven Pemberton's work on
15516         enquire.
15518 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
15520         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
15521         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
15522         handling for early expansion of vector shifts (sl,sr,sra,rl).
15523         (builtin_function_type): Add vector shift right instructions
15524         to the unsigned argument list.
15526 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15528         rtl-optimizatoin/79286
15529         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
15530         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
15531         trap.  PIC register plus a const unspec without offset can never trap.
15533 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
15535         * tree.h (builtin_structptr_type): New type.
15536         (builtin_structptr_types): Declare new array.
15537         * tree.c (builtin_structptr_types): New array.
15538         (free_lang_data, build_common_tree_nodes): Use it.
15540 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
15542         PR c++/81187
15543         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
15544         -Wnoexcept.
15546 2017-06-22  Matt Turner  <mattst88@gmail.com>
15548         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
15549         Lake models to skylake case.  Assume skylake for unknown
15550         models with clflushopt.
15552 2017-06-22  Jeff Law  <law@redhat.com>
15554         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
15555         frame sizes that do not satisfy aarch64_uimm12_shift.
15557 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
15559         * profile-count.h (apply_probability,
15560         apply_scale, probability_in): Fix checks for zero.
15562 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15564         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
15565         * doc/cppdiropts.texi (-I @var{dir}): Document it.
15567 2016-06-22  Richard Biener  <rguenther@suse.de>
15569         * tree-vect-loop.c (vect_model_reduction_cost): Handle
15570         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
15571         REDUC_MAX_EXPR support.
15572         (vectorizable_reduction): Likewise.
15573         (vect_create_epilog_for_reduction): Likewise.
15575 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
15577         * match.pd (A / (1 << B) -> A >> B): New.
15578         * generic-match-head.c: Include optabs-tree.h.
15579         * gimple-match-head.c: Likewise.
15580         * optabs-tree.h (target_supports_op_p): New.
15581         * optabs-tree.c (target_supports_op_p): New.
15583 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15585         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
15586         $gcc_cv_ld --help output.
15587         (gcc_cv_ld_demangle): Likewise.
15588         (gcc_cv_ld_eh_frame_hdr): Likewise.
15589         (gcc_cv_ld_pie): Likewise.
15590         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
15591         (gcc_cv_ld_buildid): Likewise.
15592         (gcc_cv_ld_sysroot): Likewise.
15593         (ld_bndplt_support): Likewise.
15594         (ld_pushpopstate_support): Likewise.
15595         * configure: Regenerate.
15596         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
15598 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
15600         PR target/81151
15601         * config/i386/sse.md (round<mode>2): Renumber match_dup and
15602         operands indexes to avoid gap between operands and match_dups.
15604 2017-06-21  Andrew Pinski  <apinski@cavium.com>
15606         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
15607         Increment Arith_shift and Arith_shift_reg by 1.
15608         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
15609         New tuning flag.
15610         * config/aarch64/aarch64.c (thunderx_tunings): Enable
15611         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
15612         (aarch64_strip_extend): Add new argument and test for it.
15613         (aarch64_cheap_mult_shift_p): New function.
15614         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
15615         add a cost if it is true.
15616         Update calls to aarch64_strip_extend.
15617         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
15619 2017-06-21  Andrew Pinski  <apinski@cavium.com>
15621         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
15622         tunings.
15623         (thunderxt88): Likewise.
15624         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
15625         (thunderx_prefetch_tune): New variable.
15626         (thunderx2t99_prefetch_tune): Update for the correct values.
15627         (thunderxt88_tunings): New variable.
15628         (thunderx_tunings): Use thunderx_prefetch_tune instead of
15629         generic_prefetch_tune.
15630         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
15632 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15634         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
15635         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
15636         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
15637         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
15638         (aarch64_atomic_cas<mode>, GPI): Likewise.
15640 2017-06-21  Martin Liska  <mliska@suse.cz>
15642         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
15643         statements on cold and hot labels.
15644         * predict.c (tree_estimate_probability_bb): Remove the
15645         prediction from this place.
15647 2017-06-21  Martin Liska  <mliska@suse.cz>
15649         PR tree-optimization/79489
15650         * gimplify.c (maybe_add_early_return_predict_stmt): New
15651         function.
15652         (gimplify_return_expr): Call the function.
15653         * predict.c (tree_estimate_probability_bb): Remove handling
15654         of early return.
15655         * predict.def: Update comment about early return predictor.
15656         * gimple-predict.h (is_gimple_predict): New function.
15657         * predict.def: Change default value of early return to 66.
15658         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
15659         statements.
15660         * passes.def: Put pass_strip_predict_hints to the beginning of
15661         IPA passes.
15663 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
15665         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
15666         FUNCTION_DECL declarations.
15667         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
15668         declarations.
15669         (dwaf2out_decl): Likewise.
15670         * godump.c (go_early_global_decl): Skip call to the real debug hook
15671         for FUNCTION_DECL declarations.
15672         * passes.c (rest_of_decl_compilation): Skip call to the
15673         early_global_decl debug hook for FUNCTION_DECL declarations, unless
15674         -fdump-go-spec is passed.
15676 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
15678         * config/i386/i386.c (struct builtin_isa): New field pure_p.
15679         Reorder for compactness.
15680         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
15681         (def_builtin_pure, def_builtin_pure2): New functions.
15682         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
15684 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
15686         * match.pd (nop_convert): New predicate.
15687         ((A +- CST1) +- CST2): Allow some NOP conversions.
15689 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
15691         PR c++/81130
15692         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
15693         with ctors/dtors if GOVD_SHARED is set.
15695 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
15697         * config/aarch64/aarch64.md (movti_aarch64):
15698         Emit mov rather than orr.
15699         (movtf_aarch64): Likewise.
15700         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
15701         Emit mov rather than orr.
15703 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
15705         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
15706         Swap alternatives, make integer dup more expensive.
15708 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
15710         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15711         Return true for non-tls symbols.
15713 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
15715         * config/aarch64/aarch64-cores.def (cortex-a55): New.
15716         (cortex-a75): Likewise.
15717         (cortex-a75.cortex-a55): Likewise.
15718         * config/aarch64/aarch64-tune.md: Regenerate.
15719         * doc/invoke.texi (-mtune): Document new values for -mtune.
15721 2017-06-21  Tom de Vries  <tom@codesourcery.com>
15723         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
15724         stack_size feature.
15725         (Effective-Target Keywords, Other attributes): Suggest using
15726         dg-add-options stack_size feature to get stack limit in stack_size
15727         effective target documentation.
15729 2017-06-21  Julian Brown  <julian@codesourcery.com>
15730             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
15732         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
15733         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
15734         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
15735         reservation.
15736         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
15737         attribute type list for neon_multiply.
15738         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
15739         attribute type list for neon_multiply.
15740         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
15741         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
15742         attribute type list for neon_multiply.
15743         * config/arm/types.md (crypto_pmull): Add.
15744         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
15745         attribute type list.
15747 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
15749         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
15750         arm1176jzf-s.
15752 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
15754         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
15755         to make sure not to dereference a NULL cost_classes_ptr pointer.
15757 2017-06-20  Carl Love  <cel@us.ibm.com>
15759         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15760         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
15761         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
15762         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
15763         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
15764         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
15765         VMULOSW): New enum "unspec" values.
15766         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15767         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
15768         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
15769         altivec_vmulosw): New patterns.
15770         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
15771         VMULOSW): Add definitions.
15773 2017-06-20  Julia Koval  <julia.koval@intel.com>
15775         * config/i386/i386.c: Fix rounding expand for new pattern.
15776         * config/i386/subst.md: Fix pattern (parallel -> unspec).
15778 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
15780         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
15781         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
15783 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
15785         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
15786         feature string.
15788 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
15790         * config/aarch64/aarch64-cores.def: Rearrange to sort by
15791         architecture, then by implementer ID.
15792         * config/aarch64/aarch64-tune.md: Regenerate.
15794 2017-06-20  Richard Biener  <rguenther@suse.de>
15796         PR middle-end/81097
15797         * fold-const.c (split_tree): Fold to type before negating.
15799 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
15801         * diagnostic-show-locus.c
15802         (selftest::test_fixit_deletion_affecting_newline): New function.
15803         (selftest::diagnostic_show_locus_c_tests): Call it.
15805 2017-06-20  Andreas Schwab  <schwab@suse.de>
15807         PR target/80970
15808         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
15809         instead of "+d".
15811 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
15813         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
15814         __ARM_FEATURE_COPROC according to support.
15816 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
15818         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
15819         Rewritten to avoid overflow for > 32-bit pointers.
15821         PR sanitizer/81125
15822         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
15823         by removing enum keyword.
15824         (ubsan_type_descriptor): Likewise.  Formatting fix.
15826         PR target/81121
15827         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
15828         splitter): Require TARGET_SSE2 in the condition.
15830 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
15832         PR target/79799
15833         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
15834         for doing vector set of SFmode on ISA 3.0.
15835         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
15836         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
15837         element.
15838         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
15839         SFmode value into a V4SF variable that was extracted from another
15840         V4SF variable without converting the element to double precision
15841         and back to single precision vector format.
15842         (vsx_insert_extract_v4sf_p9_2): Likewise.
15844 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
15846         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
15847         in UWHI to avoid undefined overflow.
15849         PR sanitizer/81125
15850         * ubsan.h (enum ubsan_encode_value_phase): New.
15851         (ubsan_encode_value): Change second argument to
15852         enum ubsan_encode_value_phase with default value of
15853         UBSAN_ENCODE_VALUE_GENERIC.
15854         * ubsan.c (ubsan_encode_value): Change second argument to
15855         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
15856         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
15857         create_tmp_var_raw instead of create_tmp_var and use a
15858         TARGET_EXPR.
15859         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
15860         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
15861         ubsan_encode_value callers.
15863         PR sanitizer/81111
15864         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
15865         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
15866         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
15868 2017-06-19  Richard Biener  <rguenther@suse.de>
15870         PR middle-end/81118
15871         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
15872         estimates if we changed anything.
15874 2017-06-19  Richard Biener  <rguenther@suse.de>
15876         PR tree-optimization/80887
15877         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
15878         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
15879         simplified lookups, then reset mprts_hook.
15880         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
15881         simplifying.
15882         (try_to_simplify): Likewise.
15884 2017-06-19  Martin Liska  <mliska@suse.cz>
15886         PR sanitizer/80879
15887         * gimplify.c (gimplify_switch_expr):
15888         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
15890 2017-06-19  Martin Liska  <mliska@suse.cz>
15892         * doc/install.texi: Document that PGO runs in 4 stages.
15894 2017-06-19  Martin Liska  <mliska@suse.cz>
15896         PR ipa/80732
15897         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
15898         to dispatcher function name.
15899         * multiple_target.c (replace_function_decl): New function.
15900         (create_dispatcher_calls): Redirect both edges and references.
15902 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
15904         * profile-count.c (profile_count::dump): Dump quality.
15905         (profile_count::differs_from_p): Update for unsigned val.
15906         * profile-count.h (profile_count_quality): New enum.
15907         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
15909 2017-06-19  Richard Biener  <rguenther@suse.de>
15911         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
15912         struct function as arg.
15913         (estimate_numbers_of_iterations): Export overload with loop arg.
15914         (free_numbers_of_iterations_estimates_loop): Use an overload of
15915         free_numbers_of_iterations_estimates instead.
15916         * tree-cfg.c (remove_bb): Adjust.
15917         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
15918         * tree-parloops.c (gen_parallel_loop): Likewise.
15919         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
15920         Likewise.
15921         (tree_unroll_loops_completely): Likewise.
15922         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
15923         Use an overload instead and export.
15924         (estimated_loop_iterations): Adjust.
15925         (max_loop_iterations): Likewise.
15926         (likely_max_loop_iterations): Likewise.
15927         (estimate_numbers_of_iterations): Take struct function as arg
15928         and adjust.
15929         (loop_exits_before_overflow): Adjust.
15930         (free_numbers_of_iterations_estimates_loop): Use an overload.
15931         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
15932         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
15934 2017-06-19  Richard Biener  <rguenther@suse.de>
15936         PR ipa/81112
15937         * ipa-prop.c (find_constructor_constant_at_offset): Handle
15938         RANGE_EXPR conservatively.
15940 2017-06-16  Carl Love  <cel@us.ibm.com>
15942         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15943         definitions for vec_float, vec_float2, vec_floato,
15944         vec_floate built-ins.
15945         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
15946         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
15947         floate.
15948         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
15949         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
15950         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
15951         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
15952         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
15953         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
15954         vec_floato): Add builtin defines.
15955         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
15956         Update the built-in documentation file for the new built-in
15957         functions.
15959 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
15961         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
15962         (mthumb): Mark as the negative of -marm.
15964 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
15966         * doc/invoke.texi (ARM Options, -mcpu): Document supported
15967         extension options.
15968         (ARM Options, -mtune): Document that this accepts the same
15969         extension options as -mcpu.
15970         (ARM Options, -mfpu): Document addition of -mfpu=auto.
15972 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
15974         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
15975         permitted extensions.
15977 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
15979         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
15980         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
15981         (armv8-m.main): Add option +nodsp.
15982         * config/arm/arm-cpu-cdata.h: Regenerated.
15984 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
15986         * config/arm/t-fuchsia: New file.
15987         * config.gcc (arm*-*-fuchsia*): Use it.
15989 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
15991         * config/arm/t-symbian: Rewrite for new option infrastructure.
15993 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
15995         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
15996         (MULTILIB_REQUIRED): Likewise.
15998 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16000         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
16001         (MULTILIB_RESUE): Likewise.
16002         (MULTILIB_MATCHES): Likewise.
16003         (MULTLIB_REQUIRED): Likewise.
16005 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16007         * config/arm/t-rtems: Rewrite for new option framework.
16009 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16011         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
16012         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
16013         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
16014         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
16015         * config/arm/t-multilib: ... here.
16016         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
16017         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
16018         armv7-a and armv8*-a when A-profile libraries have not been built.
16019         * config/arm/t-rmprofile: Rewrite.
16021 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16023         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
16024         with a backslash.  Remove the backslash after substituting unescaped
16025         periods.
16026         * doc/fragments.texi (MULTILIB_REUSE): Document it.
16028 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16030         * config.gcc: (arm*-*-*): When building a-profile libraries, force
16031         the driver to pass through the default setting of -mfloat-abi.
16032         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
16033         rather than NULL.
16034         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
16035         (all_feat_combs): New rule.
16036         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
16037         default libraries.
16038         * config/arm/t-aprofile: Rewrite.
16040 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16042         * config/arm/arm.h (FPUTYPE_AUTO): Define.
16043         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
16044         fpu is not specified by the user/command-line.
16045         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
16046         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
16047         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
16048         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
16049         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
16050         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
16052 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16054         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
16055         * config/arm/t-arm-elf: Rewritten.
16057 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16059         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
16060         have some floating-point instructions.
16061         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
16062         (TARGET_MAYBE_HARD_FLOAT): New macro.
16063         * config/arm/arm-builtins.c (arm_init_builtins): Use
16064         TARGET_MAYBE_HARD_FLOAT.
16065         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
16067 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16069         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
16070         (configargs.h): Include it.
16071         (arm_print_hint_for_fpu_option): New function.
16072         (arm_parse_fpu_option): New function.
16073         (candidate_extension): New class.
16074         (arm_canon_for_multilib): New function.
16075         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
16076         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
16077         (ARCH_CANONICAL_SPECS): New macro.
16078         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
16080 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16082         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
16083         are set after handling multilib fragments.  Set target_cpu_default2
16084         from with_cpu.
16086 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16088         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
16089         cpu name.
16090         (arm*-*-*): Set target_cpu_default2 to a quoted string.
16091         * config/arm/parsecpu.awk (check_cpu): Validate any extension
16092         options.
16093         (check_arch): Likewise.
16094         * config/arm/arm.c (arm_configure_build_target): Handle
16095         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
16096         options in the default.
16098 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16100         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
16101         when an option is an alias of another.
16102         * config/arm/parsecpu.awk (optalias): New parser token.
16103         (gen_comm_data): Mark non-alias options as such.  Emit entries
16104         for extension aliases.
16105         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
16106         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
16107         (armv6kz, armv6zk, armv6t2): Likewise.
16108         (armv7): Make vfpv3-d16 an alias.
16109         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
16110         canonical order.
16111         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
16112         Sort in canonical order.
16113         (armv8-a): Sort in canonical order.
16114         (armv8.1-a, armv8.2-a):  Likewise.
16115         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
16116         canonical order.
16117         (cortex-a9): Sort in canonical order.
16118         * config/arm/arm.c (selftests.h): Include it.
16119         (arm_test_cpu_arch_data): New function.
16120         (arm_run_self_tests): New function.
16121         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
16122         (targetm): Move declaration to the end of the file.
16123         * arm-cpu-cdata.h: Regenerated.
16125 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16127         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
16128         call to target_mode_check describing the type of option passed.
16129         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
16130         (arm_target_thumb_only): Use arm_parse_arch_option_name or
16131         arm_parse_cpu_option_name to match parameters against list of
16132         available targets.
16133         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
16134         arm_arch_core_flags data structure.
16135         * config/arm/arm-cpu_cdata.h: Regenerated.
16137 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16139         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
16140         config/arm/arm.c.
16141         (arm_print_hint_for_cpu_option): Likewise.
16142         (arm_print_hint_for_arch_option): Likewise.
16143         (arm_parse_cpu_option_name): Likewise.
16144         (arm_parse_arch_option_name): Likewise.
16145         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
16146         of entries in the all_fpus list.
16147         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
16148         (arm_parse_cpu_option_name): Declare.
16149         (arm_parse_arch_option_name): Declare.
16150         (arm_parse_option_features): Declare.
16151         (arm_intialize_isa): Declare.
16152         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
16153         data tables to ...
16154         (gen_comm_data): ... here.  Make definitions non-static.
16155         * config/arm/arm-cpu-data.h: Regenerated.
16156         * config/arm/arm-cpu-cdata.h: Regenerated.
16158 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16160         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
16161         (cpu_arch_extension): New structure.
16162         (cpu_arch_option, arch_option, cpu_option): New structures.
16163         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
16164         architecture types.
16165         (gen_data): Generate new format data tables.
16166         * config/arm/arm.c (cpu_tune): New structure.
16167         (cpu_option, processors): Delete.
16168         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
16169         (arm_print_hint_for_cpu_option): ... this and ...
16170         (arm_print_hint_for_arch_option): ... this.
16171         (arm_parse_arch_cpu_name): Delete.  Replace with ...
16172         (arm_parse_cpu_option_name): ... this and ...
16173         (arm_parse_arch_option_name): ... this.
16174         (arm_unrecognized_feature): Change type of target parameter to
16175         cpu_arch_option.
16176         (arm_parse_arch_cpu_features): Delete.  Replace with ...
16177         (arm_parse_option_features): ... this.
16178         (arm_configure_build_target): Rework to use new configuration data
16179         tables.
16180         (arm_print_tune_info): Rework for new configuration data tables.
16181         * config/arm/arm-cpu-data.h: Regenerated.
16182         * config/arm/arm-cpu.h: Regenerated.
16184 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16186         * Makefile.in (OBJS): Move sbitmap.o from here ...
16187         (OBJS-libcommon): ... to here.
16189 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16191         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
16192         (ISA_ALL_CRYPTO): New macro.
16193         (ISA_ALL_SIMD): New macro
16194         (ISA_ALL_FP): New macro.
16195         * config/arm/arm.c (fpu_bitlist): Update initializer.
16196         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
16197         simd or fp.
16198         (arm9e): Add fpu.  Add option for nofp
16199         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
16200         (arm926ej-s, arm1026ej-s): Likewise.
16201         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
16202         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
16203         neon-fp16, neon-vfpv4, nofp and nosimd.
16204         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
16205         (cortex-a8): Add fpu.  Add option for nofp.
16206         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
16207         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
16208         (cortex-r4f): Add fpu.
16209         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
16210         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
16211         for nofp.
16212         (cortex-r8): Likewise.
16213         (cortex-m4): Add fpu.  Add option for nofp.
16214         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
16215         (cortex-a17.cortex-a7): Likewise.
16216         (cortex-a32): Add fpu.  Add options for crypto and nofp.
16217         (cortex-a35, cortex-a53): Likewise.
16218         (cortex-a57): Add fpu.  Add option for crypto.
16219         (cortex-a72, cortex-a73): Likewise.
16220         (exynos-m1): Likewise.
16221         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
16222         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
16223         (cortex-m33): Add fpu.  Add option for nofp.
16224         * config/arm/arm-cpu-cdata.h: Regenerated
16225         * config/arm/arm-cpu-data.h: Regenerated.
16227 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16229         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
16230         (armv5te, armv5tej): Likewise.
16231         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
16232         (armv7): Add options fp and vfpv3-d16.
16233         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
16234         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
16235         nofp and nosimd.
16236         (armv7ve): Likewise.
16237         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
16238         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
16239         (armv8-a): Add nocrypto option.
16240         (armv8.1-a, armv8.2-a): Likewise.
16241         (armv8-m.main): add options fp, fp.dp and nofp.
16243 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16245         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
16246         nofp.
16247         (armv8-a+crc): Delete.
16248         (armv8.1-a): Add options simd, crypto and nofp.
16249         (armv8.2-a): Add options fp16, simd, crypto and nofp.
16250         (armv8.2-a+fp16): Delete.
16251         (armv8-m.main): Add option dsp.
16252         (armv8-m.main+dsp): Delete.
16253         (cortex-a8): Add fpu.  Add nofp option.
16254         (cortex-a9): Add fpu.  Add nofp and nosimd options.
16255         * config/arm/parsecpu.awk (gen_data): Generate option tables and
16256         link to main cpu and architecture data structures.
16257         (gen_comm_data): Only put isa attributes from the main architecture
16258         in common tables.
16259         (option): New statement for architecture and CPU entries.
16260         * arm.c (struct cpu_option): New structure.
16261         (struct processors): Add entry for options.
16262         (arm_unrecognized_feature): New function.
16263         (arm_parse_arch_cpu_name): Ignore any characters after the first
16264         '+' character.
16265         (arm_parse_arch_cpu_feature): New function.
16266         (arm_configure_build_target): Separate out any CPU and architecture
16267         features and parse separately.  Don't error out if -mfpu=auto is
16268         used with only an architecture string.
16269         (arm_print_asm_arch_directives): New function.
16270         (arm_file_start): Call it.
16271         * config/arm/arm-cpu-cdata.h: Regenerated.
16272         * config/arm/arm-cpu-data.h: Likewise.
16273         * config/arm/arm-tables.opt: Likewise.
16275 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16277         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
16278         assembler when it is not -mfpu=auto.
16280 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16282         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
16283         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
16284         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
16285         (ASM_CPU_SPEC): Rewrite.
16286         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
16287         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
16288         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
16289         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
16290         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
16291         copied string is NUL-terminated.  Also strip any characters prefixed
16292         by '+'.
16293         (arm_rewrite_selected_arch): New function.
16294         (arm_rewrite_march): New function.
16296 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16298         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
16299         (x_arm_cpu_string, x_arm_tune_string): Likewise.
16300         (march, mcpu, mtune): Convert to string-based options.
16301         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
16302         (arm_parse_arch_cpu_name): New function.
16303         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
16304         identify selected architecture or CPU.
16305         (arm_option_save): New function.
16306         (TARGET_OPTION_SAVE): Redefine.
16307         (arm_option_restore): Restore string options.
16308         (arm_option_print): Print string options.
16310 2017-06-16  Martin Sebor  <msebor@redhat.com>
16312         PR tree-optimization/80933
16313         PR tree-optimization/80934
16314         * builtins.c (fold_builtin_3): Do not handle bcmp here.
16315         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
16316         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
16317         (gimple_fold_builtin): Call them.
16319 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16321         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
16322         as unlikely; update profile.
16324 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16326         * predict.c (force_edge_cold): Handle declaring edges impossible
16327         more aggresively.
16329 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16331         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
16332         profile.
16333         (try_unroll_loop_completely): Fix reporting.
16335 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16337         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
16339 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
16341         PR target/71778
16342         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
16343         if given a non-constant argument for an intrinsic which requires a
16344         constant.
16346 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16348         * profile.c (compare_freqs): New function.
16349         (branch_prob): Sort edge list.
16350         (find_spanning_tree): Assume that the list is priority sorted.
16352 2017-06-16  Richard Biener  <rguenther@suse.de>
16354         PR tree-optimization/81090
16355         * passes.def (pass_record_bounds): Remove.
16356         * tree-pass.h (make_pass_record_bounds): Likewise.
16357         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
16358         make_pass_record_bounds): Likewise.
16359         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
16360         not free niter estimates at the beginning but at the end.
16361         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
16363 2017-06-16  Richard Biener  <rguenther@suse.de>
16365         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
16366         initializer to workaround ICE in host GCC 4.8.
16368 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16370         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
16371         counts.
16372         (clone_inlined_nodes): Update.
16374 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16376         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
16377         prefetch settings, and enable prefetching by default at -O3.
16379 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16381         * config/aarch64/aarch64.c (aarch64_override_options_internal):
16382         Set flag_prefetch_loop_arrays according to tuning data.
16384 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16386         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
16387         New tune structure.
16388         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
16389         [Unrelated to main purpose of the patch] Place the pointer field last
16390         to enable type checking errors when tune structure are wrongly merged.
16391         * config/aarch64/aarch64.c (generic_prefetch_tune,)
16392         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
16393         (thunderx2t99_prefetch_tune): New tune constants.
16394         (tune_params *_tunings): Update all tunings (no functional change).
16395         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
16396         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
16397         from tunings structures.
16399 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
16401         PR sanitizer/81094
16402         * ubsan.c (instrument_null): Add T argument, use it instead
16403         of computing it based on IS_LHS.
16404         (instrument_object_size): Likewise.
16405         (pass_ubsan::execute): Adjust instrument_null and
16406         instrument_object_size callers to pass gimple_get_lhs or
16407         gimple_assign_rhs1 result to it.  Use instrument_null instead of
16408         calling get_base_address and instrument_mem_ref.  Handle
16409         aggregate call arguments for object-size sanitization.
16411 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
16413         PR tree-optimization/81089
16414         * tree-vrp.c (is_masked_range_test): Validate operands of
16415         subexpression.
16417 2017-06-15  Martin Sebor  <msebor@redhat.com>
16419         PR c++/80560
16420         * dumpfile.c (dump_register): Avoid calling memset to initialize
16421         a class with a default ctor.
16422         * gcc.c (struct compiler): Remove const qualification.
16423         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
16424         * hash-table.h: Ditto.
16425         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
16426           assignment.
16427         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
16428         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
16429         default ctor.
16430         * params.h (struct param_info): Make struct members non-const.
16431         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
16432         with default initialization.
16433         * vec.h (vec_copy_construct, vec_default_construct): New helper
16434         functions.
16435         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
16436         with vec_copy_construct.
16437         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
16438         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
16439         * doc/invoke.texi (-Wclass-memaccess): Document.
16441 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16443         * emit-rtl.h (is_leaf): Update comment about local
16444         register allocator.
16446 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
16448         PR target/78818
16449         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
16450         for a variable to have a section before checking if the section has a
16451         name.
16452         Set section to.persistent if persistent attribute is set.
16453         Warn if .persistent attribute is used on an automatic variable.
16455 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
16457         PR rtl-optimization/80474
16458         * reorg.c (update_block): Do not ignore instructions in a delay slot.
16460 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
16462         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
16463         of REGNO.
16465 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
16467         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
16468         (casesi): Emit bounds checking as RTL.
16469         (casesi_internal_mips16_<mode>): Remove bounds checking.
16471 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
16473         * config/xtensa/xtensa.c (xtensa_option_override): Append
16474         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
16475         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
16476          xtensa_doloop_hooks): Define unconditionally.
16477         (xtensa_reorg_loops): Only call reorg_loops in the presence of
16478         TARGET_LOOPS.
16479         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
16480         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
16481         for it in xtensa_option_override.
16482         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
16483          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
16485 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
16487         * doc/cppopts.texi: Document '-' special value to -MF.
16489 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
16491         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
16492         (cortex_a53_fconst): Likewise.
16493         (cortex_a53_fpmul): Likewise.
16494         (cortex_a53_f_load_64): Likewise.
16495         (cortex_a53_f_load_many): Likewise.
16496         (cortex_a53_advsimd_alu): Likewise.
16497         (cortex_a53_advsimd_alu_q): Likewise.
16498         (cortex_a53_advsimd_mul): Likewise.
16499         (cortex_a53_advsimd_mul_q): Likewise.
16500         (fpmac bypass): Add new bypass for fpmac-fpmac case.
16501         Add missing fmul, r2f_cvt and fconst cases.
16503 2017-06-14  Richard Biener  <rguenther@suse.de>
16505         PR middle-end/81088
16506         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
16507         literal constants.
16508         (fold_binary_loc): When associating do not treat pre-existing
16509         TREE_OVERFLOW on literal constants as a reason to allow
16510         TREE_OVERFLOW on associated literal constants.
16512 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16514         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
16515         (MASK_FEATURES): New macro.
16516         * config/sparc/sparc.c (sparc_option_override): Remove the special
16517         handling of -mfpu and generalize it to all MASK_FEATURES switches.
16519 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16521         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
16522         a division of 0 if non-call exceptions are enabled.
16524 2017-06-14  Andrew Pinski  <apinski@cavium.com>
16525             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
16527         PR target/71663
16528         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
16529         Improve vector initialization code gen for only variable case.
16531 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16533         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
16535 2017-06-14  Richard Biener  <rguenther@suse.de>
16537         PR tree-optimization/81083
16538         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
16539         as values.
16541 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16543         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
16544         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
16545         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
16546         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
16547         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
16548         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
16550 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16552         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
16553         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
16555 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16557         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
16559 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16561         * config/rs6000/t-rtems: Don't handle SPE.
16563 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16565         * config/rs6000/t-linux: Don't handle SPE.
16567 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16569         * config/rs6000/eabispe.h: Delete file.
16571 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16573         * config/rs6000/t-spe: Delete file.
16575 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16577         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
16578         (rs6000_legitimate_offset_address_p): Return false for anything in
16579         V2SImode or V2SFmode.
16581 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16583         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
16584         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
16585         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
16586         and V4HImode.
16587         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
16588         (rs6000_legitimate_offset_address_p): Ditto.
16589         (rs6000_emit_move): Ditto.
16590         (rs6000_init_builtins): Remove V4HI_type_node.
16592 2017-06-13  Martin Liska  <mliska@suse.cz>
16594         PR sanitize/78204
16595         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
16596         (gate_asan): Likewise.
16597         * asan.h (asan_no_sanitize_address_p): Remove the function.
16598         (sanitize_flags_p): New function.
16599         * builtins.def: Fix coding style.
16600         * common.opt: Use renamed enum value.
16601         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
16602         * doc/extend.texi: Document no_sanitize attribute.
16603         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
16604         to SANITIZE_UNDEFINED_NONDEFAULT.
16605         * gcc.c (sanitize_spec_function): Use the renamed enum value.
16606         * gimple-fold.c (optimize_atomic_compare_exchange_p):
16607         Use sanitize_flags_p.
16608         * gimplify.c (gimplify_function_tree): Likewise.
16609         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
16610         * opts.c (parse_no_sanitize_attribute): New function.
16611         (common_handle_option): Use renamed enum value.
16612         * opts.h (parse_no_sanitize_attribute): Declare.
16613         * tree.c (sanitize_flags_p): New function.
16614         * tree.h: Declared here.
16615         * tsan.c: Use sanitize_flags_p.
16616         * ubsan.c (ubsan_expand_null_ifn): Likewise.
16617         (instrument_mem_ref): Likewise.
16618         (instrument_bool_enum_load): Likewise.
16619         (do_ubsan_in_current_function): Remove the function.
16620         (pass_ubsan::execute): Use sanitize_flags_p.
16621         * ubsan.h: Remove do_ubsan_in_current_function
16622         * tree-cfg.c (print_no_sanitize_attr_value): New function.
16623         (dump_function_to_file): Use it here.
16625 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16627         PR tree-optimization/80803
16628         PR tree-optimization/81063
16629         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
16630         (propagate_subaccesses_across_link): Enqueue subtree whenever
16631         necessary instead of relying on the caller.
16633 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16635         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
16636         that have a first_link.
16637         (sort_and_splice_var_accesses): Do not check first_link before
16638         enquing.
16639         (subtree_mark_written_and_enqueue): Likewise.
16640         (propagate_all_subaccesses): Likewise and do not stop at first
16641         parent with a first_link.
16643 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16645         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
16646         instead of f.
16648 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16650         * match.pd: New pattern.
16652 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16654         * tree-vrp.c (is_masked_range_test): New function.
16655         (register_edge_assert_for): Determine ranges for
16656         some bit tests.
16658 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16660         PR tree-optimization/67328
16661         * fold-const.c (maskable_range_p): New function.
16662         (build_range_check): Generate bittests if possible.
16664 2017-06-13  Martin Liska  <mliska@suse.cz>
16666         * gimple-pretty-print.c (dump_probability): Add new argument.
16667         (dump_edge_probability): Dump both probability and count.
16668         (dump_gimple_label): Likewise.
16669         (dump_gimple_bb_header): Likewise.
16671 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
16673         PR target/81072
16674         * config/avr/avr-devices.c: Fix indentation.
16675         * config/avr/gen-avr-mmcu-specs.c: Dito.
16677 2017-06-13  Richard Biener  <rguenther@suse.de>
16679         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
16680         instead get vector type from stmt_info.
16681         (vectorizable_reduction): Adjust.  Remove dead code.
16683 2017-06-13  Richard Biener  <rguenther@suse.de>
16685         PR middle-end/81065
16686         * fold-const.c (extract_muldiv_1): Remove bogus distribution
16687         case of C * (x * C2 + C3).
16688         (fold_addr_of_array_ref_difference): Properly fold index difference.
16690 2017-06-12  David S. Miller  <davem@davemloft.net>
16692         PR target/80968
16693         * config/sparc/sparc.md (return expander): Emit frame blockage if
16694         function uses alloca.
16696 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
16698         * combine.c (make_field_assignment): Check len rather than the mode
16699         precision when calling force_to_mode.
16701 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
16703         Support multilibs and devices that see flash in RAM address range.
16705         PR target/81072
16706         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
16707         (avr_mcu_t) <flash_pm_offset>: New field.
16708         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
16709         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
16710         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
16711         (AVR_TINY_PM_OFFSET): Remove macro.
16712         * config/avr/avr.opt (-mshort-calls): New option.
16713         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
16714         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
16715         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
16716         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
16717         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
16718         instead of avr_arch->have_jmp_call.
16719         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
16720         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
16721         avr_arch->flash_pm_offset to define.
16722         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
16723         new field flash_pm_offset.  Add entry for avrxmega3.
16724         (avr_texinfo): Add entry for avrxmega3.
16725         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
16726         attiny212, attiny214,
16727         attiny412, attiny414, attiny416, attiny417,
16728         attiny814, attiny816, attiny817,
16729         attiny1614, attiny1616, attiny1617,
16730         attiny3214, attiny3216, attiny3217.
16731         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
16732         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
16733         (avr_print_operand_address) [AVR_TINY]: Same.
16734         (avr_asm_init_sections) <readonly_data_section>: Only patch
16735         callback if avr_arch->flash_pm_offset = 0.
16736         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
16737         for rodata if avr_arch->flash_pm_offset != 0.
16738         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
16739         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
16740         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
16741         (m_options): Append opt_rcall.
16742         (m_dirnames): Append dir_rcall.
16743         * config/avr/t-multilib: Regenerate.
16745         * configure.ac [target=avr]: Check whether avrxmega3 default
16746         linker description file works as needed.
16747         * configure: Regenerate.
16748         * doc/avr-mmcu.texi: Regenerate.
16749         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
16750         <__AVR_ARCH__>: Document avrxmega3 and 103.
16751         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
16752         <__AVR_SHORT_CALLS__>: Document it.
16753         <__AVR_PM_BASE_ADDRESS__>: Document it.
16754         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
16755         (AVR Variable Attributes) <progmem>: Document this is
16756         not needed for avrxmega3.
16757         (AVR Named Address Spaces) <__flash>: Dito.
16759 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
16761         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
16763 2017-06-12  Doug Rupp  <rupp@adacore.com>
16765         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
16766         Append vxworks-stdint.h to the tm_file list.
16767         * config/vxworks-stdint.h: New file.
16769 2017-06-12  Martin Liska  <mliska@suse.cz>
16771         PR tree-optimization/81041
16772         * tree-profile.c (gimple_gen_ic_func_profiler):
16773         Create an extra BB in profile-generate
16774         (gimple_gen_time_profiler): Likewise.
16776 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
16778         PR tree-optimization/81003
16779         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
16780         (update_range_test): Use it instead of force_gimple_operand_gsi.
16782 2017-06-12  Richard Biener  <rguenther@suse.de>
16784         PR tree-optimization/81053
16785         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
16786         with backedge value not defined in loop.  Simplify def stmt
16787         compute.
16789 2017-06-11  Tom de Vries  <tom@codesourcery.com>
16791         PR target/79939
16792         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
16793         Return true.
16794         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
16795         nvptx_cannot_force_const_mem.
16797 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16799         * opts.c (finish_options): Move test for flag_split_stack after
16800         it has been initialized.
16802 2017-06-11  Jason Merrill  <jason@redhat.com>
16804         * tree.h (id_equal): New.
16805         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
16806         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
16807         instead of strcmp of IDENTIFIER_POINTER.
16809 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16811         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
16812         (mark_all_inlined_calls_cdtor): Fix formating.
16813         (inline_transform): Rescale profile before inlining.
16815 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16817         * cgraph.h (cgraph_edge::clone): Update prototype.
16818         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
16819         (cgraph_node::create_clone): Update.
16820         (cgraph_node::create_version_clone): Update.
16821         * tree-inline.c (copy_bb): Update.
16822         (expand_call_inline): Update.
16824 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
16826         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
16827         factored out from ...
16828         (rs6000_emit_prologue): ... here.
16830 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
16832         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
16833         factored out from ...
16834         (rs6000_emit_prologue): ... here.
16836 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16838         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
16839         edge counts.
16840         (handle_missing_profiles): Fix computation of tp_first_run.
16841         (counts_to_freqs): Do not touch freqs when count is 0.
16843 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16845         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
16846         profile.
16848 2017-06-10  Tom de Vries  <tom@codesourcery.com>
16850         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
16851         attributes): Document signal effective target.
16853 2017-06-10  Tom de Vries  <tom@codesourcery.com>
16855         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16856         Document effective target stack_size.
16858 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
16860         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
16861         to the edit_context if they can be auto-applied.
16863 2017-06-9  Ian Lance Taylor  <iant@golang.org>
16865         * opts.c (finish_options): If -fsplit-stack, disable implicit
16866         -forder-blocks-and-partition.
16867         * doc/invoke.texi (Optimize Options): Document that when using
16868         -fsplit-stack -forder-blocks-and-partition is not implicitly
16869         enabled.
16871 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
16873         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
16874         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
16875         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
16876         * builtins.def (abort, trap, unreachable): Declare cold.
16877         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
16878         * tree-core.h (ECF_COLD): New.
16879         * tree.c (set_call_expr_flags): Handle ECF_COLD.
16880         (build_common_builtin_nodes): Mark unreachable and abort as cold.
16882 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
16884         * predict.c (unlikely_executed_stmt_p): Cleanup.
16886 2017-06-09  Richard Biener  <rguenther@suse.de>
16888         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
16889         model if the ref is always written to.
16891 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
16893         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
16895 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
16897         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
16898         than udiv.
16900 2017-06-09  Tom de Vries  <tom@codesourcery.com>
16902         PR target/80855
16903         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
16904         "target cannot support label values" when encountering LABEL_REF.
16906 2017-06-09  Martin Liska  <mliska@suse.cz>
16908         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
16909         (gimple_gen_ic_func_profiler): Emit direct comparison
16910         of __gcov_indirect_call_callee with NULL.
16911         (gimple_gen_time_profiler): Change probability from
16912         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
16914 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
16916         * profile.c (edge_gcov_counts): Turn to pointer.
16917         (compute_branch_probabilities, compute_branch_probabilities): Update.
16918         (branch_prob): Do not clear edge_gcov_count.
16919         * profile.h (edge_gcov_counts): Turn to pointer.
16920         (edge_gcov_count): Update.
16922 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
16924         * gimple.h (gimple_check_failed): Mark cold.
16926 2017-06-09  Richard Biener  <rguenther@suse.de>
16928         PR tree-optimization/66623
16929         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
16930         refactor check_reduction into two parts, properly computing
16931         whether we have to check reduction validity for outer loop
16932         vectorization.
16934 2017-06-09  Richard Biener  <rguenther@suse.de>
16936         PR tree-optimization/79483
16937         * graphite-scop-detection.c (order): New global.
16938         (get_order): Compute bb to order mapping that satisfies code
16939         generation constraints.
16940         (cmp_pbbs): New helper.
16941         (build_scops): Start domwalk at entry block, sort generated
16942         pbbs.
16944 2017-06-09  Richard Biener  <rguenther@suse.de>
16946         PR middle-end/81007
16947         * ipa-polymorphic-call.c
16948         (ipa_polymorphic_call_context::restrict_to_inner_class):
16949         Skip FIELD_DECLs with error_mark_node type.
16950         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
16951         last again.
16953 2017-06-09  Martin Liska  <mliska@suse.cz>
16955         * predict.c (struct branch_predictor): New struct.
16956         (test_prediction_value_range): New test.
16957         (predict_c_tests): New function.
16958         * selftest-run-tests.c (selftest::run_tests): Run the function.
16959         * selftest.h: Declare new tests.
16961 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
16963         PR target/80966
16964         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
16965         gen_add3_insn did not fail.
16966         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
16967         r0, construct that number in a temporary reg and add that reg to r0.
16968         If asked to put the result in r0 as well, fail.
16970 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
16972         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
16973         for early expansion of vec_eqv.
16975 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
16977         PR middle-end/81005
16978         * ubsan.c (instrument_null): Avoid pointless code temporary.
16979         (pass_ubsan::execute): Instrument aggregate arguments of calls.
16981 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
16983         PR target/81015
16984         Revert:
16985         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
16987         PR target/59874
16988         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
16989         (*clzhi2): Ditto.
16991 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
16993         * predict.c (unlikely_executed_edge_p): Move ahead.
16994         (probably_never_executed_edge_p): Use it.
16996 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
16998         PR middle-end/79988
16999         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
17000         gimple_call_builtin_p call.
17002 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17004         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
17005         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
17006         rtl_check_failed_type2, rtl_check_failed_code1,
17007         rtl_check_failed_code2, rtl_check_failed_code_mode,
17008         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
17009         rtvec_check_failed_bounds, rtl_check_failed_flag,
17010         _fatal_insn_not_found, _fatal_insn): Likewise.
17011         * tree.h (tree_contains_struct_check_failed,
17012         tree_check_failed, tree_not_check_failed,
17013         tree_class_check_failed, tree_range_check_failed,
17014         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
17015         tree_vec_elt_check_failed, phi_node_elt_check_failed,
17016         tree_operand_check_failed, omp_clause_check_failed,
17017         omp_clause_operand_check_failed, omp_clause_range_check_failed):
17018         Likewise.
17020 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17022         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
17023         flag_branch_probabilities.
17024         * ipa-inline.c (edge_badness): Likewise.
17025         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17026         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
17027         * predict.c (maybe_hot_frequency_p): Likewise.
17028         (probably_never_executed): Likewise.
17029         * sched-ebb.c (schedule_ebbs): Likewise.
17030         * sched-rgn.c (find_single_block_region): Likewise.
17031         * tracer.c (tail_duplicate): Likewise.
17033 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17035         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
17036         longer requires x_flag_profile_use.
17038 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17040         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
17041         instead of flag_reorder_blocks_and_partition.
17042         * dbxout.c (dbxout_function_end): Likewise.
17043         * dwarf2out.c (gen_subprogram_die): Likewise.
17044         * haifa-sched.c (sched_create_recovery_edges): Likewise.
17045         * hw-doloop.c (reorg_loops): Likewise.
17046         * varasm.c (assemble_start_function,
17047         assemble_end_function): Likewise.
17048         (decide_function_section): Do not check for
17049         flag_reorder_blocks_and_partition.
17051 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
17053         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
17054         New function.
17055         (chkp_get_hard_register_fake_addr_expr): Ditto.
17056         (chkp_build_addr_expr): Add check for hard reg case.
17057         (chkp_parse_array_and_component_ref): Ditto.
17058         (chkp_find_bounds_1): Ditto.
17059         (chkp_process_stmt): Don't generate bounds store for
17060         hard reg case.
17062 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17064         * predict.c (maybe_hot_bb_p): Do not check profile status.
17065         (maybe_hot_edge_p): Likewise.
17066         (probably_never_executed): Check for zero counts even if profile
17067         is not read.
17068         (unlikely_executed_edge_p): New function.
17069         (unlikely_executed_stmt_p): New function.
17070         (unlikely_executed_bb_p): New function.
17071         (set_even_probabilities): Use unlikely predicates.
17072         (combine_predictions_for_bb): Likewise.
17073         (predict_paths_for_bb): Likewise.
17074         (predict_paths_leading_to_edge): Likewise.
17075         (determine_unlikely_bbs): New function.
17076         (estimate_bb_frequencies): Use it.
17077         (compute_function_frequency): Use zero counts even if profile is
17078         not read.
17079         * profile-count.h: Fix typo.
17081 2017-08-08  Julia Koval  <julia.koval@intel.com>
17083         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
17084         _mm512_mask_cvtsepi16_storeu_epi8,
17085         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
17086         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
17087         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
17088         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
17089         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
17090         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
17091         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
17092         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
17093         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
17094         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
17095         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
17096         __builtin_ia32_pmovuswb256mem_mask,
17097         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
17098         __builtin_ia32_pmovwb512mem_mask): New builtins.
17100 2017-08-08  Julia Koval  <julia.koval@intel.com>
17102         PR target/73350,80862
17103         * config/i386/subst.md (round): Fix round pattern.
17104         * config/i386/i386.c (ix86_erase_embedded_rounding):
17105         Fix erasing rounding for the fixed pattern.
17107 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17109         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
17111 2017-06-08  Martin Liska  <mliska@suse.cz>
17113         PR gcov-profile/80911
17114         * gcov.c (block_info::block_info): New constructor.
17116 2017-06-07  Carl Love  <cel@us.ibm.com>
17118         * config/rs6000/rs6000-c: The return type of the following
17119         built-in functions was implemented as int not long long.  Fix sign
17120         of return value for the unsigned version of vec_mulo and vec_mule.
17121         vector unsigned long long vec_bperm (vector unsigned long long,
17122                                              vector unsigned char)
17123         vector signed long long vec_mule (vector signed int,
17124                                           vector signed int)
17125         vector unsigned long long vec_mule (vector unsigned int,
17126                                             vector unsigned int)
17127         vector signed long long vec_mulo (vector signed int,
17128                                           vector signed int)
17129         vector unsigned long long vec_mulo (vector unsigned int,
17130                                             vector unsigned int)
17131         * doc/extend.texi: Fix the documentation for the built-in
17132         functions.
17134 2017-06-07  Carl Love  <cel@us.ibm.com>
17136         PR target/80982
17137         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
17138         for BE.
17140 2017-06-07  Carl Love  <cel@us.ibm.com>
17142         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
17143         support, Generate       doublehv for signed int/float for BE case only.
17145 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
17147         * doc/invoke.texi (mcx16): Rewrite.
17149 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17151         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
17152         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
17153         *mov<mode>_softfloat, and an anonymous splitter): Use
17154         nonimmediate_operand instead of rs6000_nonimmediate_operand.
17156 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17158         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
17159         SPEFSCR registers.
17160         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
17161         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
17162         (rs6000_debug_reg_global): Adjust.
17163         (rs6000_init_hard_regno_mode_ok): Adjust.
17164         (rs6000_dbx_register_number): Adjust.
17165         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
17166         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
17167         Remove SPE_ACC and SPEFSCR.
17168         (REG_ALLOC_ORDER): Ditto.
17169         (FRAME_POINTER_REGNUM): Change to 111.
17170         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
17171         (REG_CLASS_NAMES): Ditto.
17172         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
17173         (REGISTER_NAMES): Ditto.
17174         (ADDITIONAL_REG_NAMES): Ditto.
17175         (rs6000_reg_names): Ditto.
17176         * config/rs6000/rs6000.md: Renumber some register number
17177         define_constants.
17179 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17181         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
17182         registers.
17183         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
17184         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
17185         to 117.
17186         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
17187         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
17188         Delete the SPE high registers.
17189         (REG_ALLOC_ORDER): Ditto.
17190         (enum reg_class): Remove SPE_HIGH_REGS.
17191         (REG_CLASS_NAMES): Ditto.
17192         (REG_CLASS_CONTENTS): Delete the SPE high registers.
17193         (REGISTER_NAMES): Ditto.
17194         (rs6000_reg_names): Ditto.
17195         * doc/tm.texi.in: Remove SPE as example.
17196         * doc/tm.texi: Regenerate.
17198 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17200         * config/rs6000/8540.md (ppc8540_brinc): Delete.
17201         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
17202         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
17203         * config/rs6000/rs6000.md (type): Remove "brinc".
17205 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17207         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
17208         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
17209         * config/rs6000/linuxspe.h: Delete file.
17210         * config/rs6000/rs6000.md: Don't include spe.md.
17211         * config/rs6000/spe.h: Delete file.
17212         * config/rs6000/spe.md: Delete file.
17213         * config/rs6000/t-rs6000: Remove spe.md.
17215 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17217         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
17218         (reg_or_none500mem_operand): Delete.
17219         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
17220         instead of reg_or_none500mem_operand.
17222 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17224         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17225         handling of SPE flags.
17226         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
17228 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17230         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17231         SPE ABI handling.
17232         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
17233         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
17234         paired_divv2sf3): Similar.
17235         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
17236         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
17237         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
17238         RS6000_BUILTIN_S.
17239         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
17240         Rename the paired_* instruction patterns.
17241         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
17242         define __SPE__.
17243         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
17244         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
17245         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
17246         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
17247         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
17248         PAIRED_VECTOR_MODE.
17249         (struct machine_function): Delete field spe_insn_chain_scanned_p.
17250         (spe_func_has_64bit_regs_p): Delete.
17251         (spe_expand_predicate_builtin): Delete.
17252         (spe_expand_evsel_builtin): Delete.
17253         (TARGET_DWARF_REGISTER_SPAN): Do not define.
17254         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
17255         (invalid_e500_subreg): Delete.
17256         (rs6000_legitimize_address): Always force_reg op2 as well, for
17257         paired single memory accesses.
17258         (rs6000_member_type_forces_blk): Delete.
17259         (rs6000_spe_function_arg): Delete.
17260         (rs6000_expand_unop_builtin): Delete SPE handling.
17261         (rs6000_expand_binop_builtin): Ditto.
17262         (spe_expand_stv_builtin): Delete.
17263         (bdesc_2arg_spe): Delete.
17264         (spe_expand_builtin): Delete.
17265         (spe_expand_predicate_builtin): Delete.
17266         (spe_expand_evsel_builtin): Delete.
17267         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
17268         (spe_init_builtins): Delete.
17269         (spe_func_has_64bit_regs_p): Delete.
17270         (savres_routine_name): Delete "info" parameter.  Adjust callers.
17271         (rs6000_emit_stack_reset): Ditto.
17272         (rs6000_dwarf_register_span): Delete.
17273         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
17274         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
17275         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
17276         Delete.
17277         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
17278         Delete.
17279         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
17280         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
17281         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
17282         mulv2sf3, divv2sf3): Delete expanders.
17284 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17286         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
17288 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17290         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
17291         * config/rs6000/rs6000.c: Ditto.
17293 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17295         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
17296         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
17297         comparison_operator.
17299 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17301         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
17302         * config/rs6000/rs6000.opt: Ditto.
17303         * config/rs6000/t-rtems: Ditto.
17305 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17307         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
17308         TARGET_E500_SINGLE by 0, simplify.
17309         * config/rs6000/rs6000.c: Ditto.
17310         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
17311         (spe_build_register_parallel): Delete.
17312         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
17313         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
17314         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
17315         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
17316         (E500_CONVERT): Delete.
17317         * config/rs6000/spe.md: Remove many patterns and all define_constants.
17319 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17321         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
17322         * config/rs6000/dfp.md: Ditto.
17323         (negdd2, *negdd2_fpr): Merge.
17324         (absdd2, *absdd2_fpr): Merge.
17325         (negtd2, *negtd2_fpr): Merge.
17326         (abstd2, *abstd2_fpr): Merge.
17327         * config/rs6000/e500.h: Delete file.
17328         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
17329         TARGET_FPRS by 1 and simplify.
17330         * config/rs6000/rs6000-c.c: Ditto.
17331         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
17332         TARGET_DF_SPE by 0.
17333         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
17334         TARGET_DF_SPE.
17335         * config/rs6000/rs6000.md: Ditto.
17336         (floatdidf2, *floatdidf2_fpr): Merge.
17337         (move_from_CR_gt_bit): Delete.
17338         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
17339         (E500_CR_IOR_COMPARE): Delete.
17340         (All patterns that require !TARGET_FPRS): Delete.
17341         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
17343 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17345         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
17347 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17349         * graphds.c (add_edge): Intitialize edge's attached data.
17350         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
17351         pointer parameter.  Call pointed function on each edge during
17352         graph traversing.  Skip traversing the edge when the function
17353         returns true.
17354         (graphds_dfs, graphds_scc): Ditto.
17355         (for_each_edge): New parameter.  Pass the new parameter to callback
17356         function.
17357         * graphds.h (skip_edge_callback): New function pointer type.
17358         (graphds_dfs, graphds_scc): New function pointer parameter.
17359         (graphds_edge_callback, for_each_edge): New parameter.
17361 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17363         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
17364         out code checking if runtime alias check is possible to below ...
17365         Call the new function.
17366         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
17367         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
17369 2017-06-07  Marek Polacek  <polacek@redhat.com>
17371         PR sanitizer/80932
17372         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
17373         TYPE_OVERFLOW_WRAPS check.
17375 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17377         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
17378         if versioning is required.
17379         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
17380         peeling with the check for versioning.
17382 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17384         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
17385         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
17386         Set true to new parameter if new ssa variable is defined.
17387         (vect_gen_vector_loop_niters): Refactor.  Set range information
17388         for the new vector loop bound variable.
17389         (vect_do_peeling): Ditto.
17391 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17393         * tree-affine.c (ssa.h): Include header file.
17394         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
17395         has wrapping overflow behavior.
17397 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17399         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
17401 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17403         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
17404         (tree_to_aff_combination): ... here.
17406 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17408         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
17409         reg_pressure model function.
17410         (ivopts_global_cost_for_size): Delete.
17411         (determine_set_costs, iv_ca_recount_cost): Call new model function
17412         ivopts_estimate_reg_pressure.
17414 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17416         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
17417         expensive than udiv.  Remove floating point cases from mod.
17419 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17421         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
17422         Increase idiv cost.
17424 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17426         * config/aarch64/aarch64.md
17427         (copysignsf3): Fix mask generation.
17429 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
17431         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
17432         TDI_gimple.
17433         (class dump_manager): Add register_dumps method.
17434         * dumpfile.c: Include langhooks.h.
17435         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
17436         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
17437         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
17438         (dump_manager::dump_register): Start with 512 entries instead of 32.
17439         (dump_manager::register_dumps): New method.
17440         * toplev.c (general_init): Instead of invoking register_dumps
17441         langhook, invoke register_dumps method on the dump manager.
17442         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
17443         TDI_generic.
17445 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
17447         * doc/md.texi: Clarify the restrictions on a define_insn condition.
17448         Say that # requires an associated define_split to exist, and that
17449         the define_split must be suitable for use after register allocation.
17451 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17453         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
17454         (compute_outgoing_frequencies): Also initialize zero counts.
17455         (find_many_sub_basic_blocks): Do not produce uninitialized profile
17456         around loops; preserve more of profile when nothing changes.
17458 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
17460         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
17461         here.
17462         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
17463         * config/arm/arm-cpu-cdata.h: Regenerate.
17464         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
17465         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
17466         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
17467         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
17468         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
17469         support.
17470         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
17471         support.
17472         * config/arm/t-rmprofile: Likewise.
17473         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
17475 2017-06-06  David S. Miller  <davem@davemloft.net>
17477         PR target/80968
17478         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
17479         blockage if function uses alloca.
17481 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
17483         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
17484         New "uid" fields to hold pretty-print IDs of group and ref.
17485         Memory references are now identified as <group_id>:<ref_id>
17486         instead of using [random] addresses.
17487         (dump_mem_details): Simplify, no functional change.
17488         (dump_mem_ref): Simplify and make output more concise.
17489         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
17490         (find_or_create_group): Initialize group uid.
17491         (record_ref): Initialize ref uid.  Improve debug output.
17492         (prune_group_by_reuse, should_issue_prefetch_p,)
17493         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
17494         (mark_nontemporal_store, determine_loop_nest_reuse):
17495         Improve debug output.
17497 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
17499         * dbgcnt.def (prefetch): New debug counter.
17500         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
17501         (schedule_prefetches): Stop issueing prefetches if debug counter
17502         tripped.
17504 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17506         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
17507         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
17509 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17511         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
17512         Use aarch64_reg_or_zero predicate for operand 4.
17513         (aarch64_compare_and_swap<mode> define_insn_and_split):
17514         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
17515         (aarch64_store_exclusive<mode>): Likewise for operand 2.
17517 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17519         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
17520         (arm_compute_save_core_reg_mask): This.
17521         (thumb1_compute_save_reg_mask): Rename into ...
17522         (thumb1_compute_save_core_reg_mask): This.
17523         (arm_compute_save_reg0_reg12_mask): Adapt comment.
17524         (arm_compute_frame_layout): Likewise.
17526 2017-06-06  Richard Biener  <rguenther@suse.de>
17528         PR tree-optimization/80974
17529         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
17530         keep or clear leaders SSA info.
17532 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17534         * config/nvptx/nvptx.c (split_mode_p): New function.
17535         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
17537 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17539         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
17541 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17543         PR bootstrap/80978
17544         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
17545         profile.
17547 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17549         * shrink-wrap.c (handle_simple_exit): Update profile.
17550         (try_shrink_wrapping): Upate profile.
17552 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17554         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
17555         (tree_guess_outgoing_edge_probabilities): New.
17556         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
17557         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
17559 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17561         * ipa-split.c (split_function): Initialize return bb profile.
17563 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17565         * profile.c (compute_branch_probabilities): Also initialize
17566         EXIT_BLOCK profile.
17568 2017-06-06  Richard Biener  <rguenther@suse.de>
17570         PR tree-optimization/80928
17571         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
17572         (vect_analyze_loop_operations): Properly guard analysis for
17573         pure SLP case.
17574         (vect_transform_loop): Likewise.
17575         (vect_analyze_loop_2): Also reset SLP type on PHIs.
17576         (vect_model_induction_cost): Do not cost for pure SLP.
17577         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
17578         of induction in inner loop vectorization.
17579         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
17580         (vect_get_and_check_slp_defs): Handle vect_induction_def.
17581         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
17582         recursion.
17583         (vect_analyze_slp_cost_1): Cost induction.
17584         (vect_detect_hybrid_slp_stmts): Handle PHIs.
17585         (vect_get_slp_vect_defs): Likewise.
17586         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
17587         (vect_transform_stmt): Handle SLP reductions.
17588         * tree-vectorizer.h (vectorizable_induction): Adjust.
17590 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
17592         * config/rs6000/rs6000.c (make_resolver_func): Update
17593         init_lowered_empty_function call.
17595 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17597         * doc/invoke.texi: Document the -fprofile-abs-path option.
17598         * common.opt (fprofile-abs-path): New option.
17599         * gcov-io.h (gcov_write_filename): Declare.
17600         * gcov-io.c (gcov_write_filename): New function.
17601         * coverage.c (coverage_begin_function): Use gcov_write_filename.
17602         * profile.c (output_location): Likewise.
17604 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17606         * shring-wrap.c: Revert accidental commit.
17608 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
17610         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
17612 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17614         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
17615         new edge.
17616         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
17617         profile in callgraph edge.
17618         * profile-count.h (apply_probability): If THIS is 0, then result is 0
17619         (apply_scale): Likewise.
17620         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
17621         Also scale profile when inlining function with zero profile.
17622         (initialize_cfun): Update exit block profile even when it is zero.
17623         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
17624         when profile is read.
17626 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
17628         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
17629         (CLONE_*): New constants to define the processors we can generate
17630         code for with the target_clone attribute.
17631         (rs6000_clone_map): New array to identify which clone processors
17632         the current program is running on.
17633         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
17634         target_clone attribute.
17635         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
17636         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
17637         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
17638         (cpu_expand_builtin): Add support for target_clone attribute.
17639         (rs6000_valid_attribute_p): Allow "default" attribute.
17640         (get_decl_name): New debug function to simplify printing the
17641         current function name in debugging statements.
17642         (rs6000_clone_priority): New functions to support the target_clone
17643         attribute, and be able to generate code to switch between ISA 2.05
17644         through ISA 3.0 (power6 through power9).
17645         (rs6000_compare_version_priority): Likewise.
17646         (rs6000_get_function_versions_dispatcher): Likewise.
17647         (make_resolver_func): Likewise.
17648         (add_condition_to_bb): Likewise.
17649         (dispatch_function_versions): Likewise.
17650         (rs6000_generate_version_dispatcher_body): Likewise.
17651         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
17652         (fusion_gpr_load_p): Fix a spacing issue.
17653         * doc/extend.texi (Common Function Attributes): Document that the
17654         PowerPC supports the target_clone attribute.
17656 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17658         * config/arm/arm.h: explain F symbol found in description of ARM
17659         register allocation in its legend.
17661 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17663         * config/mips/frame-header-opt.c: Include profile-count.h.
17664         * config/riscv/riscv.c: Include profile-count.h
17666 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17668         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
17669         update profile.
17670         (sm_set_flag_if_changed): Add bbs field.
17671         (execute_sm_if_changed_flag_set): Pass BBS.
17672         (execute_sm): Update.
17674 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17676         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
17677         New pattern.
17679 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17681         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
17682         (peephole2): New peephole2 to emit the above.
17683         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
17685 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17687         * config/aarch64/aarch64.c (define_peephole2 above
17688         *sub_<shift>_<mode>): New peephole.
17690 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
17692         * config/i386/i386.c (make_resolver_func): Update.
17693         * Makefile.in: Add profile-count.h and profile-count.o
17694         * auto-profile.c (afdo_indirect_call): Update to new API.
17695         (afdo_set_bb_count): Update.
17696         (afdo_propagate_edge): Update.
17697         (afdo_propagate_circuit): Update.
17698         (afdo_calculate_branch_prob): Update.
17699         (afdo_annotate_cfg): Update.
17700         * basic-block.h: Include profile-count.h
17701         (struct edge_def): Turn count to profile_count.
17702         (struct basic_block_def): Likewie.
17703         (REG_BR_PROB_BASE): Move to profile-count.h
17704         (RDIV): Move to profile-count.h
17705         * bb-reorder.c (max_entry_count): Turn to profile_count.
17706         (find_traces): Update.
17707         (rotate_loop):Update.
17708         (connect_traces):Update.
17709         (sanitize_hot_paths):Update.
17710         * bt-load.c (migrate_btr_defs): Update.
17711         * cfg.c (RDIV): Remove.
17712         (init_flow): Use alloc_block.
17713         (alloc_block): Uninitialize count.
17714         (unchecked_make_edge): Uninitialize count.
17715         (check_bb_profile): Update.
17716         (dump_edge_info): Update.
17717         (dump_bb_info): Update.
17718         (update_bb_profile_for_threading): Update.
17719         (scale_bbs_frequencies_int): Update.
17720         (scale_bbs_frequencies_gcov_type): Update.
17721         (scale_bbs_frequencies_profile_count): New.
17722         * cfg.h (update_bb_profile_for_threading): Update.
17723         (scale_bbs_frequencies_profile_count): Declare.
17724         * cfgbuild.c (compute_outgoing_frequencies): Update.
17725         (find_many_sub_basic_blocks): Update.
17726         * cfgcleanup.c (try_forward_edges): Update.
17727         (try_crossjump_to_edge): Update.
17728         * cfgexpand.c (expand_gimple_tailcall): Update.
17729         (construct_exit_block): Update.
17730         * cfghooks.c (verify_flow_info): Update.
17731         (dump_bb_for_graph): Update.
17732         (split_edge): Update.
17733         (make_forwarder_block): Update.
17734         (duplicate_block): Update.
17735         (account_profile_record): Update.
17736         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
17737         (get_estimated_loop_iterations): Update.
17738         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
17739         (single_likely_exit): Update.
17740         * cfgloopmanip.c (scale_loop_profile): Update.
17741         (loopify): Update.
17742         (set_zero_probability): Update.
17743         (lv_adjust_loop_entry_edge): Update.
17744         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
17745         (purge_dead_edges): Update.
17746         (rtl_account_profile_record): Update.
17747         * cgraph.c (cgraph_node::create): Uninitialize count.
17748         (symbol_table::create_edge): Uninitialize count.
17749         (cgraph_update_edges_for_call_stmt_node): Update.
17750         (cgraph_edge::dump_edge_flags): Update.
17751         (cgraph_node::dump): Update.
17752         (cgraph_edge::maybe_hot_p): Update.
17753         * cgraph.h: Include profile-count.h
17754         (create_clone), create_edge, create_indirect_edge): Update.
17755         (cgraph_node): Turn count to profile_count.
17756         (cgraph_edge0: Likewise.
17757         (make_speculative, clone): Update.
17758         (create_edge): Update.
17759         (init_lowered_empty_function): Update.
17760         * cgraphclones.c (cgraph_edge::clone): Update.
17761         (duplicate_thunk_for_node): Update.
17762         (cgraph_node::create_clone): Update.
17763         * cgraphunit.c (cgraph_node::analyze): Update.
17764         (cgraph_node::expand_thunk): Update.
17765         * final.c (dump_basic_block_info): Update.
17766         * gimple-streamer-in.c (input_bb): Update.
17767         * gimple-streamer-out.c (output_bb): Update.
17768         * graphite.c (print_global_statistics): Update.
17769         (print_graphite_scop_statistics): Update.
17770         * hsa-brig.c: Include basic-block.h.
17771         * hsa-dump.c: Include basic-block.h.
17772         * hsa-gen.c (T sum_slice): Update.
17773         (convert_switch_statements):Update.
17774         * hsa-regalloc.c: Include basic-block.h.
17775         * ipa-chkp.c (chkp_produce_thunks): Update.
17776         * ipa-cp.c (struct caller_statistics): Update.
17777         (init_caller_stats): Update.
17778         (gather_caller_stats): Update.
17779         (ipcp_cloning_candidate_p): Update.
17780         (good_cloning_opportunity_p): Update.
17781         (get_info_about_necessary_edges): Update.
17782         (dump_profile_updates): Update.
17783         (update_profiling_info): Update.
17784         (update_specialized_profile): Update.
17785         (perhaps_add_new_callers): Update.
17786         (decide_about_value): Update.
17787         (ipa_cp_c_finalize): Update.
17788         * ipa-devirt.c (struct odr_type_warn_count): Update.
17789         (struct decl_warn_count): Update.
17790         (struct final_warning_record): Update.
17791         (possible_polymorphic_call_targets): Update.
17792         (ipa_devirt): Update.
17793         * ipa-fnsummary.c (redirect_to_unreachable): Update.
17794         * ipa-icf.c (sem_function::merge): Update.
17795         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
17796         * ipa-inline.c (compute_uninlined_call_time): Update.
17797         (compute_inlined_call_time): Update.
17798         (want_inline_small_function_p): Update.
17799         (want_inline_self_recursive_call_p): Update.
17800         (edge_badness): Update.
17801         (lookup_recursive_calls): Update.
17802         (recursive_inlining): Update.
17803         (inline_small_functions): Update.
17804         (dump_overall_stats): Update.
17805         (dump_inline_stats): Update.
17806         * ipa-profile.c (ipa_profile_generate_summary): Update.
17807         (ipa_propagate_frequency): Update.
17808         (ipa_profile): Update.
17809         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
17810         * ipa-utils.c (ipa_merge_profiles): Update.
17811         * loop-doloop.c (doloop_modify): Update.
17812         * loop-unroll.c (report_unroll): Update.
17813         (unroll_loop_runtime_iterations): Update.
17814         * lto-cgraph.c (lto_output_edge): Update.
17815         (lto_output_node): Update.
17816         (input_node): Update.
17817         (input_edge): Update.
17818         (merge_profile_summaries): Update.
17819         * lto-streamer-in.c (input_cfg): Update.
17820         * lto-streamer-out.c (output_cfg): Update.
17821         * mcf.c (create_fixup_graph): Update.
17822         (adjust_cfg_counts): Update.
17823         (sum_edge_counts): Update.
17824         * modulo-sched.c (sms_schedule): Update.
17825         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
17826         * predict.c (maybe_hot_count_p): Update.
17827         (probably_never_executed): Update.
17828         (dump_prediction): Update.
17829         (combine_predictions_for_bb): Update.
17830         (propagate_freq): Update.
17831         (handle_missing_profiles): Update.
17832         (counts_to_freqs): Update.
17833         (rebuild_frequencies): Update.
17834         (force_edge_cold): Update.
17835         * predict.h: Include profile-count.h
17836         (maybe_hot_count_p, counts_to_freqs): UPdate.
17837         * print-rtl-function.c: Do not include cfg.h
17838         * print-rtl.c: Include basic-block.h
17839         * profile-count.c: New file.
17840         * profile-count.h: New file.
17841         * profile.c (is_edge_inconsistent): Update.
17842         (correct_negative_edge_counts): Update.
17843         (is_inconsistent): Update.
17844         (set_bb_counts): Update.
17845         (read_profile_edge_counts): Update.
17846         (compute_frequency_overlap): Update.
17847         (compute_branch_probabilities): Update; Initialize and deinitialize
17848         gcov_count tables.
17849         (branch_prob): Update.
17850         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
17851         (edge_gcov_count): New.
17852         (bb_gcov_count): New.
17853         * shrink-wrap.c (try_shrink_wrapping): Update.
17854         * tracer.c (better_p): Update.
17855         * trans-mem.c (expand_transaction): Update.
17856         (ipa_tm_insert_irr_call): Update.
17857         (ipa_tm_insert_gettmclone_call): Update.
17858         * tree-call-cdce.c: Update.
17859         * tree-cfg.c (gimple_duplicate_sese_region): Update.
17860         (gimple_duplicate_sese_tail): Update.
17861         (gimple_account_profile_record): Update.
17862         (execute_fixup_cfg): Update.
17863         * tree-inline.c (copy_bb): Update.
17864         (copy_edges_for_bb): Update.
17865         (initialize_cfun): Update.
17866         (freqs_to_counts): Update.
17867         (copy_cfg_body): Update.
17868         (expand_call_inline): Update.
17869         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
17870         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
17871         (try_unroll_loop_completely): Update.
17872         (try_peel_loop): Update.
17873         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
17874         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
17875         * tree-ssa-loop-split.c (connect_loops): Update.
17876         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
17877         * tree-ssa-reassoc.c (branch_fixup): Update.
17878         * tree-ssa-tail-merge.c (replace_block_by): Update.
17879         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
17880         (compute_path_counts): Update.
17881         (update_profile): Update.
17882         (recompute_probabilities): Update.
17883         (update_joiner_offpath_counts): Update.
17884         (estimated_freqs_path): Update.
17885         (freqs_to_counts_path): Update.
17886         (clear_counts_path): Update.
17887         (ssa_fix_duplicate_block_edges): Update.
17888         (duplicate_thread_path): Update.
17889         * tree-switch-conversion.c (case_bit_test_cmp): Update.
17890         (struct switch_conv_info): Update.
17891         * tree-tailcall.c (decrease_profile): Update.
17892         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
17893         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
17894         * value-prof.c (check_counter): Update.
17895         (gimple_divmod_fixed_value): Update.
17896         (gimple_mod_pow2): Update.
17897         (gimple_mod_subtract): Update.
17898         (gimple_ic_transform): Update.
17899         (gimple_stringop_fixed_value): Update.
17900         * value-prof.h (gimple_ic): Update.
17902 2017-06-02  Carl Love  <cel@us.ibm.com>
17904         * config/rs6000/rs6000-c: Add support for built-in functions
17905         vector double vec_doublee (vector signed int);
17906         vector double vec_doublee (vector unsigned int);
17907         vector double vec_doublee (vector float);
17908         vector double vec_doubleh (vector signed int);
17909         vector double vec_doubleh (vector unsigned int);
17910         vector double vec_doubleh (vector float);
17911         vector double vec_doublel (vector signed int);
17912         vector double vec_doublel (vector unsigned int);
17913         vector double vec_doublel (vector float);
17914         vector double vec_doubleo (vector signed int);
17915         vector double vec_doubleo (vector unsigned int);
17916         vector double vec_doubleo (vector float);.
17917         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
17918         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
17919         UNS_DOUBLEL.
17920         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
17921         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
17922         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
17923         VS_sxwsp.
17924         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
17925         vec_doublel, vec_doubleh.
17926         * doc/extend.texi: Update the built-in documentation file for the
17927         new built-in functions.
17929 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
17931         PR jit/80954
17932         * ipa-inline-analysis.c (free_growth_caches): Set
17933         edge_removal_hook_holder to NULL after removing it.
17935 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
17937         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
17938         comparision with zero.
17940 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
17941         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
17942         for early expansion of vec_min and vec_max builtins.
17943         (builtin_function_type): Add min/max unsigned variants to those
17944         identified as having unsigned arguments.
17946 2017-06-02  Olivier Hainque  <hainque@adacore.com>
17948         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
17950 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17952         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
17953         Use VALL_F16 iterator rather than VALL.
17955 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17957         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
17958         Emit CBNZ inside loop when doing a strong exchange and comparing
17959         against zero.  Generate the CC flags after the loop.
17961 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
17963         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
17964         (dl_section_ref): New.
17965         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
17966         On AIX, append an expression to subtract the size of the
17967         section length to dl_section_ref.
17969 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
17971         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
17972         for early expansion of vector absolute builtins.
17974 2017-06-02  Richard Biener  <rguenther@suse.de>
17976         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
17977         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
17979 2017-06-02  Richard Biener  <rguenther@suse.de>
17981         PR tree-optimization/80948
17982         * tree-tailcall.c (find_tail_calls): Track stmts to move in
17983         stmt order as well.
17985 2017-06-02  Richard Biener  <rguenther@suse.de>
17987         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
17988         PHIs are ok.
17989         * tree-vect-stmts.c (process_use): Do not mark backedge defs
17990         for inductions as relevant.
17992 2017-06-02  Richard Biener  <rguenther@suse.de>
17994         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
17995         (vectorizable_induction): ... this.  Remove dead code.
17997 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
17999         * builtins. (expand_builtin_alloca): Remove second parameter and
18000         infer its value from the first parameter instead.
18001         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
18003 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
18005         PR rtl-optimization/80903
18006         * loop-doloop.c (add_test): Unshare sequence.
18008 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18010         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
18012 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18014         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
18015         static.
18016         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
18017         xlogue_layout::get_instance, logue_layout::xlogue_layout,
18018         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
18019         (xlogue_layout::get_stub_rtx): Make static.
18020         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
18021         (xlogue_layout::compute_stub_managed_regs): Rename to...
18022         (xlogue_layout::count_stub_managed_regs): ...this.
18023         (xlogue_layout::is_stub_managed_reg): New function.
18024         (xlogue_layout::m_stub_names): Rename to...
18025         (xlogue_layout::s_stub_names): ...this, make static.
18026         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
18027         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
18028         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
18029         xlogue_layout::s_stub_names): Instantiate statics.
18030         (stub_managed_regs): Remove.
18031         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
18032         (disable_call_ms2sysv_xlogues): Rename to...
18033         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
18034         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
18035         warning logic.
18036         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
18037         change after reload_completed.
18038         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
18039         directly.
18040         (ix86_expand_prologue): Likewise.
18041         (ix86_expand_epilogue): Likewise.
18042         (ix86_expand_split_stack_prologue): Likewise.
18043         (ix86_compute_frame_layout): Remove frame parameter ...
18044         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
18045         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
18046         only if necessary.
18047         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
18048         (ix86_frame): Move from here ...
18049         * config/i386/i386.h (ix86_frame): ... to here.
18050         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
18051         complete ix86_frame data structure instead.  Remove some_ld_name.
18053 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
18055         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
18056         symbols that hold a DECL_VALUE_EXPR.
18058 2017-06-01  Martin Jambor  <mjambor@suse.cz>
18060         PR tree-optimization/80898
18061         * tree-sra.c (process_subtree_disqualification): Removed.
18062         (disqualify_candidate): Do not acll
18063         process_subtree_disqualification.
18064         (subtree_mark_written_and_enqueue): New function.
18065         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
18066         RHS has been disqualified and re-queue LHS if necessary.  Apart
18067         from that, ignore disqualified RHS.
18069 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18071         * config/s390/s390.c (s390_emit_epilogue): Disable early return
18072         address fetch for z10 or later.
18074 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18076         * config/arc/arc.md (tst_movb): Add guard when splitting.
18078 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18080         * config/arc/arc.c (arc_can_eliminate): Test against
18081         arc_frame_pointer_needed.
18083 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18085         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
18086         to prevent store reordering.
18087         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
18088         (type): Add block type.
18089         (stack_tie): Define special instruction to be used in
18090         expand_prologue.
18092 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18094         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
18095         constraint. It is not valid for the pattern.
18096         (noncommutative_binary_comparison): Likewise.
18098 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18100         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
18101         scaled addresses.
18103 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18105         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
18106         be used by the reg-alloc.
18108 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18110         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
18111         reg-alloc when having mul64 or mul32x16 instructions.
18112         (mulsidi3): Likewise.
18113         (umulsidi3): Likewise.
18114         (mulsi32x16): New pattern.
18115         (mulsi64): Likewise.
18116         (mulsidi64): Likewise.
18117         (umulsidi64): Likewise.
18118         (MUL32x16_REG): Define.
18119         (mul64_600): Use MUL32x16_REG.
18120         (mac64_600): Likewise.
18121         (umul64_600): Likewise.
18122         (umac64_600): Likewise.
18124 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18126         * config/arc/arc.md (mulsi3_700): Make it commutative.
18128 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
18130         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
18131         type for movstouw.
18132         (*sign_extendsidi2_insn): Likewise for movstosw.
18134 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
18136         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
18137         the type of the input discriminant value.  Convert the
18138         discriminant value of signedness vary.
18140 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
18142         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
18143         Add to -Wall section.
18145 2017-06-01  Richard Biener  <rguenther@suse.de>
18147         PR middle-end/66313
18148         * fold-const.c (fold_plusminus_mult_expr): If the factored
18149         factor may be zero use a wrapping type for the inner operation.
18150         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
18151         and handle moved defs.
18152         (process_assignment): Properly guard the unary op case.  Return a
18153         tri-state indicating that moving the stmt before the call may allow
18154         to continue.  Pass through to_move.
18155         (find_tail_calls): Handle moving unrelated defs before
18156         the call.
18158 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
18160         PR target/80618
18161         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
18162         splitter result in the canonical way.
18164 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
18166         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
18167         also for 32bit target.  Update insn attributes.
18168         (zero-extendsidi2 splitter): Allow all registers for operand 1.
18170 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
18172         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
18173         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
18174         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
18175         (_mm_maskz_min_ss): New intrinsics.
18177 2017-05-31  Martin Liska  <mliska@suse.cz>
18179         * tree-vect-loop.c (vect_create_epilog_for_reduction):
18180         Change comment style to one we normally use.
18181         (vectorizable_reduction): Likewise.
18182         (vectorizable_induction): Likewise.
18183         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
18184         (vectorizable_call): Likewise.
18185         (vectorizable_simd_clone_call): Likewise.
18186         (vectorizable_conversion): Likewise.
18187         (vectorizable_assignment): Likewise.
18188         (vectorizable_shift): Likewise.
18189         (vectorizable_operation): Likewise.
18190         (vectorizable_store): Likewise.
18191         (vectorizable_load): Likewise.
18192         * tree-vectorizer.h: Likewise.
18194 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
18196         * passes.c (emergency_dump_function): New.
18197         * tree-pass.h (emergency_dump_function): Declare.
18198         * plugin.c (plugins_internal_error_function): Remove.
18199         * plugin.h (plugins_internal_error_function): Remove declaration.
18200         * toplev.c (internal_error_function): New static function.  Use it...
18201         (general_init): ...here.
18203 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
18205         * config/arc/arc.c (arc_print_operand): Handle constant operands.
18206         (arc_rtx_costs): Add costs for new patterns.
18207         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
18208         * config/arc/predicates.md: Add _1_2_3_operand predicate.
18210 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
18212         * tree-ssa-strlen.c (get_next_strinfo): New function.
18213         (get_stridx_plus_constant): Use it.
18214         (zero_length_string): Likewise.
18215         (adjust_related_strinfos): Likewise.
18216         (adjust_last_stmt): Likewise.
18218 2017-05-31  Richard Biener  <rguenther@suse.de>
18220         PR target/80880
18221         * config/i386/i386.c (ix86_expand_builtin): Remove assert
18222         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
18224 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
18226         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
18227         loop_vinfo argument and use of dependence distance vectors.
18228         Check instead whether the two references differ only in their
18229         initial value and assume that they have the same alignment if the
18230         difference is a multiple of the vector alignment.
18231         (vect_analyze_data_refs_alignment): Update call accordingly.
18233 2017-05-31  Martin Liska  <mliska@suse.cz>
18235         PR target/79155
18236         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
18238 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
18240         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
18241         (create_intersect_range_checks): Move from ...
18242         * tree-data-ref.c (create_intersect_range_checks_index)
18243         (create_intersect_range_checks): ... to here.
18244         (create_runtime_alias_checks): New function factored from ...
18245         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
18246         here.  Call above function.
18247         * tree-data-ref.h (create_runtime_alias_checks): New function.
18249 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
18251         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
18252         segment length for dr_b and compute it in wide_int.
18254 2017-05-31  Richard Biener  <rguenther@suse.de>
18256         PR tree-optimization/80906
18257         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
18258         and pass through iv_map.
18259         (copy_bb_and_scalar_dependences): Adjust.
18260         (translate_pending_phi_nodes): Likewise.
18261         (copy_loop_close_phi_args): Handle code-generating IVs instead
18262         of ICEing.
18264 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
18266         * diagnostic-color.c (color_dict): Add "type-diff".
18267         (parse_gcc_colors): Update comment.
18268         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
18269         -fdiagnostics-show-template-tree and -fno-elide-type.
18270         (GCC_COLORS): Add type-diff to example.
18271         (type-diff=): New.
18272         (-fdiagnostics-show-template-tree): New.
18273         (-fno-elide-type): New.
18274         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
18275         the pp_format_decoder callback.  Call any m_format_postprocessor's
18276         "handle" method.
18277         (pretty_printer::pretty_printer): Initialize
18278         m_format_postprocessor.
18279         (pretty_printer::~pretty_printer): Delete any
18280         m_format_postprocessor.
18281         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
18282         (class format_postprocessor): New class.
18283         (struct pretty_printer::format_decoder): Document the new parameters.
18284         (struct pretty_printer::m_format_postprocessor): New field.
18285         * tree-diagnostic.c (default_tree_printer): Update for new
18286         bool and const char ** params.
18287         * tree-diagnostic.h (default_tree_printer): Likewise.
18289 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
18291         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
18292         (lwa_operand): Delete rs6000_gen_cell_microcode test.
18293         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18294         rs6000_gen_cell_microcode code.
18295         (rs6000_final_prescan_insn): Delete.
18296         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
18297         "warn-cell-microcode" entries.
18298         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
18299         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
18300         throughout.  Change cc_reg_not_micro_cr0_operand to
18301         cc_reg_not_cr0_operand throughout.
18302         (*extendhi<mode>2_noload): Delete.
18303         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
18304         (mwarn-cell-microcode): Delete.
18305         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
18306         -mgen-cell-microcode and -mwarn-cell-microcode.
18308 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
18310         PR target/80833
18311         * config/i386/constraints.md (Yd): New constraint.
18312         (Ye): Ditto.
18313         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
18314         and (?Yd, r) alternatives.  Update insn attributes.
18315         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
18316         and (?*Yd, r) alternatives.  Update insn attributes.
18317         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
18319 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
18321         * gimplify.c (gimplify_modify_expr): Don't create a
18322         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
18323         function.
18325 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
18327         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
18329 2017-05-30  Richard Biener  <rguenther@suse.de>
18331         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
18332         and reduc_def fields.
18333         (STMT_VINFO_REDUC_TYPE): New define.
18334         (STMT_VINFO_REDUC_DEF): Likewise.
18335         (vect_force_simple_reduction): Adjust prototype.
18336         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
18337         (vect_is_simple_reduction): Remove check_reduction argument.
18338         (vect_force_simple_reduction): Adjust and set
18339         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
18340         (vectorizable_reduction): Do not re-do reduction analysis
18341         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
18342         * tree-parloops.c (gather_scalar_reductions): Adjust.
18344 2017-05-30  Richard Biener  <rguenther@suse.de>
18346         PR middle-end/80901
18347         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
18348         split_edge code.
18350 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18352         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
18353         Introduce unknown_misalignment parameter and remove vf.
18354         (vect_peeling_hash_get_lowest_cost):
18355         Pass unknown_misalignment parameter.
18356         (vect_enhance_data_refs_alignment):
18357         Fix unsupportable data ref treatment.
18359 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18361         * tree-vect-data-refs.c (vect_get_data_access_cost):
18362         Workaround for SLP handling.
18363         (vect_enhance_data_refs_alignment):
18364         Compute costs for doing no peeling at all, compare to the best
18365         peeling costs so far and avoid peeling if cheaper.
18367 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18369         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
18370         Return peeling info and set costs to zero for unlimited cost
18371         model.
18372         (vect_enhance_data_refs_alignment): Also inspect all datarefs
18373         with unknown misalignment. Compute and costs for unknown
18374         misalignment, compare them to the costs for known misalignment
18375         and choose the cheapest for peeling.
18377 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18379         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
18380         (vect_get_peeling_costs_all_drs): Create function.
18381         (vect_peeling_hash_get_lowest_cost):
18382         Use vect_get_peeling_costs_all_drs.
18383         (vect_peeling_supportable): Create function.
18384         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
18386 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18388         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
18389         DR_HAS_NEGATIVE_STEP.
18390         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
18391         (vect_enhance_data_refs_alignment): Use.
18392         (vect_duplicate_ssa_name_ptr_info): Use.
18393         * tree-vectorizer.h (dr_misalignment): Use.
18394         (known_alignment_for_access_p): Use.
18396 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18398         PR target/78838
18399         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
18400         .lowtext.
18401         (has_section_name): New function.
18403 2017-05-30  Martin Liska  <mliska@suse.cz>
18405         PR other/80909
18406         * auto-profile.c (get_function_decl_from_block): Fix
18407         parenthesis.
18409 2017-05-30  Richard Biener  <rguenther@suse.de>
18411         PR middle-end/80876
18412         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
18414 2017-05-30  Martin Liska  <mliska@suse.cz>
18416         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
18417         * dumpfile.h (struct dump_file_info): Remove ctors.
18419 2017-05-30  Martin Liska  <mliska@suse.cz>
18421         * predict.def: Fix GNU coding style.
18423 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
18425         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
18426         Mark 'to' argument with ATTRIBUTE_UNUSED.
18428 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
18430         * config/xtensa/xtensa.c (xtensa_emit_call): Use
18431         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
18432         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
18433         format string.
18435 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
18437         * doc/install.texi (Options specification): Restore entry of
18438         --enable-sjlj-exceptions.
18440 2017-05-27  Michael Eager  <eager@eagercon.com>
18442         Revert:
18443         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
18445         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
18447         * config/microblaze/microblaze.h
18448         (FIXED_REGISTERS): Update in macro.
18449         (CALL_USED_REGISTERS): Update in macro.
18451 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
18453         * doc/install.texi: Add links to macOS binary distributions.
18455 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
18457         PR bootstrap/80887
18458         Revert:
18459         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18461         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
18463 2017-05-26  Martin Liska  <mliska@suse.cz>
18465         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
18467 2017-05-26  Martin Liska  <mliska@suse.cz>
18469         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
18470         always leading ';; '.
18471         (dump_bb_info): Likewise.
18472         (brief_dump_cfg): Likewise.
18473         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
18474         * dumpfile.c: Remove usage of TDF_VERBOSE.
18475         * dumpfile.h (enum dump_kind): Likewise.
18476         (dump_gimple_bb_header): Do not use TDF_COMMENT.
18477         * print-tree.c (debug_verbose): Remove.
18478         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
18479         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
18480         * tree-diagnostic.c (default_tree_printer): Replace
18481         TDF_DIAGNOSTIC with TDF_SLIM.
18483 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18485         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
18486         in parameter loop, rather than loop_vinfo.
18487         (create_intersect_range_checks): Ditto.
18488         (vect_create_cond_for_alias_checks): Update call to above functions.
18490 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18492         PR tree-optimization/80815
18493         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
18494         for merging runtime alias checks.  Handle negative DR_STEPs.
18496 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18498         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
18499         Move from ...
18500         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
18501         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
18502         out code pruning runtime alias checks.
18503         * tree-data-ref.c (prune_runtime_alias_test_list): New function
18504         factored out from above.
18505         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
18506         Move from ...
18507         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
18508         ... to here.
18509         (prune_runtime_alias_test_list): New decalaration.
18511 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18513         * tree-vect-data-refs.c (compare_tree): Rename and move ...
18514         * tree-data-ref.c (data_ref_compare_tree): ... to here.
18515         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
18516         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
18517         (operator==, comp_dr_with_seg_len_pair): Ditto.
18518         (vect_prune_runtime_alias_test_list): Ditto.
18520 2017-05-26  Martin Liska  <mliska@suse.cz>
18522         PR ipa/80663
18523         * params.def: Bound partial-inlining-entry-probability param.
18525 2017-05-26  Marek Polacek  <polacek@redhat.com>
18527         PR sanitizer/80875
18528         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
18529         can be negated.
18531 2017-05-26  Richard Biener  <rguenther@suse.de>
18533         PR tree-optimization/80842
18534         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
18535         value.
18537 2017-05-26  Richard Biener  <rguenther@suse.de>
18539         PR tree-optimization/80844
18540         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
18542 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
18544         * doc/md.texi (Machine Constraints): Update x86 family
18545         machine constraints section to match 'config/i386/constraints.md'.
18547 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
18549         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
18551 2017-05-25  Nathan Sidwell  <nathan@acm.org>
18553         * doc/invoke.texi (--enable-languages): Update documentation.
18555 2017-05-25  Martin Liska  <mliska@suse.cz>
18557         * dumpfile.c: Add TDF_FOLDING.
18558         * dumpfile.h (enum dump_kind): Likewise.
18559         * genmatch.c (dt_simplify::gen_1): Use it.
18561 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18563         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
18565 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18567         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
18568         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
18570 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18572         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
18573         * match.pd (X == C): Rewrite it here.
18574         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
18575         with_certain_nonzero_bits2): New predicates.
18576         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
18578 2017-05-24  Nathan Sidwell  <nathan@acm.org>
18580         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
18581         avoid warning.
18583         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
18584         warning.
18586 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
18588         * config/powerpcspe: New port.  Files are copied from the rs6000
18589         port, with "rs6000" in filenames replaced by "powerpcspe".
18591 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
18593         PR rtl-optimization/80754
18594         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
18596 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
18598         * config/sparc/sparc.md (length): Return the correct value for -mflat
18599         sibcalls to match output_sibcall.
18601 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
18603         PR bootstrap/80860
18604         PR bootstrap/80843
18605         * config/rs6000/rs6000.c (struct machine_function): Add new field
18606         n_components.
18607         (rs6000_get_separate_components): Init that field, use it.
18608         (rs6000_components_for_bb): Use the field.
18610 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18612         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
18614 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
18616         PR middle-end/80823
18617         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
18619 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18621         PR target/80725
18622         * config/s390/s390.c (s390_check_qrst_address): Check incoming
18623         address against address_operand predicate.
18624         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
18626 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
18628         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
18629         parameters passed indirectly.
18631 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
18633         * config/i386/i386.md (*movdi_internal): Remove SSE4
18634         alternative 18 (?r, *v).  Update insn attributes.
18635         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
18636         Update insn attributes.
18637         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
18638         Update insn attributes.
18639         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
18640         alternative 1 (r, v). Remove isa attribute.
18641         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
18642         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
18643         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
18645 2017-05-23  Tom de Vries  <tom@codesourcery.com>
18647         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
18648         dg-line directive.
18650 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18652         * cgraphunit.c (symbol_table::process_new_functions): Update.
18653         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
18654         (inline_generate_summary): Rename to ...
18655         (ipa_fn_summary_generate): ... this one.
18656         (inline_read_summary): Rename to ...
18657         (ipa_fn_summary_read): ... this one.
18658         (inline_write_summary): Rename to ...
18659         (ipa_fn_summary_write): ... this one.
18660         (inline_free_summary): Rename to ...
18661         (ipa_free_fn_summary): ... this one.
18662         (pass_data_local_fn_summary, pass_local_fn_summary,
18663         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
18664         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
18665         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
18666         make_pass_ipa_fn_summary): New.
18667         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
18668         inline_write_summary, inline_free_summary): Remove.
18669         (ipa_free_fn_summary) : New.
18670         * ipa-inline.c (ipa_inline): Update.
18671         (pass_ipa_inline): Do not generate summaries.
18672         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
18673         Remove.
18674         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
18675         and add pass_ipa_fn_summary.
18676         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
18677         New.
18678         (make_pass_inline_parameters): Remove.
18680 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
18682         * omp-low.c (struct omp_context): Remove "default_kind" member.
18683         Adjust all users.
18685         * omp-offload.c (execute_oacc_device_lower): Remove the
18686         parallelism dimensions function attributes for unparallelized
18687         OpenACC kernels constructs.
18689 2017-05-23  Martin Liska  <mliska@suse.cz>
18691         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
18692         functions.
18693         (cgraph_edge::make_speculative): Likewise.
18694         (cgraph_edge::resolve_speculation): Likewise.
18695         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
18696         (cgraph_node::dump): Likewise.
18697         * cgraph.h: Likewise.
18698         * cgraphunit.c (analyze_functions): Likewise.
18699         (symbol_table::compile): Likewise.
18700         * ipa-cp.c (print_all_lattices): Likewise.
18701         (determine_versionability): Likewise.
18702         (initialize_node_lattices): Likewise.
18703         (ipcp_verify_propagated_values): Likewise.
18704         (estimate_local_effects): Likewise.
18705         (update_profiling_info): Likewise.
18706         (create_specialized_node): Likewise.
18707         (perhaps_add_new_callers): Likewise.
18708         (decide_about_value): Likewise.
18709         (decide_whether_version_node): Likewise.
18710         (identify_dead_nodes): Likewise.
18711         (ipcp_store_bits_results): Likewise.
18712         * ipa-devirt.c (dump_targets): Likewise.
18713         (ipa_devirt): Likewise.
18714         * ipa-icf.c (sem_item::dump): Likewise.
18715         (sem_function::equals): Likewise.
18716         (sem_variable::equals): Likewise.
18717         (sem_item_optimizer::read_section): Likewise.
18718         (sem_item_optimizer::execute): Likewise.
18719         (congruence_class::dump): Likewise.
18720         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
18721         (dump_inline_summary): Likewise.
18722         (estimate_node_size_and_time): Likewise.
18723         (inline_analyze_function): Likewise.
18724         * ipa-inline-transform.c (inline_call): Likewise.
18725         * ipa-inline.c (report_inline_failed_reason): Likewise.
18726         (want_early_inline_function_p): Likewise.
18727         (edge_badness): Likewise.
18728         (update_edge_key): Likewise.
18729         (inline_small_functions): Likewise.
18730         * ipa-profile.c (ipa_profile): Likewise.
18731         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
18732         (ipa_make_edge_direct_to_target): Likewise.
18733         (remove_described_reference): Likewise.
18734         (ipa_impossible_devirt_target): Likewise.
18735         (propagate_controlled_uses): Likewise.
18736         (ipa_print_node_params): Likewise.
18737         (ipcp_transform_function): Likewise.
18738         * ipa-pure-const.c (pure_const_read_summary): Likewise.
18739         (propagate_pure_const): Likewise.
18740         * ipa-reference.c (generate_summary): Likewise.
18741         (read_write_all_from_decl): Likewise.
18742         (propagate): Likewise.
18743         (ipa_reference_read_optimization_summary): Likewise.
18744         * ipa-utils.c (ipa_merge_profiles): Likewise.
18745         * ipa.c (walk_polymorphic_call_targets): Likewise.
18746         (symbol_table::remove_unreachable_nodes): Likewise.
18747         (ipa_single_use): Likewise.
18748         * passes.c (execute_todo): Likewise.
18749         * predict.c (drop_profile): Likewise.
18750         * symtab.c (symtab_node::get_dump_name): New function.
18751         (symtab_node::dump_name): Likewise.
18752         (symtab_node::dump_asm_name): Likewise.
18753         (symtab_node::dump_references): Likewise.
18754         (symtab_node::dump_referring): Likewise.
18755         (symtab_node::dump_base): Likewise.
18756         (symtab_node::debug_symtab): Likewise.
18757         * tree-sra.c (convert_callers_for_node): Likewise.
18758         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
18759         * value-prof.c (init_node_map): Likewise.
18761 2017-05-23  Martin Liska  <mliska@suse.cz>
18763         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
18764         and symtab_node::debug_symtab to symbol_table::debug.
18765         * cgraphunit.c (analyze_functions): Use the renamed function.
18766         (symbol_table::compile): Likewise.
18767         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
18768         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
18769         * passes.c (execute_todo): Likewise.
18770         * symtab.c (symbol_table::dump): New function.
18771         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
18773 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18775         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
18776         that nonconst implies exec.
18778 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18780         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
18781         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
18782         (inline_edge_summary_vec): Turn into ...
18783         (ipa_call_summaries): ... this one.
18784         (redirect_to_unreachable, edge_set_predicate,
18785         evaluate_properties_for_edge, inline_summary_alloc,
18786         reset_ipa_call_summary, reset_inline_summary,
18787         inline_summary_t::duplicate): Update.
18788         (inline_edge_duplication_hook): Turn to ...
18789         (ipa_call_summary_t::duplicate): ... this one.
18790         (inline_edge_removal_hook): Turn to ...
18791         (ipa_call_summary_t::remove): ... this one.
18792         (dump_inline_edge_summary): Turn to ...
18793         (dump_ipa_call_summary): ... this one.
18794         (estimate_function_body_sizes): Update.
18795         (inline_update_callee_summaries): Update.
18796         (remap_edge_change_prob): Update.
18797         (remap_edge_summaries): Update.
18798         (inline_merge_summary): Update.
18799         (do_estimate_edge_time): Update.
18800         (inline_generate_summary): Update.
18801         (inline_read_section): Update.
18802         (inline_read_summary): Update.
18803         (inline_free_summary): Update.
18804         * ipa-inline.c (can_inline_edge_p): Update.
18805         (compute_inlined_call_time): Update.
18806         (want_inline_small_function_p): Update.
18807         (edge_badness): Update.
18808         (early_inliner): Update.
18809         * ipa-inline.h (inline_edge_summary): Turn to ...
18810         (ipa_call_summary): ... this one.
18811         (ipa_call_summary_t): New class.
18812         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
18813         (ipa_call_summaries): New.
18814         (inline_edge_summary): Remove.
18815         (estimate_edge_growth): Update.
18816         * ipa-profile.c (ipa_propagate_frequency_1): Update.
18817         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
18818         * ipa-split.c (execute_split_functions): Update.
18819         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
18821 2017-05-23  Tom de Vries  <tom@codesourcery.com>
18823         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
18824         attributes): Document rdrand effective target.
18826 2017-05-23  Tom de Vries  <tom@codesourcery.com>
18828         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
18829         attributes): Sort alphabetically.
18831 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
18833         * config/avr/genmultilib.awk: Use gsub instead of gensub.
18835 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18837         PR target/80718
18838         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
18839         V2DF/V2DI splat into two separate patterns, one that handles
18840         registers, and the other that only handles memory.  Drop support
18841         for splatting from a GPR on ISA 2.07 and then splitting the
18842         splat into direct move and splat.
18843         (vsx_splat_<mode>_reg): Likewise.
18844         (vsx_splat_<mode>_mem): Likewise.
18846 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
18848         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
18850 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
18852         PR middle-end/80809
18853         * omp-low.c (finish_taskreg_remap): New function.
18854         (finish_taskreg_scan): If unit size of ctx->record_type
18855         is non-constant, unshare the size expression and replace
18856         decls in it with possible outer var refs.
18858         PR middle-end/80809
18859         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
18860         GOVD_SHARED rather than GOVD_PRIVATE with it.
18861         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
18862         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
18864         PR middle-end/80853
18865         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
18866         as last argument to build_outer_var_ref for pointer bases of array
18867         section reductions.
18869 2017-05-19  Martin Sebor  <msebor@redhat.com>
18871         * print-tree.c (print_node): Print DECL_READ_P flag.
18873 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
18875         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
18876         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
18877         * cgraph.c: Likewise.
18878         * cgraphunit.c: Likewise.
18879         * gengtype.c: Likewise.
18880         * ipa-cp.c: Likewise.
18881         * ipa-devirt.c: Likewise.
18882         * ipa-icf.c: Likewise.
18883         * ipa-predicate.c: Likewise.
18884         * ipa-profile.c: Likewise.
18885         * ipa-prop.c: Likewise.
18886         * ipa-split.c: Likewise.
18887         * ipa.c: Likewise.
18888         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
18889         edge_predicate_pool, dump_inline_hints,
18890         inline_summary::account_size_time, redirect_to_unreachable,
18891         edge_set_predicate, set_hint_predicate,
18892         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
18893         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
18894         inline_summary_t::remove, remap_hint_predicate_after_duplication,
18895         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
18896         ipa_call_summary_t::remove, initialize_growth_caches,
18897         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
18898         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
18899         mark_modified, unmodified_parm_1, unmodified_parm,
18900         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
18901         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
18902         compute_bb_predicates, will_be_nonconstant_expr_predicate,
18903         will_be_nonconstant_predicate, record_modified_bb_info,
18904         get_minimal_bb, record_modified, param_change_prob,
18905         phi_result_unknown_predicate, predicate_for_phi_result,
18906         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
18907         estimate_function_body_sizes, compute_inline_parameters,
18908         compute_inline_parameters_for_curren, pass_data_inline_parameters,
18909         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
18910         inline_update_callee_summaries, remap_edge_change_prob,
18911         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
18912         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
18913         inline_analyze_function, inline_summary_t::insert,
18914         inline_generate_summary, read_ipa_call_summary, inline_read_section,
18915         inline_read_summary, write_ipa_call_summary, inline_write_summary,
18916         inline_free_summary): Move to ipa-fnsummary.h
18917         (predicate_t): Remove.
18918         * ipa-fnsummary.c: New file.
18919         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
18920         (enum inline_hints_vals, inline_hints, agg_position_info,
18921         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
18922         inline_summaries, ipa_call_summary, ipa_call_summary_t,
18923         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
18924         dump_inline_summary, dump_inline_hints, inline_generate_summary,
18925         inline_read_summary, inline_write_summary, inline_free_summary,
18926         inline_analyze_function, initialize_inline_failed,
18927         inline_merge_summary, inline_update_overall_summary,
18928         compute_inline_parameters): Move to ipa-fnsummary.h
18929         * ipa-fnsummary.h: New file.
18930         * ipa-inline-transform.h: Include ipa-inline.h.
18931         * ipa-inline.c: LIkewise.
18933 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
18935         * ipa-inline.c (edge_badness): Use inlined_time instead of
18936         inline_summaries->get.
18938 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
18940         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
18942 2017-05-22  Nathan Sidwell  <nathan@acm.org>
18944         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
18945         (fdump-lang): Document 'raw' option.
18946         * dumpfile.h (TDI_tu): Delete.
18947         * dumpfile.c (dump_files): Remove translation-unit.
18948         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
18950 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
18952         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
18953         command option from $(AWK) call.
18954         * config/avr/genmultilib.awk: Simplify and rewrite so that it
18955         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
18956         [FORMAT]: Remove handling of variable.
18957         * config/avr/t-multilib: Regenerate.
18959 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
18961         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
18962         self_time.
18963         (dump_inline_summary): Do not print self_time.
18964         (estimate_function_body_sizes): Do not set self_time.
18965         (compute_inline_parameters): Likewise.
18966         (inline_read_section, inline_write_summary): Do not stream self_time.
18967         * ipa-inline.h (inline_summary): Drop self_time.
18969 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
18971         * ipa-inline-analysis.c (account_size_time): Rename to ...
18972         (inline_summary::account_size_time): ... this one.
18973         (reset_ipa_call_summary): Turn to ...
18974         (ipa_call_summary::reset): ... this one.
18975         (reset_inline_summary): Turn to ...
18976         (inline_summary::reset): ... this one.
18977         (inline_summary_t::remove): Update.
18978         (inline_summary_t::duplicate): Update.
18979         (ipa_call_summary_t::remove): Update.
18980         (dump_inline_summary): Update.
18981         (estimate_function_body_sizes): Update.
18982         (compute_inline_parameters): Update.
18983         (estimate_node_size_and_time): Update.
18984         (inline_merge_summary): Update.
18985         (inline_update_overall_summary): Update.
18986         (inline_read_section): Update.
18987         (inline_write_summary): Update.
18988         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
18989         add account_size_time and reset member functions.
18990         (ipa_call_summary): Add reset function.
18991         * ipa-predicate.h (predicate::operator &): Constify.
18993 2017-05-22  Richard Biener  <rguenther@suse.de>
18995         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
18997 2017-05-19  Jason Merrill  <jason@redhat.com>
18999         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
19001 2017-05-19  Marek Polacek  <polacek@redhat.com>
19003         PR sanitizer/80800
19004         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
19005         TYPE_OVERFLOW_WRAPS checks.
19007 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
19009         * tree-core.h (enum omp_clause_default_kind): Add
19010         "OMP_CLAUSE_DEFAULT_PRESENT".
19011         * tree-pretty-print.c (dump_omp_clause): Handle it.
19012         * gimplify.c (enum gimplify_omp_var_data): Add
19013         "GOVD_MAP_FORCE_PRESENT".
19014         (gimplify_adjust_omp_clauses_1): Map it to
19015         "GOMP_MAP_FORCE_PRESENT".
19016         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
19018         * gimplify.c (oacc_default_clause): Clarify.
19020 2017-05-19  Nathan Sidwell  <nathan@acm.org>
19022         LANG_HOOK_REGISTER_DUMPS
19023         * toplev.c (general_init): Call register dump lang hook.
19024         * doc/invoke.texi: Document -fdump-lang option family.
19025         * dumpfile.c (dump_files): Remove class dump here.
19026         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
19027         * dumpfile.h (tree_dump_index): Remove TDI_class.
19028         * langhooks-def.h (lhd_register_dumps): Declare.
19029         (LANG_HOOKS_REGISTER_DUMPS): Define.
19030         (LANG_HOOKS_INITIALIZER): Add it.
19031         * langhooks.c (lhd_register_dumps): Define.
19032         * langhooks.h (struct lang_hooks): Add register_dumps.
19034 2017-05-19  Nathan Sidwell  <nathan@acm.org>
19036         * context.h (context::set_passes): New.
19037         * context.c (context::context): Do not create pass manager.
19038         * toplev.c (general_init): Create pass manager here.
19040 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
19042         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
19043         use this splitter if two add or or instructions would also work for
19044         the constant we want to generate.
19046 2017-05-19  Richard Biener  <rguenther@suse.de>
19048         PR build/80821
19049         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
19050         predicate evaluation.
19052 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
19054         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
19055         add ctor.
19056         * ipa-inline.c (want_inline_small_function_p): Do not cast to
19057         unsigned.
19059 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
19061         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
19062         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
19063         (inline_edge_summary_vec): Turn into ...
19064         (ipa_call_summaries): ... this one.
19065         (redirect_to_unreachable, edge_set_predicate,
19066         evaluate_properties_for_edge, inline_summary_alloc,
19067         reset_ipa_call_summary, reset_inline_summary,
19068         inline_summary_t::duplicate): Update.
19069         (inline_edge_duplication_hook): Turn to ...
19070         (ipa_call_summary_t::duplicate): ... this one.
19071         (inline_edge_removal_hook): Turn to ...
19072         (ipa_call_summary_t::remove): ... this one.
19073         (dump_inline_edge_summary): Turn to ...
19074         (dump_ipa_call_summary): ... this one.
19075         (estimate_function_body_sizes): Update.
19076         (inline_update_callee_summaries): Update.
19077         (remap_edge_change_prob): Update.
19078         (remap_edge_summaries): Update.
19079         (inline_merge_summary): Update.
19080         (do_estimate_edge_time): Update.
19081         (inline_generate_summary): Update.
19082         (inline_read_section): Update.
19083         (inline_read_summary): Update.
19084         (inline_free_summary): Update.
19085         * ipa-inline.c (can_inline_edge_p): Update.
19086         (compute_inlined_call_time): Update.
19087         (want_inline_small_function_p): Update.
19088         (edge_badness): Update.
19089         (early_inliner): Update.
19090         * ipa-inline.h (inline_edge_summary): Turn to ...
19091         (ipa_call_summary): ... this one.
19092         (ipa_call_summary_t): New class.
19093         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
19094         (ipa_call_summaries): New.
19095         (inline_edge_summary): Remove.
19096         (estimate_edge_growth): Update.
19097         * ipa-profile.c (ipa_propagate_frequency_1): Update.
19098         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
19099         * ipa-split.c (execute_split_functions): Update.
19100         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
19102 2017-05-19  Richard Biener  <rguenther@suse.de>
19104         PR middle-end/80764
19105         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
19107 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
19109         * config/rs6000/rs6000.c (struct machine_function): Add field
19110         fpr_is_wrapped_separately.
19111         (rs6000_get_separate_components): Use 64 components.  Handle the
19112         new FPR components.
19113         (rs6000_components_for_bb): Handle the FPR components.
19114         (rs6000_emit_prologue_components): Handle the FPR components.
19115         (rs6000_emit_epilogue_components): Handle the FPR components.
19116         (rs6000_set_handled_components): Handle the FPR components.
19117         (rs6000_emit_prologue): Don't output prologue code for those FPRs
19118         that are already separately shrink-wrapped.
19119         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
19120         that are already separately shrink-wrapped.
19122 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
19124         PR target/80510
19125         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
19126         New predicate.
19128         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
19129         (define_peephole2 for Altivec d-form load): Add peepholes to catch
19130         cases where the register allocator uses a move and an offsettable
19131         memory operation to/from a FPR register on ISA 2.06/2.07.
19132         (define_peephole2 for Altivec d-form store): Likewise.
19134 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
19136         PR target/80799
19137         * config/i386/mmx.md (*mov<mode>_internal): Enable
19138         alternatives 11, 12, 13 and 14 also for 32bit targets.
19139         Remove alternatives 15, 16, 17 and 18.
19140         * config/i386/sse.md (vec_concatv2di): Change
19141         alternative (!x, *y) to (x, ?!*Yn).
19143 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
19145         * dumpfile.h (enum dump_kind): Remove stray comma.
19147 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
19149         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
19150         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
19151         predicate::num_conditions
19152         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
19153         (CHANGED): turn into predicate::changed.
19154         (agg_position_info): Move to ipa-predicate.h
19155         (add_condition, predicate::add_clause, predicate::operator &=,
19156         predicate::or_with, predicate::evaluate, predicate::probability,
19157         dump_condition, dump_clause, predicate::dump,
19158         predicate::remap_after_duplication, predicate::remap_after_inlining,
19159         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
19160         (evaluate_conditions_for_known_args): Update.
19161         (set_cond_stmt_execution_predicate): Update.
19162         * ipa-inline.h: Include ipa-predicate.h
19163         (condition, inline_param_summary, conditions, agg_position_info,
19164         predicate): Move to ipa-predicate.h
19165         * ipa-predicate.c: New file.
19166         * ipa-predicate.h: New file.
19168 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
19170         * final.c (leaf_function_p): Check we are not in a sequence.
19172 2017-05-18  Martin Liska  <mliska@suse.cz>
19174         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
19175         * dumpfile.c (dump_register): Use new enum dump_kind.
19176         (get_dump_file_name): Likewise.
19177         (dump_enable_all): Likewise.
19178         (dump_switch_p_1): Likewise.
19179         (enable_rtl_dump_file): Remove usage of TDF_RTL.
19180         * dumpfile.h (enum dump_kind): New enum type.
19181         (struct dump_file_info): Create constructor and
19182         format fields and comments.
19183         * passes.c (pass_manager::register_one_dump_file):
19184         Use num dump_kind.
19185         * statistics.c (statistics_early_init): Likewise.
19186         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
19187         TDF_TREE with TDF_SLIM.
19188         (gather_memory_references_ref): Likewise.
19190 2017-05-18  Martin Liska  <mliska@suse.cz>
19192         * vec.h (struct vnull): Use it.
19194 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
19196         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
19197         (true_predicate, false_predicate, true_predicate_p,
19198         false_predicate_p): Remove.
19199         (single_cond_predicate, not_inlined_predicate): Turn to member function
19200         in ipa-inline.h
19201         (add_condition): Update.
19202         (add_clause): Turn to...
19203         (predicate::add_clause): ... this one; update; allow passing NULL
19204         as parameter.
19205         (and_predicates): Turn to ...
19206         (predicate::operator &=): ... this one.
19207         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
19208         (or_predicates): Turn to ...
19209         (predicate::or_with): ... this one.
19210         (evaluate_predicate): Turn to ...
19211         (predicate::evaluate): ... this one.
19212         (predicate_probability): Turn to ...
19213         (predicate::probability): ... this one.
19214         (dump_condition): Update.
19215         (dump_predicate): Turn to ...
19216         (predicate::dump): ... this one.
19217         (account_size_time): Update.
19218         (edge_set_predicate): Update.
19219         (set_hint_predicate): UPdate.
19220         (evaluate_conditions_for_known_args): Update.
19221         (evaluate_properties_for_edge): Update.
19222         (remap_predicate_after_duplication): Turn to...
19223         (predicate::remap_after_duplication): ... this one.
19224         (remap_hint_predicate_after_duplication): Update.
19225         (inline_summary_t::duplicate): UPdate.
19226         (dump_inline_edge_summary): Update.
19227         (dump_inline_summary): Update.
19228         (set_cond_stmt_execution_predicate): Update.
19229         (set_switch_stmt_execution_predicate): Update.
19230         (compute_bb_predicates): Update.
19231         (will_be_nonconstant_expr_predicate): Update.
19232         (will_be_nonconstant_predicate): Update.
19233         (phi_result_unknown_predicate): Update.
19234         (predicate_for_phi_result): Update.
19235         (array_index_predicate): Update.
19236         (estimate_function_body_sizes): Update.
19237         (estimate_node_size_and_time): Update.
19238         (estimate_ipcp_clone_size_and_time): Update.
19239         (remap_predicate): Rename to ...
19240         (predicate::remap_after_inlining): ... this one.
19241         (remap_hint_predicate): Update.
19242         (inline_merge_summary): Update.
19243         (inline_update_overall_summary): Update.
19244         (estimate_size_after_inlining): Update.
19245         (read_predicate): Rename to ...
19246         (predicate::stream_in): ... this one.
19247         (read_inline_edge_summary): Update.
19248         (write_predicate): Rename to ...
19249         (predicate::stream_out): ... this one.
19250         (write_inline_edge_summary): Update.
19251         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
19252         (clause_t): Turn to uint32_t
19253         (predicate): Turn to class; implement constructor and operators
19254         ==, !=, &
19255         (size_time_entry): Update.
19256         (inline_summary): Update.
19257         (inline_edge_summary): Update.
19259 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
19261         * fold-const.c (fold_binary_loc): Move transformation...
19262         * match.pd (C - X CMP X): ... here.
19264 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
19266         * config/sparc/sparc.c (sparc_option_override): Set function
19267         alignment for -mcpu=niagara7 to 64 to match the I$ line.
19268         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
19269         latency to 1.
19270         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
19271         latency to 2.
19272         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
19274 2017-05-18  Marek Polacek  <polacek@redhat.com>
19276         PR sanitizer/80797
19277         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
19278         (pass_ubsan::execute): Call gimple_assign_single_p instead of
19279         gimple_assign_load_p.
19281 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
19283         PR middle-end/80692
19284         * real.c (do_compare): Give decimal_do_compare preference over
19285         comparing just the signs.
19287 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
19289         * doc/md.texi (Canonicalization of Instructions): Describe the
19290         canonical form of instructions that inherently set a condition
19291         code register.
19293 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
19295         PR middle-end/80775
19296         * tree-cfg.c: Move deletion of unreachable case statements to after
19297         the merging of consecutive case labels.
19299 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19301         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
19302         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
19303         restoring of callee-saved registers.
19305 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
19307         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
19308         * config/visium/visium.c (single_set_and_flags): Likewise.
19309         * config/visium/visium.md (Substitutions): Likewise.
19311 2017-05-17  Martin Liska  <mliska@suse.cz>
19313         * cfg.c: Introduce dump_flags_t type and
19314         use it instead of int type.
19315         * cfg.h: Likewise.
19316         * cfghooks.c: Likewise.
19317         * cfghooks.h (struct cfg_hooks): Likewise.
19318         * cfgrtl.c: Likewise.
19319         * cfgrtl.h: Likewise.
19320         * cgraph.c (cgraph_node::get_body): Likewise.
19321         * coretypes.h: Likewise.
19322         * domwalk.c: Likewise.
19323         * domwalk.h: Likewise.
19324         * dumpfile.c (struct dump_option_value_info): Likewise.
19325         (dump_enable_all): Likewise.
19326         (dump_switch_p_1): Likewise.
19327         (opt_info_switch_p): Likewise.
19328         * dumpfile.h (enum tree_dump_index): Likewise.
19329         (struct dump_file_info): Likewise.
19330         * genemit.c: Likewise.
19331         * generic-match-head.c: Likewise.
19332         * gengtype.c (open_base_files): Likewise.
19333         * gimple-pretty-print.c: Likewise.
19334         * gimple-pretty-print.h: Likewise.
19335         * graph.c (print_graph_cfg): Likewise.
19336         * graphite-scop-detection.c (dot_all_sese): Likewise.
19337         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
19338         * loop-unroll.c (report_unroll): Likewise.
19339         * passes.c (pass_manager::register_one_dump_file): Likewise.
19340         * print-tree.c: Likewise.
19341         * statistics.c: Likewise.
19342         * tree-cfg.c: Likewise.
19343         * tree-cfg.h: Likewise.
19344         * tree-dfa.c: Likewise.
19345         * tree-dfa.h: Likewise.
19346         * tree-dump.c (dump_function): Likewise.
19347         * tree-dump.h (struct dump_info): Likewise.
19348         * tree-pretty-print.c: Likewise.
19349         * tree-pretty-print.h: Likewise.
19350         * tree-ssa-live.c: Likewise.
19351         * tree-ssa-live.h: Likewise.
19352         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
19353         * tree-vect-loop.c: Likewise.
19354         * tree-vect-slp.c: Likewise.
19356 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
19357             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19359         PR tree-optimization/80457
19360         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
19361         of all arguments to a statement as scalar_to_vec operations.
19362         (vectorizable_call): Adjust call to vect_model_simple_cost for
19363         new parameter.
19364         (vectorizable_conversion): Likewise.
19365         (vectorizable_assignment): Likewise.
19366         (vectorizable_shift): Likewise.
19367         (vectorizable_operation): Likewise.
19368         (vectorizable_comparison): Likewise.
19369         (vect_is_simple_cond): Record the def types for operands.
19370         (vectorizable_condition): Likewise, call vect_model_simple_cost.
19371         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
19372         for statement argument count.
19374 2017-05-16  Carl Love  <cel@us.ibm.com>
19376         * config/rs6000/rs6000-c: Add support for built-in functions
19377         vector unsigned long long vec_bperm (vector unsigned long long,
19378                                              vector unsigned char)
19379         vector signed long long vec_mule (vector signed int,
19380                                           vector signed int)
19381         vector unsigned long long vec_mule (vector unsigned int,
19382                                             vector unsigned int)
19383         vector signed long long vec_mulo (vector signed int,
19384                                           vector signed int)
19385         vector unsigned long long vec_mulo (vector unsigned int,
19386                                             vector unsigned int)
19387         vector signed char vec_sldw (vector signed char,
19388                                      vector signed char,
19389                                      const int)
19390         vector unsigned char vec_sldw (vector unsigned char,
19391                                        vector unsigned char,
19392                                        const int)
19393         vector signed short vec_sldw (vector signed short,
19394                                       vector signed short,
19395                                       const int)
19396         vector unsigned short vec_sldw (vector unsigned short,
19397                                         vector unsigned short,
19398                                         const int)
19399         vector signed int vec_sldw (vector signed int,
19400                                     vector signed int,
19401                                     const int)
19402         vector unsigned int vec_sldw (vector unsigned int,
19403                                       vector unsigned int,
19404                                       const int)
19405         vector signed long long vec_sldw (vector signed long long,
19406                                           vector signed long long,
19407                                           const int)
19408         vector unsigned long long vec_sldw (vector unsigned long long,
19409                                             vector unsigned long long,
19410                                             const int)
19411         * config/rs6000/rs6000-c: Add support for built-in functions
19412         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
19413         * config/rs6000/altivec.h: Add defintion for vec_sldw.
19414         * doc/extend.texi: Update the built-in documentation for the
19415         new built-in functions.
19417 2017-05-16  Marek Polacek  <polacek@redhat.com>
19419         PR sanitizer/80536
19420         PR sanitizer/80386
19421         * tree.c (save_expr): Don't fold the expression.
19423 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
19425         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
19426         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
19427         and (?*y,m).  Update insn attributes.
19429 2017-05-16  Martin Liska  <mliska@suse.cz>
19431         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
19432         flags argument of print_gimple_stmt, print_gimple_expr,
19433         print_generic_stmt and print_generic_expr.
19434         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
19435         * coretypes.h: Likewise.
19436         * except.c (dump_eh_tree): Likewise.
19437         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
19438         * gimple-pretty-print.h: Likewise.
19439         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
19440         (backprop::push_to_worklist): Likewise.
19441         (backprop::pop_from_worklist): Likewise.
19442         (backprop::process_use): Likewise.
19443         (backprop::intersect_uses): Likewise.
19444         (note_replacement): Likewise.
19445         * gimple-ssa-store-merging.c
19446         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
19447         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
19448         (pass_store_merging::execute): Likewise.
19449         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
19450         (ssa_base_cand_dump_callback): Likewise.
19451         (dump_incr_vec): Likewise.
19452         (replace_refs): Likewise.
19453         (replace_mult_candidate): Likewise.
19454         (create_add_on_incoming_edge): Likewise.
19455         (create_phi_basis): Likewise.
19456         (insert_initializers): Likewise.
19457         (all_phi_incrs_profitable): Likewise.
19458         (introduce_cast_before_cand): Likewise.
19459         (replace_one_candidate): Likewise.
19460         * gimplify.c (gimplify_expr): Likewise.
19461         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
19462         (set_rename): Likewise.
19463         (rename_uses): Likewise.
19464         (copy_loop_phi_nodes): Likewise.
19465         (add_close_phis_to_merge_points): Likewise.
19466         (copy_loop_close_phi_args): Likewise.
19467         (copy_cond_phi_args): Likewise.
19468         (graphite_copy_stmts_from_block): Likewise.
19469         (translate_pending_phi_nodes): Likewise.
19470         * graphite-poly.c (print_pdr): Likewise.
19471         (dump_gbb_cases): Likewise.
19472         (dump_gbb_conditions): Likewise.
19473         (print_scop_params): Likewise.
19474         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
19475         (build_cross_bb_scalars_use): Likewise.
19476         (gather_bbs::before_dom_children): Likewise.
19477         * hsa-dump.c (dump_hsa_immed): Likewise.
19478         * ipa-cp.c (print_ipcp_constant_value): Likewise.
19479         (get_replacement_map): Likewise.
19480         * ipa-inline-analysis.c (dump_condition): Likewise.
19481         (estimate_function_body_sizes): Likewise.
19482         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
19483         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
19484         * ipa-prop.c (ipa_dump_param): Likewise.
19485         (ipa_print_node_jump_functions_for_edge): Likewise.
19486         (ipa_modify_call_arguments): Likewise.
19487         (ipa_modify_expr): Likewise.
19488         (ipa_dump_param_adjustments): Likewise.
19489         (ipa_dump_agg_replacement_values): Likewise.
19490         (ipcp_modif_dom_walker::before_dom_children): Likewise.
19491         * ipa-pure-const.c (check_stmt): Likewise.
19492         (pass_nothrow::execute): Likewise.
19493         * ipa-split.c (execute_split_functions): Likewise.
19494         * omp-offload.c (dump_oacc_loop_part): Likewise.
19495         (dump_oacc_loop): Likewise.
19496         * trans-mem.c (tm_log_emit): Likewise.
19497         (tm_memopt_accumulate_memops): Likewise.
19498         (dump_tm_memopt_set): Likewise.
19499         (dump_tm_memopt_transform): Likewise.
19500         * tree-cfg.c (gimple_verify_flow_info): Likewise.
19501         (print_loop): Likewise.
19502         * tree-chkp-opt.c (chkp_print_addr): Likewise.
19503         (chkp_gather_checks_info): Likewise.
19504         (chkp_get_check_result): Likewise.
19505         (chkp_remove_check_if_pass): Likewise.
19506         (chkp_use_outer_bounds_if_possible): Likewise.
19507         (chkp_reduce_bounds_lifetime): Likewise.
19508         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
19509         (chkp_mark_completed_bounds): Likewise.
19510         (chkp_register_incomplete_bounds): Likewise.
19511         (chkp_mark_invalid_bounds): Likewise.
19512         (chkp_maybe_copy_and_register_bounds): Likewise.
19513         (chkp_build_returned_bound): Likewise.
19514         (chkp_get_bound_for_parm): Likewise.
19515         (chkp_build_bndldx): Likewise.
19516         (chkp_get_bounds_by_definition): Likewise.
19517         (chkp_generate_extern_var_bounds): Likewise.
19518         (chkp_get_bounds_for_decl_addr): Likewise.
19519         * tree-chrec.c (chrec_apply): Likewise.
19520         * tree-data-ref.c (dump_data_reference): Likewise.
19521         (dump_subscript): Likewise.
19522         (dump_data_dependence_relation): Likewise.
19523         (analyze_overlapping_iterations): Likewise.
19524         * tree-inline.c (expand_call_inline): Likewise.
19525         (tree_function_versioning): Likewise.
19526         * tree-into-ssa.c (dump_defs_stack): Likewise.
19527         (dump_currdefs): Likewise.
19528         (dump_names_replaced_by): Likewise.
19529         (dump_update_ssa): Likewise.
19530         (update_ssa): Likewise.
19531         * tree-object-size.c (pass_object_sizes::execute): Likewise.
19532         * tree-parloops.c (build_new_reduction): Likewise.
19533         (try_create_reduction_list): Likewise.
19534         (ref_conflicts_with_region): Likewise.
19535         (oacc_entry_exit_ok_1): Likewise.
19536         (oacc_entry_exit_single_gang): Likewise.
19537         * tree-pretty-print.h: Likewise.
19538         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
19539         (get_scalar_evolution): Likewise.
19540         (add_to_evolution): Likewise.
19541         (get_loop_exit_condition): Likewise.
19542         (analyze_evolution_in_loop): Likewise.
19543         (analyze_initial_condition): Likewise.
19544         (analyze_scalar_evolution): Likewise.
19545         (instantiate_scev): Likewise.
19546         (number_of_latch_executions): Likewise.
19547         (gather_chrec_stats): Likewise.
19548         (final_value_replacement_loop): Likewise.
19549         (scev_const_prop): Likewise.
19550         * tree-sra.c (dump_access): Likewise.
19551         (disqualify_candidate): Likewise.
19552         (create_access): Likewise.
19553         (reject): Likewise.
19554         (maybe_add_sra_candidate): Likewise.
19555         (create_access_replacement): Likewise.
19556         (analyze_access_subtree): Likewise.
19557         (analyze_all_variable_accesses): Likewise.
19558         (sra_modify_assign): Likewise.
19559         (initialize_constant_pool_replacements): Likewise.
19560         (find_param_candidates): Likewise.
19561         (decide_one_param_reduction): Likewise.
19562         (replace_removed_params_ssa_names): Likewise.
19563         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
19564         * tree-ssa-copy.c (dump_copy_of): Likewise.
19565         (copy_prop_visit_cond_stmt): Likewise.
19566         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
19567         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
19568         (record_equivalences_from_stmt): Likewise.
19569         * tree-ssa-dse.c (compute_trims): Likewise.
19570         (delete_dead_call): Likewise.
19571         (delete_dead_assignment): Likewise.
19572         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
19573         (forward_propagate_into_cond): Likewise.
19574         (pass_forwprop::execute): Likewise.
19575         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
19576         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
19577         Likewise.
19578         (move_computations_worker): Likewise.
19579         (execute_sm): Likewise.
19580         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
19581         (remove_exits_and_undefined_stmts): Likewise.
19582         (remove_redundant_iv_tests): Likewise.
19583         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
19584         (adjust_iv_update_pos): Likewise.
19585         * tree-ssa-math-opts.c (bswap_replace): Likewise.
19586         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
19587         (value_replacement): Likewise.
19588         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
19589         * tree-ssa-pre.c (print_pre_expr): Likewise.
19590         (get_representative_for): Likewise.
19591         (create_expression_by_pieces): Likewise.
19592         (insert_into_preds_of_block): Likewise.
19593         (eliminate_insert): Likewise.
19594         (eliminate_dom_walker::before_dom_children): Likewise.
19595         (eliminate): Likewise.
19596         (remove_dead_inserted_code): Likewise.
19597         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
19598         * tree-ssa-reassoc.c (get_rank): Likewise.
19599         (eliminate_duplicate_pair): Likewise.
19600         (eliminate_plus_minus_pair): Likewise.
19601         (eliminate_not_pairs): Likewise.
19602         (undistribute_ops_list): Likewise.
19603         (eliminate_redundant_comparison): Likewise.
19604         (update_range_test): Likewise.
19605         (optimize_range_tests_var_bound): Likewise.
19606         (optimize_vec_cond_expr): Likewise.
19607         (rewrite_expr_tree): Likewise.
19608         (rewrite_expr_tree_parallel): Likewise.
19609         (linearize_expr): Likewise.
19610         (break_up_subtract): Likewise.
19611         (linearize_expr_tree): Likewise.
19612         (attempt_builtin_powi): Likewise.
19613         (attempt_builtin_copysign): Likewise.
19614         (transform_stmt_to_copy): Likewise.
19615         (transform_stmt_to_multiply): Likewise.
19616         (dump_ops_vector): Likewise.
19617         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
19618         (print_scc): Likewise.
19619         (set_ssa_val_to): Likewise.
19620         (visit_reference_op_store): Likewise.
19621         (visit_use): Likewise.
19622         (sccvn_dom_walker::before_dom_children): Likewise.
19623         (run_scc_vn): Likewise.
19624         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
19625         Likewise.
19626         (expr_hash_elt::print): Likewise.
19627         (const_and_copies::pop_to_marker): Likewise.
19628         (const_and_copies::record_const_or_copy_raw): Likewise.
19629         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
19630         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
19631         (dump_predicates): Likewise.
19632         (find_uninit_use): Likewise.
19633         (warn_uninitialized_phi): Likewise.
19634         (pass_late_warn_uninitialized::execute): Likewise.
19635         * tree-ssa.c (verify_vssa): Likewise.
19636         (verify_ssa): Likewise.
19637         (maybe_optimize_var): Likewise.
19638         * tree-vrp.c (dump_value_range): Likewise.
19639         (dump_all_value_ranges): Likewise.
19640         (dump_asserts_for): Likewise.
19641         (register_edge_assert_for_2): Likewise.
19642         (vrp_visit_cond_stmt): Likewise.
19643         (vrp_visit_switch_stmt): Likewise.
19644         (vrp_visit_stmt): Likewise.
19645         (vrp_visit_phi_node): Likewise.
19646         (simplify_cond_using_ranges_1): Likewise.
19647         (fold_predicate_in): Likewise.
19648         (evrp_dom_walker::before_dom_children): Likewise.
19649         (evrp_dom_walker::push_value_range): Likewise.
19650         (evrp_dom_walker::pop_value_range): Likewise.
19651         (execute_early_vrp): Likewise.
19653 2017-05-16  Richard Biener  <rguenther@suse.de>
19655         * dwarf2out.c (loc_list_from_tree_1): Do not create
19656         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
19658 2017-05-16  Richard Biener  <rguenther@suse.de>
19660         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
19661         just generated.
19662         (note_variable_value_in_expr): If we resolved the decl ref
19663         do not push to the stack.
19665 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
19667         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
19668         operations in fast-math mode.
19669         (vaddq_f16): Likewise.
19670         (vmul_f16): Likewise.
19671         (vmulq_f16): Likewise.
19672         (vsub_f16): Likewise.
19673         (vsubq_f16): Likewise.
19674         * config/arm/neon.md (add<mode>3): New.
19675         (sub<mode>3): New.
19676         (fma:<VH:mode>3): New.  Also remove outdated comment.
19677         (mul<mode>3): New.
19679 2017-05-16  Martin Liska  <mliska@suse.cz>
19681         PR ipa/79849.
19682         PR ipa/79850.
19683         * ipa-devirt.c (warn_types_mismatch): Fix typo.
19684         (odr_types_equivalent_p): Likewise.
19686 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
19688         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
19690 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
19692         PR target/80425
19693         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
19694         non-interunit SSE move alternatives with '?'.
19695         (zero-extendsidi peephole2): New peephole to skip intermediate
19696         general register in SSE zero-extend sequence.
19698 2017-05-15  Jeff Law  <law@redhat.com>
19700         * reorg.c (relax_delay_slots): Create a new variable to hold
19701         the temporary target rather than clobbering TARGET_LABEL.
19703         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
19704         missing argument to extract_bit_field call.
19705         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
19707 2017-05-15  Martin Liska  <mliska@suse.cz>
19709         PR driver/31468
19710         * gcc.c (process_command): Do not allow empty argument of -o option.
19712 2017-05-15  Renlin Li  <renlin.li@arm.com>
19714         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
19715         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
19716         * config/aarch64/constraints.md (Usf): Add long call check.
19717         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
19718         (call_value): Likewise.
19719         (sibcall): Likewise.
19720         (sibcall_value): Likewise.
19721         (call_insn): New.
19722         (call_value_insn): New.
19723         (sibcall_insn): Update rtx pattern.
19724         (sibcall_value_insn): Likewise.
19725         (call_internal): Remove.
19726         (call_value_internal): Likewise.
19727         (sibcall_internal): Likewise.
19728         (sibcall_value_internal): Likewise.
19729         (call_reg): Likewise.
19730         (call_symbol): Likewise.
19731         (call_value_reg): Likewise.
19732         (call_value_symbol): Likewise.
19734 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
19736         PR target/80600
19737         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
19739 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
19741         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
19742         compatible with CCGOCmode and with CCZmode.
19744 2017-05-14  Martin Sebor  <msebor@redhat.com>
19746         PR middle-end/77671
19747         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
19748         (gimple_fold_builtin_snprintf): Same.
19749         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
19750         (gimple_fold_builtin_snprintf): Same.
19751         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
19752         of character types.
19753         (is_call_safe): New function.
19754         (try_substitute_return_value): Call it.
19755         (try_simplify_call): New function.
19756         (pass_sprintf_length::handle_gimple_call): Call it.
19758 2017-05-14  Martin Sebor  <msebor@redhat.com>
19760         PR middle-end/80669
19761         * builtins.c (expand_builtin_stpncpy): Simplify.
19763 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
19765         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
19766         * config/i386/i386.h
19767         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
19768         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
19769         (struct machine_function): Add new members call_ms2sysv,
19770         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
19771         (struct machine_frame_state): New fields sp_realigned and
19772         sp_realigned_offset.
19773         * config/i386/i386.c
19774         (enum xlogue_stub): New enum.
19775         (enum xlogue_stub_sets): New enum.
19776         (class xlogue_layout): New class.
19777         (struct ix86_frame): New fields stack_realign_allocate_offset,
19778         stack_realign_offset and outlined_save_offset.  Modify comments to
19779         detail stack layout when using out-of-line stubs.
19780         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
19781         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
19782         -mcall-ms2sysv-xlogues.
19783         (stub_managed_regs): New static variable.
19784         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
19785         registers managed by out-of-line stub.
19786         (disable_call_ms2sysv_xlogues): New function.
19787         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
19788         m->call_ms2sysv when appropriate and compute frame layout for
19789         out-of-line stubs.
19790         (sp_valid_at, fp_valid_at): New inline functions.
19791         (choose_basereg): New function.
19792         (choose_baseaddr): Add align parameter, use choose_basereg and modify
19793         all callers.
19794         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
19795         Use align parameter of choose_baseaddr to generated aligned SSE movs
19796         when possible.
19797         (pro_epilogue_adjust_stack): Modify to track
19798         machine_frame_state::sp_realigned.
19799         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
19800         (ix86_nsaved_sseregs): Likewise.
19801         (ix86_emit_save_regs): Likewise.
19802         (ix86_emit_save_regs_using_mov): Likewise.
19803         (ix86_emit_save_sse_regs_using_mov): Likewise.
19804         (get_scratch_register_on_entry): Likewise.
19805         (gen_frame_set): New function.
19806         (gen_frame_load): Likewise.
19807         (gen_frame_store): Likewise.
19808         (emit_outlined_ms2sysv_save): Likewise.
19809         (emit_outlined_ms2sysv_restore): Likewise.
19810         (ix86_expand_prologue): Modify stack re-alignment code and call
19811         emit_outlined_ms2sysv_save when appropriate.
19812         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
19813         parameter rtx_insn *insn, which allows the function to be used to only
19814         generate the notes.
19815         (ix86_expand_epilogue): Modify validity checks of frame and stack
19816         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
19817         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
19818         * config/i386/predicates.md
19819         (save_multiple): New predicate.
19820         (restore_multiple): Likewise.
19821         * config/i386/sse.md
19822         (save_multiple<mode>): New pattern.
19823         (save_multiple_realign<mode>): Likewise.
19824         (restore_multiple<mode>): Likewise.
19825         (restore_multiple_and_return<mode>): Likewise.
19826         (restore_multiple_leave_return<mode>): Likewise.
19827         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
19829 2017-05-14  Julia Koval  <julia.koval@intel.com>
19831         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
19832         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
19833         (__builtin_ia32_xsetbv): New builtins.
19834         * config/i386/i386.c (ix86_expand_special_args_builtin):
19835         Process new types.
19836         (ix86_expand_builtin): Special expand for new intrinsics.
19837         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
19838         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
19839         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
19841 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19843         * cfganal.c (inverted_post_order_compute): Change argument type
19844         to vec *.
19845         * cfganal.h (inverted_post_order_compute): Adjust prototype.
19846         * df-core.c (rest_of_handle_df_initialize): Adjust.
19847         (rest_of_handle_df_finish): Likewise.
19848         (df_analyze_1): Likewise.
19849         (df_analyze): Likewise.
19850         (loop_inverted_post_order_compute): Change argument to be a vec *.
19851         (df_analyze_loop): Adjust.
19852         (df_get_n_blocks): Likewise.
19853         (df_get_postorder): Likewise.
19854         * df.h (struct df_d): Change field to be a vec.
19855         * lcm.c (compute_laterin): Adjust.
19856         (compute_available): Likewise.
19857         * lra-lives.c (lra_create_live_ranges_1): Likewise.
19858         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
19859         * tree-ssa-pre.c (compute_antic): Likewise.
19861 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19863         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
19864         (depth_first_search::depth_first_search): Change structure init
19865         function to this constructor.
19866         (depth_first_search::add_bb): Rename function to this member.
19867         (depth_first_search::execute): Likewise.
19868         (flow_dfs_compute_reverse_finish): Adjust.
19870 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19872         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
19873         (longest_simple_path): Likewise.
19874         * shrink-wrap.c (spread_components): Likewise.
19875         (disqualify_problematic_components): Likewise.
19876         (emit_common_heads_for_components): Likewise.
19877         (emit_common_tails_for_components): Likewise.
19878         (insert_prologue_epilogue_for_components): Likewise.
19880 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19882         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
19883         auto_sbitmap.
19885 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19887         * df-core.c (df_set_blocks): Start using auto_bitmap.
19888         (df_compact_blocks): Likewise.
19889         * df-problems.c (df_rd_confluence_n): Likewise.
19890         * df-scan.c (df_insn_rescan_all): Likewise.
19891         (df_process_deferred_rescans): Likewise.
19892         (df_update_entry_block_defs): Likewise.
19893         (df_update_exit_block_uses): Likewise.
19894         (df_entry_block_bitmap_verify): Likewise.
19895         (df_exit_block_bitmap_verify): Likewise.
19896         (df_scan_verify): Likewise.
19897         * lra-constraints.c (lra_constraints): Likewise.
19898         (undo_optional_reloads): Likewise.
19899         (lra_undo_inheritance): Likewise.
19900         * lra-remat.c (calculate_gen_cands): Likewise.
19901         (do_remat): Likewise.
19902         * lra-spills.c (assign_spill_hard_regs): Likewise.
19903         (spill_pseudos): Likewise.
19904         * tree-ssa-pre.c (bitmap_set_and): Likewise.
19905         (bitmap_set_subtract_values): Likewise.
19907 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19909         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
19910         management with auto_bitmap.
19911         (fix_inter_tick): Likewise.
19912         (fix_recovery_deps): Likewise.
19913         * ira.c (add_store_equivs): Likewise.
19914         (find_moveable_pseudos): Likewise.
19915         (split_live_ranges_for_shrink_wrap): Likewise.
19916         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
19917         (rtx_reuse_manager::seen_def_p): Likewise.
19918         (rtx_reuse_manager::set_seen_def): Likewise.
19919         * print-rtl.h (class rtx_reuse_manager): Likewise.
19921 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19923         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
19924         lifetime.
19925         (migrate_btr_def): Likewise.
19926         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
19927         * df-core.c (loop_post_order_compute): Likewise.
19928         (loop_inverted_post_order_compute): Likewise.
19929         * hsa-common.h: Likewise.
19930         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
19931         * init-regs.c (initialize_uninitialized_regs): Likewise.
19932         * ipa-inline.c (resolve_noninline_speculation): Likewise.
19933         (inline_small_functions): Likewise.
19934         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
19935         * ira.c (combine_and_move_insns): Likewise.
19936         (build_insn_chain): Likewise.
19937         * loop-invariant.c (find_invariants): Likewise.
19938         * lower-subreg.c (propagate_pseudo_copies): Likewise.
19939         * predict.c (tree_predict_by_opcode): Likewise.
19940         (predict_paths_leading_to): Likewise.
19941         (predict_paths_leading_to_edge): Likewise.
19942         (estimate_loops_at_level): Likewise.
19943         (estimate_loops): Likewise.
19944         * shrink-wrap.c (try_shrink_wrapping): Likewise.
19945         (spread_components): Likewise.
19946         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
19947         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
19948         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
19949         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
19950         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
19951         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
19952         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
19953         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
19954         (mark_threaded_blocks): Likewise.
19955         (thread_through_all_blocks): Likewise.
19956         * tree-ssa.c (verify_ssa): Likewise.
19957         (execute_update_addresses_taken): Likewise.
19958         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
19960 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19962         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
19963         auto_vec.
19964         (post_order_compute): Likewise.
19965         (inverted_post_order_compute): Likewise.
19966         (pre_and_rev_post_order_compute_fn): Likewise.
19968 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19970         * genrecog.c (int_set::int_set): Explicitly construct our
19971         auto_vec base class.
19972         * vec.h (auto_vec::auto_vec): New constructor.
19974 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19976         * bitmap.h (class auto_bitmap): New constructor taking
19977         bitmap_obstack * argument.
19979 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19981         * bitmap.h (class auto_bitmap): Change type of m_bits to
19982         bitmap_head, and adjust ctor / dtor and member operators.
19984 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
19986         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
19987         when returned register mode doesn't match original mode.
19989 2017-05-12  Jeff Law  <law@redhat.com>
19990             Jakub Jelinek  <jakub@redhat.com>
19992         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
19993         we look for cc setter after the compare-elim changes.
19994         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
19995         within the vector to match what compare-elim now expects.
19996         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
19997         (xorsi3_flags, one_cmplsi2_flags): Likewise.
19999         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
20000         after the compare-elim changes.
20001         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
20002         the vector to match what compare-elim now expects.
20003         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
20004         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
20005         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
20006         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
20007         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
20009         * config/visium/visium.c (single_set_and_flags): Fix where
20010         we look for cc setter after the compare-elim changes.
20011         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
20012         with the vector to match what compare-elim now expects.
20013         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
20014         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
20015         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
20016         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
20017         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
20018         (neg<mode>2_insn_set_overflow): Likewise.
20020 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
20022         PR middle-end/79794
20023         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
20024         maybe_expand_insn call, set ops[0].target.  If still set after call,
20025         set alt_rtl.  Add extra arg to recursive calls.
20026         (extract_bit_field): Add alt_rtl argument.  Pass to
20027         extract_bit_field.
20028         * expmed.h (extract_bit_field): Fix prototype.
20029         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
20030         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
20031         to extract_bit_field_calls.
20032         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
20033         Pass alt_rtl to extract_bit_field calls.
20034         * calls.c (store_unaligned_arguments_into_psuedos)
20035         load_register_parameters): Pass extra NULL to extract_bit_field calls.
20036         * optabs.c (maybe_legitimize_operand): Clear op->target when call
20037         gen_reg_rtx.
20038         * optabs.h (struct expand_operand): Add target bitfield.
20040 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
20042         * compare-elim.c (try_eliminate_compare): Canonicalize
20043         operation with embedded compare to
20044         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
20045          (set (reg) (operation)].
20047         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
20049 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
20051         PR target/80723
20052         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
20053         cost of adding a carry flag for ADC instruction.
20054         [case MINUS]: Ignore the cost of subtracting a carry flag
20055         for SBB instruction.
20057 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
20059         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
20060         and x86intrin.h
20061         * config/rs6000/bmiintrin.h: New file.
20062         * config/rs6000/bmi2intrin.h: New file.
20063         * config/rs6000/x86intrin.h: New file.
20065 2017-05-12  Jeff Law  <law@redhat.com>
20067         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
20068         markers.
20070 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
20072         PR middle-end/80707
20073         * tree-cfg.c: Remove cfg edges of unreachable case statements.
20075 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20077         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
20078         early expansion of vector divide builtins.
20079         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
20080         builtins identified as having unsigned arguments.
20082 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20084         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
20085         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
20086         expansion of vector logical operations (and, andc, or, xor,
20087         nor, orc, nand).
20089 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20091         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
20092         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
20094 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20096         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
20097         early GIMPLE expansion of vector multiplies.
20099 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
20101         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
20102         TARGET_HAVE_MOVT conditional.
20103         (movt splitter): Likewise.
20105 2017-05-12  Richard Biener  <rguenther@suse.de>
20107         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
20108         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
20109         Fold all stmts not inplace.
20111 2017-05-12  Richard Biener  <rguenther@suse.de>
20113         PR tree-optimization/80713
20114         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
20115         inserted_exprs bit for not removed stmts.
20117 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
20119         PR middle-end/69921
20120         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
20121         parallelized" attribute for parallelized OpenACC kernels.
20122         * omp-offload.c (execute_oacc_device_lower): Use it.
20124         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
20125         Set "oacc kernels" attribute.
20126         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
20127         parameter.  Adjust all users.
20128         (oacc_fn_attrib_kernels_p): Remove function.
20129         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
20130         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
20131         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
20132         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
20133         assert "oacc kernels" attribute is set.
20135 2017-05-11  Carl Love  <cel@us.ibm.com>
20137         * config/rs6000/rs6000-c: Add support for built-in functions
20138         vector unsigned char vec_popcnt (vector signed char)
20139         vector unsigned char vec_popcnt (vector unsigned char)
20140         vector unsigned short vec_popcnt (vector signed short)
20141         vector unsigned short vec_popcnt (vector unsigned short)
20142         vector unsigned int vec_popcnt (vector signed int)
20143         vector unsigned int vec_popcnt (vector unsigned int)
20144         vector unsigned long long vec_popcnt (vector signed long long)
20145         vector unsigned long long vec_popcnt (vector unsigned long long)
20146         vector signed long long vec_slo (vector signed long long,
20147                                          vector signed char)
20148         vector signed long long vec_slo (vector signed long long,
20149                                          vector unsigned char)
20150         vector unsigned long long vec_slo (vector unsigned long long,
20151                                            vector signed char)
20152         vector unsigned long long vec_slo (vector unsigned long long,
20153                                            vector unsigned char)
20154         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
20155         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
20156         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
20157         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
20158         * doc/extend.texi: Update the built-in documentation file for the
20159         new built-in functions.
20161 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20163         * attribs.h (sorted_attr_string): Move machine independent
20164         functions for target clone support from the i386 port to common
20165         code.  Rename ix86_function_versions to common_function_versions.
20166         Rename make_name to make_unique_name.
20167         (common_function_versions): Likewise.
20168         (make_unique_name): Likewise.
20169         (make_dispatcher_decl): Likewise.
20170         (is_function_default_version): Likewise.
20171         * attribs.c (attr_strcmp): Likewise.
20172         (sorted_attr_string): Likewise.
20173         (common_function_versions): Likewise.
20174         (make_unique_name): Likewise.
20175         (make_dispatcher_decl): Likewise.
20176         (is_function_default_version): Likewise.
20177         * config/i386/i386.c (attr_strcmp): Likewise.
20178         (sorted_attr_string): Likewise.
20179         (ix86_function_versions): Likewise.
20180         (make_name): Likewise.
20181         (make_dispatcher_decl): Likewise.
20182         (is_function_default_version): Likewise.
20183         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
20185 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20187         PR target/80695
20188         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
20189         Account for direct move costs for vec_construct of integer
20190         vectors.
20192 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
20194         PR target/80706
20195         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
20196         (UNSPEC_STX_ATOMIC): Ditto.
20197         (loaddi_via_sse): New insn.
20198         (storedi_via_sse): Ditto.
20199         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
20200         Update corresponding peephole2 patterns.
20201         (atomic_storedi_fpu): Ditto.
20203 2017-05-11  Julia Koval  <julia.koval@intel.com>
20205         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
20206         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
20207         New intrinsics.
20208         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
20209         (__builtin_ia32_rsqrt14ss_mask): New builtins.
20210         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
20212 2017-05-11  Nathan Sidwell  <nathan@acm.org>
20214         * graphite-poly.c: Include dumpfile.h.
20216         * dumpfle.h (dump_function): Declare here ...
20217         * tree-dump.h (dump_function): ... not here.
20218         * dumpfile.c: #include tree-cfg.h.
20219         (dump_function): Move here from ...
20220         * tree-dump.c (dump_function): ... here.
20221         * gimplify.c: #include splay-tree.h, not tree-dump.h.
20222         * graphite-poly.c: Don't include tree-dump.h.
20223         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
20224         * print-tree.c: Likewise.
20225         * stor-layout.c: Likewise.
20226         * tree-nested.c: Likewise.
20228         * dumpfile.c (dump_start): Use TDF_FLAGS.
20229         (dump_enable_all): Fix TDF_KIND check thinko.
20231 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20233         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
20234         array entries to represent two legal parameterizations of the
20235         overloaded __builtin_cmpb function, as represented by the
20236         P6_OV_BUILTIN_CMPB constant.
20237         (altivec_resolve_overloaded_builtin): Add special case handling
20238         for the __builtin_cmpb function, as represented by the
20239         P6_OV_BUILTIN_CMPB constant.
20240         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
20241         (BU_P6_64BIT_2): New macro.
20242         (BU_P6_OVERLOAD_2): New macro
20243         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
20244         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
20245         (CMPB): Add overload support to represent both 32-bit and 64-bit
20246         compare-bytes function.
20247         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
20248         support for TARGET_CMPB.
20249         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
20250         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
20251         documentation of the __builtin_cmpb overloaded built-in function.
20253 2017-05-11  Richard Biener  <rguenther@suse.de>
20255         PR tree-optimization/80705
20256         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
20257         bases are not vectorizable.
20259 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20261         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
20262         when counting register pressure.
20264 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20266         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
20267         (iv_ca_more_deps): Renamed to ...
20268         (iv_ca_compare_deps): ... this.
20269         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
20271 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20273         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
20274         to ...
20275         (determine_group_iv_costs): ... here.
20276         (find_inv_vars_cb): Record inv var if it's not recorded before.
20278 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20280         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
20281         (get_shiftadd_cost): Ditto.
20283 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20285         * tree-ssa-address.c: Include header file.
20286         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
20287         address.
20288         (add_to_parts): Refactor.
20289         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
20290         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
20291         in new order.
20293 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20295         PR tree-optimization/53090
20296         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
20297         COMP_IV_EXPR_2.
20298         (extract_cond_operands): Detect condition with IV on both sides
20299         and return COMP_IV_EXPR_2.
20300         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
20301         (rewrite_use_compare): Simplify by removing call to function
20302         extract_cond_operands.
20304 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20306         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
20307         (extract_cond_operands): Detect condition comparing against non-
20308         invariant bound and return appropriate enum value.
20309         (find_interesting_uses_cond): Update use of extract_cond_operands.
20310         Handle its return value accordingly.
20311         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
20313 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20315         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
20316         nonlinear iv_use computation in loop invariant sensitive way.
20318 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20320         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
20321         (find_iv_candidates): Call relate_compare_use_with_all_cands.
20323 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20325         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
20326         (dump_cand): Support iv_cand.inv_exprs.
20327         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
20328         for candidates.
20329         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
20330         iv_cand.inv_exprs.
20332 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20334         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
20335         from ...
20336         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
20337         as local function.  Include necessary header files.
20338         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
20340 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20342         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
20344 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20346         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
20347         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
20348         RSHIFT_EXPR and BIT_NOT_EXPR.
20350 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20352         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
20353         (adjust_setup_cost): New parameter supporting round up adjustment.
20354         (struct address_cost_data): Delete.
20355         (force_expr_to_var_cost): Don't bound cost with spill_cost.
20356         (split_address_cost, ptr_difference_cost): Delete.
20357         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
20358         (struct ainc_cost_data): New struct.
20359         (get_address_cost_ainc): New function.
20360         (get_address_cost, get_computation_cost): Reimplement.
20361         (determine_group_iv_cost_address): Record inv_expr for all uses of
20362         a group.
20363         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
20364         (iv_ca_has_deps): Reimplemented to ...
20365         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
20366         than OLD_CP.
20367         (iv_ca_extend): Call iv_ca_more_deps.
20369 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20371         * tree-ssa-address.c (struct mem_address): Move to header file.
20372         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
20373         * tree-ssa-address.h (struct mem_address): Move from C file.
20374         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
20376 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20378         * tree-affine.h (aff_combination_type): New interface.
20379         (aff_combination_zero_p): Remove static.
20380         (aff_combination_const_p): New interface.
20381         (aff_combination_singleton_var_p): New interfaces.
20383 2017-05-11  Richard Biener  <rguenther@suse.de>
20385         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
20386         Skip unreachable blocks and destinations.
20387         (eliminate): Move stmt removal and fixup ...
20388         (fini_eliminate): ... here.  Skip inserted exprs.
20389         (pass_pre::execute): Move fini_pre after fini_eliminate.
20390         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
20391         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
20392         PRE to get rid of dead code that has invalid SSA form and
20393         split critical edges again.
20395 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20397         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
20399 2017-05-11  Richard Biener  <rguenther@suse.de>
20401         * passes.c (execute_function_todo): Verify loops if they are
20402         said to be up-to-date.
20403         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
20404         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
20406 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
20408         PR target/80090
20409         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
20410         handle calling assemble_external ourself.
20412         PR target/79027
20413         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
20414         modes with zero size.  Enhance comment.
20416 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20418         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
20419         built-ins for vec_xl and vec_xst with short and char pointer
20420         arguments.
20422 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
20424         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
20425         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
20426         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
20427         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
20428         (_mm_maskz_min_round_ss): New intrinsics.
20429         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
20430         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
20431         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
20432         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
20433         (__builtin_ia32_minss_mask_round): New builtins.
20434         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20435         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
20436         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
20437         Rename to ...
20438         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
20439         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
20440         Change to ...
20441         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
20442         ... this.
20444 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
20446         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
20447         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
20448         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
20449         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
20450         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
20451         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
20452         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
20453         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20454         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
20455         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
20456         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
20457         (__builtin_ia32_mulss_mask_round): New builtins.
20458         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20459         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
20460         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
20461         Rename to ...
20462         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
20463         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
20464         Change to ...
20465         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
20466         ... this.
20468 2017-05-10  Julia Koval  <julia.koval@intel.com>
20470         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
20471         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
20472         (_mm256_setr_m128i): New intrinsics.
20474 2017-05-10  Julia Koval  <julia.koval@intel.com>
20476         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
20477         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
20478         (_mm_maskz_rcp14_ss): New intrinsics.
20479         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
20480         (__builtin_ia32_rcp14ss_mask): New builtins.
20481         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
20483 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
20485         PR tree-optimization/51513
20486         * tree-cfg.c (gimple_seq_unreachable_p): New function.
20487         (assert_unreachable_fallthru_edge_p): Use it.
20488         (group_case_labels_stmt): Likewise.
20489         * tree-cfg.h: Prototype it.
20490         * stmt.c: Include cfghooks.h and tree-cfg.h.
20491         (emit_case_dispatch_table) <gap_label>: New local variable.
20492         Use it to fill dispatch table gaps.
20493         Test for default_label before updating probabilities.
20494         (expand_case) <default_label>: Remove unneeded initialization.
20495         Test for unreachable default case statement and remove its edge.
20496         Set default_label accordingly.
20497         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
20499 2017-05-10  Carl Love  <cel@us.ibm.com>
20501         * config/rs6000/rs6000-c: Add support for built-in functions
20502         vector signed char      vec_neg (vector signed char)
20503         vector signed short int vec_neg (vector short int)
20504         vector signed int       vec_neg (vector signed int)
20505         vector signed long long vec_neg (vector signed long long)
20506         vector float            vec_neg (vector float)
20507         vector double           vec_neg (vector double)
20508         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
20509         overload.
20510         * config/rs6000/altivec.h: Add define for vec_neg
20511         * doc/extend.texi: Update the built-in documentation for the
20512         new built-in functions.
20514 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20516         PR tree-optimization/77644
20517         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
20519 2017-05-10  Nathan Sidwell  <nathan@acm.org>
20521         * dumpfile.h (TDI_lang_all): New.
20522         (TDF_KIND): New. Renumber others
20523         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
20524         than bits.
20525         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
20526         lang-all.
20527         (get_dump_file_name): Adjust suffix generation.
20528         (dump_enable_all): Use TDF_KIND.
20529         * doc/invoke.texi (-fdump-lang-all): Document.
20531         * dumpfile.h: Tabify.
20533 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
20535         PR target/80671
20536         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
20537         Move member access before delete.
20539 2017-05-10  Alexandre Oliva <aoliva@redhat.com>
20541         * tree-inline.c (expand_call_inline): Split block at stmt
20542         before the call.
20544 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
20546         PR target/68163
20547         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
20548         are now unused after splitting mov{sf,sd}_hardfloat.
20549         (f32_lr2): Likewise.
20550         (f32_lm): Likewise.
20551         (f32_lm2): Likewise.
20552         (f32_li): Likewise.
20553         (f32_li2): Likewise.
20554         (f32_lv): Likewise.
20555         (f32_sr): Likewise.
20556         (f32_sr2): Likewise.
20557         (f32_sm): Likewise.
20558         (f32_sm2): Likewise.
20559         (f32_si): Likewise.
20560         (f32_si2): Likewise.
20561         (f32_sv): Likewise.
20562         (f32_dm): Likewise.
20563         (f32_vsx): Likewise.
20564         (f32_av): Likewise.
20565         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
20566         For movsf, order stores so the VSX stores occur before the GPR
20567         store which encourages the register allocator to use a traditional
20568         FPR instead of a GPR.  For movsd, order the stores so that the GPR
20569         store comes before the VSX stores to allow the power6 to work.
20570         This is due to the power6 not having a 32-bit integer store
20571         instruction from a FPR.
20572         (movsf_hardfloat): Likewise.
20573         (movsd_hardfloat): Likewise.
20575 2017-05-09  Martin Sebor  <msebor@redhat.com>
20577         PR translation/80280
20578         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
20579         added in r247778.
20581         PR translation/80280
20582         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
20583         data member added in r247778.
20584         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
20586 2017-05-09  Nathan Sidwell  <nathan@acm.org>
20588         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
20590         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
20591         typedefs.
20593 2017-05-09  Marek Polacek  <polacek@redhat.com>
20595         * doc/invoke.texi: Fix typo.
20597 2017-05-09  Richard Biener  <rguenther@suse.de>
20599         * tree-vrp.c (vrp_val_is_max): Adjust comment.
20600         (vrp_val_is_min): Likewise.
20601         (set_value_range_to_value): Likewise.
20602         (set_value_range_to_nonnegative): Likewise.
20603         (gimple_assign_nonzero_p): Likewise.
20604         (gimple_stmt_nonzero_p): Likewise.
20605         (vrp_int_const_binop): Likewise.  Remove unreachable case.
20606         (adjust_range_with_scev): Adjust comments.
20607         (compare_range_with_value): Likewise.
20608         (extract_range_from_phi_node): Likewise.
20609         (test_for_singularity): Likewise.
20611 2017-05-09  Richard Biener  <rguenther@suse.de>
20613         * tree-vrp.c (get_single_symbol): Add assert that we don't
20614         get overflowed constants as invariant part.
20615         (compare_values_warnv): Add comment before the TREE_NO_WARNING
20616         checks.  Use wi::cmp instead of recursing for integer constants.
20617         (compare_values): Just ignore whether we assumed undefined
20618         overflow instead of failing the compare.
20619         (extract_range_for_var_from_comparison_expr): Add comment before the
20620         TREE_NO_WARNING sets.
20621         (test_for_singularity): Likewise.
20622         (extract_range_from_comparison): Do not disable optimization
20623         when we assumed undefined overflow.
20624         (extract_range_basic): Remove init of unused var.
20626 2017-05-09  Richard Biener  <rguenther@suse.de>
20628         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
20629         (extract_range_from_multiplicative_op_1): Adjust.
20630         (extract_range_from_binary_expr_1): Use int_const_binop.
20632 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20634         PR target/80101
20635         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
20636         rs6000_store_data_bypass_p in seven define_bypass directives and
20637         in several comments.
20638         * config/rs6000/rs6000-protos.h: Add prototype for
20639         rs6000_store_data_bypass_p function.
20640         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
20641         function implements slightly different (rs6000-specific) semantics
20642         than store_data_bypass_p, returning false rather than aborting
20643         with assertion error when arguments do not satisfy the
20644         requirements of store data bypass.
20645         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
20646         rs6000_store_data_bypass_p.
20648 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
20650         * config/xtensa/xtensa-protos.h
20651         (xtensa_initial_elimination_offset): New declaration.
20652         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
20653         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
20654         macro definition, add case for FRAME_POINTER_REGNUM when
20655         FRAME_GROWS_DOWNWARD.
20656         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
20657         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
20658         xtensa_initial_elimination_offset.
20660 2017-05-08  Nathan Sidwell  <nathan@acm.org>
20662         * doc/invoke.texi: Alphabetize -fdump options.
20664 2017-05-08  Martin Sebor  <msebor@redhat.com>
20666         PR translation/80280
20667         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
20669 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20671         * target.def (compute_frame_layout): New optional target hook.
20672         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
20673         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
20674         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
20675         target hook.
20676         * reload1.c (verify_initial_elim_offsets): Likewise.
20677         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
20678         (use_simple_return_p): Call arm_compute_frame_layout if needed.
20679         (arm_get_frame_offsets): Split up into this ...
20680         (arm_compute_frame_layout): ... and this function.
20682 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
20684         * config/aarch64/constraints.md (Usa): New constraint.
20685         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
20687 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20689         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
20690         with_multilib_list after it has been checked.
20692 2017-05-08  Richard Biener  <rguenther@suse.de>
20694         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
20695         (bitmap_set_subtract_values): Likewise.
20697 2017-05-08  Richard Biener  <rguenther@suse.de>
20699         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
20700         (gimple_assign_nonzero): ... this and remove strict_overflow_p
20701         argument.
20702         (gimple_stmt_nonzero_warnv_p): Rename to ...
20703         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
20704         argument.
20705         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
20706         (extract_range_basic): Adjust, do not disable propagation on
20707         strict overflow sensitive simplification.
20708         (vrp_visit_cond_stmt): Likewise.
20710 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
20712         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
20713         body size unconditionally.
20715 2017-05-07  Jeff Law  <law@redhat.com>
20717         Revert:
20718         2017-05-06  Jeff Law  <law@redhat.com>
20719         PR tree-optimization/78496
20720         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
20721         code.
20723         PR tree-optimization/78496
20724         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
20725         (simplify_stmt_using_ranges): Call it.
20726         (vrp_dom_walker::before_dom_children): Extract equivalences
20727         from an ASSERT_EXPR with an equality comparison against a
20728         constant.
20730 2017-05-06  Jeff Law  <law@redhat.com>
20732         PR tree-optimization/78496
20733         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
20734         code.
20736         PR tree-optimization/78496
20737         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
20738         (simplify_stmt_using_ranges): Call it.
20739         (vrp_dom_walker::before_dom_children): Extract equivalences
20740         from an ASSERT_EXPR with an equality comparison against a
20741         constant.
20743 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
20745         * lra-constraints.c (lra_copy_reg_equiv): New function.
20746         (split_reg): Use it to copy equivalence information from the
20747         original register to the spill register.
20749 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
20751         PR rtl-optimization/75964
20752         * simplify-rtx.c (simplify_const_relational_operation): Remove
20753         invalid handling of comparisons of integer ABS.
20755 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
20757         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
20758         initialize to zero.
20759         (init_regs): Remove declaration.
20760         (function_arg_advance_32): Initialize error_p as boolean variable.
20762 2017-05-05  Nathan Sidwell  <nathan@acm.org>
20764         * store-motion.c (remove_reachable_equiv_notes): Reformat long
20765         lines.  Use for (;;).
20767 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20769         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
20770         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
20771         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
20772         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
20773         VF=2 that require versioning.
20775 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20777         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
20778         int.
20780 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20782         * diagnostic.h (diagnostic_override_option_index): Convert from
20783         macro to inline function.
20785 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20787         * diagnostic.c (last_module_changed_p): New function.
20788         (set_last_module): New function.
20789         (diagnostic_report_current_module): Convert macro usage to
20790         the above functions.
20791         * diagnostic.h (diagnostic_context::last_module): Strengthen
20792         from const line_map * to const line_map_ordinary *.
20793         (diagnostic_last_module_changed): Delete macro.
20794         (diagnostic_set_last_module): Delete macro.
20796 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20798         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
20799         with diagnostic_report_diagnostic.
20800         (diagnostic_n_impl_richloc): Likewise.
20801         * diagnostic.h (report_diagnostic): Delete macro.
20802         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
20803         with diagnostic_report_diagnostic.
20804         * substring-locations.c (format_warning_va): Likewise.
20806 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20808         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
20809         save/restor of format_spec.  Move option-printing code to...
20810         (print_option_information): ...this new function, and
20811         reimplement by simply printing to the pretty_printer,
20812         rather than appending to the format string.
20814 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20816         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
20817         handling logic into...
20818         (update_effective_level_from_pragmas): ...this new function.
20820 2017-05-04  Andrew Waterman  <andrew@sifive.com>
20822         * config/riscv/riscv.opt (mstrict-align): New option.
20823         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
20824         (SLOW_UNALIGNED_ACCESS): Define.
20825         (riscv_slow_unaligned_access): Declare.
20826         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
20827         field.
20828         (riscv_slow_unaligned_access): New variable.
20829         (rocket_tune_info): Set slow_unaligned_access to true.
20830         (optimize_size_tune_info): Set slow_unaligned_access to false.
20831         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
20832         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
20833         (riscv_option_override): Set riscv_slow_unaligned_access.
20834         * doc/invoke.texi: Add -mstrict-align to RISC-V.
20836 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
20838         * config/riscv/riscv.md: Unify indentation.
20840 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
20842         PR target/79038
20843         PR target/79202
20844         PR target/79203
20845         * config/rs6000/rs6000.md (u code attribute): Add FIX and
20846         UNSIGNED_FIX.
20847         (extendsi<mode>2): Add support for doing sign extension via
20848         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
20849         don't have ISA 3.0 instructions.
20850         (extendsi<mode>2 splitter): Likewise.
20851         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
20852         generate the normal insns since SImode can now go in vector
20853         registers.  Disallow the special UNSPECs needed for previous
20854         machines to hide SImode being used.  Add new insns
20855         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
20856         (fix_trunc<mode>si2_stfiwx): Likewise.
20857         (fix_trunc<mode>si2_internal): Likewise.
20858         (fixuns_trunc<mode>si2): Likewise.
20859         (fixuns_trunc<mode>si2_stfiwx): Likewise.
20860         (fctiw<u>z_<mode>_smallint): Likewise.
20861         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
20862         of floating point to 32-bit integer from doing a direct move to
20863         the GPR registers to do a store.
20864         (fctiwz_<mode>): Break long line.
20866 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
20868         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
20869         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
20870         (addr_list, addr_offset_valid_p): New.
20871         (split_address_groups): Check offset validity with above function.
20872         (gt-tree-ssa-loop-ivopts.h): Include header file.
20874 2017-05-05  Nathan Sidwell  <nathan@acm.org>
20876         * config.gcc (arm*-*-*): Add missing 'fi'.
20878 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
20880         * doc/invoke.texi (-fopt-info): Explicitly say order of options
20881         included in -fopt-info does not matter.
20882         * doc/optinfo.texi (-fopt-info): Fix description of default
20883         behavour. Explicitly say order of options included in -fopt-info
20884         does not matter.
20886 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20888         * config.gcc: Allow combinations of aprofile and rmprofile values for
20889         --with-multilib-list.
20890         * config/arm/t-multilib: New file.
20891         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
20892         variables.  Remove setting of ISA and floating-point ABI in
20893         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
20894         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
20895         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
20896         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
20897         CPU options.
20898         * config/arm/t-rmprofile: Likewise except for the matches changes.
20899         * doc/install.texi (--with-multilib-list): Document the combination of
20900         aprofile and rmprofile values and warn about pitfalls in doing that.
20902 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
20904         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
20905         (movdi_aarch64): Likewise.
20907 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
20909         PR tree-optimization/80632
20910         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
20911         field.
20912         (build_arrays): Initialize it for virtual phis.
20913         (fix_phi_nodes): Use it for virtual phis.
20915         PR tree-optimization/80558
20916         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
20917         [x, y] op z into [x op, y op z] for op & or | if conditions
20918         are met.
20920 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
20921             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
20923         PR target/71607
20924         * config/arm/arm.md (use_literal_pool): Remove.
20925         (64-bit immediate split): No longer takes cost into consideration
20926         if arm_disable_literal_pool is enabled.
20927         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
20928         used when arm_disable_literal_pool is enabled.
20929         (arm_max_const_double_inline_cost): Remove use of
20930         arm_disable_literal_pool.
20931         (push_minipool_fix): Add assert.
20932         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
20933         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
20934         (no_literal_pool_sf_immediate): New.
20936 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20938         PR tree-optimization/80613
20939         * tree-ssa-dce.c (propagate_necessity): Remove cases for
20940         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
20942 2017-05-05  Richard Biener  <rguenther@suse.de>
20944         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
20946 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
20948         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
20949         of this flag from insn conditions due to removal from r247495.
20951 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
20953         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
20954         New function.
20955         (arm_early_store_addr_dep_ptr): Likewise.
20956         * config/arm/aarch-common-protos.h
20957         (arm_early_load_addr_dep_ptr): Add prototype.
20958         (arm_early_store_addr_dep_ptr): Likewise.
20959         * config/arm/cortex-a53.md: Add new bypasses.
20961 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
20963         * tree.c (next_type_uid): Change type to unsigned.
20964         (type_hash_canon): Decrement back next_type_uid if
20965         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
20966         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
20967         if possible.
20969 2017-05-04  Martin Sebor  <msebor@redhat.com>
20971         * builtins.c: Fix a trivial typo in a comment.
20973         PR middle-end/79234
20974         * builtins.c (check_sizes): Adjust to handle reading past the end.
20975         Avoid printing excessive upper bound of ranges.  Use %E to print
20976         tree nodes instead of converting them to %wu.
20977         (expand_builtin_memchr): New function.
20978         (compute_dest_size): Rename...
20979         (compute_objsize): ...to this.
20980         (expand_builtin_memcpy): Adjust.
20981         (expand_builtin_mempcpy): Adjust.
20982         (expand_builtin_strcat): Adjust.
20983         (expand_builtin_strcpy): Adjust.
20984         (check_strncat_sizes): Adjust.
20985         (expand_builtin_strncat): Adjust.
20986         (expand_builtin_strncpy): Adjust and simplify.
20987         (expand_builtin_memset): Adjust.
20988         (expand_builtin_bzero): Adjust.
20989         (expand_builtin_memcmp): Adjust.
20990         (expand_builtin): Handle memcmp.
20991         (maybe_emit_chk_warning): Check strncat just once.
20993 2017-05-04  Martin Sebor  <msebor@redhat.com>
20995         PR preprocessor/79214
20996         PR middle-end/79222
20997         PR middle-end/79223
20998         * builtins.c (check_sizes): Add inlining context and issue
20999         warnings even when -Wno-system-headers is set.
21000         (check_strncat_sizes): Same.
21001         (expand_builtin_strncat): Same.
21002         (expand_builtin_memmove): New function.
21003         (expand_builtin_stpncpy): Same.
21004         (expand_builtin): Handle memmove and stpncpy.
21006 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
21008         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
21009         which is not used any more.
21011 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21013         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
21015 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21017         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
21018         (cortexa53_tunings): Likewise.
21019         (cortexa57_tunings): Likewise.
21020         (cortexa72_tunings): Likewise.
21021         (cortexa73_tunings): Likewise.
21023 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21025         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
21026         Set loop alignment to 8.
21028 2017-05-04  Martin Sebor  <msebor@redhat.com>
21030         PR translation/80280
21031         * builtins.c (expand_builtin_object_size): Add missing quoting to
21032         %D and like directives.
21033         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
21034         (hsa_type_for_tree_type): Same.
21035         (verify_function_arguments): Same.
21036         * symtab.c (symbol_table::change_decl_assembler_name): Same.
21037         * varasm.c (get_section): Same.
21038         (mark_weak): Same.
21040 2017-05-04  Martin Sebor  <msebor@redhat.com>
21042         PR translation/80280
21043         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
21045 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21047         * config/aarch64/aarch64.c (generic_addrcost_table):
21048         Change HI/TI mode setting.
21050 2017-05-04  Martin Jambor  <mjambor@suse.cz>
21052         PR tree-optimization/80622
21053         * tree-sra.c (comes_initialized_p): New function.
21054         (build_accesses_from_assign): Only set write lazily when
21055         comes_initialized_p is false.
21056         (analyze_access_subtree): Use comes_initialized_p.
21057         (propagate_subaccesses_across_link): Assert !comes_initialized_p
21058         instead of testing for PARM_DECL.
21060 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21062         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
21063         constraint on operand 0 to allow more general addressing modes.
21064         Adjust output template.
21065         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
21066         New function.
21067         * config/aarch64/aarch64-protos.h
21068         (aarch64_address_valid_for_prefetch_p): Declare prototype.
21069         * config/aarch64/constraints.md (Dp): New address constraint.
21070         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
21071         predicate.
21073 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
21075         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
21076         update use of estimate_ipcp_clone_size_and_time.
21077         (estimate_local_effects): Update use of
21078         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
21079         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
21080         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
21081         Return nonspecialized time.
21083 2017-05-04  Richard Biener  <rguenther@suse.de>
21085         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
21086         for the last VUSE which def dominates the PHI.  Directly call
21087         maybe_skip_until.
21088         (get_continuation_for_phi_1): Remove.
21090 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
21092         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
21093         to explain the use of truncating division.  Cap the number of
21094         iterations to the maximum given by nb_iterations_upper_bound,
21095         if defined.
21097 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21099         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
21100         * configure: Regenerate.
21101         * config.in: Regenerate.
21102         * config/i386/driver-mingw32.c: new file.
21103         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
21104         * config.host: Link driver-mingw32.o on MinGW host.
21105         * doc/install.texi: Document new --enable-mingw-wildcard configure
21106         option.
21108 2017-05-04  Marek Polacek  <polacek@redhat.com>
21110         PR tree-optimization/80612
21111         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
21113 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21114             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
21116         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
21117         (movt splitter): Likewise.
21118         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
21119         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
21120         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
21121         block for Thumb-1 with MOVT.
21122         (thumb2_legitimate_address_p): Move code block ...
21123         (can_avoid_literal_pool_for_label_p): ... into this new function.
21124         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
21125         literal pool.
21126         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
21127         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
21128         "M-profile targets with the MOVT instruction".
21130 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21132         * config/arm/arm-builtins.c (arm_init_builtins): Rename
21133         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
21134         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
21136 2017-05-04  Martin Liska  <mliska@suse.cz>
21138         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
21139         variable cond_code.
21141 2017-05-04  Richard Biener  <rguenther@suse.de>
21143         * tree.c (array_at_struct_end_p): Handle arrays at struct
21144         end with flexarrays more conservatively.  Refactor and treat
21145         arrays of arrays or aggregates more strict.  Fix
21146         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
21147         * tree.c (array_at_struct_end_p): Adjust prototype.
21148         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
21149         * gimple-fold.c (get_range_strlen): Likewise.
21150         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
21152 2017-05-04  Richard Biener  <rguenther@suse.de>
21154         PR tree-optimization/31130
21155         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
21156         false.
21157         (supports_overflow_infinity): Likewise.
21158         (is_negative_overflow_infinity): Likewise.
21159         (is_positive_overflow_infinity): Likewise.
21160         (is_overflow_infinity): Likewise.
21161         (stmt_overflow_infinity): Likewise.
21162         (overflow_infinity_range_p): Likewise.
21163         (usable_range_p): Remove as always returning true.
21164         (make_overflow_infinity): Remove.
21165         (negative_overflow_infinity): Likewise.
21166         (positive_overflow_infinity): Likewise.
21167         (avoid_overflow_infinity): Likewise.
21168         (set_value_range): Adjust accordingly.
21169         (set_value_range_to_nonnegative): Likewise, remove now unused
21170         overflow_infinity arg.
21171         (vrp_operand_equal_p): Adjust.
21172         (update_value_range): Likewise.
21173         (range_int_cst_singleton_p): Likewise.
21174         (operand_less_p): Likewise.
21175         (compare_values_warnv): Likewise.
21176         (extract_range_for_var_from_comparison_expr): Likewise.
21177         (vrp_int_const_binop): Likewise.
21178         (zero_nonzero_bits_from_vr): Likewise.
21179         (extract_range_from_multiplicative_op_1): Likewise.
21180         (extract_range_from_binary_expr_1): Likewise.
21181         (extract_range_from_unary_expr): Likewise.
21182         (extract_range_from_comparison): Likewise.
21183         (extract_range_basic): Likewise.
21184         (adjust_range_with_scev): Likewise.
21185         (compare_ranges): Likewise.
21186         (compare_range_with_value): Likewise.
21187         (dump_value_range): Likewise.
21188         (test_for_singularity): Likewise, remove strict_overflow_p parameter
21189         never used.
21190         (simplify_cond_using_ranges): Adjust.
21192 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
21194         * brig-builtins.def: Added a builtin for class_f64.
21195         * builtin-types.def: Added a builtin type needed by class_f64.
21197 2017-05-03  Jason Merrill  <jason@redhat.com>
21199         * timevar.def: Add TV_CONSTEXPR.
21201 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
21203         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
21205 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21207         * ipa-prop.c (ipa_update_after_lto_read): Removed.
21208         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
21209         * ipa-cp.c (ipcp_propagate_stage): Do not call
21210         ipa_update_after_lto_read.
21211         * ipa-inline.c (ipa_inline): Likewise.
21213 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21215         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
21216         tag.  Added a default constructor and a destructor.
21217         (ipa_edge_args_sum_t): New class;
21218         (ipa_edge_args_sum): Declare.
21219         (ipa_edge_args_vector): Remove declaration.
21220         (IPA_EDGE_REF): Use ipa_edge_args_sum.
21221         (ipa_free_edge_args_substructures): Remove declaration.
21222         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
21223         (ipa_edge_args_info_available_for_edge_p): Likewise.
21224         * ipa-prop.c (ipa_edge_args_vector): Removed.
21225         (edge_removal_hook_holder): Likewise.
21226         (edge_duplication_hook_holder): Likewise.
21227         (ipa_edge_args_sum): New variable.
21228         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
21229         ipa_edge_args_vector.
21230         (ipa_free_edge_args_substructures): Likewise.
21231         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
21232         ipa_edge_args_vector.
21233         (ipa_edge_removal_hook): Turned into method
21234         ipa_edge_args_sum_t::remove.
21235         (ipa_edge_duplication_hook): Turned into method
21236         ipa_edge_args_sum_t::duplicate.
21237         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
21238         registering edge hooks.
21239         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
21240         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
21241         ipa_edge_args_sum instead of ipa_edge_args_vector.
21242         * ipa-profile.c (ipa_profile): Likewise.
21244 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21246         * symbol-summary.h (function_summary): New method exists.
21247         (function_summary::symtab_removal): Deallocate through release.
21248         (call_summary): New class.
21249         (gt_ggc_mx): New overload.
21250         (gt_pch_nx): Likewise.
21251         (gt_pch_nx): Likewise.
21253 2017-05-03  Jeff Law  <law@redhat.com>
21255         PR tree-optimization/78496
21256         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
21257         from simplify_cond_using_ranges.  Split off code to walk
21258         backwards through casts into ...
21259         (simplify_cond_using_ranges_2): New function.
21260         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
21261         (execute_vrp): After identifying jump threads, call
21262         simplify_cond_using_ranges_2.
21264 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
21266         PR bootstrap/80609
21267         * ipa-inline.h (inline_summary): Add ctor.
21268         (create_ggc): Do not use ggc_cleared_alloc.
21270 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
21271             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21273         * gcc.c (handle_braces): Support escaping in switch matching
21274         text.
21275         * doc/invoke.texi (Spec Files): Document it.
21276         Remove superfluous @code markup in items.
21278 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
21280         * diagnostic-show-locus.c (struct column_range): New struct.
21281         (get_affected_columns): New function.
21282         (get_printed_columns): New function.
21283         (struct correction): New struct.
21284         (correction::ensure_capacity): New function.
21285         (correction::ensure_terminated): New function.
21286         (struct line_corrections): New struct.
21287         (line_corrections::~line_corrections): New dtor.
21288         (line_corrections::add_hint): New function.
21289         (layout::print_trailing_fixits): Reimplement in terms of the new
21290         classes.
21291         (selftest::test_overlapped_fixit_printing): New function.
21292         (selftest::diagnostic_show_locus_c_tests): Call it.
21294 2017-05-03  Nathan Sidwell  <nathan@acm.org>
21296         Canonicalize canonical type hashing
21297         * tree.h (type_hash_canon_hash): Declare.
21298         * tree.c (type_hash_list, attribute_hash_list): Move into
21299         type_hash_canon_hash.
21300         (build_type_attribute_qual_variant): Break out hash code calc into
21301         type_hash_canon_hash.
21302         (type_hash_canon_hash): New.  Generic type hash computation.
21303         (build_range_type_1, build_array_type_1, build_function_type,
21304         build_method_type_directly, build_offset_type, build_complex_type,
21305         make_vector_type): Call it.
21307 2017-05-03  Richard Biener  <rguenther@suse.de>
21309         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
21310         When all DRs have unknown misaligned do not always peel
21311         when there is a store but apply the same costing model as if
21312         there were only loads.
21314 2017-05-03  Richard Biener  <rguenther@suse.de>
21316         Revert
21317         PR tree-optimization/80492
21318         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
21319         compare_base_decls returning dont-know properly.
21321 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21323         * config/arm/iterators.md (CCSI): New mode iterator.
21324         (arch): New mode attribute.
21325         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
21326         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
21327         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
21328         code iterator for success result mode.
21329         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
21330         the corresponding new insn generators.
21332 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
21334         Revert r247509
21335         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21336         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
21338 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
21340         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
21341         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
21342         (DDR_A): Wrap DDR argument in brackets.
21343         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
21344         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
21345         (DDR_REVERSED_P): Likewise.
21347 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
21349         PR tree-optimization/79472
21350         * tree-switch-conversion.c (struct switch_conv_info): Add
21351         contiguous_range and default_case_nonstandard fields.
21352         (collect_switch_conv_info): Compute contiguous_range and
21353         default_case_nonstandard fields, don't clear final_bb if
21354         contiguous_range and only the default case doesn't have the required
21355         structure.
21356         (check_all_empty_except_final): Set default_case_nonstandard instead
21357         of failing if contiguous_range and the default case doesn't have empty
21358         block.
21359         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
21360         and only the default case doesn't have the required constants.  Skip
21361         virtual phis.
21362         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
21363         if default_case_nonstandard.
21364         (build_constructors): Build constant 1 just once.  Assert that default
21365         values aren't inserted in between cases if contiguous_range.  Skip
21366         virtual phis.
21367         (build_arrays): Skip virtual phis.
21368         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
21369         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
21370         Handle virtual phis.
21371         (gen_inbound_check): Handle default_case_nonstandard case.
21372         (process_switch): Adjust check_final_bb caller.  Call
21373         gather_default_values with the first non-default case instead of
21374         default case if default_case_nonstandard.
21376 2017-05-02  Nathan Sidwell  <nathan@acm.org>
21378         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
21379         check.  Fix formatting.
21381 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
21383         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
21384         errors when comparing specialized and unspecialized times.
21386 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
21388         * diagnostic-show-locus.c
21389         (layout::should_print_annotation_line_p): Make private.
21390         (layout::print_annotation_line): Make private.
21391         (layout::annotation_line_showed_range_p): Make private.
21392         (layout::show_ruler): Make private.
21393         (layout::print_source_line): Make private.  Pass in line and
21394         line_width, rather than calling location_get_source_line.  Drop
21395         returned value.
21396         (layout::print_leading_fixits): New method.
21397         (layout::print_any_fixits): Rename to...
21398         (layout::print_trailing_fixits): ...this, and make private.
21399         Don't print newline fixits.
21400         (diagnostic_show_locus): Move logic for printing one row into...
21401         (layout::print_line): ...this new function.  Move the
21402         location_get_source_line call and error-handling from
21403         print_source_line to here.  Call print_leading_fixits, and rename
21404         print_any_fixits to print_trailing_fixits.
21405         (selftest::test_fixit_insert_containing_newline): Update now that
21406         newlines are partially supported.
21407         (selftest::test_fixit_insert_containing_newline_2): New test.
21408         (selftest::test_fixit_replace_containing_newline): Update comments.
21409         (selftest::diagnostic_show_locus_c_tests): Call the new test.
21410         * edit-context.c (class added_line): New class.
21411         (class edited_line): Describe newline handling in comment.
21412         (edited_line::actually_edited_p): New method.
21413         (edited_line::print_content): Delete redundant decl.
21414         (edited_line::m_predecessors): New field.
21415         (edited_file::print_content): Call edited_line::print_content.
21416         (edited_file::print_diff): Update to support newlines.
21417         (edited_file::print_diff_hunk): Likewise.
21418         (edited_file::print_run_of_changed_lines): New function.
21419         (edited_file::print_diff_line): Convert to...
21420         (print_diff_line): ...this.
21421         (edited_file::get_effective_line_count): New function.
21422         (edited_line::edited_line): Initialize new field m_predecessors.
21423         (edited_line::~edited_line): Clean up m_predecessors.
21424         (edited_line::apply_fixit): Handle newlines.
21425         (edited_line::get_effective_line_count): New function.
21426         (edited_line::print_content): New function.
21427         (edited_line::print_diff_lines): New function.
21428         (selftest::test_applying_fixits_insert_containing_newline): New
21429         test.
21430         (selftest::test_applying_fixits_replace_containing_newline): New
21431         test.
21432         (selftest::insert_line): New function.
21433         (selftest::test_applying_fixits_multiple_lines): Add example of
21434         inserting a line.
21435         (selftest::edit_context_c_tests): Call the new tests.
21437 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21439         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
21440         parameter cand.  Update dump information.
21441         (get_computation_cost): Update uses.
21443 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21445         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
21446         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
21447         (get_computation_at, rewrite_use_address): Update use of
21448         get_computation_aff.
21450 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21452         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
21453         (get_computation): Delete.
21454         (get_computation_cost): Implement like get_computation_cost_at.
21455         Use get_computation_at.
21456         (get_computation_cost_at): Delete.
21457         (rewrite_use_nonlinear_expr): Use get_computation_at.
21458         (rewrite_use_compare, remove_unused_ivs): Ditto.
21460 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21462         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
21464 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21466         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
21467         (ivopts_global_cost_for_size): Rename parameter and update uses.
21468         (iv_ca_recount_cost): Update uses.
21469         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
21470         candidates seperately in n_invs and n_cands.
21471         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
21473 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21475         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
21476         (find_inv_vars_cb): New.
21477         (find_depends): Renamed to ...
21478         (find_inv_vars): ... this.
21479         (add_candidate_1, force_var_cost): Call find_inv_vars.
21480         (split_address_cost, determine_group_iv_cost_cond): Ditto.
21482 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21484         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
21485         inv_vars.  Add inv_exprs.
21486         (struct iv_cand): Rename depends_on to inv_vars.
21487         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
21488         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
21489         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
21490         (dump_cand): Dump inv_vars.
21491         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
21492         (record_invariant, find_depends, add_candidate_1): Ditto.
21493         (set_group_iv_cost, force_var_cost): Ditto.
21494         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
21495         (get_computation_cost_at, get_computation_cost): Ditto.
21496         (determine_group_iv_cost_generic): Ditto.
21497         (determine_group_iv_cost_address): Ditto.
21498         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
21499         (determine_group_iv_costs): Ditto.
21500         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
21501         (iv_ca_set_remove_invariants): Renamed to ...
21502         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
21503         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
21504         (iv_ca_set_add_invariants):  Renamed to ...
21505         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
21506         (iv_ca_set_cp): Use iv_ca_set_add_invs.
21507         (iv_ca_has_deps): Support inv_vars and inv_exprs.
21508         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
21509         (create_new_ivs): Remove useless dump.
21511 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21513         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
21514         iv_cand code.
21515         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
21516         (iv_ca_set_no_cp, create_new_iv): Ditto.
21518 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21520         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
21522 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
21524         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
21525         function tree_check2.
21527 2017-05-02  Martin Liska  <mliska@suse.cz>
21529         * doc/gcov.texi: Add missing preposition.
21530         * gcov.c (function_info::function_info): Properly fill up
21531         all member variables.
21533 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
21535         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
21537 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
21539         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
21541 2017-05-02  Martin Liska  <mliska@suse.cz>
21543         PR lto/77954.
21544         * lto-streamer-in.c (lto_read_tree_1): Remove
21545         LTO_STREAMER_DEBUG.
21546         * lto-streamer.c (struct tree_hash_entry): Likewise.
21547         (struct tree_entry_hasher): Likewise.
21548         (tree_entry_hasher::hash): Likewise.
21549         (tree_entry_hasher::equal): Likewise.
21550         (lto_streamer_init): Likewise.
21551         (lto_orig_address_map): Likewise.
21552         (lto_orig_address_get): Likewise.
21553         (lto_orig_address_remove): Likewise.
21554         * lto-streamer.h: Likewise.
21555         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
21556         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
21558 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
21560         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
21561         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
21562         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
21563         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
21564         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
21565         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
21566         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
21567         (mm_maskz_sub_ss): New intrinsics.
21568         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
21569         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
21570         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
21571         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
21572         (__builtin_ia32_subss_mask_round): New builtins.
21573         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
21574         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
21575         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
21576         Renamed to ...
21577         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
21578         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
21579         Changed to ...
21580         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
21581         ... this.
21583 2017-05-02  Martin Jambor  <mjambor@suse.cz>
21585         PR tree-optimization/78687
21586         * tree-sra.c (access): New field parent.
21587         (process_subtree_disqualification): New function.
21588         (disqualify_candidate): Call it.
21589         (build_accesses_from_assign): Reset write flag if creating an
21590         assighnment link.
21591         (build_access_subtree): Fill in parent field and also prpagate
21592         down grp_write flag.
21593         (create_artificial_child_access): New parameter set_grp_write, set
21594         grp_write to its value.
21595         (propagate_subaccesses_across_link): Also propagate grp_write flag
21596         values.
21597         (propagate_all_subaccesses): Push the closest parent back to work
21598         queue if add_access_to_work_queue returned true.
21600 2017-05-02  Richard Biener  <rguenther@suse.de>
21602         * common.opt (fstrict-overflow): Alias negative to fwrapv.
21603         * doc/invoke.texi (fstrict-overflow): Remove all traces of
21604         -fstrict-overflow documentation.
21605         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
21606         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
21607         flag_strict_overflow.
21608         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
21609         * lto-opts.c (lto_write_options): Do not stream it.
21610         * lto-wrapper.c (merge_and_complain): Do not handle it.
21611         * opts.c (default_options_table): Do not set -fstrict-overflow.
21612         (finish_options): Likewise do not clear it when sanitizing.
21613         * simplify-rtx.c (simplify_const_relational_operation): Do not
21614         test flag_strict_overflow.
21616 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
21618         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
21619         using enabled attribute.
21620         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
21621         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
21622         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
21623         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
21624         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
21625         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
21626         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
21627         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
21628         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
21629         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
21631 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
21633         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
21635 2017-05-02  Richard Biener  <rguenther@suse.de>
21637         PR tree-optimization/80591
21638         Revert
21639         2017-04-10  Richard Biener  <rguenther@suse.de>
21641         * tree-ssa-structalias.c (find_func_aliases): Properly handle
21642         asm inputs.
21644 2017-05-02  Richard Biener  <rguenther@suse.de>
21646         PR tree-optimization/80549
21647         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
21648         (cleanup_tree_cfg_noloop): Create forwarders to known loop
21649         headers if they do not have a preheader.
21651 2017-05-02  Martin Liska  <mliska@suse.cz>
21653         PR other/80589
21654         * common.opt: Fix typo.
21655         * doc/invoke.texi: Likewise.
21657 2017-05-01  Jan Beulich  <jbeulich@suse.com>
21659         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
21660         swapping, add (x,x,m,x,n) alternative.
21662 2017-05-01  Nathan Sidwell  <nathan@acm.org>
21664         * calls.c (combine_pending_stack_adjustment_and_call): Remove
21665         unnecessary unadjusted_alignment check.
21667 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
21669         PR c++/80038
21670         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
21671         operations here.
21672         * gimplify.c (gimplify_cilk_detach): New function.
21673         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
21674         * tree-core.h: Document EXPR_CILK_SPAWN.
21675         * tree.h (EXPR_CILK_SPAWN): Define.
21677 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
21679         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
21680         to use new fixit_hint representation, using the "replace" logic.
21681         (get_line_span_for_fixit_hint): Likewise.
21682         (layout::print_any_fixits): Likewise.
21683         (selftest::test_one_liner_many_fixits): Rename to...
21684         (selftest::test_one_liner_many_fixits_1): ...this, and update
21685         comment and expected output to reflect that the multiple fix-it
21686         hints are now consolidated into one insertion.
21687         (selftest::test_one_liner_many_fixits_2): New test.
21688         (selftest::test_diagnostic_show_locus_one_liner): Update for
21689         above.
21690         (selftest::test_fixit_consolidation): Update for fix-it API
21691         change.
21692         * diagnostic.c (print_parseable_fixits): Likewise.
21693         * edit-context.c (edited_line::m_line_events): Convert from
21694         auto_vec <line_event *> to auto_vec <line_event>.
21695         (class line_event): Convert from abstract base class to a concrete
21696         class, taking over the role of replace_event.
21697         (class insert_event): Delete.
21698         (class replace_event): Rename to class line_event.  Convert to
21699         half-open range.
21700         (edit_context::add_fixits): Reimplement.
21701         (edit_context::apply_insert): Delete.
21702         (edit_context::apply_replace): Rename to...
21703         (edit_context::apply_fixit): ...this.  Convert to half-open range.
21704         (edited_file::apply_insert): Delete.
21705         (edited_file::apply_replace): Rename to...
21706         (edited_file::apply_fixit): ...this.
21707         (edited_line::~edited_line): Drop deletion of events.
21708         (edited_line::apply_insert): Delete.
21709         (edited_line::apply_replace): Rename to...
21710         (edited_line::apply_fixit): ...this.  Convert to half-open range.
21711         Update for change to type of m_line_events.
21712         * edit-context.h (edit_context::apply_insert): Delete.
21713         (edit_context::apply_replace): Rename to...
21714         (edit_context::apply_fixit): ...this.
21716 2017-05-01  Martin Sebor  <msebor@redhat.com>
21718         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
21719         known.
21721 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
21723         PR target/68491
21724         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
21725         __get_cpuid_max returns 0.
21726         (__get_cpuid_count): Ditto.
21728 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
21730         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
21731         replacement expression is another instance of one of its arguments.
21733 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
21735         PR target/79430
21736         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
21737         check for stack push/pop autoinc.
21738         * config/i386/i386.c (ix86_agi_dependent): Return false
21739         if the only reason why modified_in_p returned true is that
21740         addr is SP based and set_insn is a push or pop.
21742 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
21744         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
21745         overflow check.
21747 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
21749         PR ipa/79224
21750         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
21751         (account_size_time): Use two predicates - exec_pred and
21752         nonconst_pred_ptr.
21753         (evaluate_conditions_for_known_args): Compute both clause and
21754         nonspec_clause.
21755         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
21756         (inline_summary_t::duplicate): Update.
21757         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
21758         separately.
21759         (compute_inline_parameters): Likewise.
21760         (estimate_edge_size_and_time): Update caluclation of time.
21761         (estimate_node_size_and_time): Compute both time and nonspecialized
21762         time.
21763         (estimate_ipcp_clone_size_and_time): Update.
21764         (inline_merge_summary): Update.
21765         (do_estimate_edge_time): Update.
21766         (do_estimate_edge_size): Update.
21767         (do_estimate_edge_hints): Update.
21768         (inline_read_section, inline_write_summary): Stream both new predicates.
21769         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
21770         as argument.
21771         (compute_inlined_call_time): Cleanup.
21772         (big_speedup_p): Update.
21773         (edge_badness): Update.
21774         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
21775         (size_time_entry): Replace predicate by exec_predicate and
21776         nonconst_predicate.
21777         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
21778         (estimate_edge_time): Return also nonspec_time.
21779         (reset_edge_growth_cache): Update.
21781 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
21783         PR rtl-optimization/80491
21784         * ifcvt.c (noce_process_if_block): When looking for x setter
21785         with missing else_bb, don't check only the insn right before
21786         cond_earliest, but look for the last insn that x is modified in
21787         within the same bb.
21789         PR rtl-optimization/80491
21790         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
21792 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
21794         PR tree-optimization/80487
21795         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
21797 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21799         PR tree-optimization/79697
21800         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
21801         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
21802         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
21803         BUILT_IN_STRNDUP.
21804         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
21805         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
21807 2017-04-28  Martin Sebor  <msebor@redhat.com>
21809         PR tree-optimization/80523
21810         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
21811         (init_target_to_host_charmap, target_to_host, target_strtol10): New
21812         functions.
21813         (maybe_warn, format_directive, parse_directive): Use new functions.
21814         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
21816 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
21818         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
21820 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
21822         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
21823         target_header_dir): Set correctly.
21824         * configure: Regenerated.
21825         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
21826         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
21827         instead of SYSTEM_HEADER_DIR.
21829 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
21831         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
21832         (estimate_local_effects): Likewise.
21833         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
21834         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
21835         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
21836         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
21837         do_estimate_edge_time, estimate_edge_time): Likewise.
21838         * ipa-inline-analysis.c (estimate_node_size_and_time,
21839         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
21840         (estimate_time_after_inlining): Remove.
21842 2017-04-28  Martin Liska  <mliska@suse.cz>
21844         * doc/gcov.texi: Enhance documentation of gcov.
21846 2017-04-28  Martin Liska  <mliska@suse.cz>
21848         * doc/gcov.texi: Sort options in alphabetic order.
21849         * doc/gcov-dump.texi: Likewise.
21850         * doc/gcov-tool.texi: Likewise.
21851         * gcov.c (print_usage): Likewise.
21852         * gcov-dump.c (print_usage): Likewise.
21853         * gcov-tool.c (print_merge_usage_message): Likewise.
21854         (print_rewrite_usage_message): Likewise.
21855         (print_overlap_usage_message): Likewise.
21857 2017-04-28  Martin Liska  <mliska@suse.cz>
21859         PR gcov-profile/53915
21860         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
21862 2017-04-28  Martin Liska  <mliska@suse.cz>
21864         PR gcov-profile/79891
21865         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
21866         is marked by compiler as living on a line.
21867         (get_cycles_count): Remove usage of the union.
21868         (output_intermediate_file): Likewise.
21869         (find_source): Fix GNU coding style.
21870         (accumulate_line_counts): Remove old non-all block mode.
21871         (output_lines): Remove usage of the union.
21872         * profile.c (output_location): Include all BBs, even if
21873         belonging to a same line (and file) as a previous BB.
21875 2017-04-28  Martin Liska  <mliska@suse.cz>
21877         * gcov.c (process_args): Handle new argument 'w'.
21878         (read_graph_file): Assign ID to BBs.
21879         (output_branch_count): Display BB # if verbose flag is set.
21880         (output_lines): Likewise for arcs.
21881         (print_usage): Add '--verbose' option help.
21882         * doc/gcov.texi: Document --verbose (-w) option.
21884 2017-04-28  Martin Liska  <mliska@suse.cz>
21886         * gcov.c (struct block_location_info): New struct.
21887         (process_file): Fill up the new structure.
21888         (read_graph_file): Replace usage of encoding by the newly added
21889         struct.
21890         (add_line_counts): Likewise.
21891         (accumulate_line_counts): Remove usage of the union.
21892         (function_info::function_info): New function.
21893         (function_info::~function_info): Likewise.
21894         (process_file): Call delete instead of release_function.
21895         (release_function): Release the function.
21896         (release_structures): Call delete instead of release_function.
21897         (solve_flow_graph): Replace usage of num_blocks.
21898         (find_exception_blocks): Likewise.
21899         (output_lines): Fix GNU coding style.
21901 2017-04-28  Martin Liska  <mliska@suse.cz>
21903         PR driver/56469
21904         * coverage.c (coverage_remove_note_file): New function.
21905         * coverage.h: Declare the function.
21906         * toplev.c (finalize): Clean if an error has been seen.
21908 2017-04-28  Martin Liska  <mliska@suse.cz>
21910         PR gcov-profile/80031
21911         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
21912         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
21913         * gcov.c (read_graph_file): Read just number of blocks.
21914         * profile.c (branch_prob): Do not stream 0 flags per a basic
21915         block.
21917 2017-04-28  Martin Liska  <mliska@suse.cz>
21919         * gcov-dump.c (tag_*): Add new argument to declarations.
21920         (dump_gcov_file): Likewise.
21921         (tag_blocks): Add and use new argument depth.
21922         (tag_arcs): Likewise.
21923         (tag_lines): Likewise.
21924         (tag_counters): Likewise.
21925         (tag_summary): Likewise.
21926         (dump_working_sets): Use depth to do a proper indentation.
21928 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
21930         PR bootstrap/80531
21931         * cgraph.h (symtab_node::debug_symtab): No longer inline.
21932         * symtab.c (symtab_node::debug_symtab): Move definition here.
21934 2017-04-28  Richard Biener  <rguenther@suse.de>
21936         * lto-streamer.h (LTO_major_version): Bump to 7.
21938 2017-04-28  Richard Biener  <rguenther@suse.de>
21940         * tree-vrp.c (assert_info): New struct.
21941         (add_assert_info): New helper.
21942         (register_edge_assert_for_2): Refactor to add asserts to a vector
21943         of assert_info.
21944         (register_edge_assert_for_1): Likewise.
21945         (register_edge_assert_for): Likewise.
21946         (finish_register_edge_assert_for): New helper actually registering
21947         asserts where live on edge.
21948         (find_conditional_asserts): Adjust.
21949         (find_switch_asserts): Likewise.
21950         (evrp_dom_walker::try_find_new_range): Generalize.
21951         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
21953 2017-04-27  Marek Polacek  <polacek@redhat.com>
21955         PR sanitizer/80349
21956         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
21957         arg10 and arg11 to itype.
21959 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
21961         * doc/extend.texi (Object Size Checking): Improve grammar.
21963 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
21965         PR target/80530
21966         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
21967         that the logic for permitting reciprocal estimates matches that
21968         in use_rsqrt_p.
21970 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
21972         PR c++/80534
21973         * tree.c (type_cache_hasher::equal): Only compare
21974         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
21975         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
21976         non-aggregate element types.
21977         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
21978         about the flag on ARRAY_TYPEs in the comment, formatting fix.
21980 2017-04-27  Richard Biener  <rguenther@suse.de>
21982         PR middle-end/80533
21983         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
21984         stripping ARRAY_REFs from MEM_EXPR make sure we're not
21985         keeping a reference to a trailing array.
21987 2017-04-27  Richard Biener  <rguenther@suse.de>
21989         PR middle-end/80539
21990         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
21991         being in loop-closed SSA form conservatively.
21992         (chrec_fold_multiply_poly_poly): Likewise.
21994 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
21996         PR middle-end/79665
21997         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
21998         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
22000 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
22002         PR target/77728
22003         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
22004         (aarch64_function_arg_alignment): Return unsigned int again, but still
22005         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
22006         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
22007         Don't emit -Wpsabi note.
22008         (aarch64_function_arg_boundary): Likewise.
22009         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
22010         caller.
22012 2017-04-26  Nathan Sidwell  <nathan@acm.org>
22014         * tree.h (crc32_unsigned_n): Declare.
22015         (crc32_unsigned, crc32_unsigned): Make inline.
22016         * tree.c (crc32_unsigned_bits): Replace with ...
22017         (crc32_unsigned_n): ... this.
22018         (crc32_unsigned, crc32_byte): Remove.
22019         (crc32_string): Remove unnecessary braces.
22021 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
22023         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
22024         * ipa-inline-analysis.c (MAX_TIME): Remove.
22025         (account_size_time): Use sreal for time.
22026         (dump_inline_summary): Update.
22027         (estimate_function_body_sizes): Update.
22028         (estimate_edge_size_and_time): Update.
22029         (estimate_calls_size_and_time): Update.
22030         (estimate_node_size_and_time): Update.
22031         (inline_merge_summary): Update.
22032         (inline_update_overall_summary): Update.
22033         (estimate_time_after_inlining): Update.
22034         (inline_read_section): Update.
22035         (inline_write_summary): Update.
22036         * ipa-inline.c (compute_uninlined_call_time): Update.
22037         (compute_inlined_call_time): Update.
22038         (recursive_inlining): Update.
22039         (inline_small_functions): Update.
22040         (dump_overall_stats): Update.
22041         * ipa-inline.h: Include sreal.h.
22042         (size_time_entry): Turn time to sreal.
22043         (inline_summary): Turn self_time nad time to sreal.
22045 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
22047         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
22048         data-streamer.h
22049         (sreal::stream_out, sreal::stream_in): New.
22050         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
22052 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
22054         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
22055         environment.
22057 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
22059         PR target/70799
22060         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
22061         Handle ASHIFTRT.
22062         (dimode_scalar_chain::compute_convert_gain): Ditto.
22063         (dimode_scalar_chain::make_vector_copies): Ditto.
22064         (dimode_scalar_chain::convert_reg): Ditto.
22065         (dimode_scalar_chain::convert_insn): Ditto.
22066         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
22067         (VI248_AVX512BW_1): New mode iterator.
22068         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
22069         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
22070         mode iterator.
22072 2017-04-25  Martin Sebor  <msebor@redhat.com>
22074         PR tree-optimization/80497
22075         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
22076         constants are representable in HOST_WIDE_INT.
22077         (parse_directive): Ditto.
22079 2017-04-25  Martin Sebor  <msebor@redhat.com>
22081         PR bootstrap/80486
22082         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
22083         (new_zero_array): Adjust signature.
22084         (dom_info::dom_init): Used unsigned rather that size_t.
22085         (dom_info::dom_info): Same.
22087 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22088             Jakub Jelinek  <jakub@redhat.com>
22090         PR target/77728
22091         * config/arm/arm.c: Include gimple.h.
22092         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
22093         returns negative, increment ncrn only if it returned positive.
22094         (arm_needs_doubleword_align): Return int instead of bool,
22095         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
22096         members, but if there is any such non-FIELD_DECL
22097         > PARM_BOUNDARY aligned decl, return -1 instead of false.
22098         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
22099         returns negative, increment nregs only if it returned positive.
22100         (arm_setup_incoming_varargs): Likewise.
22101         (arm_function_arg_boundary): Emit -Wpsabi note if
22102         arm_needs_doubleword_align returns negative, return
22103         DOUBLEWORD_ALIGNMENT only if it returned positive.
22105 2017-04-25  Marek Polacek  <polacek@redhat.com>
22107         PR sanitizer/80349
22108         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
22109         first argument to type.
22111 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
22113         PR target/80482
22114         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
22115         type checks to test for compatibility instead of equality.
22117 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22118             Jakub Jelinek  <jakub@redhat.com>
22120         PR target/77728
22121         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
22122         type.
22123         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
22124         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
22125         the alignment computation, but return their maximum in warn_alignment.
22126         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
22127         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
22128         is smaller.
22129         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
22130         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
22131         caller.
22133 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22135         * config/arc/simdext.md (dmpyh): Fix typo.
22137 2017-04-25  Richard Biener  <rguenther@suse.de>
22139         PR tree-optimization/80492
22140         * alias.c (compare_base_decls): Handle registers with asm
22141         specification conservatively.
22142         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
22143         compare_base_decls returning dont-know properly.
22145 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22147         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
22148         (legitimate_offset_address_p): New function.
22149         (arc_legitimate_address_p): Use above function.
22151 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22153         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
22155 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22157         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
22158         ACCH registers whenever they are available.
22160 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22162         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
22163         double regs fix when not used.
22165 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22167         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
22168         core registers.
22169         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
22170         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
22172 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22174         * config/arc/arc.c (arc_output_addsi): Check for h-register class
22175         when emitting short ADD instructions.
22177 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22179         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
22180         constraint.
22181         (cmpsi_cc_c_insn): Likewise.
22182         (cbranchsi4_scratch): Compute proper instruction length using
22183         compact_hreg_operand.
22184         * config/arc/predicates.md (compact_hreg_operand): New predicate.
22186 2017-04-25  Richard Biener  <rguenther@suse.de>
22188         PR middle-end/80509
22189         * passes.c (pass_manager::pass_manager): Initialize
22190         m_name_to_pass_map.
22192 2017-04-25  Richard Biener  <rguenther@suse.de>
22194         PR tree-optimization/79201
22195         * tree-ssa-sink.c (statement_sink_location): Handle calls.
22197 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22199         PR target/80464
22200         * config/s390/vector.md: Split MEM->GPR vector moves for
22201         non-s_operand addresses.
22203 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22205         PR target/79895
22206         * config/s390/predicates.md (reload_const_wide_int_operand): New
22207         predicate.
22208         * config/s390/s390.md ("movti"): Remove d/P alternative.
22209         ("movti_bigconst"): New pattern definition.
22211 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22213         PR target/80080
22214         * s390-protos.h (s390_expand_cs_hqi): Removed.
22215         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
22216         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
22217         modes as well as CCZ1mode and CCZmode.
22218         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
22219         signature of s390_emit_compare_and_swap.
22220         (s390_expand_cs_hqi): Likewise, make static.
22221         (s390_expand_cs_tdsi): Generate an explicit compare before trying
22222         compare-and-swap, in some cases.
22223         (s390_expand_cs): Wrapper function.
22224         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
22225         atomic_exchange.
22226         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
22227         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
22228         patterns for small and large integers.  Forbid symref memory operands.
22229         Move expander to s390.c.  Require cc register.
22230         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
22231         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
22232         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
22233         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
22234         symref memory operands.  Remove CC mode and call s390_match_ccmode
22235         instead.
22236         ("atomic_exchange<mode>"): Allow and implement all integer modes.
22238 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22240         * config/s390/s390.md (define_peephole2): New peephole to help
22241         combining the load-and-test pattern with volatile memory.
22243 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22245         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
22246         with CCZmode for TARGET_Z196.
22248 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
22250         PR rtl-optimization/80501
22251         * combine.c (make_compound_operation_int): Set subreg_code to SET
22252         even for AND with mask of the sign bit of mode.
22254         PR rtl-optimization/80500
22255         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
22256         sum's initial value.
22258 2017-04-25  Julian Brown  <julian@codesourcery.com>
22259             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22261         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
22263 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
22265         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
22267 2017-04-25  Julian Brown  <julian@codesourcery.com>
22268             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22270         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
22271         (thunderx2t99_sha): New Reservation.
22273 2017-04-25  Julian Brown  <julian@codesourcery.com>
22274             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22276         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
22277         type for 1-element load.
22279 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
22281         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
22283 2017-04-24  Martin Jambor  <mjambor@suse.cz>
22285         PR tree-optimization/80293
22286         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
22287         char arrays not totally scalarizable if it is false.
22288         (analyze_all_variable_accesses): Pass correct value in the new
22289         parameter.  Add a statistics counter.
22291 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
22293         PR middle-end/79931
22294         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
22296 2017-04-24  Richard Biener  <rguenther@suse.de>
22298         PR tree-optimization/80494
22299         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
22300         out for complex types.
22302 2017-04-24  Richard Biener  <rguenther@suse.de>
22304         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
22305         * tree-ssa-sccvn.c (print_scc): Print SCC size.
22306         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
22307         (DFS): Adjust and never fail.
22308         (sccvn_dom_walker::fail): Remove.
22309         (sccvn_dom_walker::before_dom_children): Adjust.
22310         (run_scc_vn): Likewise and never fail.
22311         * tree-ssa-pre.c (pass_pre::execute): Adjust.
22312         (pass_fre::execute): Likewise.
22314 2017-04-24  Richard Biener  <rguenther@suse.de>
22316         PR tree-optimization/79725
22317         * tree-ssa-sink.c (statement_sink_location): Return whether
22318         failure reason was zero uses.  Move that check later.
22319         (sink_code_in_bb): Deal with zero uses by removing the stmt
22320         if possible.
22322 2017-04-24  Richard Biener  <rguenther@suse.de>
22324         PR c++/2972
22325         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
22326         pointer-based references.
22328 2017-04-24  Richard Biener  <rguenther@suse.de>
22330         PR bootstrap/79814
22331         * pass_manager.h (pass_manager::operator new): Remove.
22332         (pass_manager::operator delete): Likewise.
22333         * passes.c (pass_manager::operator new): Remove.
22334         (pass_manager::operator delete): Likewise.
22335         (pass_manager::pass_manager): Zero individual pass members.
22337 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
22339         PR target/70799
22340         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
22341         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
22342         Check "XEXP (src, 1)" operand here.
22343         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
22344         Check "XEXP (src, 1)" operand here.
22345         (dimode_scalar_chain::make_vector_copies): Detect count register
22346         of a shift instruction.  Zero extend count register from QImode
22347         to DImode to satisfy vector shift pattern count operand predicate.
22348         Substitute vector shift count operand with a DImode copy.
22349         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
22350         vector register.
22352 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
22354         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
22355         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
22356         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
22357         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
22358         (UNSPEC_NOREX_MEM): Remove definition.
22360 2017-04-21  Richard Biener  <rguenther@suse.de>
22362         PR tree-optimization/79547
22363         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
22364         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
22365         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
22366         without any constraints.
22368 2017-04-21  Richard Biener  <rguenther@suse.de>
22370         PR tree-optimization/78847
22371         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
22373 2017-04-21  Richard Biener  <rguenther@suse.de>
22375         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
22376         (build_distinct_type_copy): Likewise.
22377         (build_variant_type_copy): Likewise.
22378         * tree.c (build_qualified_type): Pass down mem-stat info.
22379         (build_distinct_type_copy): Likewise.
22380         (build_variant_type_copy): Likewise.
22382 2017-04-21  Richard Biener  <rguenther@suse.de>
22384         PR tree-optimization/80237
22385         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
22386         defaulted to NULL.
22387         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
22388         for a simplified result.
22390 2016-04-21  Richard Biener  <rguenther@suse.de>
22392         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
22393         sth as strict as a simple_iv but a chrec without symbols and an
22394         operand defined in the loop we are peeling (and not some subloop).
22395         (propagate_constants_for_unrolling): Propagate all constants.
22397 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22399         PR target/79804
22400         * config/i386/i386.c (print_reg): Remove assert for disalowed
22401         regno values, call output_operand_lossage instead.
22403 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22405         PR target/78090
22406         * config/i386/constraints.md (Yc): New register constraint.
22407         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22408         Use Yc constraint for alternative 2 of operand 0.  Remove
22409         preferred_for_speed attribute.
22411 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
22413         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
22414         lastprivate clauses in SIMT case.
22416 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
22418         * doc/invoke.texi (-Wextra-semi): Document new warning option.
22420 2017-04-20  Richard Biener  <rguenther@suse.de>
22422         PR tree-optimization/57796
22423         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
22424         as N scalar stores.
22425         (vect_model_load_cost): Cost gathers as N scalar loads.
22427 2017-04-20  Richard Biener  <rguenther@suse.de>
22429         * ggc-page.c (ggc_allocated_p): Rename to ...
22430         (safe_lookup_page_table_entry): ... this and return the lookup
22431         result.
22432         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
22434 2017-04-20  Richard Biener  <rguenther@suse.de>
22436         PR tree-optimization/80453
22437         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
22438         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
22439         from the conditions.
22440         (vn_phi_eq): Pass them down.
22441         (vn_phi_lookup): Record them.
22442         (vn_phi_insert): Likewise.
22444 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
22446         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
22447         uninitialized variable warning to avoid buffer overrun.
22449 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
22451         PR other/71250
22452         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
22453         is suppressed for '{ 0 }' in C.
22455 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
22457         * BASE-VER: Set to 8.0.0.
22459 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22461         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
22462         priority .init_array and .fini_array section with SECTION_NOTYPE
22463         flag.
22465 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
22467         PR middle-end/80423
22468         * tree.h (build_array_type): Add typeless_storage default argument.
22469         * tree.c (type_cache_hasher::equal): Also compare
22470         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
22471         (build_array_type): Add typeless_storage argument, set
22472         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
22473         recursive call.
22474         (build_nonshared_array_type): Adjust build_array_type_1 caller.
22475         (build_array_type): Likewise.  Add typeless_storage argument.
22477 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
22478             Jakub Jelinek  <jakub@redhat.com>
22480         PR tree-optimization/80426
22481         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
22482         operation on symbolic operands, also compute the overflow for the
22483         invariant part when the operation degenerates into a negation.
22485 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
22487         PR debug/80461
22488         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
22489         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
22491         PR debug/80436
22492         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
22494 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
22496         PR target/80462
22497         * config/avr/avr.c (tree.h): Include it.
22498         (cgraph.h): Include it.
22499         (avr_encode_section_info): Don't warn for uninitialized progmem
22500         variable if it's just an alias.
22502 2017-04-19  Richard Biener  <rguenther@suse.de>
22504         PR ipa/65972
22505         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
22506         when needed by AutoPGO.
22508 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
22510         PR lto/50345
22511         * doc/lto.texi: Remove an extra 'that'.
22513 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
22515         PR rtl-optimization/80429
22516         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
22517         are only used in debug insns.
22519 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
22520             Vladimir Makarov  <vmakarov@redhat.com>
22522         * config/sparc/predicates.md (input_operand): Add comment.  Return
22523         true for any memory operand when LRA is in progress.
22524         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
22526 2017-04-18  Jeff Law  <law@redhat.com>
22528         PR target/74563
22529         * mips.md ({return,simple_return}_internal): Do not overwrite
22530         operands[0].
22532 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22534         PR tree-optimization/80443
22535         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
22536         instead of adding 1, subtract -1 and similarly instead of subtracting
22537         1 add -1.
22539 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
22541         PR rtl-optimization/80357
22542         * haifa-sched.c (tmp_bitmap): New variable.
22543         (model_recompute): Handle duplicate use records.
22544         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
22545         (free_global_sched_pressure_data): Free it.
22547 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22549         Revert:
22550         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22551         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
22552         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
22553         instead of SYSTEM_HEADER_DIR.
22555 2017-04-18  Jeff Law  <law@redhat.com>
22557         PR middle-end/80422
22558         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
22559         predecessors after walking up the insn chain.
22561 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22563         PR debug/80263
22564         * dwarf2out.c (modified_type_die): Try harder not to emit internal
22565         sizetype type into debug info.
22567 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
22569         PR target/80099
22570         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
22571         unneeded test for TARGET_UPPER_REGS_SF.
22572         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
22574 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22576         PR sanitizer/80444
22577         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
22578         instead of gsi_after_labels.
22580 2017-04-18  Jeff Law  <law@redhat.com>
22582         * regcprop.c (maybe_mode_change): Avoid creating copies of the
22583         stack pointer.
22585         Revert:
22586         2017-04-13  Jeff Law  <law@redhat.com>
22587         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
22588         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
22590 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
22592         PR target/79453
22593         * config/avr/avr.c (intl.h): Include it.
22594         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
22596 2017-04-18  Martin Liska  <mliska@suse.cz>
22598         PR gcov-profile/78783
22599         * gcov-tool.c (gcov_output_files): Validate that destination
22600         file is either removed by the tool or by a user.
22602 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
22603             Guy Benyei  <guybe@mellanox.com>
22605         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
22606         block, and do not negate it, the stored id is already negative.
22608 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
22610         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
22612 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
22614         PR target/80098
22615         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
22616         masks of options that should be turned off if the VSX vector
22617         options are turned off.
22618         (OTHER_P8_VECTOR_MASKS): Likewise.
22619         (OTHER_VSX_VECTOR_MASKS): Likewise.
22620         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
22621         rs6000_disable_incompatible_switches to validate no type switches
22622         like -mvsx.
22623         (rs6000_incompatible_switch): New function to disallow turning on
22624         other vector options if -mno-vsx, -mno-power8-vector, or
22625         -mno-power9-vector are specified.
22627 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22629         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
22631 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22633         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
22634         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
22635         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
22636         (ARG_POINTER_CFA_OFFSET): Likewise.
22638 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22640         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
22641         conditions to take advantage of various optimizations.
22643 2017-04-13  Jeff Law  <law@redhat.com>
22645         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
22646         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
22647         (zero_extendsidi2_dext): Likewise.
22649 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
22651         PR sanitizer/80403
22652         * fold-const.c (fold_ternary_loc): Revert
22653         use op0 instead of fold_convert_loc (loc, type, arg0) part of
22654         2017-04-12 change.
22656 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
22658         PR rtl-optimization/80343
22659         * lra-remat.c (update_scratch_ops): Assign original hard reg to
22660         new scratch pseudo.
22662 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
22664         PR sanitizer/80414
22665         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
22666         to ubsan_encode_value.
22668 2017-04-13  Jeff Law  <law@redhat.com>
22670         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
22671         appearing in DEBUG_INSNs.
22673 2017-04-13  Martin Liska  <mliska@suse.cz>
22675         PR gcov-profile/80413
22676         * gcov-io.c (gcov_write_string): Copy to buffer just when
22677         allocated size is greater than zero.
22679 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
22681         PR debug/80321
22682         * dwarf2out.c (decls_for_scope): Ignore declarations of
22683         current_function_decl in BLOCK_NONLOCALIZED_VARS.
22685 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
22687         PR lto/69953
22688         * ipa-visibility.c (non_local_p): Fix typos.
22689         (localize_node): When localizing symbol in same comdat group,
22690         dissolve the group only when we know external symbols are going
22691         to be privatized.
22692         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
22694 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
22696         PR tree-optimization/79390
22697         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
22698         order does not result in usable sequence, retry with reversed operand
22699         order.
22701         PR sanitizer/80403
22702         PR sanitizer/80404
22703         PR sanitizer/80405
22704         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
22705         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
22706         op0 instead of fold_convert_loc (loc, type, arg0).
22708 2017-04-12  Jeff Law  <law@redhat.com>
22710         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
22711         has a delay slot in the generated code.
22713         * config/cris/cris.md (cris_preferred_reload_class): Return
22714         GENNONACR_REGS rather than GENERAL_REGS.
22716 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
22718         PR c/80163
22719         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
22720         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
22721         signedness of the result type.
22723 2017-04-12  Richard Biener  <rguenther@suse.de>
22724             Jeff Law  <law@redhat.com>
22726         PR tree-optimization/80359
22727         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
22728         trim stores to TARGET_MEM_REFs.
22730 2017-04-12  Richard Biener  <rguenther@suse.de>
22732         PR tree-optimization/79390
22733         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
22734         threading case even more.
22736 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
22738         PR target/80382
22739         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
22740         for quad_address_p for TImode, instead of just not indexed_address.
22742 2017-04-12  Richard Biener  <rguenther@suse.de>
22743             Bernd Edlinger  <bernd.edlinger@hotmail.de>
22745         PR middle-end/79671
22746         * alias.c (component_uses_parent_alias_set_from): Handle
22747         TYPE_TYPELESS_STORAGE.
22748         (get_alias_set): Likewise.
22749         * tree-core.h (tree_type_common): Add typeless_storage flag.
22750         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
22751         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
22752         for types containing members with TYPE_TYPELESS_STORAGE.
22753         (place_field): Likewise.
22754         (layout_type): Likewise for ARRAY_TYPE.
22755         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
22756         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
22757         TYPE_TYPELESS_STORAGE.
22758         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
22760 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
22762         PR sanitizer/80349
22763         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
22764         first argument to type.
22766 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22768         PR target/80376
22769         PR target/80315
22770         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
22771         CONST0_RTX (mode) rather than const0_rtx where appropriate.
22772         (rs6000_expand_binop_builtin): Likewise.
22773         (rs6000_expand_ternop_builtin): Likewise; also add missing
22774         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
22775         vshasigma built-ins.
22776         * doc/extend.texi: Document that vec_xxpermdi's third argument
22777         must be a constant.
22779 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
22781         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
22782         Use shift_const cost parameter when calculating gain of STV shifts.
22784 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
22786         PR rtl-optimization/70478
22787         * lra-constraints.c (process_alt_operands): Check memory for
22788         disfavoring memory insn operand.
22790 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
22792         PR middle-end/80100
22793         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
22794         left shift in unsigned HOST_WIDE_INT type.
22796         PR rtl-optimization/80385
22797         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
22798         (not (neg X)) into (plus X -1) for complex or non-integral modes.
22800         PR libgomp/80394
22801         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
22802         if they have any depend clauses.
22804 2017-04-11  Martin Liska  <mliska@suse.cz>
22806         PR ipa/80212
22807         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
22808         * ipa-split.c (split_function): Create a local comdat symbol
22809         if caller is in a comdat group.
22811 2017-04-11  Martin Liska  <mliska@suse.cz>
22813         PR ipa/80212
22814         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
22815         flags.
22817 2017-04-11  Martin Sebor  <msebor@redhat.com>
22819         PR middle-end/80364
22820         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
22821         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
22822         for INTEGER_TYPE.
22823         (directive::set_width, directive::set_precision, format_character):
22824         Adjust.
22825         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
22826         INTEGER_TYPE.
22828 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
22830         PR target/80389
22831         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
22832         conflict, set target->arch_name instead of target->cpu_name.
22834 2017-04-11  Richard Biener  <rguenther@suse.de>
22836         PR tree-optimization/80374
22837         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
22838         build_zero_cst, remove fold_convertible_p check again.
22840 2017-04-11  Martin Liska  <mliska@suse.cz>
22842         PR sanitizer/70878
22843         * ubsan.c (instrument_object_size): Do not instrument register
22844         variables.
22846 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
22848         PR target/80381
22849         * config/i386/i386-builtin-types.def
22850         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
22851         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
22852         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
22853         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
22854         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
22855         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
22856         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
22857         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
22858         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
22859         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
22860         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
22861         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
22862         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
22863         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
22864         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
22865         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
22866         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
22867         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
22868         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
22869         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
22870         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
22871         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
22872         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
22873         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
22874         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
22875         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
22876         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
22877         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
22878         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
22879         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
22880         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
22881         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
22882         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
22883         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
22884         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
22885         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
22886         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
22887         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
22888         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
22889         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
22890         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
22891         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
22892         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
22893         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
22894         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
22895         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
22896         aliases.
22897         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
22898         flag to second_arg_count, handle 4 argument function type _COUNT
22899         aliases, handle second_arg_count on second argument rather than last.
22901 2017-04-10  Jeff Law  <law@redhat.com>
22903         PR tree-optimization/80374
22904         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
22905         record anything if we can not convert integer_zero_node to the
22906         desired type.
22908 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22910         PR target/80108
22911         * config/rs6000/rs6000.c (rs6000_option_override_internal):
22912         Enhance special handling given to the TARGET_P9_MINMAX option in
22913         relation to certain other options.
22915 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
22917         PR tree-optimization/80153
22918         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
22919         remove POINTER_PLUS_EXPR's base part directly, rather than through
22920         aff_tree.
22922 2017-04-10  Richard Biener  <rguenther@suse.de>
22923             Bin Cheng  <bin.cheng@arm.com>
22925         PR tree-optimization/80153
22926         * tree-affine.c (aff_combination_to_tree): Get base pointer from
22927         the first element of pointer type aff_tree.  Build result expr in
22928         aff_tree's type.
22929         (add_elt_to_tree): Convert to type unconditionally.  Remove other
22930         fold_convert calls.
22931         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
22932         (rewrite_use_nonlinear_expr): Check invariant using iv information.
22934 2017-04-10  Richard Biener  <rguenther@suse.de>
22936         * tree-ssa-structalias.c (find_func_aliases): Properly handle
22937         asm inputs.
22939 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
22941         PR rtl-optimization/70478
22942         * lra-constraints.c (curr_small_class_check): New.
22943         (update_and_check_small_class_inputs): New.
22944         (process_alt_operands): Update curr_small_class_check.  Disfavor
22945         alternative insn memory operands.  Check available regs for small
22946         class operands.
22948 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
22950         PR target/80057
22951         * config/mips/mips.opt (-mvirt): Update description.
22952         * doc/invoke.texi (-mvirt): Likewise.
22954 2017-04-10  Richard Biener  <rguenther@suse.de>
22956         PR middle-end/80362
22957         * fold-const.c (fold_binary_loc): Look at unstripped ops when
22958         looking for NEGATE_EXPR in -A / -B to A / B folding.
22960 2017-04-10  Martin Liska  <mliska@suse.cz>
22962         PR gcov-profile/80224
22963         * gcov.c (print_usage): Fix usage string.
22964         (get_gcov_intermediate_filename): Remove.
22965         (output_gcov_file): Use both for normal and intermediate format.
22966         (generate_results): Do not initialize special file for
22967         intermediate format.
22969 2017-04-10  Richard Biener  <rguenther@suse.de>
22971         PR tree-optimization/80304
22972         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
22973         for safelen.
22975 2017-04-10  Nathan Sidwell  <nathan@acm.org>
22977         PR target/79905
22978         * config/rs6000/rs6000.c (rs6000_vector_type): New.
22979         (rs6000_init_builtins): Use it.
22981 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22983         * config/arm/arm.md (<mrc>): Add mode to SET source.
22984         (<mrrc>): Likewise.
22986 2017-04-10  Richard Biener  <rguenther@suse.de>
22988         PR middle-end/80344
22989         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
22991 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
22993         PR target/80324
22994         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
22995         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
22996         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
22997         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
22998         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
22999         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
23000         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
23001         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
23002         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
23003         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
23004         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
23005         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
23006         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
23007         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
23008         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
23009         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
23010         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
23011         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
23012         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
23013         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
23014         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
23015         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
23016         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
23018 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
23020         PR rtl-optimization/70478
23021         * lra-constraints.c: Reverse the last patch.
23023 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
23025         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
23026         Add comment for WCHAR_T.
23028 2017-04-08  Martin Liska  <mliska@suse.cz>
23030         Revert:
23031         2017-04-07  Martin Liska  <mliska@suse.cz>
23033         PR ipa/80212
23034         * ipa-split.c (split_function): Add function part to a same comdat
23035         group.
23037 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23039         PR target/80358
23040         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
23042 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
23044         * rs6000/rs6000.c (vec_load_pendulum): Rename...
23045         (vec_pairing): ...to this.
23046         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
23047         (rs6000_sched_init): Adjust for name change.
23048         (struct rs6000_sched_context): Likewise.
23049         (rs6000_init_sched_context): Likewise.
23050         (rs6000_set_sched_context): Likewise.
23052 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
23054         PR target/80322
23055         PR target/80323
23056         PR target/80325
23057         PR target/80326
23058         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
23059         intrinsics.
23060         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
23061         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
23062         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
23064 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
23066         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
23068 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
23070         PR rtl-optimization/70703
23071         * ira-color.c (update_conflict_hard_regno_costs): Use
23072         int64_t instead of HOST_WIDE_INT.
23074 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
23076         PR rtl-optimization/70478
23077         * lra-constraints.c (process_alt_operands): Disfavor alternative
23078         insn memory operands.
23080 2017-04-07  Jeff Law  <law@redhat.com>
23082         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
23083         CALL and NOTE_INSN_CALL_ARG_LOCATION.
23085 2017-04-07  Martin Liska  <mliska@suse.cz>
23087         PR target/79889
23088         * config/aarch64/aarch64.c (aarch64_process_target_attr):
23089         Show error message instead of an ICE.
23091 2017-04-07  Martin Liska  <mliska@suse.cz>
23093         PR ipa/80212
23094         * ipa-split.c (split_function): Add function part to a same comdat
23095         group.
23097 2017-04-07  Richard Biener  <rguenther@suse.de>
23099         PR middle-end/80341
23100         * tree.c (get_unwidened): Also handle ! for_type case for
23101         INTEGER_CSTs.
23102         * convert.c (do_narrow): Split out from ...
23103         (convert_to_integer_1): ... here.  Do not pass final truncation
23104         type to get_unwidened for TRUNC_DIV_EXPR.
23106 2017-04-07  Richard Biener  <rguenther@suse.de>
23108         * tree-affine.c (wide_int_ext_for_comb): Take type rather
23109         than aff_tree.
23110         (aff_combination_const): Adjust.
23111         (aff_combination_scale): Likewise.
23112         (aff_combination_add_elt): Likewise.
23113         (aff_combination_add_cst): Likewise.
23114         (aff_combination_convert): Likewise.
23115         (add_elt_to_tree): Likewise.  Remove unused argument.
23116         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
23118 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23120         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
23121         definition.
23122         * config/arm/arm.c (arm_default_short_enums): Use
23123         ARM_DEFAULT_SHORT_ENUMS.
23124         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
23126 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
23128         PR debug/80234
23129         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
23130         members with redundant out-of-class redeclaration.
23132 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
23134         PR target/80286
23135         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
23136         * config/i386/i386.md (*zero_extendsidi2):
23137         Add (?*x,*x) and (?*v,*v) alternatives.
23139 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
23141         PR target/79733
23142         * config/i386/i386.c (ix86_expand_builtin)
23143         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
23144         mode from insn data. Convert operands to insn operand mode.
23145         Copy operands that don't satisfy insn predicate to a register.
23147 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
23149         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
23150         Update comments.
23152 2017-04-06  Richard Biener  <rguenther@suse.de>
23154         PR tree-optimization/80334
23155         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
23156         preserve alignment of accesses.
23158 2017-04-06  Richard Biener  <rguenther@suse.de>
23160         PR tree-optimization/80262
23161         * tree-sra.c (build_ref_for_offset): Preserve address-space
23162         information.
23163         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
23164         Drop useless address-space information on MEM_REF offsets.
23166 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
23168         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
23170 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
23172         PR rtl-optimization/70703
23173         * ira-color.c (update_conflict_hard_regno_costs): Use
23174         HOST_WIDE_INT instead of long.
23176 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
23178         PR target/80298
23179         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
23180         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
23181         is not defined.
23182         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
23183         for x86_64 target.  Handle -m3dnowa option.
23185 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
23187         PR rtl-optimization/70703
23188         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
23189         (update_conflict_hard_regno_costs): Use long instead of unsigned
23190         arithmetic for cost calculation.
23192 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
23193             Bernd Edlinger  <bernd.edlinger@hotmail.de>
23195         PR sanitizer/80308
23196         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
23197         for big endian.
23199 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
23201         PR target/78002
23202         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
23203         ptr_mode with Pmode throughout.
23204         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
23205         into probe_stack_range and use DImode.
23207 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
23209         PR target/79890
23210         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
23211         call_eh_return is true.
23213 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23215         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
23216         Initialize last_match_fntype_index.
23218 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
23220         PR target/80310
23221         * tree-nvr.c: Include internal-fn.h.
23222         (pass_return_slot::execute): Ignore internal calls without
23223         direct optab.
23225 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23226             Richard Biener  <rguenther@suse.de>
23228         PR c++/80297
23229         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
23230         captures used multiple times, except for the last use.
23231         * generic-match-head.c: Include gimplify.h.
23233 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23235         PR tree-optimization/79390
23236         * target.h (struct noce_if_info): Declare.
23237         * targhooks.h (default_noce_conversion_profitable_p): Declare.
23238         * target.def (noce_conversion_profitable_p): New target hook.
23239         * ifcvt.h (struct noce_if_info): New type, moved from ...
23240         * ifcvt.c (struct noce_if_info): ... here.
23241         (noce_conversion_profitable_p): Renamed to ...
23242         (default_noce_conversion_profitable_p): ... this.  No longer
23243         static nor inline.
23244         (noce_try_store_flag_constants, noce_try_addcc,
23245         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
23246         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
23247         instead of noce_conversion_profitable_p.
23248         * config/i386/i386.c: Include ifcvt.h.
23249         (ix86_option_override_internal): Don't override
23250         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
23251         (ix86_noce_conversion_profitable_p): New function.
23252         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
23253         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
23254         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
23255         * doc/tm.texi: Regenerated.
23257 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23259         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
23260         correction.
23262 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23264         PR target/80307
23265         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
23266         instructions for small multiply cores.
23268 2017-04-04  Jeff Law  <law@redhat.com>
23270         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
23271         added member.
23272         (mips_expand_vec_perm_const): Initialize elements in orig_perm
23273         that are not set by the loop over the elements.
23275 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23277         PR target/80286
23278         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
23279         int mode, convert_modes it to mode as unsigned, otherwise use
23280         lowpart_subreg to mode rather than SImode.
23281         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
23282         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
23283         Use DImode instead of SImode for the shift count operand.
23284         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
23285         Likewise.
23287 2017-04-04  Richard Biener  <rguenther@suse.de>
23289         PR middle-end/80281
23290         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
23291         arithmetic done for the negate or the plus.  Simplify.
23292         (A - (-B) -> A + B): Likewise.
23293         * fold-const.c (split_tree): Make sure to not negate pointers.
23295 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
23297         PR rtl-optimization/60818
23298         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
23299         a compare of comparisons with the thing compared if this results
23300         in a different machine mode.
23302 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
23304         * alias.c (base_alias_check): Fix typo in comment.
23305         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
23306         * cgraphunit.c (symbol_table::compile): Likewise.
23307         * collect2.c (maybe_run_lto_and_relink): Likewise.
23308         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
23309         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
23310         * config/avr/avr.c (avr_map_op_t): Likewise.
23311         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
23312         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
23313         * config/epiphany/epiphany.md (movcc): Likewise.
23314         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
23315         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
23316         Likewise.
23317         * config/mips/mips.c (mips_save_restore_reg): Likewise.
23318         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
23319         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
23320         * config/sh/sh.c (sh_rtx_costs): Likewise.
23321         * fold-const.c (fold_truth_andor): Likewise.
23322         * genautomata.c (collapse_flag): Likewise.
23323         * gengtype.h (struct type::u::s): Likewise.
23324         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
23325         * input.c (FORMAT_AMOUNT): Likewise.
23326         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
23327         (known_aggs_to_agg_replacement_list): Likewise.
23328         * ipa-inline-analysis.c: Likewise.
23329         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
23330         * ipa-polymorphic-call.c
23331         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
23332         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
23333         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
23334         Likewise.
23335         * modulo-sched.c (apply_reg_moves): Likewise.
23336         * omp-expand.c (build_omp_regions_1): Likewise.
23337         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
23338         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
23339         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
23340         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23341         * value-prof.c: Likewise.
23342         * var-tracking.c (val_reset): Likewise.
23344 2017-04-03  Richard Biener  <rguenther@suse.de>
23346         PR tree-optimization/80275
23347         * fold-const.c (split_address_to_core_and_offset): Handle
23348         POINTER_PLUS_EXPR.
23350 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
23352         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
23353         descriptors is at least equal to that of functions.
23355 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
23357         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
23359 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
23361         PR target/80250
23362         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
23363         (mov<IMOD4:mode>): New expander.
23364         (*mov<IMOD4:mode>_internal): New insn and split pattern.
23366 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
23368         PR rtl-optimization/79405
23369         * fwprop.c (propagations_left): New variable.
23370         (forward_propagate_into): Decrement it.
23371         (fwprop_init): Initialize it.
23372         (fw_prop): If the variable has reached zero, stop propagating.
23373         (fwprop_addr): Ditto.
23375 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
23377         PR debug/79255
23378         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
23379         a FUNCTION_DECL, pass it as decl instead of origin to
23380         process_scope_var.
23382 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
23384         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
23385         string.
23387 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
23389         PR target/80107
23390         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
23391         TARGET_VSX_SMALL_INTEGER.
23393 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23395         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
23396         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
23398 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
23400         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
23401         extraction from odd-numbered MSA register.
23403 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
23405         PR middle-end/80173
23406         * expmed.c (store_bit_field_1): Don't attempt to create
23407         a word subreg out of hard registers wider than word if they
23408         have HARD_REGNO_NREGS of 1 for their mode.
23410         PR middle-end/80163
23411         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
23412         conversions to integer types wider than word and pointer.
23414         PR debug/80025
23415         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
23416         (rtx_equal_for_cselib_p): Pass 0 to it.
23417         * cselib.c (cselib_hasher::equal): Likewise.
23418         (rtx_equal_for_cselib_1): Add depth argument.  If depth
23419         is 128, don't look up VALUE locs and punt.  Increment
23420         depth in recursive calls when walking VALUE locs.
23422 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23424         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
23425         (make_gcov_file_name): Use the canonical path name for generating
23426         the MD5 value.
23427         (read_line): Fix handling of files with ascii null bytes.
23429 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
23431         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
23432         to initialise a vector register instead
23433         of using a const_int.
23435 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
23437         PR translation/80189
23438         * gimplify.c (omp_default_clause): Use %qs instead of %s in
23439         diagnostic messages.
23441 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
23443         PR target/80246
23444         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
23445         (dfp_diex_<mode>): Update mode of operand 1.
23446         * doc/extend.texi (dxex, dxexq): Document change to return type.
23447         (diex, diexq): Document change to argument type.
23449 2017-03-30  Martin Jambor  <mjambor@suse.cz>
23451         PR ipa/77333
23452         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
23453         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
23454         it reflects the signature changes performed at the callee side.
23455         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
23456         to cgraph_build_function_type_skip_args.
23457         (build_function_decl_skip_args): Adjust call to the above function.
23459 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
23461         PR target/80206
23462         * config/i386/sse.md
23463         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
23464         register as dest whenever it is a MEM not rtx_equal_p to the
23465         corresponding dup operand, and when forcing into reg move the
23466         reg into the memory afterwards.
23467         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
23468         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
23469         for the force_reg mode.
23470         (avx512vl_vextractf128<mode>): Use register as dest either
23471         always when a MEM, or when it is a MEM not rtx_equal_p to the
23472         corresponding dup operand, or even not when it is a CONST_VECTOR
23473         depending on the mode and lo vs. hi.
23474         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
23475         parens.
23476         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
23477         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
23478         Likewise.  Require that operands[2] is even.
23479         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
23480         Remove extraneous parens.  Require that operands[2] is a multiple
23481         of 4.
23482         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
23483         operands[0] is a MEM if <mask_applied>, the predicates/constraints
23484         disallow memory then.
23486 2017-03-30  Richard Biener  <rguenther@suse.de>
23488         PR tree-optimization/77498
23489         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
23490         to non-constants over backedges.
23492 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
23494         PR rtl-optimization/80233
23495         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
23496         as last_combined_insn.  Do not test for BARRIER_P separately.
23498 2017-03-29  Andreas Schwab  <schwab@suse.de>
23500         PR ada/80146
23501         * calls.c (prepare_call_address): Convert funexp to Pmode before
23502         copying to temp reg.
23504 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23506         PR tree-optimization/80158
23507         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
23508         Handle possible future case of more than one alternate
23509         interpretation.
23510         (replace_rhs_if_not_dup): Likewise.
23511         (replace_one_candidate): Likewise.
23513 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
23515         PR rtl-optimization/80193
23516         * ira.c (ira): Do not check allocation for LRA.
23518 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
23520         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
23521         (nvptx_output_simt_exit): Declare.
23522         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
23523         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
23524         (init_softstack_frame): Move initialization of crtl->is_leaf to...
23525         (nvptx_declare_function_name): ...here.  Emit declaration of local
23526         memory space buffer for omp_simt_enter insn.
23527         (nvptx_output_unisimt_switch): New.
23528         (nvptx_output_softstack_switch): New.
23529         (nvptx_output_simt_enter): New.
23530         (nvptx_output_simt_exit): New.
23531         * config/nvptx/nvptx.h (struct machine_function): New fields
23532         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
23533         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
23534         (UNSPECV_SIMT_EXIT): Ditto.
23535         (omp_simt_enter_insn): New insn.
23536         (omp_simt_enter): New expansion.
23537         (omp_simt_exit): New insn.
23538         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
23540         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
23541         (expand_GOMP_SIMT_ENTER_ALLOC): New.
23542         (expand_GOMP_SIMT_EXIT): New.
23543         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
23544         (GOMP_SIMT_ENTER_ALLOC): Ditto.
23545         (GOMP_SIMT_EXIT): Ditto.
23546         * target-insns.def (omp_simt_enter): New insn.
23547         (omp_simt_exit): Ditto.
23548         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
23549         simt_dlist.
23550         (lower_rec_simd_input_clauses): Implement SIMT privatization.
23551         (lower_rec_input_clauses): Likewise.
23552         (lower_lastprivate_clauses): Handle SIMT privatization.
23554         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
23555         (ompdevlow_adjust_simt_enter): New.
23556         (find_simtpriv_var_op): New.
23557         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
23558         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
23560         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
23561         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
23562         (copy_decl_for_dup_finish): Ditto.
23564         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
23566 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
23568         PR target/53383
23569         * config/i386/i386.c (ix86_option_override_internal): Always
23570         allow -mpreferred-stack-boundary=3 for 64-bit targets.
23572 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
23574         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
23576 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
23578         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
23579         mark new edge's irreducible flag accordign to it.
23580         (vect_do_peeling): Check loop preheader edge's irreducible flag
23581         and pass it to function slpeel_add_loop_guard.
23583 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
23585         PR tree-optimization/80218
23586         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
23587         Update block frequencies and counts.
23589 2017-03-28  Richard Biener  <rguenther@suse.de>
23591         PR tree-optimization/78644
23592         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
23593         of a simplification result we may not use it at all.
23595 2017-03-28  Richard Biener  <rguenther@suse.de>
23597         PR ipa/80205
23598         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
23599         without arguments, generate default definition of a SSA name.
23601 2017-03-28  Richard Biener  <rguenther@suse.de>
23603         PR middle-end/80222
23604         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
23605         TYPE_REF_CAN_ALIAS_ALL references.
23606         * fold-const.c (fold_indirect_ref_1): Likewise.
23608 2017-03-28  Martin Liska  <mliska@suse.cz>
23610         PR ipa/80104
23611         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
23612         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
23614 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
23615             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
23617         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
23618         (EXTRA_SPECS): Define.
23619         (SUBTARGET_EXTRA_SPECS): Likewise.
23620         (SUBTARGET_CPP_SPEC): Likewise.
23621         * config/arc/elf.h (EXTRA_SPECS): Renamed to
23622         SUBTARGET_EXTRA_SPECS.
23623         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
23625 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
23627         * config/arc/simdext.md (vst64_insn): Update pattern.
23628         (vld32wh_insn): Likewise.
23629         (vld32wl_insn): Likewise.
23630         (vld64_insn): Likewise.
23631         (vld32_insn): Likewise.
23633 2017-03-28  Marek Polacek  <polacek@redhat.com>
23635         PR sanitizer/80067
23636         * fold-const.c (fold_comparison): Use protected_set_expr_location
23637         instead of SET_EXPR_LOCATION.
23639 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
23641         * tree.c (add_expr): Avoid name lookup warning.
23643 2017-03-27  Jeff Law  <law@redhat.com>
23645         PR tree-optimization/80216
23646         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
23647         function name.  Limit recursion depth.
23648         (record_temporary_equivalences): Corresponding changes.
23650 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
23652         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
23653         covered first.
23655 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
23657         PR target/80102
23658         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
23659         notes.
23660         * cfgcleanup.c (reg_note_cfa_p): New array.
23661         (insns_have_identical_cfa_notes): New function.
23662         (old_insns_match_p): Don't cross-jump in between /f
23663         and non-/f instructions.  If both i1 and i2 are frame related,
23664         verify all CFA notes, their order and content.
23666 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
23668         PR target/78543
23669         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
23670         HImode and SImode with zero extend to DImode to one insn.
23671         (bswap<mode>2_extenddi): Likewise.
23672         (bswapsi2_extenddi): Likewise.
23673         (bswaphi2_extendsi): Likewise.
23674         (bswaphi2): Combine bswap HImode and SImode into one insn.
23675         Separate memory insns from swapping register.
23676         (bswapsi2): Likewise.
23677         (bswap<mode>2): Likewise.
23678         (bswaphi2_internal): Delete, no longer used.
23679         (bswapsi2_internal): Likewise.
23680         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
23681         store, and gpr<-gpr swap insns.
23682         (bswap<mode>2_store): Likewise.
23683         (bswaphi2_reg): Register only splitter, combine with the splitter.
23684         (bswaphi2 splitter): Likewise.
23685         (bswapsi2_reg): Likewise.
23686         (bswapsi2 splitter): Likewise.
23687         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
23688         the insns into load, store, and register/register insns.
23689         (bswapdi2_ldbrx): Likewise.
23690         (bswapdi2_load): Likewise.
23691         (bswapdi2_store): Likewise.
23692         (bswapdi2_reg): Likewise.
23694 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
23696         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
23697         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
23699 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23701         PR target/80103
23702         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
23703         add comments.
23704         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
23705         special handling for target option conflicts between dform
23706         options (-mpower9-dform, -mpower9-dform-vector,
23707         -mpower9-dform-scalar) and -mno-direct-move.
23709 2017-03-27  Richard Biener  <rguenther@suse.de>
23711         PR tree-optimization/80181
23712         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
23714 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23716         * config/arc/predicates.md (move_double_src_operand): Replace the
23717         call to move_double_src_operand with a call to address_operand.
23719 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23721         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
23722         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
23723         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
23725 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23727         * config/arc/predicates.md (long_immediate_loadstore_operand):
23728         Consider scaled addresses cases.
23730 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23732         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
23733         restored when in interrupt.
23734         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
23735         doesn't have delay slot.
23737 2017-03-27  Richard Biener  <rguenther@suse.de>
23739         PR ipa/79776
23740         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
23741         inlined thunk clones.
23743 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
23745         PR sanitizer/80168
23746         * asan.c (instrument_derefs): Copy over last operand from
23747         original COMPONENT_REF to the new COMPONENT_REF with
23748         DECL_BIT_FIELD_REPRESENTATIVE.
23749         * ubsan.c (instrument_object_size): Likewise.
23751 2017-03-27  Richard Biener  <rguenther@suse.de>
23753         PR tree-optimization/80170
23754         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
23755         sure DR/SCEV didnt fold in constants we do not see when looking
23756         at the reference base alignment.
23758 2017-03-27  Richard Biener  <rguenther@suse.de>
23760         PR middle-end/80171
23761         * gimple-fold.c (fold_ctor_reference): Properly guard against
23762         NULL return value from canonicalize_constructor_val.
23764 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
23766         PR target/80180
23767         * config/i386/i386.c (ix86_expand_builtin)
23768         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
23769         flags reg setting and flags reg using instructions.
23770         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
23771         clobbering instructions to zero extend op2.
23773 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
23775         * doc/install.texi (Configuration) <--with-aix-soname>:
23776         Update link to AIX ld.
23778 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
23780         PR rtl-optimization/80160
23781         PR rtl-optimization/80159
23782         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
23783         reg_alternate_class into account.
23785 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
23787         PR target/80148
23788         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
23789         to consider in curr_insn_transform.
23791 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
23793         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
23794         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
23795         and emit_mode_inner.
23797 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23799         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
23800         argument to the overloaded builtin variants.  Use the new flag to
23801         deprecate certain builtin variants.
23802         * config/s390/s390-builtin-types.def: Add new builtin types.
23803         * config/s390/s390-builtins.h: Support new flags field for
23804         overloaded builtins.
23805         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
23806         (s390_macro_to_expand): Enable vector float data type.
23807         (s390_cpu_cpp_builtins_internal): Indicate support of the new
23808         builtins by incrementing the __VEC__ version number.
23809         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
23810         vec_xst.
23811         (s390_resolve_overloaded_builtin): Emit error messages depending
23812         on the builtin flags.
23813         * config/s390/s390.c (s390_expand_builtin): Support additional
23814         flags argument.  Change error message to match the messages
23815         emitted in s390-c.c.
23816         * config/s390/s390.md: New UNSPEC_* constants.
23817         (op_type): Add new instruction types.
23818         * config/s390/vecintrin.h: Add new builtins and test data class
23819         constants.
23820         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
23821         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
23822         (VEC_INEXACT, VEC_NOINEXACT): New constants.
23823         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
23824         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
23825         ("vec_mergel<mode>"): V_HW -> VEC_HW.
23827         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
23828         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
23829         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
23830         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
23832         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
23833         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
23834         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
23835         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
23837         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
23838         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
23839         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
23840         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
23841         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
23842         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
23843         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
23845         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
23846         ("vec_scatter_element<V_HW_4:mode>_DI")
23847         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
23848         ("vec_fpint<mode>", "vflls")
23849         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
23850         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
23851         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
23852         ("*vec_cmphe<mode>_cc"): ... these.
23854         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
23855         mode constant instead of magic value.
23857 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23859         * config/s390/s390.c (s390_expand_vec_compare): Support other
23860         vector floating point modes than just V2DF.
23861         (s390_expand_vcond): Likewise.
23862         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
23863         (s390_cannot_change_mode_class): Prevent mode changes between TF
23864         and V1TF in vector registers.
23865         * config/s390/s390.md (DF, SF): New mode attributes.
23866         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
23867         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
23868         SFmode support for VRs.
23869         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
23870         vector fp modes.
23871         (VFT, VF_HW): New mode iterators.
23872         (vw, sdx): New mode attributes.
23873         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
23874         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
23875         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
23876         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
23877         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
23878         also the new vector floating point modes.  Renaming to ...
23880         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
23881         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
23882         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
23883         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
23884         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
23885         ("vec_unordered<mode>"): ... these.
23887         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
23888         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
23889         ("*vec_extendv2df"): New insn definitions.
23891 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23893         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
23894         ("mulditi3_2", "*muldi3_sign"): New patterns.
23895         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
23896         rename the pattern definition.
23898 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23900         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
23901         expander.
23902         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
23904 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23906         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
23907         instruction if possible.
23908         * config/s390/vector.md (vec_halfnumelts): New mode
23909         attribute.
23910         ("*vec_vllezlf<mode>"): New pattern.
23912 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23914         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
23915         ("popcountv4si2", "popcountv2di2"): Rename to ...
23916         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
23917         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
23918         condition.
23919         ("popcount<mode>2_vxe"): New pattern.
23921 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23923         * common/config/s390/s390-common.c (processor_flags_table): Add
23924         arch12.
23925         * config.gcc: Add arch12.
23926         * config/s390/driver-native.c (s390_host_detect_local_cpu):
23927         Default to arch12 for unknown CPU model numbers.
23928         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
23929         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
23930         PROCESSOR_max sanity check.
23931         * config/s390/s390-opts.h (enum processor_type): Add
23932         PROCESSOR_ARCH12.
23933         * config/s390/s390.c (processor_table): Add arch12.
23934         (s390_expand_builtin): Add check for B_VXE flag.
23935         (s390_issue_rate): Add PROCESSOR_ARCH12.
23936         (s390_get_sched_attrmask): Likewise.
23937         (s390_get_unit_mask): Likewise.
23938         (s390_sched_score): Enable z13 scheduling for arch12.
23939         (s390_sched_reorder): Likewise.
23940         (s390_sched_variable_issue): Likewise.
23941         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
23942         PF_VXE.
23943         (s390_tune_attr): Use z13 scheduling also for arch12.
23944         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
23945         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
23946         (TARGET_VXE_P): New macros.
23947         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
23948         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
23949         * config/s390/s390.opt: Add arch12 as processor_type.
23951 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23953         * config/s390/s390.md
23954         ("fixuns_truncdddi2", "fixuns_trunctddi2")
23955         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
23956         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
23958         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
23959         Rename expanders to ...
23961         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
23962         ("fixuns_truncdddi2_emu"): ... these.
23964         ("fixuns_trunc<mode>si2_emu"): New expander.
23966         ("*fixuns_truncdfdi2_z13"): Rename to ...
23967         ("*fixuns_truncdfdi2_vx"): ... this.
23969 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23971         * config/s390/2964.md: Remove the single element vector compare
23972         instructions which are no longer used.
23973         * config/s390/s390.c (s390_select_ccmode): Remove handling of
23974         vector CCmodes.
23975         (s390_canonicalize_comparison): Remove handling of DFmode
23976         compares.
23977         (s390_expand_vec_compare_scalar): Remove function.
23978         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
23979         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
23980         pattern.
23981         ("*cmp<mode>_ccs"): Add wfcdb instruction.
23983 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23985         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
23986         FP zero.
23987         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
23988         will anyway by matched by mov<mode>_64dfp.
23990 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23992         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
23993         vlef/vstef.  Add missing operand to vleif.
23995 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23997         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
23998         pair for all vector types with 64 bit elements.
23999         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
24000         * config/s390/vector.md (V_HW_64): ... here.
24001         (V_128_NOSINGLE): New mode iterator.
24002         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
24003         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
24004         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
24005         ("*vec_load_pairv2di"): Change to ...
24006         ("*vec_load_pair<mode>"): ... this one.
24008 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24010         * config/s390/constraints.md: Add comments.
24011         (jKK): Reject element sizes > 8 bytes.
24012         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
24013         s_operands.
24014         * config/s390/s390.md: Add the s_operand checks formerly in
24015         s390_split_ok_p to various splitters where they are still
24016         required.
24017         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
24018         for 128 bit vectors.  Plus two splitters.
24020 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24022         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
24023         the file.
24025 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24027         PR target/79893
24028         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
24029         error if the boundary argument is not constant.
24031 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
24033         PR rtl-optimization/80112
24034         * loop-doloop.c (doloop_condition_get): Don't check condition
24035         if cmp isn't SET with IF_THEN_ELSE src.
24037 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24039         PR tree-optimization/80158
24040         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
24041         replacing a candidate statement, also replace it for the
24042         candidate's alternate interpretation.
24043         (replace_rhs_if_not_dup): Likewise.
24044         (replace_one_candidate): Likewise.
24046 2017-03-24  Richard Biener  <rguenther@suse.de>
24048         PR tree-optimization/80167
24049         * graphite-isl-ast-to-gimple.c
24050         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
24051         properly.
24052         (translate_isl_ast_to_gimple::get_rename): Likewise.
24054 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24056         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
24057         handling of certain combinations of target options, including the
24058         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
24059         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
24061 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24063         PR target/71436
24064         * config/arm/arm.md (*load_multiple): Add reload_completed to
24065         matching condition.
24067 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24068             Richard Biener  <rguenth@suse.de>
24070         PR tree-optimization/79908
24071         PR tree-optimization/80136
24072         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
24073         been cast away, gimplify_and_add suffices.
24075 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
24077         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
24079 2017-03-23  Richard Biener  <rguenther@suse.de>
24081         PR tree-optimization/80032
24082         * gimplify.c (gimple_push_cleanup): Forced unconditional
24083         cleanups still have to go to the conditional_cleanups
24084         sequence.
24086 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
24088         PR tree-optimization/80072
24089         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
24090         to unsigned int.
24091         (next_operand_entry_id): Change type to unsigned int.
24092         (sort_by_operand_rank): Make sure to return the right return value
24093         even if unsigned fields are bigger than INT_MAX.
24094         (struct oecount): Change cnt and id type to unsigned int.
24095         (oecount_hasher::equal): Formatting fix.
24096         (oecount_cmp): Make sure to return the right return value
24097         even if unsigned fields are bigger than INT_MAX.
24098         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
24100         PR c++/80129
24101         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
24102         TREE_READONLY on result if writing it more than once.
24104         PR sanitizer/80110
24105         * doc/invoke.texi (-fsanitize=thread): Document that with
24106         -fnon-call-exceptions atomics are not able to throw
24107         exceptions.
24109         PR sanitizer/80110
24110         * tsan.c: Include tree-eh.h.
24111         (instrument_builtin_call): Call maybe_clean_eh_stmt or
24112         maybe_clean_or_replace_eh_stmt where needed.
24113         (instrument_memory_accesses): Add cfg_changed argument.
24114         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
24115         if it returned true.
24116         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
24118         PR rtl-optimization/63191
24119         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
24120         wrapper function, moved the whole old content into ...
24121         (ix86_delegitimize_address_1): ... this.  New inline function.
24122         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
24123         true as last argument instead of ix86_delegitimize_address.
24125 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
24127         * config/aarch64/aarch64.c (generic_branch_cost): Copy
24128         cortexa57_branch_cost.
24130 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
24132         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
24134 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24136         PR target/80123
24137         * doc/md.texi (Constraints): Document wA constraint.
24138         * config/rs6000/constraints.md (wA): New.
24139         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
24140         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
24141         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
24142         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
24144 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
24146         PR c++/80029
24147         * gimplify.c (is_oacc_declared): New function.
24148         (oacc_default_clause): Use it to set default flags for acc declared
24149         variables inside parallel regions.
24150         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
24151         declared variables.
24152         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
24153         declare attribute to any decl as necessary.
24155 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24157         PR target/80082
24158         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
24159         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
24160         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
24161         (arm_arch_lpae): This.
24162         * config/arm/arm.c (arm_arch7ve): Rename into ...
24163         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
24164         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
24165         arm_arch_lpae.
24167 2017-03-22  Martin Liska  <mliska@suse.cz>
24169         PR target/79906
24170         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
24171         error message instead of an ICE.
24173 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24175         * doc/extend.texi (6.11 Additional Floating Types): Revise.
24177 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24179         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
24180         comments.
24181         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
24182         comments.
24184 2017-03-21  Martin Sebor  <msebor@redhat.com>
24186         * doc/extend.texi: Use "cannot" instead of "can't."
24187         * doc/hostconfig.texi: Same.
24188         * doc/install.texi: Same.
24189         * doc/invoke.texi: Same.
24190         * doc/loop.texi: Same.
24191         * doc/md.texi: Same.
24192         * doc/objc.texi: Same.
24193         * doc/rtl.texi: Same.
24194         * doc/tm.texi: Same.
24195         * doc/tm.texi.in: Same.
24196         * doc/trouble.texi: Same.
24198 2017-03-21  Alexandre Oliva <aoliva@redhat.com>
24200         PR debug/63238
24201         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
24202         (collect_checksum_attributes): Set it.
24203         (die_checksum_ordered): Use it.
24205 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24207         PR tree-optimization/79908
24208         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
24209         change: For a VA_ARG whose LHS has been cast away, use
24210         force_gimple_operand to construct the side effects.
24212 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
24214         PR translation/80001
24215         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
24216         more amenable to translation.
24217         (oacc_loop_auto_partitions): Likewise.
24219 2017-03-21  Marek Polacek  <polacek@redhat.com>
24220             Martin Sebor  <msebor@redhat.com>
24222         PR tree-optimization/80109
24223         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
24224         on INTEGRAL_TYPE_P.
24226 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
24227             Segher Boessenkool  <segher@kernel.crashing.org>
24229         PR target/80125
24230         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
24231         check reg_used_between_p between insn and one of succ or succ2
24232         depending on if succ is artificial insn not inserted into insn
24233         stream.
24235 2017-03-21  Martin Liska  <mliska@suse.cz>
24237         PR gcov-profile/80081
24238         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
24239         * doc/gcc.texi: Include gcov-dump stuff.
24240         * doc/gcov-dump.texi: New file.
24242 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
24244         PR rtl-optimization/79150
24245         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
24246         conditional jump, if the jump is the last insn of the loop.
24248 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24249             Richard Biener  <rguenth@suse.de>
24251         PR tree-optimization/79908
24252         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
24253         been cast away, use force_gimple_operand to construct the side
24254         effects.
24256 2017-03-21  Martin Liska  <mliska@suse.cz>
24258         PR libfortran/79956
24259         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
24260         to NULL.
24262 2017-03-21  Brad Spengler <spender@grsecurity.net>
24264         PR plugins/80094
24265         * plugin.c (htab_hash_plugin): New function.
24266         (add_new_plugin): Use it and adjust.
24267         (parse_plugin_arg_opt): Adjust.
24268         (init_one_plugin): Likewise.
24270 2017-03-21  Richard Biener  <rguenther@suse.de>
24272         PR tree-optimization/80032
24273         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
24274         if set force the cleanup to happen unconditionally.
24275         (gimplify_target_expr): Push inserted clobbers with force_uncond
24276         to avoid them being removed by control-dependent DCE.
24278 2017-03-21  Richard Biener  <rguenther@suse.de>
24280         PR tree-optimization/80122
24281         * tree-inline.c (copy_bb): Do not expans va-arg packs or
24282         va_arg_pack_len when the inlined call stmt requires pack
24283         expansion itself.
24284         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
24286 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
24288         PR sanitizer/78158
24289         * tsan.c (instrument_builtin_call): If the memory model argument
24290         is not a constant, assume it is valid.
24292         PR c/67338
24293         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
24294         avoid UB.
24296 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
24298         PR rtl-optimization/79910
24299         * combine.c (can_combine_p): Do not allow combining an I0 or I1
24300         if its dest is used by an insn before I2 (other than the combined
24301         insns themselves, which are properly handled already).
24303 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
24305         Revert:
24306         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
24308         * combine.c (record_used_regs): New static function.
24309         (try_combine): Handle situations where there is an additional
24310         instruction between I2 and I3 which needs to have a LOG_LINK
24311         updated.
24313         Revert:
24314         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
24316         * combine.c (try_combine): Delete redundant i1 test.  Call
24317         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
24319 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24321         PR target/80083
24322         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
24323         alternatives 13/14.
24325 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24327         PR tree-optimization/80054
24328         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
24329         the optimization if a PHI or any of its arguments is not dominated
24330         by the candidate's basis.  Use gphi* rather than gimple* as
24331         appropriate.
24332         (replace_profitable_candidates): Clean up a gimple* variable that
24333         should be a gphi* variable.
24335 2017-03-20  Martin Sebor  <msebor@redhat.com>
24337         PR c++/52477
24338         * doc/extend.texi (attribute constructor): Document present limitation.
24340 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24342         PR target/79963
24343         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
24344         __POWER9_VECTOR__ #ifdef control, change template definition to
24345         use Power9-specific built-in function.
24346         (vec_any_eq): Likewise.
24347         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
24348         to control outcomes from this test.
24349         (vector_ae_<mode>p): For VEC_F modes, likewise.
24351 2017-03-20  Ian Lance Taylor  <iant@google.com>
24353         * config/i386/i386.c (ix86_function_regparm): Save an extra
24354         register for -fsplit-stack with DECL_STATIC_CHAIN.
24356 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
24358         PR target/79912
24359         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
24360         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
24362 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
24364         * config/riscv/riscv.c (riscv_print_operand): Use "fence
24365         iorw,ow".
24366         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
24367         iorw,iorw".
24369 2017-03-20  Marek Polacek  <polacek@redhat.com>
24371         PR sanitizer/80063
24372         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
24374 2017-03-20  Richard Biener  <rguenther@suse.de>
24376         PR tree-optimization/80113
24377         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
24378         allocate extra SSA name for PHI def.
24379         (add_close_phis_to_outer_loops): Likewise.
24380         (add_close_phis_to_merge_points): Likewise.
24381         (copy_loop_close_phi_args): Likewise.
24382         (copy_cond_phi_nodes): Likewise.
24384 2017-03-20  Martin Liska  <mliska@suse.cz>
24386         PR middle-end/79753
24387         * tree-chkp.c (chkp_build_returned_bound): Do not build
24388         returned bounds for a LHS that's not a BOUNDED_P type.
24390 2017-03-20  Martin Liska  <mliska@suse.cz>
24392         PR target/79769
24393         PR target/79770
24394         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
24395         COMPLEX_CST and VECTOR_CST.
24397 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24399         PR target/78857
24400         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
24401         target operand.  A new splitter adds the clobber statement in case
24402         the target operand is dead anyway.
24404 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
24406         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
24407         to age-old versions of binutils and glibc.
24409 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
24411         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
24413 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
24415         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
24417 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
24419         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
24420         requirement for binutils 2.13.
24422 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
24424         * combine.c (try_combine): Delete redundant i1 test.  Call
24425         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
24427 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
24429         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
24430         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
24431         contents.
24432         <riscv64-*-elf>: Re-arrange section
24433         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
24434         <riscv32-*-linux>: Likewise.
24435         <riscv64-*-elf>: Likewise
24436         <riscv64-*-linux>: Likewise.
24438 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
24440         PR target/80052
24441         * aarch64.opt(verbose-cost-dump): Fix typo.
24443 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
24445         PR target/79951
24446         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
24447         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
24449 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
24451         * reload.c (find_reloads): When reloading a nonoffsettable address,
24452         use RELOAD_OTHER for it and its address reloads.
24454         PR rtl-optimization/79910
24455         * combine.c (record_used_regs): New static function.
24456         (try_combine): Handle situations where there is an additional
24457         instruction between I2 and I3 which needs to have a LOG_LINK
24458         updated.
24460 2017-03-17  Jeff Law  <law@redhat.com>
24462         PR tree-optimization/71437
24463         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
24464         conditional in the hash table first.
24465         (vrp_dom_walker::before_dom_children): Extract condition from
24466         ASSERT_EXPR.  Record condition, its inverion and any implied
24467         conditions as well.
24469 2017-03-17  Marek Polacek  <polacek@redhat.com>
24470             Markus Trippelsdorf  <markus@trippelsdorf.de>
24472         PR tree-optimization/80079
24473         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
24474         m_stores_head.
24476 2017-03-17  Richard Biener  <rguenther@suse.de>
24478         PR middle-end/80075
24479         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
24480         Properly verify the LHS before the RHS possibly claims to be
24481         handled.
24482         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
24483         do not throw.
24485 2017-03-17  Martin Jambor  <mjambor@suse.cz>
24487         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
24488         (List of -O2 options): Likewise.
24489         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
24490         (-fipa-vrp) New.
24492 2017-03-17  Tom de Vries  <tom@codesourcery.com>
24494         * gcov-dump.c (print_usage): Print bug_report_url.
24496 2017-03-17  Richard Biener  <rguenther@suse.de>
24498         PR middle-end/80050
24499         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
24500         (parser::peek): Likewise.
24502 2017-03-17  Richard Biener  <rguenther@suse.de>
24504         PR tree-optimization/80048
24505         * sese.c (free_sese_info): Properly release rename_map and
24506         copied_bb_map elements.
24508 2017-03-16  Alexandre Oliva <aoliva@redhat.com>
24510         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
24511         Add linked-list forward and backlinks.  Insert on
24512         construction, remove on destruction.
24513         (class pass_store_merging): Add m_stores_head field.
24514         (pass_store_merging::terminate_and_process_all_chains):
24515         Iterate over m_stores_head list.
24516         (pass_store_merging::terminate_all_aliasing_chains):
24517         Likewise.
24518         (pass_store_merging::execute): Check for debug stmts first.
24519         Push new chains onto the m_stores_head stack.
24521 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24523         PR target/71294
24524         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
24525         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
24526         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
24528 2017-03-16  Jeff Law  <law@redhat.com>
24530         PR tree-optimization/71437
24531         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
24532         member function.  Implementation moved into after_dom_children
24533         member function and into the threader's thread_outgoing_edges
24534         function.
24535         (dom_opt_dom_walker::after_dom_children): Simplify by moving
24536         some code into new thread_outgoing_edges.
24537         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
24538         definition.  Simplify marker handling (do it here).   Assume we always
24539         have the available expression and the const/copies tables.
24540         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
24541         and tree-vrp.c
24542         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
24543         * tree-vrp.c (equiv_stack): No longer file scoped.
24544         (vrp_dom_walker): New class.
24545         (vrp_dom_walker::before_dom_children): New member function.
24546         (vrp_dom_walker::after_dom_children): Likewise.
24547         (identify_jump_threads):  Setup domwalker.  Use it rather than
24548         walking edges in a random order by hand.  Simplify setup/finalization.
24549         (finalize_jump_threads): Remove.
24550         (vrp_finalize): Do not call identify_jump_threads here.
24551         (execute_vrp): Do it here instead and call thread_through_all_blocks
24552         here too.
24554         PR tree-optimization/71437
24555         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
24556         callers changed.
24557         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
24558         callers changed.
24559         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
24560         (dom_opt_dom_walker::thread_across_edge): Remove
24561         handle_dominating_asserts argument.  All callers changed.
24562         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
24563         changes.  Remove calls to lhs_of_dominating_assert.  Other
24564         uses of handle_dominating_asserts turn into unconditional code
24565         (simplify_control_stmt_condition_1): Likewise.
24566         (simplify_control_stmt_condition): Likewise.
24567         (thread_through_normal_block, thread_across_edge): Likewise.
24568         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
24569         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
24570         object if it is not an SSA_NAME.
24571         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
24572         before calling into the VRP specific simplifiers.
24573         (identify_jump_threads): Remove handle_dominating_asserts
24574         argument.
24576 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
24578         PR fortran/79886
24579         * tree-diagnostic.c (default_tree_printer): No longer static.
24580         * tree-diagnostic.h (default_tree_printer): New prototype.
24582 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
24584         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
24585         Change ins into fmov.
24587 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24589         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
24590         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
24591         Use h_con constraint for operand 1.
24592         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
24593         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
24595 2017-03-15  Jeff Law  <law@redhat.com>
24597         PR tree-optimization/71437
24598         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
24599         (record_temporary_equivalences): Use it.
24601         PR tree-optimization/71437
24602         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
24603         tree-ssa-scopedtables.
24604         (lookup_avail_expr, build_and_record_new_cond): Likewise.
24605         (record_conditions, record_cond, vuse_eq): Likewise.
24606         (record_edge_info): Adjust to API tweak of record_conditions.
24607         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
24608         (record_temporary_equivalences, optimize_stmt): Likewise.
24609         (eliminate_redundant_computations): Likewise.
24610         (record_equivalences_from_stmt): Likewise.
24611         * tree-ssa-scopedtables.c: Include options.h and params.h.
24612         (vuse_eq): New function, moved from tree-ssa-dom.c
24613         (build_and_record_new_cond): Likewise.
24614         (record_conditions): Likewise.  Accept vector of conditions rather
24615         than edge_equivalence structure for first argument.
24616         for the first argument.
24617         (avail_exprs_stack::lookup_avail_expr): New member function, moved
24618         from tree-ssa-dom.c.
24619         (avail_exprs_stack::record_cond): Likewise.
24620         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
24621         from tree-ssa-dom.c.
24622         (avail_exprs_stack): Add new member functions lookup_avail_expr
24623         and record_cond.
24624         (record_conditions): Declare.
24626 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
24628         PR target/80017
24629         * lra-constraints.c (process_alt_operands): Increase reject for
24630         reloading an input/output operand.
24632 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
24634         PR target/79038
24635         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
24636         insns to convert from signed/unsigned char/short to IEEE 128-bit
24637         floating point.
24638         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
24640 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
24642         PR target/80019
24643         * config/i386/i386.c (ix86_vector_duplicate_value): Create
24644         subreg of inner mode for values already in registers.
24646 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
24648         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
24649         iteration reg is used after the loop.
24651 2017-03-14  Martin Sebor  <msebor@redhat.com>
24653         PR tree-optimization/79800
24654         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
24655         precision in negative-positive range.
24656         (format_floating): Call non-const overload with adjusted precision.
24658 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
24660         PR target/79947
24661         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
24662         -mpowerpc-gfxopt.
24664 2017-03-14  Martin Sebor  <msebor@redhat.com>
24666         PR middle-end/80020
24667         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
24668         * builtins.def (aligned_alloc): Use it.
24670         PR c/79936
24671         * Makefile.in (GTFILES): Add calls.c.
24672         * calls.c: Include "gt-calls.h".
24674 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
24676         PR rtl-optimization/79728
24677         * regs.h (struct target_regs): New field
24678         x_contains_allocatable_regs_of_mode.
24679         (contains_allocatable_regs_of_mode): New macro.
24680         * reginfo.c (init_reg_sets_1): Initialize it, and change
24681         contains_reg_of_mode so it includes global regs as well.
24682         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
24683         rather than contains_regs_of_mode.
24685 2017-03-14  Martin Liska  <mliska@suse.cz>
24687         * doc/invoke.texi: Document options that can't be combined with
24688         -fcheck-pointer-bounds.
24690 2017-03-14  Martin Liska  <mliska@suse.cz>
24692         PR middle-end/79831
24693         * doc/invoke.texi (-Wchkp): Document the option.
24695 2017-03-14  Martin Liska  <mliska@suse.cz>
24697         * Makefile.in: Install gcov-dump.
24699 2017-03-14  Martin Liska  <mliska@suse.cz>
24701         * multiple_target.c (expand_target_clones): Bail out for
24702         an invalid attribute.
24704 2017-03-14  Richard Biener  <rguenther@suse.de>
24706         * alias.c (struct alias_set_entry): Pack properly.
24707         * cfgloop.h (struct loop): Likewise.
24708         * cse.c (struct set): Likewise.
24709         * ipa-utils.c (struct searchc_env): Likewise.
24710         * loop-invariant.c (struct invariant): Likewise.
24711         * lra-remat.c (struct cand): Likewise.
24712         * recog.c (struct change_t): Likewise.
24713         * rtl.h (struct address_info): Likewise.
24714         * symbol-summary.h (function_summary): Likewise.
24715         * tree-loop-distribution.c (struct partition): Likewise.
24716         * tree-object-size.c (struct object_size_info): Likewise.
24717         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
24718         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
24719         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
24720         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
24721         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
24722         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
24723         (struct _stmt_vec_info): Likewise.
24725 2017-03-14  Martin Liska  <mliska@suse.cz>
24727         PR target/79892
24728         * multiple_target.c (create_dispatcher_calls): Check that
24729         a target can create a function dispatcher.
24731 2017-03-14  Martin Liska  <mliska@suse.cz>
24733         PR lto/66295
24734         * multiple_target.c (expand_target_clones): Drop local.local
24735         flag for default implementation.
24737 2017-03-14  Richard Biener  <rguenther@suse.de>
24739         PR tree-optimization/80030
24740         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
24742 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
24744         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
24745         gcc_fallthrough() instead of __attribute__((fallthrough));
24747 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
24749         * doc/gcc.texi: Remove "up" link to (DIR).
24750         * doc/gccint.texi: Ditto.
24752 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
24754         * doc/install.texi (Specific) <avr>: Remove reference to
24755         binutils 2.13.
24757 2017-03-13  Jeff Law  <law@redhat.com>
24759         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
24760         attribute rather than comments.
24762         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
24763         match_scratch operand is highest.
24765 2017-03-13  Martin Liska  <mliska@suse.cz>
24767         PR middle-end/78339
24768         * ipa-pure-const.c (warn_function_noreturn): If the declarations
24769         is a CHKP clone, use original declaration.
24771 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24773         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
24774         (arc_conditional_register_usage): Use a different allocation order
24775         when optimizing for size.
24776         * common/config/arc/arc-common.c (arc_option_optimization_table):
24777         Section anchors default on when optimizing for size.
24779 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24781         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
24783 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24785         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
24786         * config/arc/arc.md (cpu_facility): Add cd variant.
24787         (*movqi_insn): Add code density variant.
24788         (*movhi_insn): Likewise.
24789         (*movqi_insn): Likewise.
24790         (*addsi3_mixed): Likewise.
24791         (subsi3_insn): Likewise.
24793 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24795         * config/arc/arc.md (movsi_cond_exec): Update constraint.
24797 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24799         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
24800         expressions with MINUS and UNARY ops.
24802 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24804         PR target/79911
24805         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
24806         Rename to...
24807         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
24808         between vec_select and vector argument.
24809         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
24810         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
24811         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
24812         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
24813         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
24814         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
24816 2017-03-13  Richard Biener  <rguenther@suse.de>
24818         PR other/79991
24819         * params.def (vect-max-peeling-for-alignment): Fix typo.
24821 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
24823         * doc/install.texi (Specific) <mips-*-*>: Remove description of
24824         issue that only occurred with binutils below 2.18.
24826 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
24828         * doc/install.texi (Specific) <cris-axis-elf>: No longer
24829         refer to binutils 2.11/2.12 minimum.
24831 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
24833         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
24834         ftp.kernel.org and simplify binutils requirement.
24836 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
24838         * doc/invoke.texi (Warning Options): Fix spelling of link-time
24839         optimization.
24840         (Optimize Options): Ditto.  Also remove redundancy.
24842 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24844         PR translation/79848
24845         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
24846         "%qs".
24847         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
24848         to G_ to avoid double translation.
24850 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24852         PR translation/79923
24853         * auto-profile.c (get_combined_location): Convert leading
24854         character of diagnostics to lower case and remove trailing period.
24855         (read_profile): Likewise for various diagnostics.
24856         * config/arm/arm.c (arm_option_override): Remove trailing period
24857         from various diagnostics.
24858         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
24859         (msp430_expand_delay_cycles): Likewise.
24861 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24863         PR target/79925
24864         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
24865         full command-line argument, rather than just "str".
24866         (aarch64_validate_march): Likewise.
24867         (aarch64_validate_mtune): Likewise.
24869 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
24871         PR rtl-optimization/78911
24872         * lra-assigns.c (must_not_spill_p): New function.
24873         (spill_for): Use it.
24875 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
24877         PR tree-optimization/79981
24878         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
24879         ATOMIC_COMPARE_EXCHANGE ifn result.
24880         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
24881         IFN_ATOMIC_COMPARE_EXCHANGE.
24883 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24885         PR driver/79875
24886         * opts.c (parse_sanitizer_options): Add missing question mark to
24887         "did you mean" message.
24889 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24891         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
24892         built-in.
24893         (VMULEUH_UNS): Likewise.
24894         (VMULOUB_UNS): Likewise.
24895         (VMULOUH_UNS): Likewise.
24896         * config/rs6000/rs6000.c (builtin_function_type): Remove
24897         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
24899 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24901         PR bootstrap/79952
24902         * read-rtl-function.c (function_reader::read_rtx_operand): Update
24903         x with result of extra_parsing_for_operand_code_0.
24904         (function_reader::extra_parsing_for_operand_code_0): Convert
24905         return type from void to rtx, returning x.  When reading
24906         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
24907         larger size containing struct block_symbol.
24909 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
24911         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
24912         -mfloat128-hardware without -m64.
24914 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
24916         PR target/79941
24917         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
24918         entries to the case statement that marks unsigned arguments to
24919         overloaded functions.
24921 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24923         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
24924         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
24926 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
24928         PR target/79907
24929         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
24930         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
24932 2017-03-10  Martin Liska  <mliska@suse.cz>
24934         PR target/65705
24935         PR target/69804
24936         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
24937         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
24938         FIELD != NULL.
24940 2017-03-10  Olivier Hainque  <hainque@adacore.com>
24942         * tree-switch-conversion (array_value_type): Start by resetting
24943         candidate type to it's main variant.
24945 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
24947         PR rtl-optimization/79909
24948         * combine.c (try_combine): Use simplify_replace_rtx on individual
24949         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
24950         of the whole CALL_INSN_FUNCTION_USAGE.
24952         PR tree-optimization/79972
24953         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
24954         get_range_info on SSA_NAMEs.  Formatting fixes.
24956 2017-03-10  Richard Biener  <rguenther@suse.de>
24957             Jakub Jelinek  <jakub@redhat.com>
24959         PR tree-optimization/77975
24960         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
24961         edge to be constant.
24962         (get_val_for): For constant x return it.  Formatting fix.
24963         (loop_niter_by_eval): Avoid pointless looping if the next iteration
24964         would use the same bases as the current one.
24966 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24968         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
24969         instead of vec_select for V1TImode.
24970         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
24971         longer needed.
24972         (VSX_LE_128): Add V1TI to this mode iterator.
24973         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
24974         (*vsx_le_perm_store_<mode>): Likewise.
24975         (pre-reload splitter for VSX stores): Likewise.
24976         (post-reload splitter for VSX stores): Likewise.
24977         (*vsx_xxpermdi2_le_<mode>): Likewise.
24978         (*vsx_lxvd2x2_le_<mode>): Likewise.
24979         (*vsx_stxvd2x2_le_<mode>): Likewise.
24981 2017-03-09  Michael Eager  <eager@eagercon.com>
24983         Correct failures with --enable-checking=yes,rtl.
24985         * config/microblaze/microblaze.c (microblaze_expand_shift):
24986         Replace GET_CODE test with CONST_INT_P and INTVAL test with
24987         test for const0_rtx.
24988         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
24989         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
24991 2017-03-09  Richard Biener  <rguenther@suse.de>
24993         PR tree-optimization/79977
24994         * graphite-scop-detection.c (scop_detection::merge_sese):
24995         Handle the case of extra exits to blocks dominating the entry.
24997 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
24999         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25000         Document rdynamic.
25002 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
25004         PR rtl-optimization/79949
25005         * lra-constraints.c (process_alt_operands): Check memory when
25006         trying to predict a cycle.  Print about the overall increase.
25008 2017-03-09  Richard Biener  <rguenther@suse.de>
25010         PR middle-end/79971
25011         * gimple-expr.c (useless_type_conversion_p): Preserve
25012         TYPE_SATURATING for fixed-point types.
25014 2017-03-09  Richard Biener  <rguenther@suse.de>
25016         PR ipa/79970
25017         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
25018         alignment of BLKmode params.
25020 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25022         PR target/79913
25023         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
25024         (VALL_NO_V2Q): Likewise.
25025         (VDQF_DF): Delete.
25026         * config/aarch64/aarch64-simd.md
25027         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
25028         iterator.
25029         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
25030         VALL_NO_V2Q mode iterator.
25031         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
25033 2017-03-09  Martin Liska  <mliska@suse.cz>
25035         PR tree-optimization/79631
25036         * tree-chkp-opt.c (chkp_is_constant_addr): Call
25037         tree_int_cst_sign_bit just for INTEGER constants.
25039 2017-03-09  Martin Liska  <mliska@suse.cz>
25041         PR target/65705
25042         PR target/69804
25043         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
25044         sanitizers.
25046 2017-03-09  Marek Polacek  <polacek@redhat.com>
25048         PR c++/79672
25049         * tree.c (inchash::add_expr): Handle TREE_VEC.
25051 2017-03-09  Martin Liska  <mliska@suse.cz>
25053         PR ipa/79764
25054         (chkp_narrow_size_and_offset): New function.
25055         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
25056         (void chkp_parse_bit_field_ref): New function.
25057         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
25058         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
25060 2017-03-09  Martin Liska  <mliska@suse.cz>
25062         PR ipa/79761
25063         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
25064         (chkp_find_bounds_1): Remove gcc_unreachable.
25066 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
25068         PR sanitizer/79944
25069         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
25070         BUILT_IN_SYNC*, determine the access type from the size suffix and
25071         always build a MEM_REF with that type.  Handle forgotten
25072         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
25074         PR target/79932
25075         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
25076         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
25077         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
25078         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
25079         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
25080         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
25081         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
25082         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
25083         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
25084         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
25085         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
25086         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
25087         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
25088         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
25089         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
25090         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
25091         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
25092         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
25093         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
25094         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
25095         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
25096         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
25097         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
25098         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
25099         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
25100         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
25101         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
25102         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
25103         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
25104         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
25105         definitions outside of __OPTIMIZE__ guarded section.
25107         PR target/79932
25108         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
25109         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
25110         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
25111         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
25112         guarded section.
25114 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25116         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
25117         ("vfenez<mode>"): Add missing constraints.
25119 2017-03-08  Martin Sebor  <msebor@redhat.com>
25121         PR target/79928
25122         * config/nds32/nds32.c (nds32_option_override):
25123         Fix misspelled diagnostic.
25125 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25127         PR c/79940
25128         * gimplify.c (gimplify_omp_for): Replace index var in outer
25129         taskloop statement with an artificial variable and add
25130         OMP_CLAUSE_PRIVATE clause for it.
25132 2017-03-08  Richard Biener  <rguenther@suse.de>
25134         PR tree-optimization/79955
25135         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
25136         for accesses that are completely outside of the variable.
25138 2017-03-08  Andrew Haley  <aph@redhat.com>
25140         PR tree-optimization/79943
25141         * tree-ssa-loop-split.c (compute_new_first_bound): When
25142         calculating the new upper bound, (END-BEG) should be added, not
25143         subtracted.
25145 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25147         * config/avr/avr.md (setmemhi): Make sure match_dup
25148         operand number comes before match_scratch.
25150 2017-03-08  Richard Biener  <rguenther@suse.de>
25152         PR tree-optimization/79920
25153         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
25154         with ncopies == 1 to ...
25155         (vect_transform_slp_perm_load): ... here.  Properly compute
25156         all element loads by iterating VF times over the group.  Do
25157         not handle ncopies (computed in a broken way) in
25158         vect_create_mask_and_perm.
25160 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25162         PR sanitizer/79904
25163         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
25164         is a uniform vector, use uniform_vector_p return value instead of
25165         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
25167 2017-03-07  Marek Polacek  <polacek@redhat.com>
25169         PR middle-end/79809
25170         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
25171         (alloca_call_type): Likewise.
25173 2017-03-07  Martin Liska  <mliska@suse.cz>
25175         * gcov.c (process_args): Put comment to correct location.
25177 2017-03-07  Martin Liska  <mliska@suse.cz>
25179         PR middle-end/68270
25180         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
25181         Use array_at_struct_end_p instead of DECL_CHAIN (field).
25182         (chkp_narrow_bounds_for_field): Likewise.
25183         (chkp_parse_array_and_component_ref): Pass one more argument to
25184         call.
25186 2017-03-07  Richard Biener  <rguenther@suse.de>
25188         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
25189         preheaders.
25191 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
25193         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
25194         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
25196 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25198         PR c/79855
25199         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
25200         to end of description.
25201         (PARAM_MAX_STORES_TO_MERGE): Likewise.
25203 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
25205         PR rtl-optimization/79901
25206         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
25207         ...
25208         (*avx512f_<code><mode>3<mask_name>): ... this.
25209         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
25210         iterator instead of VI8_AVX2_AVX512BW.
25212         PR rtl-optimization/79901
25213         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
25214         min/max expander, expand it using expand_vec_cond_expr.
25216         PR sanitizer/79897
25217         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
25218         temporary.
25220 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
25222         PR c++/79821
25223         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
25224         to void * for PCH reasons.
25225         * dwarf2out.c (output_loc_operands, output_die): Cast
25226         v.val_vec.array to unsigned char *.
25228 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
25230         PR target/77850
25231         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
25232         vector types.
25234 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
25236         PR rtl-optimization/79571
25237         * lra-constraints.c (process_alt_operands): Calculate static
25238         reject and subtract it from overall when only addresses will be
25239         reloaded.
25241 2017-03-06  Julia Koval  <julia.koval@intel.com>
25243         PR target/79793
25244         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
25245         incoming stack boundary to 128 for 64-bit targets.
25247 2017-03-06  Richard Biener  <rguenther@suse.de>
25249         PR tree-optimization/79894
25250         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
25251         to NULL after folding it.
25253 2017-03-06  Richard Biener  <rguenther@suse.de>
25255         PR tree-optimization/79824
25256         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
25257         check disabling peeling for gaps.
25259 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
25261         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
25262         attributes): Document gettimeofday.
25264 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25266         * config/s390/s390.c (s390_option_override_internal): Set
25267         PARAM_MIN_VECT_LOOP_BOUND
25269 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25271         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
25272         * config/s390/s390.md: Likewise.
25274 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
25276         PR target/79812
25277         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
25278         (<avx2_avx512>_perm<mode>): Rename to ...
25279         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
25280         of VI8F_256_512.
25281         (<avx512>_perm<mode>_mask): Rename to ...
25282         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
25283         of VI8F_256_512.
25284         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
25285         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
25286         instead of VI8F_256_512.
25287         (avx512f_perm<mode>): New define_expand.
25288         (avx512f_perm<mode>_mask): Likewise.
25289         (avx512f_perm<mode>_1<mask_name>): New define_insn.
25290         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
25292 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25294         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
25295         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
25296         if_then_else.
25297         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
25299 2017-03-06  Martin Liska  <mliska@suse.cz>
25301         PR sanitize/79783
25302         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
25303         when having a SSA NAME w/o VAR_DECL assigned to it.
25305 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25307         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
25308         msa_dpsub_<su>_d): Fix MODE for vec_select.
25310 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25312         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
25313         argument.
25314         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
25316 2017-03-06  Richard Biener  <rguenther@suse.de>
25318         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
25319         * plugin.c (register_plugin_info): Likewise.
25320         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
25322 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
25324         * config/i386/sse.md (sse_storehps, sse_storelps,
25325         avx_<castmode><avxsizesuffix>_<castmode>,
25326         avx512f_<castmode><avxsizesuffix>_<castmode>,
25327         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
25328         in condition that at least one operand is not a MEM.
25330 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
25332         PR middle-end/79805
25333         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
25334         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
25335         ECF_NOTHROW.
25336         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
25337         gimple_call_nothrow_p flag based on whether original builtin can throw.
25338         If it can, emit following stmts on the fallthrough edge.
25339         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
25340         don't create new bb if inserting just debug stmts on the edge, try to
25341         insert them on the fallthru bb or just reset debug stmts.
25343 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
25345         PR target/43763
25346         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
25347         restore recog_data (including the operand rtxes inside it) around
25348         the call to get_insn_template.
25350 2017-03-03  Martin Sebor  <msebor@redhat.com>
25352         PR tree-optimization/79699
25353         * context.c (context::~context): Free MPFR caches to avoid
25354         a memory leak on program exit.
25356 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25358         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
25359         Use wide_int::ulow () instead of .elt (0).
25361 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
25363         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
25364         (*pushxf): Limit oF constraint to 32bit targets and add oC
25365         constraint for 64bit targets.
25366         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
25367         (*pushdf): Change rmF constraint to rmC.
25369 2017-03-03  Martin Liska  <mliska@suse.cz>
25371         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
25372         Remove unused variable.
25374 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
25376         PR target/79807
25377         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
25378         is a memory operand, increase num_memory.
25379         (ix86_expand_args_builtin): Likewise.
25381 2017-03-03  Jan Hubicka  <jh@suse.cz>
25383         PR lto/79760
25384         * ipa-devirt.c (maybe_record_node): Properly handle
25385         __cxa_pure_virtual visibility.
25387 2017-03-03  Martin Liska  <mliska@suse.cz>
25389         PR tree-optimization/79803
25390         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
25391         assert.
25392         (pass_loop_prefetch::execute): Disabled optimization if an
25393         assumption about L1 cache size is not met.
25395 2017-03-03  Martin Liska  <mliska@suse.cz>
25397         PR rtl-optimization/79574
25398         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
25399         (hash_scan_set): Likewise.
25400         (dump_hash_table): Likewise.
25401         (hoist_code): Likewise.
25403 2017-03-03  Richard Biener  <rguenther@suse.de>
25405         * fixed-value.c (fixed_from_string): Restore use of elt (1)
25406         in place of uhigh ().
25407         (fixed_convert_from_real): Likewise.
25409 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
25411         PR target/79514
25412         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
25414 2017-03-03  Richard Biener  <rguenther@suse.de>
25416         PR middle-end/79818
25417         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
25418         TYPE_OVERFLOW_UNDEFINED check.
25420 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25422         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
25423         numbers.
25424         (vector_ae_<mode>_p): Likewise.
25425         (vector_nez_<mode>_p): Likewise.
25426         (vector_ne_v2di_p): Likewise.
25427         (vector_ae_v2di_p): Likewise.
25428         (vector_ne_<mode>_p): Likewise.
25429         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
25430         numbers.
25431         (vsx_tsqrt<mode>2_fe): Likewise.
25433 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
25435         PR target/79514
25436         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
25438 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
25440         PR rtl-optimization/79780
25441         * cprop.c (one_cprop_pass): When second and further conditional trap
25442         in a single basic block is turned into an unconditional trap, turn it
25443         into a deleted note to avoid RTL verification failures.
25445 2017-03-02  Richard Biener  <rguenther@suse.de>
25447         * fold-const.c (const_binop): Use ulow () instead of elt (0).
25449 2017-03-02  Richard Biener  <rguenther@suse.de>
25451         PR tree-optimization/79345
25452         PR c++/42000
25453         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
25454         param and abort the walk, returning -1 if it is hit.
25455         (walk_aliased_vdefs): Take a limit param and pass it on.
25456         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
25457         defaulting to 0 and return a signed int.
25458         * tree-ssa-uninit.c (struct check_defs_data): New struct.
25459         (check_defs): New helper.
25460         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
25461         about uninitialized memory.
25462         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
25463         bogus uninitialized warning.
25464         (fixed_convert_from_real): Likewise.
25466 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
25468         PR tree-optimization/66768
25469         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
25470         iv_use if base object can't be determined.
25472 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
25474         PR tree-optimization/79345
25475         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
25476         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
25477         (get_pattern_stats): Initialize it.
25478         * genemit.c (gen_expand): Verify match_scratch numbers come after
25479         match_operand/match_dup numbers.
25480         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
25481         match_scratch numbers.
25482         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
25483         Likewise.
25484         * config/s390/s390.md (trunctdsd2): Likewise.
25486 2017-03-02  Richard Biener  <rguenther@suse.de>
25488         * wide-int.h (wide_int_storage::operator=): Implement in terms
25489         of wi::copy.
25491 2017-03-02  Richard Biener  <rguenther@suse.de>
25493         PR tree-optimization/79777
25494         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
25495         the to insert expression to sth existing.
25497 2017-03-01  Martin Sebor  <msebor@redhat.com>
25499         PR middle-end/79692
25500         * gimple-ssa-sprintf.c
25501         (directive::known_width_and_precision): New function.
25502         (format_integer): Use it.
25503         (get_mpfr_format_length): Consider the full range of precision
25504         when computing %g output with the # flag.  Set the likely byte
25505         count to 3 rather than 1 when precision is indeterminate.
25506         (format_floating): Correct the lower bound of precision.
25508 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25510         * doc/invoke.texi: Document default code model for 64-bit Linux.
25512 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25514         PR target/79752
25515         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
25516         udiv rather than div since input pattern is unsigned.
25518 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
25520         * config/i386/i386.c (print_reg): Warn for values of
25521         unsupported size in integer register.
25523 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
25525         PR target/79439
25526         * config/rs6000/predicates.md (current_file_function_operand): Do
25527         not allow self calls to be local if the function is replaceable.
25529 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25531         PR target/79395
25532         * config/rs6000/altivec.h (vec_ctz and others): Change the
25533         preprocessor macro that controls conditional compilation from
25534         _ARCH_PWR9 to __POWER9_VECTOR__.
25535         (vec_all_ne): Change parameterization of __altivec_scalar_pred
25536         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
25537         control (instead of _ARCH_PWR9 control) so that template
25538         definition uses power9-specific function.
25539         (vec_any_eq): Likewise.
25540         (vec_all_ne): Change macro definition to use a power9-specific
25541         expansion under #ifdef __POWER9_VECTOR__ control (instead of
25542         _ARCH_PWR9 control).
25543         (vec_any_eq) Likewise.
25544         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
25545         expansion for CMPNEF to remove support for xvcmpnesp instruction.
25546         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
25547         support for xvcmpnedp instruction.
25548         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
25549         macro expansion so that Power9 implementation of vec_all_ne does
25550         not use the AltiVec predicate framework.
25551         (VCMPNEH_P): Likewise.
25552         (VCMPNEW_P): Likewise.
25553         (VCMPNED_P): Likewise.
25554         (VCMPNEFP_P): Likewise.
25555         (VCMPNEDP_P): Likewise.
25556         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
25557         implementation of vec_any_eq to not use AltiVec predicate
25558         framework.
25559         (VCMPAEH_P): Likewise.
25560         (VCMPAEW_P): Likewise.
25561         (VCMPAED_P): Likewise.
25562         (VCMPAEFP_P): Likewise.
25563         (VCMPAEDP_P): Likewise.
25564         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
25565         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
25566         not use the AltiVec predicate framework.
25567         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
25568         of vec_any_eq to not use AltiVec predicate framework.
25569         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
25570         support for predefined __POWER9_VECTOR__ macro to indicate that
25571         Power9 instruction selection is enabled.
25572         (altivec_overloaded_builtins): Remove extraneous
25573         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
25574         function argument types RS6000_BTI_bool_V16QI and
25575         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
25576         entry for overloaded function argument types RS6000_BTI_bool_V4SI
25577         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
25578         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
25579         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
25580         Power9 for implementations of vec_cmpne.  Change the signature for
25581         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
25582         (representing vec_all_ne) to remove the previously described first
25583         argument of type RS6000_BTI_INTSI, as this was an artifact of
25584         reliance on the AltiVec predicate framework, which is no longer
25585         used in the implementation of these functions.  Add
25586         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
25587         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
25588         since, unlike the AltiVec predicate framework implementation, we
25589         do not share function descriptors between vec_alle and vec_anyeq.
25590         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
25591         set of modes that receive special treatment even when
25592         TARGET_P9_VECTOR is true.  The special treatment emits code that
25593         does not depend on Power9 instructions.
25594         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
25595         define_expand to not rely on AltiVec predicate framework.
25596         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
25597         function.
25598         (vector_ne_v2di_p): Change this define_expand to not rely on
25599         AltiVec predicate framework.
25600         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
25601         function.
25602         (vector_ne_<mode>_p): Change this define_expand to not rely on
25603         AltiVec predicate framework.
25604         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
25605         function.
25606         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
25607         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
25608         define_insn pattern.
25609         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
25610         define_insn pattern because the xvcmpne<VSs>. instruction is not
25611         supported.
25612         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
25613         instruction is not supported.
25615 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25617         * config/nvptx/nvptx.c: Include intl.h.
25619 2017-03-01  Martin Jambor  <mjambor@suse.cz>
25621         PR lto/78140
25622         * ipa-prop.h (ipa_bits): Removed field known.
25623         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
25624         to pointers.  Adjusted their comments to warn about their sharing.
25625         (ipcp_transformation_summary): Change bits to a vector of pointers.
25626         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
25627         (ipa_get_ipa_bits_for_value): Declare.
25628         * tree-vrp.h (value_range): Mark as GTY((for_user)).
25629         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
25630         (ipa_bits_hash_table): Likewise.
25631         (ipa_vr_ggc_hash_traits): Likewise.
25632         (ipa_vr_hash_table): Likewise.
25633         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
25634         being pointers and vr_known being removed.
25635         (ipa_set_jf_unknown): Likewise.
25636         (ipa_get_ipa_bits_for_value): New function.
25637         (ipa_set_jfunc_bits): Likewise.
25638         (ipa_get_value_range): New overloaded functions.
25639         (ipa_set_jfunc_vr): Likewise.
25640         (ipa_compute_jump_functions_for_edge): Use the above functions to
25641         construct bits and vr parts of jump functions.
25642         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
25643         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
25644         exist.
25645         (ipcp_grow_transformations_if_necessary): Also allocate
25646         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
25647         exist.
25648         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
25649         them.  Fix too long lines.
25650         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
25651         vr_known being removed.
25652         (ipa_read_jump_function): Use new setter functions to construct bits
25653         and vr parts of jump functions or set them to NULL.
25654         (write_ipcp_transformation_info): Adjust for bits being pointers.
25655         (read_ipcp_transformation_info): Likewise.
25656         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
25657         space.
25658         Include gt-ipa-prop.h.
25659         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
25660         being pointers.
25661         (ipcp_store_bits_results): Likewise.
25662         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
25663         Do not write to existing jump functions but use a temporary instead.
25665 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25667         PR c++/79681
25668         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
25669         attempt to use its first operand as BIT_FIELD_REF base.
25671 2017-03-01  Richard Biener  <rguenther@suse.de>
25673         PR middle-end/79721
25674         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
25675         interpolating formula in wrapping arithmetic.
25676         (chrec_apply): Convert chrec_evaluate return value to wanted type.
25678 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25680         PR tree-optimization/79734
25681         * tree-vect-generic.c (expand_vector_condition): Optimize
25682         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
25683         Handle VEC_COND_EXPR where comparison has different inner width from
25684         type's inner width.
25686 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
25688         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
25689         markup, and similar issues.  Remove @opindex entries for things
25690         that aren't options.  Add missing -mmpy-option entries.
25692 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
25694         PR tree-optimization/79737
25695         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
25696         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
25697         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
25698         instead of byte_size.  Formatting fix.
25699         (shift_bytes_in_array_right): Formatting fix.
25701 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
25703         PR target/79749
25704         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
25705         condition on optimize for the leaf function test.
25707 2017-02-28  Martin Liska  <mliska@suse.cz>
25709         PR lto/79625
25710         * read-rtl-function.c (function_reader::handle_unknown_directive):
25711         Bail out when one uses -flto.
25713 2017-02-28  Martin Liska  <mliska@suse.cz>
25715         * common.opt: Replace space with tabular for options of <number>
25716         type.
25717         * config/i386/i386.opt: Show <number> value for
25718         -mlarge-data-threshold.
25719         * opts.c (print_filtered_help): Do not display number in hexadecimal
25720         format.
25722 2017-02-28  Martin Liska  <mliska@suse.cz>
25724         * common.opt: Fix --help=option -Q for options which are of
25725         an enum type.
25727 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
25729         * config/i386/i386.c (print_reg): Error out for values
25730         of 8-bit size in invalid integer register.
25732 2017-02-28  Martin Sebor  <msebor@redhat.com>
25734         PR tree-optimization/79691
25735         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
25737 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
25739         PR target/79729
25740         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
25741         gcc_unreachable with output_operand_lossage.
25743 2017-02-28  Richard Biener  <rguenther@suse.de>
25745         PR tree-optimization/79740
25746         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
25747         inserts.
25748         (visit_nary_op): Insert the nary into the hashtable if we
25749         pattern-matched sth.
25750         * tree-ssa-pre.c (eliminate_insert): Robustify.
25752 2017-02-28  Richard Biener  <rguenther@suse.de>
25754         PR middle-end/79731
25755         * fold-const.c (decode_field_reference): Reject out-of-bound
25756         accesses.
25758 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
25760         * config/i386/i386.c: Include intl.h.
25761         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
25762         instead of just cond ? "..." : "...".
25763         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
25764         * coverage.c (read_counts_file): Likewise.
25765         * omp-offload.c: Include intl.h.
25766         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
25767         of just cond ? "..." : "...".
25768         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
25769         of just cond ? "..." : "...".
25771 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
25773         PR target/79742
25774         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
25775         entry, if present.
25776         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
25777         'tune for' CPU name.
25778         * config/arm/arm-cpu-data.h: Regenerated.
25780 2017-02-28  Richard Biener  <rguenther@suse.de>
25782         PR tree-optimization/79732
25783         * tree-inline.c (expand_call_inline): Do not shadow var.
25785 2017-02-28  Richard Biener  <rguenther@suse.de>
25787         PR tree-optimization/79723
25788         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
25789         address-space properly.
25791 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
25793         * doc/optinfo.texi (Optimization groups): Fix option used for
25794         OPTGROUP_ALL.
25795         * doc/invoke.texi (-fopt-info): Document "omp".
25796         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
25797         (OPTGROUP_ALL): Add OPTGROUP_OMP.
25798         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
25799         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
25800         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
25802         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
25803         all users.
25804         * dumpfile.c (optgroup_options): Instead of "openmp", associate
25805         OPTGROUP_OMP with "omp".
25807 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
25809         PR target/79544
25810         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
25811         for arithmetic shift of unsigned V2DI.
25813 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
25815         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
25816         arc/linux.h headers.
25817         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
25818         (LINK_SPEC): Likewise.
25819         (ARC_TLS_EXTRA_START_SPEC): Likewise.
25820         (EXTRA_SPECS): Likewise.
25821         (STARTFILE_SPEC): Likewise.
25822         (ENDFILE_SPEC): Likewise.
25823         (LIB_SPEC): Likewise.
25824         (TARGET_SDATA_DEFAULT): Likewise.
25825         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
25826         (MULTILIB_DEFAULTS): Likewise.
25827         (DWARF2_UNWIND_INFO): Likewise.
25828         * config/arc/big.h: New file.
25829         * config/arc/elf.h: Likewise.
25830         * config/arc/linux.h: Likewise.
25831         * config/arc/t-uClibc: Remove.
25833 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
25835         PR tree-optimization/77536
25836         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
25837         (tree_transform_and_unroll_loop): Use above function to compute the
25838         estimated niter of unrolled loop and use it when scaling profile.
25839         Also use count info rather than frequency if it's non-zero.
25840         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
25841         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
25842         (vect_transform_loop): Call above function.
25844 2017-02-27  Richard Biener  <rguenther@suse.de>
25846         PR tree-optimization/45397
25847         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
25848         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
25849         (visit_nary_op): Add pattern matching for CSEing sign-changed
25850         or truncated operations with wider ones.
25852 2017-02-27  Richard Biener  <rguenther@suse.de>
25854         PR tree-optimization/79690
25855         * tree-vect-stmts.c (vectorizable_store): Use vector type
25856         built from the DR with address-space.
25858 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
25860         * doc/invoke.texi (Optimize Options): Refine the description
25861         of asan-use-after-return.
25863 2017-02-25  Alan Modra  <amodra@gmail.com>
25865         PR rtl-optimization/79584
25866         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
25867         base, not ad->base_term, the reg within base.  Remove assertion
25868         that ad->base == ad->base_term.  Replace gen_int_mode using
25869         bogus mode with const0_rtx.
25871 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
25873         PR middle-end/79396
25874         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
25875         FMA_EXPR like tcc_binary or tcc_unary.
25877         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
25879         PR debug/77589
25880         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
25881         bitfield.
25882         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
25883         (output_loc_operands): Handle DW_OP_call_ref and
25884         DW_OP_GNU_variable_value.
25885         (struct variable_value_struct): New type.
25886         (struct variable_value_hasher): Likewise.
25887         (variable_value_hash): New variable.
25888         (string_types): Remove.
25889         (copy_loc_descr): New function.
25890         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
25891         (prepend_loc_descr_to_each): New function.
25892         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
25893         instead of add_loc_descr_to_each if the first argument is single
25894         location list and the second has multiple.
25895         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
25896         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
25897         when looking for variable value which doesn't have other location info.
25898         (loc_list_from_tree): Formatting fix.
25899         (gen_array_type_die): Simplify DW_AT_string_length handling.
25900         (adjust_string_types): Remove.
25901         (gen_subprogram_die): Don't call adjust_string_types nor test/set
25902         string_types.  Call resolve_variable_values.
25903         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
25904         (resolve_addr_in_expr): Likewise.  Add A argument.
25905         (copy_deref_exprloc): Remove deref argument.  Adjust for the
25906         original expression being DW_OP_GNU_variable_value with optionally
25907         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
25908         optionally after it.
25909         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
25910         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
25911         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
25912         (variable_value_hasher::hash, variable_value_hasher::equal): New
25913         methods.
25914         (resolve_variable_value_in_expr, resolve_variable_value,
25915         resolve_variable_values, note_variable_value_in_expr,
25916         note_variable_value): New functions.
25917         (dwarf2out_early_finish): Call note_variable_value on all toplevel
25918         DIEs.
25920 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
25922         PR c/79677
25923         * opts.h (handle_generated_option): Add GENERATED_P argument.
25924         * opts-common.c (handle_option): Adjust function comment.
25925         (handle_generated_option): Add GENERATED_P argument, pass it to
25926         handle_option.
25927         (control_warning_option): Pass false to handle_generated_option
25928         GENERATED_P.
25929         * opts.c (maybe_default_option): Pass true to handle_generated_option
25930         GENERATED_P.
25931         * optc-gen.awk: Likewise.
25933 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
25935         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
25936         a REG, look at the REG it is a SUBREG of.
25937         (splitter for cmpeqsi_t): Ditto.
25939 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
25941         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
25942         the special USEs with the pattern of the insn, not the insn itself.
25944 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
25946         PR target/79473
25947         * doc/invoke.texi: Document -mload-store-pairs.
25949 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
25950             Sandra Loosemore  <sandra@codesourcery.com>
25952         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
25953         argument isn't a CONST_INT.
25954         (nios2_alternate_compare_const): Assert op is a CONST_INT.
25955         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
25956         (nios2_validate_compare): Bypass alternate compare logic if *op2
25957         is not a CONST_INT.
25958         (ldstwm_operation_p): Return false if first_base is not a REG or
25959         if first_offset is not a CONST_INT.
25961 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
25963         * config/cris/cris.md: Use correct operand in a define_peephole2.
25965 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
25967         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
25969 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
25971         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
25972         this_insn if it is an INSN or JUMP_INSN.
25973         (force_offsettable): Look at base, not at addr.
25974         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
25975         on things that aren't necessarily CONST_INTs.
25977 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
25979         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
25980         -mfpmath=sse is the default also for x86-32 targets with SSE2
25981         instruction set when @option{-ffast-math} is enabled
25983 2017-02-24  Jeff Law  <law@redhat.com>
25985         PR rtl-optimizatoin/79286
25986         * ira.c (update_equiv_regs): Drop may_trap_p exception to
25987         dominance test.
25989 2017-02-24  Richard Biener  <rguenther@suse.de>
25991         PR tree-optimization/79389
25992         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
25993         debug insns.
25995 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
25997         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
25998         function comment to reflect reality.
25999         (loop_exits_before_overflow): Fix typo in function description.
26001 2017-02-24  Richard Biener  <rguenther@suse.de>
26003         PR tree-optimization/79389
26004         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
26005         properly that a threading opportunity exists.  Detect conditional
26006         copy/constant propagation opportunities.
26008 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
26010         * config/visium/visium.md (type): Add trap.
26011         (b): New mode attribute.
26012         (*btst): Rename into...
26013         (*btst<mode>): ...this and adjust.
26014         (*cbranchsi4_btst_insn): Rename into...
26015         (*cbranch<mode>4_btst_insn): ...this and adjust.
26016         (trap): New define_insn.
26018 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
26020         PR tree-optimization/79389
26021         * ifcvt.c (struct noce_if_info): Add rev_cond field.
26022         (noce_reversed_cond_code): New function.
26023         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
26024         reversed_comparison_code.  Formatting fix.
26025         (noce_try_store_flag): Test rev_cond != NULL in addition to
26026         reversed_comparison_code.
26027         (noce_try_store_flag_constants): Likewise.
26028         (noce_try_store_flag_mask): Likewise.
26029         (noce_try_addcc): Use rev_cond if non-NULL instead of
26030         reversed_comparison_code.
26031         (noce_try_cmove_arith): Likewise.  Formatting fixes.
26032         (noce_try_minmax, noce_try_abs): Clear rev_cond.
26033         (noce_find_if_block): Initialize rev_cond.
26034         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
26035         instead of false as last argument never attempt to reverse it
26036         afterwards.
26038 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
26040         PR tree-optimization/79663
26041         * tree-predcom.c (combine_chains): Process refs in reverse order
26042         only for ZERO length chains, and add explaining comment.
26044 2017-02-23  Jeff Law  <law@redhat.com>
26046         PR tree-optimization/79578
26047         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
26048         in call to operand_equal_p.
26050 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
26052         PR target/71017
26053         * config/i386/cpuid.h: Fix another undefined behavior.
26055 2017-02-23  Richard Biener  <rguenther@suse.de>
26057         PR tree-optimization/79683
26058         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
26059         vector types for data-refs.
26061 2017-02-23  Martin Liska  <mliska@suse.cz>
26063         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
26065 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
26067         PR middle-end/79665
26068         * internal-fn.c (get_range_pos_neg): Moved to ...
26069         * tree.c (get_range_pos_neg): ... here.  No longer static.
26070         * tree.h (get_range_pos_neg): New prototype.
26071         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
26072         are known to be in between 0 and signed maximum inclusive, try to
26073         expand both unsigned and signed divmod and use the cheaper one from
26074         those.
26076 2017-02-22  Jeff Law  <law@redhat.com>
26078         PR tree-optimization/79578
26079         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
26080         to compare base operands.
26082 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
26084         PR target/79211
26085         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
26086         gpc_reg_operand instead of fpr_reg_operand.
26088 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
26090         * config/mips/mips.c (mips_return_in_memory): Force FP
26091         vector types to be returned in memory for o32 ABI.
26093 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
26095         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
26096         instead of DW_TAG_member for static data member declarations and don't
26097         set no_linkage_name for static inline data members.
26098         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
26099         to DW_TAG_member.
26101 2017-02-22  Martin Liska  <mliska@suse.cz>
26103         * doc/invoke.texi: Replace inequality signs with square brackets
26104         for -Wnormalized.
26106 2017-02-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26108         PR tree-optimization/68644
26109         * gcc.dg/tree-ssa/ivopts-lt-2.c: Skip for powerpc*-*-*.
26111 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
26113         PR target/78660
26114         * lra-constraints.c (simplify_operand_subreg): Handle
26115         WORD_REGISTER_OPERATIONS targets.
26117 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
26119         PR target/70465
26120         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
26121         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
26122         elimination by swapping fld*.
26124 2017-02-22  Richard Biener  <rguenther@suse.de>
26126         PR tree-optimization/79673
26127         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
26128         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
26129         irrelevant address-space qualifiers and avoiding a
26130         ADDR_SPACE_CONVERT_EXPR from fold_convert.
26132 2017-02-22  Richard Biener  <rguenther@suse.de>
26134         PR tree-optimization/79666
26135         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
26136         to not symbolically negate if that may introduce undefined
26137         overflow.
26139 2017-02-22  Martin Liska  <mliska@suse.cz>
26141         PR lto/79587
26142         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
26143         * data-streamer-out.c (streamer_write_gcov_count_stream):
26144         Likewise.
26145         * value-prof.c (stream_out_histogram_value): Make assert more
26146         precise based on type of counter.
26148 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
26150         PR target/79593
26151         * config/i386/i386.md (standard_x87sse_constant_load splitter):
26152         Use nonimmediate_operand instead of memory_operand for operand 1.
26153         (float-extend standard_x87sse_constant_load splitter): Ditto.
26155 2017-02-21  Jeff Law  <law@redhat.com>
26157         PR tree-optimization/79621
26158         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
26159         blocks with edges to themselves.
26161 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26163         PR target/79633
26164         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
26165         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
26166         Use gimple_call_builtin_p.
26168         PR target/79570
26169         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
26170         on temporarily removed DEBUG_INSNs.
26172         PR tree-optimization/79649
26173         * tree-loop-distribution.c (classify_partition): Give up on
26174         non-generic address space loads/stores.
26176 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
26178         * doc/loop.texi (Loop manipulation): Remove nonexistent
26179         tree_ssa_loop_version from the documentation.
26180         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
26182 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26184         PR target/79494
26185         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
26186         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
26187         * config/rs6000/rs6000.c: Include except.h.
26188         (rs6000_expand_split_stack_prologue): Call
26189         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
26191 2017-02-21  Martin Jambor  <mjambor@suse.cz>
26193         PR lto/79579
26194         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
26195         have been analyzed.
26197 2017-02-21  Martin Jambor  <mjambor@suse.cz>
26199         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
26200         for backward compatibility only.
26201         * doc/invoke.texi (Option Summary): Remove all references to
26202         -fipa-cp-alignment.
26204 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
26206         PR target/78660
26207         Revert:
26208         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26210         * lra-constraints.c (curr_insn_transform): Handle
26211         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
26213 2017-02-21  Martin Liska  <mliska@suse.cz>
26215         * config/i386/i386.opt: Replace -masm-dialect with -masm.
26217 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
26219         PR translation/79638
26220         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
26222 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
26224         PR ada/67205
26225         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
26226         (arm_function_ok_for_sibcall): Return false for an indirect call by
26227         descriptor if all the argument registers are used.
26228         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
26229         alignment of the function.
26231 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26233         PR tree-optimization/61441
26234         * simplify-rtx.c (simplify_const_unary_operation): For
26235         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
26236         the sNaN unmodified.
26238 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26240         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
26241         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
26242         instead of SYSTEM_HEADER_DIR.
26244 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
26245             Martin LiÅ¡ka  <mliska@suse.cz>
26247         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
26248         Fix typos and grammar, use active voice, and clarify.
26250 2017-02-20  Marek Polacek  <polacek@redhat.com>
26252         PR middle-end/79537
26253         * gimplify.c (gimplify_expr): Handle unused *&&L;.
26255         PR sanitizer/79558
26256         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
26258 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
26260         PR target/79568
26261         * config/i386/i386.c (ix86_expand_builtin): Handle
26262         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
26263         ix86_builtins_isa[fcode].isa as a requirement of those
26264         flags and any other flag in the bitmask.
26265         (ix86_init_mmx_sse_builtins): Use 0 instead of
26266         ~OPTION_MASK_ISA_64BIT as mask.
26267         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
26268         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
26269         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
26270         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
26272 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26274         PR target/78012
26275         * lra-constraints.c (split_reg): Check requested split mode
26276         is supported by the register.
26278 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26280         * lra-constraints.c (simplify_operand_subreg): Remove early
26281         return false.
26283 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26285         PR target/78660
26286         * lra-constraints.c (curr_insn_transform): Tighten condition
26287         for converting SUBREG reloads from OP_OUT to OP_INOUT.
26289 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26291         PR target/78660
26292         * lra-constraints.c (curr_insn_transform): Handle
26293         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
26295 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
26297         Revert:
26298         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
26300         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
26302 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
26304         PR c++/69523
26305         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
26306         description.
26308 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26310         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
26311         for FMA_EXPR.
26313 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
26315         * final.c (last_columnnum, override_columnnum): New variables.
26316         (final_start_function): Set last_columnnum, pass it to begin_prologue
26317         hook and pass 0 to dwarf2out_begin_prologue.
26318         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
26319         to source_line debug hook.
26320         (notice_source_line): Compute last_columnnum and for debug_column_info
26321         return true on column changes.
26322         * debug.h (struct gcc_debug_hooks): Add column argument to
26323         source_line and begin_prologue hooks.
26324         (debug_nothing_int_charstar_int_bool): Remove prototype.
26325         (debug_nothing_int_int_charstar,
26326         debug_nothing_int_int_charstar_int_bool): New prototypes.
26327         (dwarf2out_begin_prologue): Add column argument.
26328         * debug.c (do_nothing_debug_hooks): Adjust source_line and
26329         begin_prologue hooks.
26330         (debug_nothing_int_charstar_int_bool): Remove.
26331         (debug_nothing_int_int_charstar,
26332         debug_nothing_int_int_charstar_int_bool): New functions.
26333         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
26334         through to dwarf2out_source_line.
26335         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
26336         (dwarf2out_source_line): Add column argument, emit it if requested.
26337         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
26338         arguments.
26339         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
26340         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
26341         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
26342         through to dwarf2out_begin_prologue.
26343         (vmsdbgout_source_line): Add column argument, pass it through to
26344         dwarf2out_source_line.
26345         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
26346         dbxout_source_line caller.
26347         (dbxout_source_line): Add column argument.
26349         * common.opt (gno-column-info, gcolumn-info): New options.
26350         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
26351         (check_die): Also test for multiple DW_AT_decl_column attributes.
26352         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
26353         DW_AT_decl_column if requested.
26354         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
26355         if requested.
26356         (gen_variable_die): Likewise.
26357         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
26358         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
26360         PR target/79569
26361         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
26362         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
26363         (ix86_handle_option): Handle OPT_m3dnowa.
26364         * doc/invoke.texi (-m3dnowa): Document.
26365         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
26366         -m3dnowa instead of -m3dnow -march=athlon.
26368         PR target/79559
26369         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
26370         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
26372 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26374         PR target/79261
26375         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
26376         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
26377         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
26378         generator for vsx_xxpermdi_<mode>_be.
26379         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
26380         force big-endian semantics.
26381         (vsx_xxpermdi_<mode>_be): New define_expand with same
26382         implementation as previous version of vsx_xxpermdi_<mode>.
26384 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
26386         PR tree-optimization/79327
26387         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
26388         variable, its initialization and use.
26390 2017-02-17  Julia Koval  <julia.koval@intel.com>
26392         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
26393         (OPTION_MASK_ISA_PKU_UNSET): New.
26394         (ix86_handle_option): Handle -mrdpid.
26395         * config/i386/cpuid.h (bit_RDPID): New.
26396         * config/i386/driver-i386.c (host_detect_local_cpu):
26397         Detect RDPID feature.
26398         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
26399         * config/i386/i386-c.c (ix86_target_macros_internal):
26400         Handle RDPID flag.
26401         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
26402         (ix86_valid_target_attribute_inner_p): Add "rdpid".
26403         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26404         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
26405         * config/i386/i386.md (define_insn "rdpid"): New.
26406         * config/i386/i386.opt Add -mrdpid.
26407         * config/i386/immintrin.h (_rdpid_u32): New.
26409 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
26411         PR rtl-optimization/79541
26412         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
26413         instead of transforming it into USE.
26415 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
26417         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
26418         If HONOR_SNANS (SFmode) force the input to a register.
26419         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
26420         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
26421         an frsp or similar insn.
26423 2017-02-17  Martin Liska  <mliska@suse.cz>
26425         PR rtl-optimization/79577
26426         * params.def (selsched-max-sched-times): Increase minimum to 1.
26428 2017-02-17  Martin Liska  <mliska@suse.cz>
26430         PR rtl-optimization/79574
26431         * gcse.c (want_to_gcse_p): Prevent integer overflow.
26433 2017-02-17  Martin Liska  <mliska@suse.cz>
26435         PR tree-optimization/79529
26436         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
26437         ssa_defined_default_def_p to handle cases which are implicitly
26438         defined.
26439         * tree-ssa.c (ssa_defined_default_def_p): New function.
26440         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
26441         which are implicitly defined.
26442         * tree-ssa.h (ssa_defined_default_def_p): Declare.
26444 2017-02-17  Richard Biener  <rguenther@suse.de>
26446         PR middle-end/79576
26447         * params.def (max-ssa-name-query-depth): Limit to 10.
26449 2017-02-17  Richard Biener  <rguenther@suse.de>
26451         PR tree-optimization/79552
26452         * tree-ssa-structalias.c (visit_loadstore): Properly verify
26453         default defs.
26455 2017-02-17  Richard Biener  <rguenther@suse.de>
26457         PR bootstrap/79567
26458         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
26460 2017-02-17  Marek Polacek  <polacek@redhat.com>
26462         PR middle-end/79536
26463         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
26464         (fold_negate_expr): New wrapper.
26466 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
26468         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
26469         Correct terminology and de-emphasize pre-standard behavior.
26471 2017-02-16  Alan Modra  <amodra@gmail.com>
26473         PR rtl-optimization/79286
26474         * ira.c (def_dominates_uses): New function.
26475         (update_equiv_regs): Don't create an equivalence for insns that
26476         may trap where the register def does not dominate the use.
26478 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
26480         PR rtl-optimization/78127
26481         * lra.c (lra): Call lra_eliminate before finish the loop after
26482         lra_constraint.
26484 2017-02-16  Richard Biener  <rguenther@suse.de>
26486         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
26487         isl/isl_val.h.
26488         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
26489         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
26490         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
26491         (isl_val_int_from_wi): New function.
26492         (extract_affine_gmp): Rename to ...
26493         (extract_affine_wi): ... this, take a widest_int.
26494         (extract_affine_int): Just wrap extract_affine_wi.
26495         (add_param_constraints): Use isl_val_int_from_wi.
26496         (add_loop_constraints): Likewise, and extract_affine_wi.
26498 2017-02-15  Jeff Law  <law@redhat.com>
26500         PR middle-end/79521
26501         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
26502         ira_init_register_move_cost_if_necessary.
26504 2017-02-15  Martin Sebor  <msebor@redhat.com>
26506         PR middle-end/32003
26507         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
26508         removed in a prior commit.
26510 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
26512         PR tree-optimization/79347
26513         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
26514         counters during peeling.
26516 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
26518         * Makefile.in (site.exp): Remove "set ISLVER".
26520 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
26522         PR target/79487
26523         * real.c (real_from_integer): Call real_convert even for decimal.
26525 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
26527         PR target/79421
26528         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
26530 2017-02-14  Andrew Pinski  <apinski@cavium.com>
26532         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
26533         cores and change the partno/implementer to be correct.
26534         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
26535         the 'B" as the implementer.
26536         * config/aarch64/aarch64-tune.md: Regenerate.
26538 2017-02-14  Carl Love  <cel@us.ibm.com>
26540         * config/rs6000/rs6000.c: Add case statement entry to make the
26541         xvcvuxdsp built-in argument unsigned.
26542         * config/rs6000/vsx.md: Fix the source and return operand types so they
26543         match the instruction definitions from the ISA document.  Fix typo
26544         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
26545         statement.
26547 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
26549         PR target/79282
26550         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
26551         member early_clobber_alts.
26552         * lra-lives.c (reg_early_clobber_p): New.
26553         (process_bb_lives): Use it.
26554         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
26555         (debug_operand_data): Initialize early_clobber_alts.
26556         (setup_operand_alternative): Set up early_clobber_alts.
26557         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
26558         alternatives to new_insn_reg.
26559         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
26560         it.
26561         (lra_update_insn_regno_info): Pass the new arg.
26563 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
26565         PR middle-end/79505
26566         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
26567         (new_oacc_loop_raw): Don't clear already cleared fields.
26569         PR target/79481
26570         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
26571         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
26572         _mm512_prefetch_i64gather_ps): New inline functions and macros.
26574 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
26576         PR target/79495
26577         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
26579 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
26581         PR target/79498
26582         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
26583         the extra instruction to the right place to store 128-bit constant
26584         when needed.
26586 2017-02-14  Martin Sebor  <msebor@redhat.com>
26588         PR middle-end/79448
26589         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
26590           warning for strings of unknown length.
26592 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
26594         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
26596 2017-02-14  Jeff Law  <law@redhat.com>
26598         PR target/79404
26599         * ira-costs.c (scan_one_insn): Initialize register move costs
26600         for pseudos seen in USE/CLOBBER insns.
26602         PR tree-optimization/79095
26603         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
26604         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
26605         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
26606         if the operands are known to be not equal, then the resulting range
26607         is ~[0,0].
26608         (intersect_ranges): If the new range is ~[0,0] and the old range is
26609         wide, then prefer ~[0,0].
26610         * tree-vrp.c (overflow_comparison_p_1): New function.
26611         (overflow_comparison_p): New function.
26612         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
26613         if NAME is used in an overflow test.
26614         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
26615         overflow check that can be expressed as an equality test, then adjust
26616         ops to be that equality test.
26618 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26620         * config/s390/s390-builtin-types.def: Remove flags argument.
26621         * config/s390/s390.c (s390_init_builtins): Likewise.
26623 2017-02-14  Martin Liska  <mliska@suse.cz>
26625         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
26626         vector.  Fix trailing white spaces.
26628 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
26630         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
26631         HFmode.
26633 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26635         PR rtl-optimization/68664
26636         * config/arm/arm.c (arm_sched_can_speculate_insn):
26637         New function.  Declare prototype.
26638         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
26640 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26642         PR rtl-optimization/68664
26643         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
26644         New function.
26645         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
26647 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
26649         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
26650         max skip bytes for function, loop and jump.
26652 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26654         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
26655         ABS_EXPR for gimple dump.
26657 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
26659         PR target/79462
26660         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
26662         PR tree-optimization/79408
26663         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
26664         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
26665         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
26666         also if rhs1 is INTEGER_CST.
26668 2017-02-14  Richard Biener  <rguenther@suse.de>
26670         PR middle-end/79432
26671         * tree-into-ssa.c (insert_phi_nodes): When the function can
26672         have abnormal edges rewrite SSA names with broken use-def
26673         dominance out of SSA and register them for PHI insertion.
26675 2017-02-13  Martin Sebor  <msebor@redhat.com>
26677         PR middle-end/79496
26678         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
26679         clearing info.nowrite flag when snprintf size argument is a range.
26681 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
26683         * cprop.c (cprop_jump): Add missing space in string literal.
26684         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
26685         (get_constraint_for_component_ref): Likewise.
26686         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
26687         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
26688         * lra-constraints.c (process_alt_operands): Likewise.
26689         * ipa-inline.c (inline_small_functions): Likewise.
26690         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
26691         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
26692         * trans-mem.c (diagnose_tm_1_op): Likewise.
26693         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
26694         (grid_parallel_clauses_gridifiable): Likewise.
26696         * config/nvptx/mkoffload.c (process): Add space in between
26697         , and %d.
26699         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
26700         "MOD4_SSE_REGS" and "ALL_REGS".
26702         * spellcheck.c (test_data): Add , in between "foo" and "food".
26704 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26706         PR target/79449
26707         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
26708         boundary crossing check and subsequent code generation agree.
26710 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26712         * config/aarch64/aarch64.c (has_memory_op): Delete.
26713         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
26714         has_memory_op.
26716 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
26718         PR rtl-optimization/79388
26719         PR rtl-optimization/79450
26720         * combine.c (distribute_notes): When removing TEM_INSN for which
26721         corresponding dest has last value recorded, invalidate that last
26722         value.
26724 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26726         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
26727         of explicit '@'.  Add missing assembly comment marker on branch costs
26728         printout.
26730 2017-02-13  Nathan Sidwell  <nathan@acm.org>
26732         * gengtype-lex.l (<in_struct>): Add '/'.
26734 2017-02-13  Martin Liska  <mliska@suse.cz>
26736         PR c/79471
26737         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
26739 2017-02-13  Richard Biener  <rguenther@suse.de>
26741         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
26742         Remove.
26743         * configure: Re-generate.
26744         * config.in: Likewise.
26745         * graphite-dependences.c: Simplify as if
26746         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
26747         * graphite-isl-ast-to-gimple.c: Likewise.
26748         * graphite-optimize-isl.c: Likewise.
26749         * graphite-poly.c: Likewise.
26750         * graphite-sese-to-poly.c: Likewise.
26751         * graphite.h: Likewise.
26752         * toplev.c: Include isl/version.h and use isl_version () for
26753         printing the ISL version.
26754         * doc/install.texi: Update ISL requirement.
26756 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
26758         * doc/standards.texi (Standards): Update reference to
26759         Objective-C 2.0.
26761 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
26763         * doc/extend.texi (Named Address Spaces): sourceware.org now
26764         defaults to https.
26765         * doc/install.texi (Binaries): Ditto.
26766         (Specific): Ditto.
26768 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
26770         * doc/cpp.texi: Replace "stringify"/"stringification" with C
26771         standard terminology "stringize"/"stringizing" throughout.
26772         * doc/cppinternals.texi: Likewise.
26774 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
26776         * doc/extend.texi: Fix some spelling mistakes and typos.
26777         * doc/invoke.texi: Likewise.
26779 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
26781         PR ipa/79224
26782         * params.def (inline-min-speedup) Change from 10 to 8.
26784 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
26786         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
26787         4.5.
26789 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
26791         PR ipa/79224
26792         * ipa-inline-analysis.c (get_minimal_bb): New function.
26793         (record_modified): Use it.
26794         (remap_edge_change_prob): Handle also ancestor functions.
26796 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
26798         * doc/contrib.texi (Contributors): Remove broken link into
26799         the Mauve CVS repository.
26801 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
26803         PR middle-end/79454
26804         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
26805         result computation whenever lhs doesn't have vector mode, not
26806         just when it has BLKmode.
26808 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
26810         * doc/makefile.texi (profiledbootstrap): Refer to the
26811         installation instructions only in textual form.
26813 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26815         PR target/79295
26816         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
26818 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
26820         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
26821         (Specific): Update mingw-w64 reference.
26822         (Binaries): Ditto.
26823         (Specific): Remove broken link to Renesas RX processor.
26825 2017-02-10  Richard Biener  <rguenther@suse.de>
26827         * toplev.c (process_options): Do not mention obsolete graphite
26828         options when printing sorry message about missing graphite support.
26829         Mention -floop-nest-optimize.
26831 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
26833         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
26834         (vtst_p16): Likewise.
26835         (vtstq_p8): Likewise.
26836         (vtstq_p16): Likewise.
26837         (vtst_p64): New.
26838         (vtstq_p64): Likewise.
26839         * config/arm/arm_neon.h (vgetq_lane_p64): New.
26840         (vset_lane_p64): New.
26841         (vsetq_lane_p64): New.
26843 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
26845         PR tree-optimization/79411
26846         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
26847         stmt operands are SSA_NAMEs used in abnormal phis.
26848         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
26849         phis.
26851 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
26853         PR ipa/70795
26854         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
26855         flag if needed.
26857 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
26859         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
26861 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
26863         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
26864         to avoid warning.
26866         PR c/79413
26867         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
26868         not arbitrary TREE_CONSTANT.
26870         PR c/79431
26871         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
26872         "omp declare target link" attribute unless is_global_var.
26873         * omp-offload.c (find_link_var_op): Likewise.
26875 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
26876             Chung-Lin Tang  <cltang@codesourcery.com>
26878         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
26879         OMP_CLAUSE_TILE.
26880         (gimplify_adjust_omp_clauses): Don't delete TILE.
26881         (gimplify_omp_for): Deal with TILE.
26882         * internal-fn.c (expand_GOACC_TILE): New function.
26883         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
26884         (GOACC_TILE): New.
26885         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
26886         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
26887         element fields.
26888         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
26889         avoid DIV for outermost collapse var.
26890         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
26891         Remove out of date comments, fix whitespace.
26892         * omp-general.c (omp_extract_for_data): Deal with tiling.
26893         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
26894         adjust OLF_DIM_BASE value.
26895         (struct omp_for_data): Add tiling field.
26896         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
26897         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
26898         for auto loops.  Remove default auto determining, moved to
26899         oacc_loop_fixed_partitions.
26900         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
26901         stmts, add e_mask field.
26902         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
26903         (oacc_thread_numbers): Use oacc_dim_call.
26904         (oacc_xform_tile): New.
26905         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
26906         (finish_oacc_loop): Adjust for ifns vector.
26907         (oacc_loop_discover_walk): Append loop abstraction sites to list,
26908         add case for GOACC_TILE fns.
26909         (oacc_loop_xform_loop): Delete.
26910         (oacc_loop_process): Iterate over call list directly, and add
26911         handling for GOACC_TILE fns.
26912         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
26913         dump partitioning.
26914         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
26915         vector partitioning to outer loops.  Assign 2 partitions to loops
26916         when available. Add TILE handling.
26917         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
26918         (execite_oacc_device_lower): Process GOACC_TILE fns,
26919         ignore unknown specs.
26920         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
26921         * tree.c (omp_clause_num_ops): Adjust TILE ops.
26922         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
26924 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
26926         * configure.ac (ACX_BUGURL): Update.
26927         * configure: Regenerate.
26929 2017-02-09  Richard Biener  <rguenther@suse.de>
26931         PR tree-optimization/69823
26932         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26933         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
26935 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
26937         * config/arc/arc-c.def: Add __NPS400__ definition.
26938         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
26939         (TARGET_NPS400): Define.
26941 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
26943         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
26944         file.
26945         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
26946         pointer, arch_info.
26947         (arc_cpu_types): Fill the arch_info field with a pointer into the
26948         arc_arch_types table.
26949         (arc_selected_cpu): Declare.
26950         * config/arc/arc.c (arc_selected_cpu): Make global.
26951         (arc_selected_arch): Delete.
26952         (arc_base_cpu): Delete.
26953         (arc_override_options): Remove references to deleted variables,
26954         update access to arch information.
26955         (ARC_OPT): Update access to arch information.
26956         (ARC_OPTX): Likewise.
26957         * config/arc/arc.h (arc_base_cpu): Remove declaration.
26958         (TARGET_ARC600): Update access to arch information.
26959         (TARGET_ARC601): Likewise.
26960         (TARGET_ARC700): Likewise.
26961         (TARGET_EM): Likewise.
26962         (TARGET_HS): Likewise.
26963         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
26964         information.
26966 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
26968         PR target/78604
26969         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
26970         condition/operands for integer GE/LE/GEU/LEU operations.
26972 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
26974         PR translation/79397
26975         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
26976         of AltiVec.
26978 2017-02-08  Martin Jambor  <mjambor@suse.cz>
26980         PR ipa/79375
26981         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
26982         whether allocation happened.
26983         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
26984         nothing was allocated.
26986 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
26988         PR tree-optimization/79408
26989         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
26990         constant, but SSA_NAME with a known integer range, use the minimum
26991         of that range instead of op1 to determine if modulo can be replaced
26992         with its first operand.
26994 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26996         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
26998 2017-02-08  Richard Biener  <rguenther@suse.de>
27000         PR tree-optimization/71824
27001         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
27002         Check all loops contained in the merged region.
27004 2017-02-07  Andrew Pinski  <apinski@cavium.com>
27006         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
27008 2017-02-07  Andrew Pinski  <apinski@cavium.com>
27010         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
27011         (thunderxt88): Likewise.
27012         (thunderxt81): Disable LSE and change v8.1 to v8.
27013         (thunderxt83): Likewise.
27015 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
27016             Richard Biener  <rguenther@suse.de>
27018         PR middle-end/79399
27019         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
27020         type from int to size_t.
27021         * ira-costs.c (struct_costs_size): Change type from int to size_t.
27023 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
27025         PR rtl-optimization/79386
27026         * cprop.c (bypass_conditional_jumps): Initialize
27027         bypass_last_basic_block already before splitting bbs after
27028         unconditional traps...
27029         (bypass_conditional_jumps): ... rather than here.
27031         PR target/79299
27032         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
27033         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
27034         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
27035         fix -masm=intel patterns.
27037 2017-02-07  Richard Biener  <rguenther@suse.de>
27039         PR tree-optimization/79256
27040         PR middle-end/79278
27041         * builtins.c (get_object_alignment_2): Use min_align_of_type
27042         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
27043         and ADJUST_FIELD_ALIGN.
27045         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
27046         type parameter.
27047         * doc/tm.texi: Regenerate.
27048         * stor-layout.c (layout_decl): Adjust.
27049         (update_alignment_for_field): Likewise.
27050         (place_field): Likewise.
27051         (min_align_of_type): Likewise.
27052         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
27053         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
27054         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
27055         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
27056         * config/frv/frv.c (frv_adjust_field_align): Likewise.
27057         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
27058         * config/i386/i386.c (x86_field_alignment): Likewise.
27059         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
27060         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
27061         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
27062         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
27063         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
27064         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
27065          Likewise.
27067         Revert
27068         2017-01-30  Richard Biener  <rguenther@suse.de>
27070         PR tree-optimization/79256
27071         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
27072         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
27073         alignment on TYPE.
27075 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
27077         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
27078         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
27079         builtins to SImode and emit a zero-extend, if necessary.
27081 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27083         * docs/invoke.texi (RISC-V Options): Alphabetize.
27085 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27087         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
27088         options.
27090 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27092         * config/riscv/riscv.c: New file.
27093         * common/config/riscv/riscv-common.c: Likewise.
27094         * config.gcc: Likewise.
27095         * config/riscv/constraints.md: Likewise.
27096         * config/riscv/elf.h: Likewise.
27097         * config/riscv/generic.md: Likewise.
27098         * config/riscv/linux.h: Likewise.
27099         * config/riscv/multilib-generator: Likewise.
27100         * config/riscv/peephole.md: Likewise.
27101         * config/riscv/pic.md: Likewise.
27102         * config/riscv/predicates.md: Likewise.
27103         * config/riscv/riscv-builtins.c: Likewise.
27104         * config/riscv/riscv-c.c: Likewise.
27105         * config/riscv/riscv-ftypes.def: Likewise.
27106         * config/riscv/riscv-modes.def: Likewise.
27107         * config/riscv/riscv-opts.h: Likewise.
27108         * config/riscv/riscv-protos.h: Likewise.
27109         * config/riscv/riscv.h: Likewise.
27110         * config/riscv/riscv.md: Likewise.
27111         * config/riscv/riscv.opt: Likewise.
27112         * config/riscv/sync.md: Likewise.
27113         * config/riscv/t-elf-multilib: Likewise.
27114         * config/riscv/t-linux: Likewise.
27115         * config/riscv/t-linux-multilib: Likewise.
27116         * config/riscv/t-riscv: Likewise.
27117         * configure.ac: Likewise.
27118         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
27119         Waterman as RISC-V maintainers.
27120         * doc/install.texi: Add RISC-V entries.
27121         * doc/invoke.texi: Add RISC-V options section.
27122         * doc/md.texi: Add RISC-V constraints section.
27123         * configure: Regenerated.
27125 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
27127         PR target/66144
27128         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
27129         false values to be constant vectors with all 0 or all 1 bits set.
27130         (vcondu<mode><mode>): Likewise.
27131         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
27132         predicate.
27133         (fpmask_comparison_operator): Update comment.
27134         (vecint_comparison_operator): New predicate.
27135         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
27136         vector conditionals when the true and false values are constant
27137         vectors with all 0 bits or all 1 bits set.
27139 2017-02-06  Martin Sebor  <msebor@redhat.com>
27141         PR  tree-optimization/79376
27142         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
27144 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
27146         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
27147         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
27148         to simplify split condition.
27150 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
27152         * omp-expand.c (oxpand_omp_atomic_fetch_op,
27153         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
27154         false.
27156 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
27158         PR rtl-optimization/68664
27159         * target.def (can_speculate_insn): New hook.
27160         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
27161         * doc/tm.texi: Regenerate.
27162         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
27163         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
27164         (rs6000_sched_can_speculate_insn): New function.
27166 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
27168         PR tree-optimization/79284
27169         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
27170         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
27171         vectorizable_mask_load_store, vectorizable_operation,
27172         vect_is_simple_cond, get_same_sized_vectype): Use it instead
27173         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
27174         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
27175         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
27176         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
27177         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27178         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
27179         is_gimple_assign (stmt).  Replace another such test with
27180         is_gimple_assign (stmt).
27182 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
27184         PR target/78883
27185         * config/avr/avr.c (rtl-iter.h): Include it.
27186         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
27187         (avr_legitimate_combined_insn): ...and implementation.
27189 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27191         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
27192         * config/s390/s390.c (s390_const_operand_ok)
27193         (s390_canonicalize_comparison, s390_extract_part)
27194         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
27195         (s390_contiguous_bitmask_p, s390_rtx_costs)
27196         (legitimize_pic_address): Likewise.
27197         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
27198         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
27199         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
27200         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
27201         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
27203 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
27205         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
27206         REGNO($0) == REGNO($1).
27208 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27210         * config/s390/linux.h(SIZE_TYPE): Add comment.
27212 2017-02-06  Julian Brown  <julian@codesourcery.com>
27213             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27214             Virendra Pathak  <virendra.pathak@broadcom.com>
27216         * config/aarch64/aarch64-cores.def: Change the scheduler
27217         to Thunderx2t99.
27218         * config/aarch64/aarch64.md: Include thunderx2t99.md.
27219         * config/aarch64/thunderx2t99.md: New file.
27221 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27223         * doc/standards.texi (Go Language): Update link to language
27224         standard.
27226 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
27228         * tree-eh.c (lower_resx): Sanitize profile.
27229         (cleanup_empty_eh_move_lp): Likewise.
27231 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
27233         PR tree-ssa/79347
27234         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
27235         ELSE_PROB.
27236         * cfgloopmanip.h (loop_version): Update prototype.
27237         * modulo-sched.c (sms_schedule): Update call of loop_version.
27238         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
27239         * tree-parloops.c (gen_parallel_loop): Likewise.
27240         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
27241         * tree-ssa-loop-split.c (split_loop): Likewise.
27242         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
27243         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
27245 2017-02-05  Martin Liska  <mliska@suse.cz>
27247         PR bootstrap/78985
27248         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
27249         variable to NULL.
27250         (print_operand_address): Initialize a struct to zero.
27252 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27254         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
27255         garbage collector only in textual form.
27257 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27259         * doc/extend.texi (x86 specific memory model extensions for
27260         transactional memory): Simplify a phrase.
27262 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
27264         PR target/79353
27265         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
27266         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
27267         (atomic_storedi_1): Likewise.
27269 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
27271         PR tree-optimization/79338
27272         * tree-parloops.c (gather_scalar_reductions): Don't call
27273         vect_analyze_loop_form for loop->inner before destroying loop's
27274         loop_vinfo.
27276 2017-02-03  Martin Sebor  <msebor@redhat.com>
27278         PR tree-optimization/79327
27279         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
27280         when precision has resulted in leading zeros.
27281         (format_integer): Adjust the likely counter to assume an unknown
27282         argument that may be zero is non-zero.
27284 2017-02-03  Jason Merrill  <jason@redhat.com>
27286         PR c++/78689
27287         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
27288         avoid copying non-taken branch.
27290 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
27292         PR tree-optimization/79340
27293         * tree-vect-loop.c (vectorizable_reduction): Release
27294         vec_defs elements after safe_splicing them into other vectors.
27295         Formatting fixes.
27297         PR tree-optimization/79327
27298         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
27299         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
27300         dirtype.
27301         (format_integer): Use wide_int_to_tree instead of build_int_cst
27302         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
27303         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
27304         of shortest and longest sequence.
27306 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
27308         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
27309         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
27311 2017-02-03  Walter Lee  <walt@tilera.com>
27313         PR target/78862
27314         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
27315         after initial stackframe link reg save.
27316         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
27318 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
27320         PR target/79354
27321         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
27322         wu for stxssp alternative.
27324 2017-02-03  Martin Sebor  <msebor@redhat.com>
27326         PR tree-optimization/79352
27327         * gimple-fold.c (get_range_strlen): Add argument.
27328         (get_range_strlen): Change return type to bool.
27329         (get_maxval_strlen): Pass in a dummy argument.
27330         * gimple-fold.h (get_range_strlen): Change return type to bool.
27331         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
27332         * tree.h (array_at_struct_end_p): Add argument.
27333         * tree.c (array_at_struct_end_p): Handle it.
27335 2017-02-03  Martin Liska  <mliska@suse.cz>
27337         PR lto/66295
27338         * multiple_target.c (create_dispatcher_calls): Redirect edge
27339         from a caller of a dispatcher.
27340         (expand_target_clones): Make the clones local.
27341         (ipa_target_clone): Do both target clones and resolvers.
27342         (ipa_dispatcher_calls): Remove the pass.
27343         (pass_dispatcher_calls::gate): Likewise.
27344         (make_pass_dispatcher_calls): Likewise.
27345         * passes.def (pass_target_clone): Put as very first IPA early
27346         pass.
27348 2017-02-03  Martin Liska  <mliska@suse.cz>
27350         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
27351         in case of a function with ifunc attribute.
27353 2017-02-03  Martin Liska  <mliska@suse.cz>
27355         * cgraph.c (cgraph_node::dump): Dump function version info.
27356         * symtab.c (symtab_node::dump_base): Add missing new line.
27358 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
27360         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
27361         (ifcombine_ifandif): Use it.
27363 2017-02-03  Martin Liska  <mliska@suse.cz>
27365         * doc/invoke.texi: Document default value for
27366         use-after-scope-direct-emission-threshold.
27368 2017-02-03  Martin Liska  <mliska@suse.cz>
27370         PR tree-optimization/79339
27371         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
27372         (format_floating): Likewise.
27374 2017-02-03  Martin Liska  <mliska@suse.cz>
27376         PR ipa/79337
27377         * ipa-prop.c (ipa_node_params_t::insert): Remove current
27378         implementation.
27379         (ipa_node_params_t::remove): Likewise.
27380         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
27381         initialization from removed ipa_node_params_t::insert.
27382         (ipa_node_params::~ipa_node_params): Move from removed
27383         ipa_node_params_t::release.
27384         * symbol-summary.h (symbol_summary::m_released): New member.
27385         Do not release a summary twice.  Do not allow to call finalizer
27386         for types of a summary that live in GGC memory.
27388 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27390         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
27391         cmp_branch fusion.
27393 2017-02-02  Martin Sebor  <msebor@redhat.com>
27395         PR middle-end/79275
27396         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
27397         (format_string): Tighten up the range of output for non-constant
27398         strings and correct the expected range for wide non-constant strings.
27400 2017-02-02  Martin Sebor  <msebor@redhat.com>
27402         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
27404         PR middle-end/32003
27405         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
27406         index.
27407         (-fdump-tree-@var): Add to index and document how to come up
27408         with pass-specific option and dump file names.
27409         (-fdump-passes): Clarify where to look for output.
27411 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
27413         PR middle-end/77445
27414         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
27415         statistics of the analyzed path; allow threading for speed when
27416         any of BBs along the path are optimized for speed.
27418 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
27420         PR middle-end/78468
27421         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
27422         settings of the virtual registers.
27424         Revert again
27425         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27427         * explow.c (get_dynamic_stack_size): Take known alignment of stack
27428         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
27429         needed.
27431 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27433         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
27434         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
27436 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27438         * config/s390/s390.md: Add missing comments with the expanded
27439         mnemonics.
27440         * config/s390/vector.md: Likewise.
27441         * config/s390/vx-builtins.md: Likewise.
27443 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
27445         PR target/79197
27446         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
27447         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
27448         conditions on a single line.
27450 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27452         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
27453         __S390_VX__ to __VX__.
27455 2017-02-01  Andrew Pinski  <apinski@cavium.com>
27457         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
27458         stmt_info to record_stmt_cost.
27459         (vect_get_known_peeling_cost): Pass stmt_info if known to
27460         record_stmt_cost.
27461         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
27462         cpu_vector_cost field into
27463         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
27464         field into vec_int_stmt_cost and vec_fp_stmt_cost.
27465         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
27466         splitting of scalar_stmt_cost and vec_stmt_cost.
27467         (thunderx_vector_cost): Likewise.
27468         (cortexa57_vector_cost): LIkewise.
27469         (exynosm1_vector_cost): Likewise.
27470         (xgene1_vector_cost): Likewise.
27471         (thunderx2t99_vector_cost): Improve after the splitting of the two
27472         fields.
27473         (aarch64_builtin_vectorization_cost): Update for the splitting of
27474         scalar_stmt_cost and vec_stmt_cost.
27476 2017-02-01  Torvald Riegel  <triegel@redhat.com>
27477             Richard Henderson  <rth@redhat.com>
27479         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
27480         conditional on existance of a fast atomic load.
27481         * optabs-query.c (can_atomic_load_p): New function.
27482         * optabs-query.h (can_atomic_load_p): Declare it.
27483         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
27484         no fast atomic load is available for the particular size of access.
27485         (expand_atomic_compare_and_swap): Likewise.
27486         (expand_atomic_load): Likewise.
27487         (expand_atomic_store): Likewise.
27488         (expand_atomic_fetch_op): Likewise.
27489         * testsuite/lib/target-supports.exp
27490         (check_effective_target_sync_int_128): Remove x86 because it provides
27491         no fast atomic load.
27492         (check_effective_target_sync_int_128_runtime): Likewise.
27494 2017-02-01  Richard Biener  <rguenther@suse.de>
27496         * graphite.c: Include tree-vectorizer.h for find_loop_location.
27497         (graphite_transform_loops): Provide opt-info for optimized nests.
27498         * tree-parloop.c (parallelize_loops): Provide opt-info for
27499         parallelized loops.
27501 2017-02-01  Richard Biener  <rguenther@suse.de>
27503         PR middle-end/79315
27504         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
27505         was not set before.
27507 2017-02-01  Richard Biener  <rguenther@suse.de>
27509         PR tree-optimization/71824
27510         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
27511         Verify the loops are valid in the merged SESE region.
27512         (scop_detection::can_represent_loop_1): Check analyzing the
27513         evolution of the number of iterations in the region succeeds.
27515 2017-01-31  Ian Lance Taylor  <iant@golang.org>
27517         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
27518         REG_ARGS_SIZE note to 32-bit push insns and call insn.
27520 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
27522         PR preprocessor/79210
27523         * input.c (get_substring_ranges_for_loc): Replace line_width
27524         assertion with error-handling.
27526 2017-01-31  Richard Biener  <rguenther@suse.de>
27528         PR tree-optimization/77318
27529         * graphite-sese-to-poly.c (extract_affine): Fix assert.
27530         (create_pw_aff_from_tree): Take loop parameter.
27531         (add_condition_to_pbb): Pass loop of the condition to
27532         create_pw_aff_from_tree.
27534 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
27536         * config/s390/s390.c (s390_asan_shadow_offset): New function.
27537         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
27539 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
27541         PR target/78597
27542         PR target/79038
27543         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
27544         no longer used.
27545         (convert_int_to_float128): Likewise.
27546         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
27547         (convert_int_to_float128): Likewise.
27548         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
27549         (UNSPEC_IEEE128_CONVERT): Likewise.
27550         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
27551         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
27552         Use local variables for IBM extended format.
27553         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
27554         (fix_trunc<mode>si2_fprs): Likewise.
27555         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
27556         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
27557         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
27558         to know that we can now have integers of all sizes in vector
27559         registers.
27560         (fix<uns>_<mode>di2_hw): Likewise.
27561         (float<uns>_<mode>si2_hw): Likewise.
27562         (fix_<mode>si2_hw): Likewise.
27563         (fixuns_<mode>si2_hw): Likewise.
27564         (float<uns>_<mode>di2_hw): Likewise.
27565         (float_<mode>di2_hw): Likewise.
27566         (float_<mode>si2_hw): Likewise.
27567         (floatuns_<mode>di2_hw): Likewise.
27568         (floatuns_<mode>si2_hw): Likewise.
27569         (xscvqp<su>wz_<mode>): Delete, no longer used.
27570         (xscvqp<su>dz_<mode>): Likewise.
27571         (xscv<su>dqp_<mode>): Likewise.
27572         (ieee128_mfvsrd_64bit): Likewise.
27573         (ieee128_mfvsrd_32bit): Likewise.
27574         (ieee128_mfvsrwz): Likewise.
27575         (ieee128_mtvsrw): Likewise.
27576         (ieee128_mtvsrd_64bit): Likewise.
27577         (ieee128_mtvsrd_32bit): Likewise.
27579 2017-01-31  Martin Liska  <mliska@suse.cz>
27581         PR ipa/79285
27582         * ipa-prop.c (ipa_free_all_node_params): Call release method
27583         instead of ~sumbol_summary to not to trigger double times
27584         dtor of hash_map.
27586 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
27588         PR tree-optimization/71691
27589         * bitmap.h (class auto_bitmap): New.
27590         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
27591         is_maybe_undefined instead of ssa_undefined_value_p.
27593 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27595         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
27596         __S390_ARCH_LEVEL__ to __ARCH__.
27598 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
27600         PR tree-optimization/79267
27601         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
27602         if should_remove_lhs_p is true.
27604 2017-01-30  Alexandre Oliva <aoliva@redhat.com>
27606         PR debug/63238
27607         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
27608         (add_alignment_attribute): New.
27609         (base_type_die): Add alignment attribute.
27610         (subrange_type_die): Likewise.
27611         (modified_type_die): Likewise.
27612         (gen_array_type_die): Likewise.
27613         (gen_descr_array_type_die: Likewise.
27614         (gen_enumeration_type_die): Likewise.
27615         (gen_subprogram_die): Likewise.
27616         (gen_variable_die): Likewise.
27617         (gen_field_die): Likewise.
27618         (gen_ptr_to_mbr_type_die): Likewise.
27619         (gen_struct_or_union_type_die): Likewise.
27620         (gen_subroutine_type_die): Likewise.
27621         (gen_typedef_die): Likewise.
27622         (base_type_cmp): Compare alignment attribute.
27624 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27626         PR target/79170
27627         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
27628         (setb_unsigned) New pattern for setb with CCUNS.
27629         * config/rs6000/rs6000.c (expand_block_compare): Use a different
27630         subfc./subfe sequence to avoid overflow problems.  Generate a
27631         shorter sequence with cmpld/setb for power9.
27632         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
27633         for generating subfc. instruction.
27634         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
27635         now uses this instruction.
27637 2017-01-30  Ian Lance Taylor  <iant@google.com>
27639         PR debug/79289
27640         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
27641         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
27643 2017-01-30  Martin Sebor  <msebor@redhat.com>
27645         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
27646         Move constant to the right of a relational operator.
27647         (get_mpfr_format_length, format_character, format_string): Ditto.
27648         (should_warn_p, maybe_warn): Same.
27650         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
27652 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
27654         PR lto/79061
27655         * asan.c (get_translation_unit_decl): Remove function.
27656         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
27658 2017-01-30  Martin Liska  <mliska@suse.cz>
27660         PR gcov-profile/79259
27661         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
27662         -fprofile-generate.
27664 2017-01-30  Martin Liska  <mliska@suse.cz>
27666         PR bootstrap/78985
27667         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
27668         Initialize variables with NULL value.
27670 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
27672         PR target/79260
27673         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
27674         tm_p_file.
27675         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
27677 2017-01-30  Richard Biener  <rguenther@suse.de>
27679         PR tree-optimization/79276
27680         * tree-vrp.c (process_assert_insertions): Properly adjust common
27681         when removing a duplicate.
27683         * gcc.dg/torture/pr79276.c: New testcase.
27685 2017-01-30  Richard Biener  <rguenther@suse.de>
27687         PR tree-optimization/79256
27688         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
27689         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
27690         alignment on TYPE.
27691         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
27693 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27695         PR target/79240
27696         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
27697         ("*r<noxa>sbg_<mode>_sll_bitmask")
27698         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
27699         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
27700         Use contiguous_bitmask_nowrap_operand.
27702 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27704         PR target/79268
27705         * config/rs6000/altivec.h (vec_xl): Revise #define.
27706         (vec_xst): Likewise.
27708 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
27710         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
27712 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
27714         PR rtl-optimization/79194
27715         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
27716         traps before call to bypass_conditional_jumps.
27718 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
27720         PR tree-optimization/71374
27721         * lra-constraints.c (check_conflict_input_operands): New.
27722         (match_reload): Use it.
27724 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
27726         PR target/79131
27727         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
27728         account to calculate conflict_set.
27730 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
27732         PR rtl-optimization/78559
27733         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
27734         other_insn in combine.
27736 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
27738         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
27739         uint16_type_node for BT_UINT16.
27741 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
27743         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
27744         "RTL Tests" to menu.
27745         (GIMPLE Tests): New node.
27746         (RTL Tests): New node.
27748 2017-01-27  Richard Biener  <rguenther@suse.de>
27750         PR tree-optimization/79245
27751         * tree-loop-distribution.c (distribute_loop): Apply cost
27752         modeling also to detected patterns.
27754 2017-01-27  Richard Biener  <rguenther@suse.de>
27756         PR tree-optimization/71433
27757         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
27758         (compare_assert_loc): New function.
27759         (process_assert_insertions): Sort and optimize assert locations
27760         to remove duplicates and push down identical assertions on
27761         edges to their destination block.
27763 2017-01-27  Richard Biener  <rguenther@suse.de>
27765         PR tree-optimization/79244
27766         * tree-vrp.c (remove_range_assertions): Forcefully propagate
27767         out SSA names even if abnormal.
27769 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
27771         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
27772         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
27773         instead of MPFR_RNDN.
27775 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
27777         PR target/79239
27778         * arm.c (arm_option_override): Don't call build_target_option_node
27779         until after doing all option overrides.
27780         (arm_valid_target_attribute_tree): Likewise.
27782 2017-01-27  Martin Liska  <mliska@suse.cz>
27784         * doc/invoke.texi (-fprofile-arcs): Document profiling support
27785         for {cd}tors and C++ {cd}tors.
27787 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27789         * config/s390/s390.md ("*setmem_long_and")
27790         ("*setmem_long_and_31z"): Use zero_extend instead of and.
27792 2017-01-26  Martin Sebor  <msebor@redhat.com>
27794         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
27795         of precision.
27797 2017-01-26  Martin Sebor  <msebor@redhat.com>
27799         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
27800         HAVE_DFmode before using XFmode or DFmode.
27801         (parse_directive): Avoid using the z length modifier to avoid
27802         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
27804         PR middle-end/78703
27805         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
27806         to accept adjustment as an array.
27807         (get_int_range): New function.
27808         (struct directive): Make width and prec arrays.
27809         (directive::set_width, directive::set_precision): Call get_int_range.
27810         (format_integer, format_floating): Handle width and precision ranges.
27811         (format_string, parse_directive): Same.
27813 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
27815         PR debug/79129
27816         * dwarf2out.c (generate_skeleton_bottom_up): For children with
27817         comdat_type_p set, just clone them, but keep the children in the
27818         original DIE.
27820         PR debug/78835
27821         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
27822         which have direct callers with -fvar-tracking-assignments enabled
27823         in the current TU.
27824         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
27825         inside of type units.
27827 2017-01-26  Martin Sebor  <msebor@redhat.com>
27829         PR middle-end/78703
27830         * gimple-ssa-sprintf.c (struct result_range): Add likely and
27831         unlikely counters.
27832         (struct format_result): Replace number_chars, number_chars_min,
27833         and number_chars_max with a single member of struct result_range.
27834         Remove bounded.
27835         (format_result::operator+=): Adjust.
27836         (struct fmtresult): Remove bounded.  Handle likely and unlikely
27837         counters.
27838         (fmtresult::adjust_for_width_or_precision): New function.
27839         (fmtresult:type_max_digits): New function.
27840         (bytes_remaining): Handle likely and unlikely counters.
27841         (min_bytes_remaining): Remove.
27842         (format_percent): Simplify.
27843         (format_integer, format_floating): Set likely and unlikely counters.
27844         (get_string_length, format_character, format_string): Same.
27845         (format_plain, should_warn_p): New function.
27846         (maybe_warn): Call should_warn_p.  Update diagnostic messages
27847         and handle those for all directives, including plain strings.
27848         (format_directive): Handle likely and unlikely counters.
27849         Remove unnecessary quoting from diagnostics.  Add an informational
27850         note.
27851         (add_bytes): Remove.
27852         (pass_sprintf_length::compute_format_length): Simplify.
27853         (try_substitute_return_value): Handle likely and unlikely counters.
27855 2017-01-26  Carl Love  <cel@us.ibm.com>
27857         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
27858         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
27860 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
27862         PR target/79131
27863         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
27864         endianess for subregs into account.
27865         * lra-constraints.c (lra_constraints): Do risky transformations
27866         always on the first iteration.
27867         * lra-lives.c (check_pseudos_live_through_calls): Add arg
27868         last_call_used_reg_set.
27869         (process_bb_lives): Define and use last_call_used_reg_set.
27870         * lra.c (lra): Always continue after lra_constraints on the first
27871         iteration.
27873 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
27875         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
27876         constant.
27877         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
27879 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
27881         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
27882         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
27883         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
27884         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
27885         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
27886         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
27887         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
27888         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
27889         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
27891 2017-01-26  Marek Polacek  <polacek@redhat.com>
27893         PR c/79199
27894         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
27895         for the third operand.
27897 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
27899         PR middle-end/79236
27900         * omp-low.c (struct omp_context): Add simt_stmt field.
27901         (scan_omp_for): Return omp_context *.
27902         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
27903         context to the _simt_ SIMD stmt.
27904         (lower_omp_for): For combined SIMD with sibling _simt_
27905         SIMD, make sure to use the same decls in _looptemp_
27906         clauses as in the sibling.
27908 2017-01-26  David Sherwood  <david.sherwood@arm.com>
27910         PR middle-end/79212
27911         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
27912         all contexts.
27914 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
27916         PR target/70465
27917         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
27918         emit fld b; fld a; if possible.
27920         * brig-builtins.def: Update copyright years.
27921         * config/arm/arm_acle_builtins.def: Update copyright years.
27923 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
27925         PR target/79179
27926         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
27927         constraint instead of o for the stxsd instruction.
27929 2017-01-25  Carl Love  <cel@us.ibm.com>
27931         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
27932         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
27934 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
27936         * doc/invoke.texi (C++ Dialect Options): Fix typo.
27938 2017-01-25  Richard Biener  <rguenther@suse.de>
27940         PR tree-optimization/69264
27941         * target.def (vector_alignment_reachable): Improve documentation.
27942         * doc/tm.texi: Regenerate.
27943         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
27944         and add a comment.
27945         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
27946         earlier changes with respect to TYPE_USER_ALIGN.
27947         (vector_alignment_reachable_p): Likewise.  Improve dumping.
27949 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27951         PR target/79145
27952         * config/arm/arm.md (xordi3): Force constant operand into a register
27953         for TARGET_IWMMXT.
27955 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27957         * doc/invoke.texi (-fstore-merging): Correct default optimization
27958         levels at which it is enabled.
27959         (-O): Move -fstore-merging from list to...
27960         (-O2): ... Here.
27962 2017-01-25  Richard Biener  <rguenther@suse.de>
27964         PR debug/78363
27965         * omp-expand.c: Include debug.h.
27966         (expand_omp_taskreg): Make sure to generate early debug before
27967         outlining anything from a function.
27968         (expand_omp_target): Likewise.
27969         (grid_expand_target_grid_body): Likewise.
27971 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
27973         PR lto/79061
27974         * asan.c (get_translation_unit_decl): New function.
27975         (asan_add_global): Extract modules file name from globals
27976         TRANSLATION_UNIT_DECL name.
27978 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
27980         PR target/77439
27981         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
27982         for long calls with APCS frame and VFP.
27984 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
27986         * cfg.c (original_copy_tables_initialized_p): New function.
27987         * cfg.h (original_copy_tables_initialized_p): New decl.
27988         * cfgrtl.c (relink_block_chain): Guard the call to
27989         free_original_copy_tables with a call to
27990         original_copy_tables_initialized_p.
27991         * cgraph.h (symtab_node::native_rtl_p): New decl.
27992         * cgraphunit.c (symtab_node::native_rtl_p): New function.
27993         (symtab_node::needed_p): Don't assert for early assembly output
27994         for __RTL functions.
27995         (cgraph_node::finalize_function): Set "force_output" for __RTL
27996         functions.
27997         (cgraph_node::analyze): Bail out early for __RTL functions.
27998         (analyze_functions): Update assertion to support __RTL functions.
27999         (cgraph_node::expand): Bail out early for __RTL functions.
28000         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
28001         __RTL functions.
28002         * function.h (struct function): Update comment for field
28003         "pass_startwith".
28004         * gimple-expr.c: Include "tree-pass.h".
28005         (gimple_has_body_p): Return false for __RTL functions.
28006         * Makefile.in (OBJS): Add run-rtl-passes.o.
28007         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
28008         accessor.
28009         (gcc::pass_manager::get_clean_slate): New accessor.
28010         * passes.c: Include "insn-addr.h".
28011         (should_skip_pass_p): Add logging.  Update logic for running
28012         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
28013         property-provider override so it is only done for gimple passes.
28014         Don't skip dfinit.
28015         (skip_pass): New function.
28016         (execute_one_pass): Call skip_pass when skipping passes.
28017         * read-md.c (md_reader::read_char): Support filtering
28018         the input to a subset of line numbers.
28019         (md_reader::md_reader): Initialize fields
28020         m_first_line and m_last_line.
28021         (md_reader::read_file_fragment): New function.
28022         * read-md.h (md_reader::read_file_fragment): New decl.
28023         (md_reader::m_first_line): New field.
28024         (md_reader::m_last_line): New field.
28025         * read-rtl-function.c (function_reader::create_function): Only
28026         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
28027         curr_properties.  Set DECL_INITIAL to a dummy block.
28028         (read_rtl_function_body_from_file_range): New function.
28029         * read-rtl-function.h (read_rtl_function_body_from_file_range):
28030         New decl.
28031         * run-rtl-passes.c: New file.
28032         * run-rtl-passes.h: New file.
28034 2017-01-24  Jeff Law  <law@redhat.com>
28036         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
28037         buffer size.
28039 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
28041         PR tree-optimization/79159
28042         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
28043         (record_nonwrapping_iv): Improve boundary using above function if no
28044         value range information.
28046 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
28047             Martin Jambor  <mjambor@suse.cz>
28049         * brig-builtins.def: New file.
28050         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
28051         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
28052         (DEF_HSAIL_SAT_BUILTIN): Likewise.
28053         (DEF_HSAIL_INTR_BUILTIN): Likewise.
28054         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
28055         * builtin-types.def (BT_INT8): New.
28056         (BT_INT16): Likewise.
28057         (BT_UINT8): Likewise.
28058         (BT_UINT16): Likewise.
28059         (BT_FN_ULONG): Likewise.
28060         (BT_FN_UINT_INT): Likewise.
28061         (BT_FN_UINT_ULONG): Likewise.
28062         (BT_FN_UINT_LONG): Likewise.
28063         (BT_FN_UINT_PTR): Likewise.
28064         (BT_FN_ULONG_PTR): Likewise.
28065         (BT_FN_INT8_FLOAT): Likewise.
28066         (BT_FN_INT16_FLOAT): Likewise.
28067         (BT_FN_UINT32_FLOAT): Likewise.
28068         (BT_FN_UINT16_FLOAT): Likewise.
28069         (BT_FN_UINT8_FLOAT): Likewise.
28070         (BT_FN_UINT64_FLOAT): Likewise.
28071         (BT_FN_UINT16_UINT32): Likewise.
28072         (BT_FN_UINT32_UINT16): Likewise.
28073         (BT_FN_UINT16_UINT16_UINT16): Likewise.
28074         (BT_FN_INT_PTR_INT): Likewise.
28075         (BT_FN_UINT_PTR_UINT): Likewise.
28076         (BT_FN_LONG_PTR_LONG): Likewise.
28077         (BT_FN_ULONG_PTR_ULONG): Likewise.
28078         (BT_FN_VOID_UINT64_UINT64): Likewise.
28079         (BT_FN_UINT8_UINT8_UINT8): Likewise.
28080         (BT_FN_INT8_INT8_INT8): Likewise.
28081         (BT_FN_INT16_INT16_INT16): Likewise.
28082         (BT_FN_INT_INT_INT): Likewise.
28083         (BT_FN_UINT_FLOAT_UINT): Likewise.
28084         (BT_FN_FLOAT_UINT_UINT): Likewise.
28085         (BT_FN_ULONG_UINT_UINT): Likewise.
28086         (BT_FN_ULONG_UINT_PTR): Likewise.
28087         (BT_FN_ULONG_ULONG_ULONG): Likewise.
28088         (BT_FN_UINT_UINT_UINT): Likewise.
28089         (BT_FN_VOID_UINT_PTR): Likewise.
28090         (BT_FN_UINT_UINT_PTR: Likewise.
28091         (BT_FN_UINT32_UINT64_PTR): Likewise.
28092         (BT_FN_INT_INT_UINT_UINT): Likewise.
28093         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
28094         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
28095         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
28096         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
28097         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
28098         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
28099         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
28100         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
28101         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
28102         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
28103         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
28104         * doc/frontends.texi: List BRIG FE.
28105         * doc/install.texi (Testing): Add BRIG tesring requirements.
28106         * doc/invoke.texi (Overall Options): Mention BRIG.
28107         * doc/standards.texi (Standards): Doucment BRIG HSA version.
28109 2017-01-24  Richard Biener  <rguenther@suse.de>
28111         PR translation/79208
28112         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
28114 2017-01-24  Martin Jambor  <mjambor@suse.cz>
28116         PR bootstrap/79198
28117         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
28118         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
28119         and known_contexts.
28121 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
28123         PR middle-end/79123
28124         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
28125         casts from signed to unsigned really don't have a range.
28127 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
28129         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
28130         GMP_RNDx for compatiblity.
28132 2017-01-24  Martin Liska  <mliska@suse.cz>
28134         PR bootstrap/79132
28135         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
28136         that would prevent us to call alloca with -1 as argument.
28138 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
28140         * dwarf2out.c (output_compilation_unit_header, output_file_names):
28141         Avoid -Wformat-security warning.
28143 2017-01-23  Andrew Pinski  <apinski@cavium.com>
28145         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
28146         cost table.
28148 2017-01-23  Martin Sebor  <msebor@redhat.com>
28150         PR middle-end/78703
28151         * gimple-ssa-sprintf.c (warn_level): New global.
28152         (format_integer): Use it here and throughout the rest of the file.
28153         Use the same switch to compute sign as base.
28154         (maybe_warn): New function.
28155         (format_directive): Factor out warnings into maybe_warn.
28156         Add debugging output.  Use warn_level.
28157         (add_bytes): Use warn_level.
28158         (pass_sprintf_length::compute_format_length): Add debugging output.
28159         (try_substitute_return_value): Same.
28160         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
28162         PR middle-end/78703
28163         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
28164         (struct fmtresult, format_integer, format_floating): Adjust.
28165         (fmtresult::fmtresult): Set max correctly in two argument ctor.
28166         (get_string_length, format_string,format_directive): Same.
28167         (pass_sprintf_length::compute_format_length): Same.
28168         (try_substitute_return_value): Simplify slightly.
28170         PR middle-end/78703
28171         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
28172         (fmtresult::operator+=): Outlined.
28173         (struct fmtresult): Add ctors.
28174         (struct conversion_spec): Rename...
28175         (struct directive): ...to this.  Add and remove data members.
28176         (directive::set_width, directive::set_precision): New functions.
28177         (format_percent): Use fmtresult ctor.
28178         (get_width_and_precision): Remove.
28179         (format_integer): Make naming changes.  Avoid computing width and
28180         precision.
28181         (format_floating): Same.  Adjust indentation.
28182         (format_character, format_none): New functions.
28183         (format_string): Moved character handling to format_character.
28184         (format_directive): Remove arguments, change return type.
28185         (parse_directive): New function.
28186         (pass_sprintf_length::compute_format_length): Move directive
28187         parsing to parse_directive.
28189 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
28191         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
28192         (assign_assembler_name_if_needed): ... this.
28193         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
28194         (assign_assembler_name_if_needed): ... this.
28195         (free_lang_data_in_cgraph): Adjust callers.
28196         * cgraphunit.c (cgraph_node::analyze): Likewise.
28197         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
28198         Likewise.
28200 2017-01-23  Richard Biener  <rguenther@suse.de>
28202         PR tree-optimization/79088
28203         PR tree-optimization/79188
28204         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
28205         resetting loop bounds after last path deletion.  Reset loop
28206         bounds of the target loop, make code match the comments.
28207         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
28208         Make sure loops need no fixups.
28210 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28212         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
28213         exponent support with double type for first argument.
28214         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
28215         type returned by __builtin_vec_extract_sig,
28216         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
28217         functions from "vector int" to "vector unsigned int" or from
28218         "vector long long int" to "vector unsigned long long int".
28219         Changed type returned by __builtin_vec_extract_exp,
28220         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
28221         functions from "vector int" to "vector unsigned int" or from
28222         "vector long long int" to "vector unsigned long long int".
28223         Changed return type of __builtin_vec_test_data_class,
28224         __builtin_vec_test_data_class_sp, and
28225         __builtin_vec_test_data_class_dp from "vector int" to
28226         "vector bool int" or from "vector long long int" to "vector bool
28227         long long int" and changed second argument type from "unsigned
28228         int" to "int".  Added new overloaded function forms "vector float
28229         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
28230         "vector float __builtin_vec_insert_exp_sp (vector float, vector
28231         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
28232         double, vector unsigned long long int)" and "vector double
28233         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
28234         long int)".  Changed return type of
28235         __builtin_scalar_test_data_class and
28236         __builtin_scalar_test_data_class_sp and
28237         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
28238         int" and changed second argument from "unsigned int" to "int".
28239         Changed type returned by __builtin_scalar_test_neg,
28240         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
28241         from "int" to "bool int".  Added new overloaded function form
28242         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
28243         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
28244         exponent double-precision with floating point first argument.
28245         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
28246         documentation of scalar_test_data_class, scalar_test_neg,
28247         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
28248         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
28249         vec_test_data_class built-in functions to reflect refinements in
28250         their type signatures.
28252 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
28254         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
28255         size of buf.
28256         (aarch64_elf_asm_destructor): Likewise.
28258 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
28260         PR rtl-optimization/78634
28261         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
28262         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
28263         * ifcvt.c (noce_try_cmove): Add missing cost check.
28265         PR rtl-optimization/71724
28266         * combine.c (if_then_else_cond): Look for situations where it is
28267         beneficial to undo the work of one of the recursive calls.
28269 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
28271         PR tree-optimization/70754
28272         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
28273         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
28274         combined stmt before it if not NULL.
28275         (combine_chains): Process refs reversely and compute dominance point
28276         for root ref.
28278 2017-01-23  Martin Liska  <mliska@suse.cz>
28280         PR tree-optimization/79196
28281         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
28282         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
28283         instead of memcmp.
28284         (strlen_optimize_stmt): Call the renamed function.
28286 2017-01-23  Michael Matz  <matz@suse.de>
28288         PR tree-optimization/78384
28289         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
28291 2017-01-23  Richard Biener  <rguenther@suse.de>
28293         PR tree-optimization/79186
28294         * tree-vrp.c (register_new_assert_for): Make sure we've seen
28295         both incoming edges before moving an assert.
28297 2017-01-23  Martin Jambor  <mjambor@suse.cz>
28299         * ipa-prop.c (load_from_param_1): Removed.
28300         (load_from_unmodified_param): Bits from load_from_param_1 put back
28301         here.
28302         (load_from_param): Removed.
28303         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
28304         with stmt.  Reverted back to use of load_from_unmodified_param.
28306 2017-01-23  Martin Jambor  <mjambor@suse.cz>
28308         PR ipa/79108
28309         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
28310         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
28311         field a pointer to garbage collected vector, mark lattices and
28312         ipcp_orig_node with GTY((skip)).
28313         (ipa_get_param_count): Adjust to descriptors being a pointer.
28314         (ipa_get_param): Likewise.
28315         (ipa_get_type): Likewise.
28316         (ipa_get_param_move_cost): Likewise.
28317         (ipa_set_param_used): Likewise.
28318         (ipa_get_controlled_uses): Likewise.
28319         (ipa_set_controlled_uses): Likewise.
28320         (ipa_is_param_used): Likewise.
28321         (ipa_node_params_t): Move into garbage collector.  New methods insert
28322         and remove.
28323         (ipa_node_params_sum): Annotate wth GTY(()).
28324         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
28325         garbage collected.
28326         (ipa_load_from_parm_agg): Adjust declaration.
28327         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
28328         * ipa-profile.c (ipa_profile): Likewise.
28329         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
28330         (ipa_populate_param_decls): Make descriptors parameter garbage
28331         collected.
28332         (ipa_dump_param): Adjust to descriptors being a pointer.
28333         (ipa_alloc_node_params): Likewise.
28334         (ipa_initialize_node_params): Likewise.
28335         (load_from_param_1): Make descriptors parameter garbage collected.
28336         (load_from_unmodified_param): Likewise.
28337         (load_from_param): Likewise.
28338         (ipa_load_from_parm_agg): Likewise.
28339         (ipa_node_params::~ipa_node_params): Removed.
28340         (ipa_free_all_node_params): Remove call to delete operator.
28341         (ipa_node_params_t::insert): New.
28342         (ipa_node_params_t::remove): Likewise.
28343         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
28344         copy known_csts and known_contexts vectors.
28345         (ipa_read_node_info): Adjust to descriptors being a pointer.
28346         (ipcp_modif_dom_walker): Make m_descriptors field garbage
28347         collected.
28348         (ipcp_transform_function): Make descriptors variable garbage
28349         collected.
28351 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
28353         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
28354         * config/i386/avx512dqintrin.h: Ditto.
28355         * config/i386/avx512fintrin.h: Ditto.
28356         * config/i386/i386.c: Handle new builtins.
28357         * config/i386/i386-builtin.def: Add new builtins.
28358         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
28359         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
28361 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
28362             Martin Liska  <mliska@suse.cz>
28364         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
28365         * asan.c (asan_expand_poison_ifn): Support stores and use
28366         appropriate ASAN report function.
28367         * internal-fn.c (expand_ASAN_POISON_USE): New function.
28368         * internal-fn.def (ASAN_POISON_USE): Declare.
28369         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
28370         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
28371         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
28372         ASAN_POISON calls w/o LHS.
28373         * tree-ssa.c (execute_update_addresses_taken): Create clobber
28374         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
28375         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
28376         * gimplify.c (asan_poison_variables): Add attribute
28377         use_after_scope_memory to variables that really needs to live
28378         in memory.
28379         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
28380         having the attribute.
28382 2017-01-23  Martin Liska  <mliska@suse.cz>
28384         * asan.c (create_asan_shadow_var): New function.
28385         (asan_expand_poison_ifn): Likewise.
28386         * asan.h (asan_expand_poison_ifn): New declaration.
28387         * internal-fn.c (expand_ASAN_POISON): Likewise.
28388         * internal-fn.def (ASAN_POISON): New builtin.
28389         * sanopt.c (pass_sanopt::execute): Expand
28390         asan_expand_poison_ifn.
28391         * tree-inline.c (copy_decl_for_dup_finish): Make function
28392         external.
28393         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
28394         * tree-ssa.c (is_asan_mark_p): New function.
28395         (execute_update_addresses_taken): Rewrite local variables
28396         (identified just by use-after-scope as addressable) into SSA.
28398 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
28400         * doc/install.texi (Specific): opensource.apple.com uses https
28401         now. Remove trailing slash.
28403 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
28405         * README.Portability: Remove note on an Irix compatibility issue.
28407 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
28409         * gcov.c (INCLUDE_ALGORITHM): Define.
28410         (INCLUDE_VECTOR): Define.
28411         No longer include <vector> and <algorithm> directly.
28413 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
28415         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
28416         to https.
28417         * doc/invoke.texi (Code Gen Options): Ditto.
28419 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
28421         PR lto/78407
28422         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
28424 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
28426         rtl-optimization/79125
28427         * cprop.c (local_cprop_pass): Handle cases where we make an
28428         unconditional trap.
28430 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
28432         PR target/61729
28433         PR target/77850
28434         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
28435         read from, for big endian.
28437 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
28439         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
28440         register pauth builtins for LP64 only.
28442 2017-01-20  Marek Polacek  <polacek@redhat.com>
28444         PR c/79152
28445         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
28446         non-case labels.
28448 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
28450         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
28451         of safelen status.
28452         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
28453         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
28454         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
28456 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28458         PR target/71270
28459         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
28460         in big-endian mode when they are not a single duplicated value.
28462 2017-01-20  Richard Biener  <rguenther@suse.de>
28464         * BASE-VER: Bump to 7.0.1.
28466 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
28468         * omp-low.c (omplow_simd_context): New struct.  Use it...
28469         (lower_rec_simd_input_clauses): ...here and...
28470         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
28471         references to idx, lane, max_vf, is_simt.
28473 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
28475         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
28476         mcpu=nps400.
28478 2017-01-20  Martin Jambor  <mjambor@suse.cz>
28480         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
28481         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
28482         gt-hsa-common.h.
28483         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
28484         (GTFILES): Rename hsa.c to hsa-common.c.
28485         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
28486         * hsa-dump.c: Likewise.
28487         * hsa-gen.c: Likewise.
28488         * hsa-regalloc.c: Likewise.
28489         * ipa-hsa.c: Likewise.
28490         * omp-expand.c: Likewise.
28491         * omp-low.c: Likewise.
28492         * toplev.c: Likewise.
28494 2017-01-20  Marek Polacek  <polacek@redhat.com>
28496         PR c/64279
28497         * doc/invoke.texi: Document -Wduplicated-branches.
28498         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
28499         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
28500         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
28501         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
28502         return 0 only when not OEP_LEXICOGRAPHIC.
28503         (fold_build_cleanup_point_expr): Use the expression
28504         location when building CLEANUP_POINT_EXPR.
28505         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
28506         * tree.c (add_expr): Handle error_mark_node.
28508 2017-01-20  Martin Liska  <mliska@suse.cz>
28510         PR lto/69188
28511         * tree-profile.c (init_ic_make_global_vars): Do not call
28512         finalize_decl.
28513         (gimple_init_gcov_profiler): Likewise.
28515 2017-01-20  Martin Liska  <mliska@suse.cz>
28517         PR ipa/71190
28518         * cgraph.h (maybe_create_reference): Remove argument and
28519         update comment.
28520         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
28521         argument.
28522         * ipa-cp.c (create_specialized_node): Likewise.
28523         * symtab.c (symtab_node::maybe_create_reference): Handle
28524         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
28526 2017-01-20  Martin Liska  <mliska@suse.cz>
28528         * read-rtl-function.c (function_reader::create_function): Use
28529         build_decl instread of build_decl_stat.
28531 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
28533         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
28534         * config/i386/avx512dqintrin.h: Ditto.
28535         * config/i386/avx512fintrin.h: Ditto.
28536         * config/i386/i386-builtin-types.def: Add new types.
28537         * config/i386/i386.c: Handle new types.
28538         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
28539         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
28540         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
28541         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
28542         (__builtin_ia32_kshiftridi): New.
28543         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
28545 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
28547         PR target/78875
28548         PR target/79140
28549         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
28550         define to rs6000_init_stack_protect_guard.
28551         (rs6000_init_stack_protect_guard): New function.
28553 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
28554             Yunqiang Su  <yunqiang.su@imgtec.com>
28556         * config.gcc (supported_defaults): Add madd4.
28557         (with_madd4): Add validation.
28558         (all_defaults): Add madd4.
28559         * config/mips/mips.opt (mmadd4): New option.
28560         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
28561         mmadd4.
28562         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
28563         __mips_no_madd4.
28564         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
28565         (ISA_HAS_FUSED_MADD4): Likewise.
28566         * doc/invoke.texi (-mmadd4): Document the new option.
28567         * doc/install.texi (--with-madd4): Document the new option.
28569 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28571         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
28572         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
28573         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
28574         (aarch64_init_pauth_hint_builtins): New.
28575         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
28576         (aarch64_expand_builtin): Expand new builtins.
28578 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28580         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
28581         * combine-stack-adj.c (no_unhandled_cfa): Handle
28582         REG_CFA_TOGGLE_RA_MANGLE.
28583         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
28584         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
28585         info for return address signing.
28586         (aarch64_expand_epilogue): Likewise.
28588 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28590         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
28591         * config/aarch64/aarch64-protos.h
28592         (aarch64_return_address_signing_enabled): New declaration.
28593         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
28594         New function.
28595         (aarch64_expand_prologue): Sign return address before it's pushed onto
28596         stack.
28597         (aarch64_expand_epilogue): Authenticate return address fetched from
28598         stack.
28599         (aarch64_override_options): Sanity check for ILP32 and ISA level.
28600         (aarch64_attributes): New function attributes for "sign-return-address".
28601         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
28602         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
28603         ("*do_return"): Generate combined instructions according to key index.
28604         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
28605         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
28606         iterators.
28607         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
28608         * config/aarch64/aarch64.opt (msign-return-address=): New.
28609         * doc/extend.texi (AArch64 Function Attributes): Documents
28610         "sign-return-address=".
28611         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
28613 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
28615         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
28616         overall option summary.
28618 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28620         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
28621         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
28622         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
28623         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
28625 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
28627         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
28628         -mpower9-minmax by default for -mcpu=power9.
28629         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
28630         128-bit floating point.
28632 2017-01-20  Alan Modra  <amodra@gmail.com>
28634         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
28635         optimizing for size.
28637 2017-01-20  Alan Modra  <amodra@gmail.com>
28639         PR target/79144
28640         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
28641         for strcmp and strncmp from corresponding builtin decl.
28643 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
28645         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
28646         instead of i386/rtems-64.h.
28647         * config/i386/rtems-64.h: Remove.
28649 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
28651         PR target/78478
28652         Revert:
28653         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
28655         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
28657 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
28659         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
28660         Change int to HOST_WIDE_INT.
28661         * config/aarch64/aarch64-protos.h
28662         (aarch64_simd_gen_const_vector_dup): Likewise.
28663         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
28665 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
28667         * langhooks-def.h (lhd_type_for_size): New decl.
28668         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
28669         * langhooks.c (lhd_type_for_size): New function, taken from
28670         lto_type_for_size.
28672 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
28674         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
28675         define_bypass for CR latency.
28676         (power9-cracked-alu): Update bypass latency and remove power9-branch.
28677         (power9-alu2): Add define_bypass for CR latency.
28678         (power9-cmp): New.
28679         (power9-mul): Update insn latency.
28680         (power9-mul-compare): Update insn latency, bypass latency and remove
28681         power9-branch.
28683 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28685         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
28686         Delete.
28687         * config/aarch64/aarch64.md
28688         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
28689         aarch64_nopcrelative_literal_loads.
28690         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
28692 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
28694         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
28695         TARGET_LOONGSON_3A.
28696         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
28698 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
28700         PR target/78176
28701         * config.gcc (supported_defaults): Add lxc1-sxc1.
28702         (with_lxc1_sxc1): Add validation.
28703         (all_defaults): Add lxc1-sxc1.
28704         * config/mips/mips.opt (mlxc1-sxc1): New option.
28705         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
28706         mlxc1-sxc1.
28707         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
28708         __mips_no_lxc1_sxc1.
28709         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
28710         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
28711         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
28713 2017-01-19  Richard Biener  <rguenther@suse.de>
28715         PR tree-optimization/72488
28716         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
28717         sure to restore SSA info.
28718         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
28720 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
28722         PR rtl-optimization/79121
28723         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
28724         of the inner type when shifting an extended value.
28726 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
28728         PR lto/78407
28729         * symtab.c (symtab_node::equal_address_to): Fix comparing of
28730         interposable aliases.
28732 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
28734         PR target/78516
28735         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
28736         Use the evmergelohi instruction.
28737         (mov_si<mode>_e500_subreg4_2_le): Likewise.
28738         (mov_sitf_e500_subreg8_2_be): Likewise.
28739         (mov_sitf_e500_subreg12_2_le): Likewise.
28740         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
28741         (mov_si<mode>_e500_subreg4_2_be): Likewise.
28742         (mov_sitf_e500_subreg8_2_le): Likewise.
28743         (mov_sitf_e500_subreg12_2_be): Likewise.
28745 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28747         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
28748         attribute from vecsimple to vecperm.
28749         (altivec_vbpermq2): Likewise.
28751 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28753         PR target/79040
28754         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
28756 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28757         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
28758         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
28759         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
28760         case where N arg is SIZE_MAX.
28761         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
28762         (cmpstrsi): Add pattern.
28764 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
28766         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
28767         __builtin_vec_revb builtins.
28768         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
28769         built-in functions to support generation of the ISA 3.0 XXBR<x>
28770         vector byte reverse instructions.
28771         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
28772         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
28773         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
28774         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
28775         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
28776         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
28777         (P9V_BUILTIN_VEC_REVB): Likewise.
28778         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
28779         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
28780         (p9_xxbrq_v16qi): Likewise.
28781         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
28782         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
28783         (p9_xxbrh_v8hi): Likewise.
28784         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
28785         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
28786         vec_revb built-in functions.
28788 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
28790         PR rtl-optimization/78952
28791         * config/i386/i386.md (any_extract): New code iterator.
28792         (*insvqi_2): Use any_extract for source operand.
28793         (*insvqi_3): Use any_shiftrt for source operand.
28795 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
28797         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
28798         New function.
28799         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
28801 2017-01-18  Matthias Klose  <doko@ubuntu.com>
28803         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
28805 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28807         * config/rs6000/altivec.h (vec_bperm): Change #define.
28808         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
28809         (altivec_vbpermq2): New define_insn.
28810         (altivec_vbpermd): Likewise.
28811         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
28812         function interface.
28813         (VBPERMD): Likewise.
28814         (VBPERM): New polymorphic function interface.
28815         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
28816         Add entries for P9V_BUILTIN_VEC_VBPERM.
28817         * doc/extend.texi: Add interfaces for vec_bperm.
28819 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28821         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
28822         first letter of error messages.
28823         (s390_resolve_overloaded_builtin): Likewise.
28824         * config/s390/s390.c (s390_expand_builtin): Likewise.
28825         (s390_invalid_arg_for_unprototyped_fn): Likewise.
28826         (s390_valid_target_attribute_inner_p): Likewise.
28827         * config/s390/s390.md ("tabort"): Likewise.
28829 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
28831         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
28832         (ISA_AVOID_DIV_HILO): New macro.
28833         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
28834         (ISA_HAS_DDIV): Likewise.
28836 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28838         * doc/invoke.texi (fabi-version): Correct number of occurrences.
28840 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28842         * doc/invoke.texi (fabi-version): Spelling fix.
28844 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28846         PR c++/70182
28847         * doc/invoke.texi (fabi-version): Mention mangling fix for
28848         operator names.
28850 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28852         PR c++/77489
28853         * doc/invoke.texi (fabi-version): Document discriminator mangling.
28855 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
28857         PR target/78875
28858         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
28859         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
28860         the new options.
28861         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
28862         flexible settings.
28863         (stack_protect_test): Ditto.
28864         * config/rs6000/rs6000.opt (mstack-protector-guard=,
28865         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
28866         options.
28867         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
28868         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
28869         -mstack-protector-guard-offset=.
28870         (RS/6000 and PowerPC Options): Ditto.
28872 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
28874         * config/i386/i386.h (MASK_CLASS_P): New define.
28875         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
28876         there are no registers from different register sets also when
28877         mask registers are used.  Update function comment.
28878         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
28879         to (*k/*r) and (*k/*km) alternatives.
28881 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
28883         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
28884         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
28885         (EH_RETURN_HANDLER_RTX): New define.
28886         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
28887         Force frame pointer in EH return functions.
28888         (aarch64_expand_epilogue): Add barrier for eh_return.
28889         (aarch64_final_eh_return_addr): Remove.
28890         (aarch64_eh_return_handler_rtx): New function.
28891         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
28892         Remove.
28893         (aarch64_eh_return_handler_rtx): New prototype.
28895 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28897         * config/rs6000/altivec.h (vec_rlmi): New #define.
28898         (vec_vrlnm): Likewise.
28899         (vec_rlnm): Likewise.
28900         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
28901         (UNSPEC_VRLNM): Likewise.
28902         (VIlong): New mode iterator.
28903         (altivec_vrl<VI_char>mi): New define_insn.
28904         (altivec_vrl<VI_char>nm): Likewise.
28905         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
28906         function entry.
28907         (VRLDNM): Likewise.
28908         (RLNM): New polymorphic function entry.
28909         (VRLWMI): New monomorphic function entry.
28910         (VRLDMI): Likewise.
28911         (RLMI): New polymorphic function entry.
28912         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
28913         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
28914         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
28915         vec_vrlnm.
28917 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
28919         PR debug/78839
28920         * dwarf2out.c (field_byte_offset): Restore the
28921         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
28922         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
28923         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
28924         of build2 + fold.
28926 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
28928         PR ada/67205
28929         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
28931 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
28933         PR debug/71669
28934         * dwarf2out.c (add_data_member_location_attribute): For constant
28935         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
28936         instead of DW_AT_data_member_location, DW_AT_bit_offset and
28937         DW_AT_byte_size attributes.
28939 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
28941         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
28942         after forcing to constant memory when the code model is medium.
28944 2017-01-17  Julia Koval  <julia.koval@intel.com>
28946         PR target/76731
28947         * config/i386/avx512fintrin.h
28948         (_mm512_i32gather_ps): Change __addr type to void const*.
28949         (_mm512_mask_i32gather_ps): Ditto.
28950         (_mm512_i32gather_pd): Ditto.
28951         (_mm512_mask_i32gather_pd): Ditto.
28952         (_mm512_i64gather_ps): Ditto.
28953         (_mm512_mask_i64gather_ps): Ditto.
28954         (_mm512_i64gather_pd): Ditto.
28955         (_mm512_mask_i64gather_pd): Ditto.
28956         (_mm512_i32gather_epi32): Ditto.
28957         (_mm512_mask_i32gather_epi32): Ditto.
28958         (_mm512_i32gather_epi64): Ditto.
28959         (_mm512_mask_i32gather_epi64): Ditto.
28960         (_mm512_i64gather_epi32): Ditto.
28961         (_mm512_mask_i64gather_epi32): Ditto.
28962         (_mm512_i64gather_epi64): Ditto.
28963         (_mm512_mask_i64gather_epi64): Ditto.
28964         (_mm512_i32scatter_ps): Change __addr type to void*.
28965         (_mm512_mask_i32scatter_ps): Ditto.
28966         (_mm512_i32scatter_pd): Ditto.
28967         (_mm512_mask_i32scatter_pd): Ditto.
28968         (_mm512_i64scatter_ps): Ditto.
28969         (_mm512_mask_i64scatter_ps): Ditto.
28970         (_mm512_i64scatter_pd): Ditto.
28971         (_mm512_mask_i64scatter_pd): Ditto.
28972         (_mm512_i32scatter_epi32): Ditto.
28973         (_mm512_mask_i32scatter_epi32): Ditto.
28974         (_mm512_i32scatter_epi64): Ditto.
28975         (_mm512_mask_i32scatter_epi64): Ditto.
28976         (_mm512_i64scatter_epi32): Ditto.
28977         (_mm512_mask_i64scatter_epi32): Ditto.
28978         (_mm512_i64scatter_epi64): Ditto.
28979         (_mm512_mask_i64scatter_epi64): Ditto.
28980         * config/i386/avx512pfintrin.h
28981         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
28982         (_mm512_mask_prefetch_i32gather_ps): Ditto.
28983         (_mm512_mask_prefetch_i64gather_pd): Ditto.
28984         (_mm512_mask_prefetch_i64gather_ps): Ditto.
28985         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
28986         (_mm512_prefetch_i32scatter_ps): Ditto.
28987         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
28988         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
28989         (_mm512_prefetch_i64scatter_pd): Ditto.
28990         (_mm512_prefetch_i64scatter_ps): Ditto.
28991         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
28992         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
28993         * config/i386/avx512vlintrin.h
28994         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
28995         (_mm_mmask_i32gather_ps): Ditto.
28996         (_mm256_mmask_i32gather_pd): Ditto.
28997         (_mm_mmask_i32gather_pd): Ditto.
28998         (_mm256_mmask_i64gather_ps): Ditto.
28999         (_mm_mmask_i64gather_ps): Ditto.
29000         (_mm256_mmask_i64gather_pd): Ditto.
29001         (_mm_mmask_i64gather_pd): Ditto.
29002         (_mm256_mmask_i32gather_epi32): Ditto.
29003         (_mm_mmask_i32gather_epi32): Ditto.
29004         (_mm256_mmask_i32gather_epi64): Ditto.
29005         (_mm_mmask_i32gather_epi64): Ditto.
29006         (_mm256_mmask_i64gather_epi32): Ditto.
29007         (_mm_mmask_i64gather_epi32): Ditto.
29008         (_mm256_mmask_i64gather_epi64): Ditto.
29009         (_mm_mmask_i64gather_epi64): Ditto.
29010         (_mm256_i32scatter_ps): Change __addr type to void*.
29011         (_mm256_mask_i32scatter_ps): Ditto.
29012         (_mm_i32scatter_ps): Ditto.
29013         (_mm_mask_i32scatter_ps): Ditto.
29014         (_mm256_i32scatter_pd): Ditto.
29015         (_mm256_mask_i32scatter_pd): Ditto.
29016         (_mm_i32scatter_pd): Ditto.
29017         (_mm_mask_i32scatter_pd): Ditto.
29018         (_mm256_i64scatter_ps): Ditto.
29019         (_mm256_mask_i64scatter_ps): Ditto.
29020         (_mm_i64scatter_ps): Ditto.
29021         (_mm_mask_i64scatter_ps): Ditto.
29022         (_mm256_i64scatter_pd): Ditto.
29023         (_mm256_mask_i64scatter_pd): Ditto.
29024         (_mm_i64scatter_pd): Ditto.
29025         (_mm_mask_i64scatter_pd): Ditto.
29026         (_mm256_i32scatter_epi32): Ditto.
29027         (_mm256_mask_i32scatter_epi32): Ditto.
29028         (_mm_i32scatter_epi32): Ditto.
29029         (_mm_mask_i32scatter_epi32): Ditto.
29030         (_mm256_i32scatter_epi64): Ditto.
29031         (_mm256_mask_i32scatter_epi64): Ditto.
29032         (_mm_i32scatter_epi64): Ditto.
29033         (_mm_mask_i32scatter_epi64): Ditto.
29034         (_mm256_i64scatter_epi32): Ditto.
29035         (_mm256_mask_i64scatter_epi32): Ditto.
29036         (_mm_i64scatter_epi32): Ditto.
29037         (_mm_mask_i64scatter_epi32): Ditto.
29038         (_mm256_i64scatter_epi64): Ditto.
29039         (_mm256_mask_i64scatter_epi64): Ditto.
29040         (_mm_i64scatter_epi64): Ditto.
29041         (_mm_mask_i64scatter_epi64): Ditto.
29042         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
29043         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
29044         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
29045         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
29046         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
29047         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
29048         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
29049         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
29050         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
29051         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
29052         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
29053         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
29054         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
29055         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
29056         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
29057         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
29058         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
29059         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
29060         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
29061         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
29062         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
29063         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
29064         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
29065         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
29066         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
29067         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
29068         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
29069         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
29070         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
29071         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
29072         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
29073         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
29074         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
29075         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
29076         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
29077         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
29078         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
29079         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
29080         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
29081         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
29082         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
29083         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
29084         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
29085         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
29086         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
29087         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
29088         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
29089         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
29090         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
29091         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
29092         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
29093         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
29094         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
29095         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
29096         definitions accordingly.
29098 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
29099             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
29101         PR target/79079
29102         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
29103         gen_lowpart.
29105 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
29107         PR target/79058
29108         * ira-conflicts.c (ira_build_conflicts): Update total conflict
29109         hard regs for inner regno.
29111 2017-01-17  Martin Liska  <mliska@suse.cz>
29113         PR ipa/71207
29114         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
29115         assumption and add comment.
29117 2017-01-17  Nathan Sidwell  <nathan@acm.org>
29119         * ipa-visibility.c (localize_node): New function, broken out of ...
29120         (function_and_variable_visibility): ... here. Call it.
29122 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
29124         PR middle-end/77445
29125         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
29126         correctly set frequency of oudgoing edge.
29127         (duplicate_thread_path): Fix profile updating.
29129 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
29131         PR other/79046
29132         * configure.ac: Add GCC_BASE_VER.
29133         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
29134         version from BASE-VER file.
29135         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
29136         (gcc.o): Depend on $(BASEVER).
29137         * common.opt (dumpfullversion): New option.
29138         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
29139         * doc/invoke.texi: Document -dumpfullversion.
29140         * doc/install.texi: Document --with-gcc-major-version-only.
29141         * configure: Regenerated.
29143 2017-01-17  Richard Biener  <rguenther@suse.de>
29145         PR tree-optimization/71433
29146         * tree-vrp.c (register_new_assert_for): Merge same asserts
29147         on all incoming edges.
29148         (process_assert_insertions_for): Handle insertions at the
29149         beginning of BBs.
29151 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
29153         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
29154         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
29156 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
29158         PR target/78633
29159         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
29160         RTL sharing.
29162 2017-01-17  Alan Modra  <amodra@gmail.com>
29164         PR target/79066
29165         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
29166         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
29167         symbolic stack limit when pic.
29169 2017-01-16  Martin Sebor  <msebor@redhat.com>
29171         PR tree-optimization/78608
29172         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
29174 2017-01-16  Jeff Law  <law@redhat.com>
29176         Revert:
29177         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
29178         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
29179         for several include directories that may be relative to sysroot.
29180         * config/i386/x-mingw32 (gplus_includedir): Define.
29181         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
29182         (native_system_includedir): Likewise.
29183         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
29184         override if TARGET_SYSTEM_ROOT is defined.
29185         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
29187         PR tree-optimization/79090
29188         PR tree-optimization/33562
29189         PR tree-optimization/61912
29190         PR tree-optimization/77485
29191         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
29192         and computed trims into the dump file.
29194 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
29196         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
29198 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
29200         PR c/79089
29201         * gimplify.c (gimplify_init_constructor): If want_value and
29202         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
29203         fix.
29205         PR target/79080
29206         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
29207         sequence.  Formatting fixes.
29208         (doloop_optimize): Formatting fixes.
29210         PR driver/49726
29211         * gcc.c (debug_level_greater_than_spec_func): New function.
29212         (static_spec_functions): Add debug-level-gt spec function.
29213         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
29214         !g0.
29215         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
29216         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
29217         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
29218         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
29219         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
29220         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
29222 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
29224         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
29225         QImode fixups to general and mask registers only.
29227 2017-01-16  Carl Love  <cel@us.ibm.com>
29229         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
29230         for built-in functions
29231         vector signed char vec_nabs (vector signed char)
29232         vector signed short vec_nabs (vector signed short)
29233         vector signed int vec_nabs (vector signed int)
29234         vector signed long long vec_nabs (vector signed long long)
29235         vector float vec_nabs (vector float)
29236         vector double vec_nabs (vector double)
29237         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
29238         and NABS overload.
29239         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
29240         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
29241         * doc/extend.texi: Update the documentation file for the new built-in
29242         functions.
29244 2017-01-16  Martin Sebor  <msebor@redhat.com>
29246         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
29247         message.
29249 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29251         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
29252         UNSPEC_VSX__XXSPLTD to require special splat handling.
29254 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
29256         PR bootstrap/78616
29257         * system.h: Poison strndup.
29259 2017-01-16  Alan Modra  <amodra@gmail.com>
29261         PR target/79098
29262         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
29263         use a switch.
29265 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
29267         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
29269 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
29271         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
29272         call recog here.  Assert that INSN_CODE (insn) is non-negative.
29274 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29276         PR target/72749
29277         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
29278         fallthrough.
29279         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
29280         in the currently scheduled RTL fragment.
29282 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29284         PR rtl-optimization/78751
29285         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
29286         give up.
29288 2017-01-14  Jeff Law  <law@redhat.com>
29290         PR tree-optimization/79090
29291         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
29292         variable length stores.
29293         (compute_trims): Delete dead assignment to *trim_tail.
29294         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
29295         zero length.
29297 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
29299         PR rtl-optimization/78626
29300         PR rtl-optimization/78727
29301         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
29302         of a block, and split such blocks after everything else is finished.
29304 2017-01-14  Alan Modra  <amodra@gmail.com>
29306         PR target/72749
29307         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
29308         target legitimate_combined_insn.
29309         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
29310         (rs6000_legitimate_combined_insn): New function.
29311         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
29312         all uses.
29313         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
29314         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
29315         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
29317 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
29319         * doc/frontends.texi (G++ and GCC): Remove references to Java.
29321 2017-01-13  Jeff Law  <law@redhat.com>
29323         PR tree-optimization/33562
29324         PR tree-optimization/61912
29325         PR tree-optimization/77485
29326         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
29327         a statement.
29328         (delete_dead_assignment): Likewise.
29329         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
29330         statement to delete_dead_call and delete_dead_assignment.
29332 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
29334         PR c/78304
29335         * substring-locations.c (format_warning_va): Strengthen case 1 so
29336         that both endpoints of the substring must be within the format
29337         range for just the substring to be printed.
29339 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
29341         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
29342         * config/i386/i386.c (ix86_target_string): Add missing options
29343         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
29344         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
29345         flags_other and ix86_target_other to flags2_other.  Display unknown
29346         isa2 options.
29347         (ix86_valid_target_attribute_inner_p): Add missing options and
29348         reorder options by implied ISAs, as in ix86_target_string.
29350 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
29352         * hash-table.h (hash_table::too_empty_p): New function.
29353         (hash_table::expand): Use it.
29354         (hash_table::traverse): Likewise.
29355         (hash_table::empty_slot): Use sizeof (value_type) instead of
29356         sizeof (PTR) to convert bytes to elements.  Shrink the table
29357         if the current size is excessive for the current number of
29358         elements.
29360 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
29362         * ira-costs.c (record_reg_classes): Break from the inner loop
29363         early once alt_fail is known to be true.  Update outer loop
29364         handling accordingly.
29366 2017-01-13  Jeff Law  <law@redhat.com>
29368         * tree-ssa-dse.c (decrement_count): New function.
29369         (increment_start_addr, maybe_trim_memstar_call): Likewise.
29370         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
29371         when we know the partially dead statement is a mem* function.
29373         PR tree-optimization/61912
29374         PR tree-optimization/77485
29375         * tree-ssa-dse.c: Include expr.h.
29376         (maybe_trim_constructor_store): New function.
29377         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
29379         PR tree-optimization/33562
29380         PR tree-optimization/61912
29381         PR tree-optimization/77485
29382         * doc/invoke.texi: Document new dse-max-object-size param.
29383         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
29384         * tree-ssa-dse.c: Include params.h.
29385         (dse_store_status): New enum.
29386         (initialize_ao_ref_for_dse): New, partially extracted from
29387         dse_optimize_stmt.
29388         (valid_ao_ref_for_dse, normalize_ref): New.
29389         (setup_live_bytes_from_ref, compute_trims): Likewise.
29390         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
29391         (maybe_trim_partially_dead_store): Likewise.
29392         (maybe_trim_complex_store): Likewise.
29393         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
29394         Track what bytes live from the original store.  Return tri-state
29395         for dead, partially dead or live.
29396         (dse_dom_walker): Add constructor, destructor and new private members.
29397         (delete_dead_call, delete_dead_assignment): New extracted from
29398         dse_optimize_stmt.
29399         (dse_optimize_stmt): Make a member of dse_dom_walker.
29400         Use initialize_ao_ref_for_dse.
29402         PR tree-optimization/33562
29403         PR tree-optimization/61912
29404         PR tree-optimization/77485
29405         * sbitmap.h (bitmap_count_bits): Prototype.
29406         (bitmap_clear_range, bitmap_set_range): Likewise.
29407         * sbitmap.c (bitmap_clear_range): New function.
29408         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
29410 2017-01-13  Martin Liska  <mliska@suse.cz>
29412         PR ipa/79043
29413         * function.c (set_cfun): Add new argument force.
29414         * function.h (set_cfun): Likewise.
29415         * ipa-inline-transform.c (inline_call): Use the function when
29416         strict alising from is dropped for function we inline to.
29418 2017-01-13  Richard Biener  <rguenther@suse.de>
29420         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
29421         for dumping GIMPLE INTEGER_CSTs.
29423 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29425         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
29426         to 201112L since C++17.
29428 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
29430         PR sanitizer/78887
29431         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
29432         if -fsanitize=kernel-address is present.
29434 2017-01-13  Richard Biener  <rguenther@suse.de>
29436         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
29437         as _Literal ( type ) number in case usual suffixes do not
29438         preserve all information.
29440 2017-01-13  Richard Biener  <rguenther@suse.de>
29442         PR tree-optimization/77283
29443         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
29444         and ssa-iterators.h.
29445         (is_feasible_trace): Implement a cost model based on joiner
29446         PHI node uses.
29448 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
29450         PR target/79004
29451         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
29452         char or short to __float128/_Float128 directly.
29454 2017-01-12  Martin Sebor  <msebor@redhat.com>
29456         to -Wformat-overflow.
29457         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
29458         (min_bytes_remaining): Same.
29459         (get_string_length): Same.
29460         (format_string): Same.
29461         (format_directive): Same.
29462         (add_bytes): Same.
29463         (pass_sprintf_length::handle_gimple_call): Same.
29465 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
29467         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
29468         info.nowrite calls with no lhs that can't throw.  Return bool
29469         whether gsi_remove has been called or not.
29470         (pass_sprintf_length::handle_gimple_call): Return bool whether
29471         try_substitute_return_value called gsi_remove.  Formatting fix.
29472         (pass_sprintf_length::execute): Don't use gsi_remove if
29473         handle_gimple_call returned true.
29475         PR bootstrap/79069
29476         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
29477         be removed due to side-effects, don't remove following barrier nor
29478         turn the successor edge into fallthru edge.
29480 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29482         PR target/79044
29483         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
29484         element-reversing loads and stores as not swappable.
29486 2017-01-12  Nathan Sidwell  <nathan@acm.org>
29487             Nicolai Stange  <nicstange@gmail.com>
29489         * combine.c (try_combine): Don't ignore result of overlap checking
29490         loop.  Combine overlap & asm check into single loop.
29492 2017-01-12  Richard Biener  <rguenther@suse.de>
29494         * tree-pretty-print.c (dump_generic_node): Provide -gimple
29495         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
29497 2017-01-12  Richard Biener  <rguenther@suse.de>
29499         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
29500         and TS_TARGET_OPTION directly derive from TS_BASE.
29501         * tree-core.h (tree_optimization_option): Derive from tree_base.
29502         (tree_target_option): Likewise.
29504 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
29506         * config/i386/i386.c (memory_address_length): Increase len
29507         only when rip_relative_addr_p returns false.
29509 2017-01-11  Julia Koval  <julia.koval@intel.com>
29511         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
29512         (OPTION_MASK_ISA_SGX_SET): New.
29513         (ix86_handle_option): Handle OPT_msgx.
29514         * config.gcc: Added sgxintrin.h.
29515         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
29516         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
29517         * config/i386/i386.c (ix86_target_string): Add -msgx.
29518         (PTA_SGX): New.
29519         (ix86_option_override_internal): Handle new options.
29520         (ix86_valid_target_attribute_inner_p): Add sgx.
29521         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
29522         * config/i386/i386.opt: Add msgx.
29523         * config/i386/sgxintrin.h: New file.
29524         * config/i386/x86intrin.h: Add sgxintrin.h.
29526 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
29528         PR c++/71537
29529         * fold-const.c (maybe_nonzero_address): Return 1 for function
29530         local objects.
29531         (tree_single_nonzero_warnv_p): Don't handle function local objects
29532         here.
29534         PR c++/72813
29535         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
29536         of c-header.
29538 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
29540         PR driver/78877
29541         * opts.c: Include "spellcheck.h"
29542         (struct string_fragment): New struct.
29543         (struct edit_distance_traits<const string_fragment &>): New
29544         struct.
29545         (get_closest_sanitizer_option): New function.
29546         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
29548 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
29550         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
29551         by 12.
29552         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
29553         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
29554         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
29555         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
29556         for initial die_offset if dwarf_split_debug_info.
29557         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
29558         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
29559         fields.
29560         (output_skeleton_debug_sections): Formatting fix.  Use
29561         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
29562         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
29564 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
29566         * config/arm/cortex-a53.md: Add bypasses for
29567         cortex_a53_r2f_cvt.
29568         (cortex_a53_r2f): Only use for transfers.
29569         (cortex_a53_f2r): Likewise.
29570         (cortex_a53_r2f_cvt): Add reservation for conversions.
29571         (cortex_a53_f2r_cvt): Likewise.
29573 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
29575         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
29576         to all inlined functions, change static to extern.
29578 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
29580         PR target/78253
29581         * config/arm/arm.c (legitimize_pic_address): Handle reference to
29582         weak symbol.
29583         (arm_assemble_integer): Likewise.
29585 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
29587         * config.gcc: Use new awk script to check CPU, FPU and architecture
29588         parameters for --with-... options.
29589         * config/arm/parsecpu.awk: New file
29590         * config/arm/arm-cpus.in: New file.
29591         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
29592         files.
29593         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
29594         files.
29595         * config/arm/t-arm: Update dependency rules.
29596         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
29597         of processing .def files.
29598         * config/arm/genopt.sh: Deleted.
29599         * config/arm/gentune.sh: Deleted.
29600         * config/arm/arm-cores.def: Deleted.
29601         * config/arm/arm-arches.def: Deleted.
29602         * config/arm/arm-fpus.def: Deleted.
29603         * config/arm/arm-tune.md: Regenerated.
29604         * config/arm/arm-tables.opt: Regenerated.
29605         * config/arm/arm-cpu.h: New generated file.
29606         * config/arm/arm-cpu-data.h: New generated file.
29607         * config/arm/arm-cpu-cdata.h: New generated file.
29609 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
29611         PR lto/79042
29612         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
29613         bit.
29614         (input_varpool_node): Unpack dynamically_initialized bit.
29616 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
29618         PR rtl-optimization/79032
29619         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
29620         the alignment of the adjusted memory reference against that of MODE,
29621         instead of the alignment of the original memory reference.
29623 2017-01-11  Martin Jambor  <mjambor@suse.cz>
29625         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
29626         test.
29627         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
29628         decorated functions.
29630 2017-01-11  Richard Biener  <rguenther@suse.de>
29632         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
29633         set range/nonnull info for PHI results.  Do not set it on
29634         stmts marked for removal.
29636 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
29638         * expr.c (store_field): In the bitfield case, fetch the return value
29639         from the registers before applying a single big-endian adjustment.
29640         Always do a final load for a BLKmode value not larger than a word.
29642 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
29644         PR c++/77949
29645         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
29646         that we correctly handle column numbers greater than
29647         LINE_MAP_MAX_COLUMN_NUMBER.
29649 2017-01-10  Martin Sebor  <msebor@redhat.com>
29651         PR middle-end/78245
29652         * gimple-ssa-sprintf.c (get_destination_size): Call
29653         {init,fini}object_sizes.
29654         * tree-object-size.c (addr_object_size): Adjust.
29655         (pass_through_call): Adjust.
29656         (pass_object_sizes::execute): Adjust.
29657         * tree-object-size.h (fini_object_sizes): Declare.
29659 2017-01-10  Martin Sebor  <msebor@redhat.com>
29661         PR tree-optimization/78775
29662         * builtins.c (get_size_range): Move...
29663         * calls.c: ...to here.
29664         (alloc_max_size): Accept zero argument.
29665         (operand_signed_p): Remove.
29666         (maybe_warn_alloc_args_overflow): Call get_size_range.
29667         * calls.h (get_size_range): Declare.
29669 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
29671         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
29672         from TI's devices.csv file as of September 2016.
29673         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
29675 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
29677         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
29678         * doc/invoke.texi: Likewise.
29679         * doc/md.texi: Likewise.
29680         * doc/objc.texi: Likewise.
29682 2017-01-10  Joshua Conner  <joshconner@google.com>
29684         * config/arm/fuchsia-elf.h: New file.
29685         * config/fuchsia.h: New file.
29686         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
29687         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
29688         targets.
29689         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
29691 2016-01-10  Richard Biener  <rguenther@suse.de>
29693         PR tree-optimization/79034
29694         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
29695         Propagate out degenerate PHIs in the joiner.
29697 2017-01-10  Martin Liska  <mliska@suse.cz>
29699         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
29700         (sort_congruence_classes_by_decl_uid): Likewise.
29701         (sort_congruence_class_groups_by_decl_uid): Likewise.
29702         (sem_item_optimizer::merge_classes): Sort class, groups in these
29703         classes and members in the groups by DECL_UID of declarations.
29704         This would make merge operations stable.
29706 2017-01-10  Martin Liska  <mliska@suse.cz>
29708         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
29709         usage of m_classes_vec.
29710         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
29711         (sem_item_optimizer::get_group_by_hash): Likewise.
29712         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
29713         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
29714         (sem_item_optimizer::verify_classes): Likewise.
29715         (sem_item_optimizer::process_cong_reduction): Likewise.
29716         (sem_item_optimizer::dump_cong_classes): Likewise.
29717         (sem_item_optimizer::merge_classes): Likewise.
29718         * ipa-icf.h (congruence_class_hash): Rename from
29719         congruence_class_group_hash.  Remove declaration of m_classes_vec.
29721 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
29723         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
29724         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
29725         * config.gcc: Add avx512vpopcntdqintrin.h.
29726         * config/i386/avx512vpopcntdqintrin.h: New.
29727         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
29728         * config/i386/i386-builtin-types.def: Add new types.
29729         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
29730         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
29731         __builtin_ia32_vpopcountq_v8di_mask): New.
29732         * config/i386/i386-c.c (ix86_target_macros_internal): Define
29733         __AVX512VPOPCNTDQ__.
29734         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
29735         (PTA_AVX512VPOPCNTDQ): Define.
29736         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
29737         TARGET_AVX512VPOPCNTDQ_P): Define.
29738         * config/i386/i386.opt: Add mavx512vpopcntdq.
29739         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
29740         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
29742 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
29744         PR middle-end/77484
29745         * predict.def (PRED_CALL): Set to 67.
29747 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
29749         * expr.c (store_field): In the bitfield case, if the value comes from
29750         a function call and is of an aggregate type returned in registers, do
29751         not modify the field mode; extract the value in all cases if the mode
29752         is BLKmode and the size is not larger than a word.
29754 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
29756         PR target/71017
29757         * config/i386/cpuid.h: Fix undefined behavior.
29759 2017-01-04  Jeff Law  <law@redhat.com>
29761         PR tree-optimization/79007
29762         PR tree-optimization/67955
29763         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
29764         conservative for pt.null when flag_non_call_exceptions is on.
29766 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
29768         PR translation/79019
29769         PR translation/79020
29770         * params.def (PARAM_INLINE_MIN_SPEEDUP,
29771         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
29772         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
29773         in descriptions.
29774         * config/avr/avr.opt (maccumulate-args): Likewise.
29775         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
29776         * common.opt (freport-bug): Likewise.
29777         * cif-code.def (CIF_FINAL_ERROR): Likewise.
29778         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
29779         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
29780         translatable string.
29781         * config/i386/i386.c (function_value_32): Likewise.
29782         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
29783         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
29784         Likewise.
29785         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
29786         * common/config/msp430/msp430-common.c (msp430_handle_option):
29787         Likewise.
29788         * symtab.c (symtab_node::verify_base): Likewise.
29789         * opts.c (set_debug_level): Likewise.
29790         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
29791         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
29792         missing whitespace to translatable strings.
29793         * config/avr/avr.md (bswapsi2): Fix typo in comment.
29794         * config/sh/superh.h: Likewise.
29795         * config/i386/xopintrin.h: Likewise.
29796         * config/i386/znver1.md: Likewise.
29797         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
29798         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
29799         * double-int.h (struct double_int): Likewise.
29800         * double-int.c (div_and_round_double): Likewise.
29801         * wide-int.cc: Likewise.
29802         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
29803         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
29804         * cfgcleanup.c (crossjumps_occured): Renamed to ...
29805         (crossjumps_occurred): ... this.
29806         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
29807         Adjust all uses.
29809         PR tree-optimization/78899
29810         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
29811         returning bool return struct loop *, NULL for failure and the new
29812         loop on success.
29813         (versionable_outer_loop_p): Don't version outer loop if it has
29814         dont_vectorized bit set.
29815         (tree_if_conversion): When versioning outer loop, ensure
29816         tree_if_conversion is performed also on the inner loop of the
29817         non-vectorizable outer loop copy.
29818         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
29819         LOOP_VECTORIZED in inner loop of the scalar outer loop and
29820         prevent vectorization of it.
29821         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
29822         the outer loop vectorization of the non-scalar version is attempted
29823         before vectorization of the inner loop in scalar version.  If
29824         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
29825         vectorization of its inner loop.
29826         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
29827         has 2 inner loops, rename also on edges from bb whose single pred
29828         is outer_loop->header.  Fix typo in function comment.
29830 2017-01-09  Martin Sebor  <msebor@redhat.com>
29832         PR bootstrap/79033
29833         * asan.c (asan_emit_stack_protection): Increase local buffer size
29834         to avoid snprintf truncation warning.
29836 2017-01-09  Andrew Pinski  <apinski@cavium.com>
29838         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
29839         to reference thunderx2t99 for the tuning structure
29840         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
29841         Rename to ...
29842         (thunderx2t99_extra_costs): This.
29843         * config/aarch64/aarch64-tune.md: Regenerate.
29844         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
29845         (vulcan_addrcost_table): This.
29846         (vulcan_regmove_cost): Rename to ...
29847         (thunderx2t99_regmove_cost): This.
29848         (vulcan_vector_cost): Rename to ...
29849         (thunderx2t99_vector_cost): this.
29850         (vulcan_branch_cost): Rename to ...
29851         (thunderx2t99_branch_cost): This.
29852         (vulcan_tunings): Rename to ...
29853         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
29854         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
29856 2017-01-09  Martin Jambor  <mjambor@suse.cz>
29858         PR ipa/78365
29859         PR ipa/78599
29860         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
29861         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
29862         (propagate_vr_accross_jump_function): Use the above function for all
29863         value range computations for pass-through jump functions and type
29864         converasion from explicit value range values.
29865         (ipcp_propagate_stage): Do not attempt to deduce types of formal
29866         parameters from TYPE_ARG_TYPES.
29867         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
29868         (ipa_write_node_info): Stream type of the actual argument.
29869         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
29871 2017-01-09  Martin Liska  <mliska@suse.cz>
29873         PR pch/78970
29874         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
29875         (lookup_compiler): Do not show error message with have_E.
29877 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
29879         PR tree-optimization/78938
29880         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
29881         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
29882         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
29883         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
29884         fixes.
29886 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29888         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
29889         is const0_rtx.
29891 2017-01-09  Richard Biener  <rguenther@suse.de>
29893         PR tree-optimization/78997
29894         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
29895         name condition properly.
29897 2017-01-09  Richard Biener  <rguenther@suse.de>
29899         PR debug/79000
29900         * dwarf2out.c (is_cxx): New overload with context.
29901         (is_naming_typedef_decl): Use it.
29903 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
29905         * invoke.texi (Option Summary): Correct spacing in option lists
29906         and add line breaks to fix over-long lines.
29908 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
29910         PR middle-end/17660
29912         * extend.texi (Common Variable Attributes): Add xref to GCC
29913         Internals manual to explain mode attribute keywords.
29915 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
29917         PR other/16519
29918         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
29919         and Preprocessor Options.
29920         (Options for Linking): Document -pthread here....
29921         (RS/6000 and PowerPC Options): ...not here.
29922         (Solaris 2 Options): ...or here.
29923         * doc/cppopts.texi: Document -pthread.
29925 2017-01-08  Martin Sebor  <msebor@redhat.com>
29927         PR middle-end/77708
29928         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
29929         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
29930         New member functions.
29931         (format_directive): Used them.
29932         (add_bytes): Same.
29933         (pass_sprintf_length::handle_gimple_call): Same.
29934         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
29935         to avoid truncation for any argument.
29936         (extract_affine_mul): Same.
29937         * tree.c (get_file_function_name): Same.
29939 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
29941         PR middle-end/77484
29942         * predict.def (PRED_INDIR_CALL): Set to 86.
29944 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
29946         PR preprocessor/54124
29947         * doc/cppopts.texi: Reformat -d subtable to list the full name
29948         of the options.  Add cross-reference to the docs for the general
29949         compiler -d options.
29950         * doc/invoke.texi (Developer Options): Add cross-reference to the
29951         preprocessor-specific -d option documentation.
29953 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
29955         PR preprocessor/13498
29956         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
29957         redudant material, and reflect new command-line options.
29958         (System Headers): Likewise.
29960 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
29962         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
29963         -isystem, and -idirafter.  Copy-edit.
29964         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
29965         default for -ftrack-macro-expansion.  Delete obsolete and
29966         badly-formatted implementation details about -fdebug-cpp output.
29967         * doc/cppwarnopts.texi: Copy-edit.
29969 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
29971         PR c++/72803
29972         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
29973         that the transition from a max line width >= 1<<10 to narrower
29974         lines works correctly.
29976 2017-01-07  Alexandre Oliva <aoliva@redhat.com>
29978         * doc/options.texi (PerFunction): New.
29979         * opt-functions.awk (switch_flags): Map both Optimization and
29980         PerFunction to CL_OPTIMIZATION.
29981         * opth-gen.awk: Test for PerFunction flag along with
29982         Optimization.
29983         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
29984         it only when the latter is present.  Skip those that don't in
29985         the hash function generator.
29986         * common.opt (fvar-tracking): Mark as PerFunction instead of
29987         Optimization.
29988         (fvar-tracking-assignments): Likewise.
29989         (fvar-tracking-assignments-toggle): Likewise.
29990         (fvar-tracking-uninit): Likewise.
29992 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
29994         PR translation/79018
29995         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
29996         the and store.
29998 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
30000         PR target/57583
30001         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
30002         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
30003         TARGET_LONG_JUMP_TABLE_OFFSETS.
30004         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
30005         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
30006         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
30007         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
30008         * config/m68k/m68k.md (tablejump expander): Likewise.
30009         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
30010         TARGET_LONG_JUMP_TABLE_OFFSETS.
30011         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
30012         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
30014 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
30015             David Holsgrove <david.holsgrove@xilinx.com>
30017         * common/config/microblaze/microblaze-common.c
30018         (TARGET_EXCEPT_UNWIND_INFO): Remove.
30019         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
30020         New prototype.
30021         * config/microblaze/microblaze.c (microblaze_must_save_register)
30022         (microblaze_expand_epilogue, microblaze_return_addr): Handle
30023         calls_eh_return.
30024         (microblaze_eh_return): New function.
30025         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
30026         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
30027         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
30028         * config/microblaze/microblaze.md (eh_return): New pattern.
30030 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
30032         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
30033         GCC_DIAGNOSTIC_STRINGIFY): Define.
30035         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
30037 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30039         * config/arm/arm.md (<mcrr>): New.
30040         (<mrrc>): New.
30041         * config/arm/arm.c (arm_arch5te): New.
30042         (arm_option_override): Set arm_arch5te.
30043         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
30044         and mrrc2.
30045         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
30046         (arm_mcrr_qualifiers): ... this. New.
30047         (MRRC_QUALIFIERS): Define to...
30048         (arm_mrrc_qualifiers): ... this. New.
30049         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
30050         __arm_mrrc2): New.
30051         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
30052         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
30053         (MRRCI, mrrc, MRRC): New.
30054         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
30055         VUNSPEC_MRRC2): New.
30057 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30059         * config/arm/arm.md (<mcr>): New.
30060         (<mrc>): New.
30061         * config/arm/arm.c (arm_coproc_builtin_available): Add
30062         support for mcr, mrc, mcr2 and mrc2.
30063         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
30064         (arm_mcr_qualifiers): ... this. New.
30065         (MRC_QUALIFIERS): Define to ...
30066         (arm_mrc_qualifiers): ... this. New.
30067         (MCR_QUALIFIERS): Define to ...
30068         (arm_mcr_qualifiers): ... this. New.
30069         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
30070         __arm_mrc2): New.
30071         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
30072         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
30073         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
30074         VUNSPEC_MRC2): New.
30076 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30078         * config/arm/arm.md (*ldc): New.
30079         (*stc): New.
30080         (<ldc>): New.
30081         (<stc>): New.
30082         * config/arm/arm.c (arm_coproc_builtin_available): Add
30083         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
30084         (arm_coproc_ldc_stc_legitimate_address): New.
30085         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
30086         'qualifier_const_pointer'.
30087         (LDC_QUALIFIERS): Define to...
30088         (arm_ldc_qualifiers): ... this. New.
30089         (STC_QUALIFIERS): Define to...
30090         (arm_stc_qualifiers): ... this. New.
30091         * config/arm/arm-protos.h
30092         (arm_coproc_ldc_stc_legitimate_address): New.
30093         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
30094         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
30095         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
30096         stc2, stcl, stc2l): New.
30097         * config/arm/constraints.md (Uz): New.
30098         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
30099         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
30100         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
30101         VUNSPEC_STC2L): New.
30103 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30105         * config/arm/arm.md (<cdp>): New.
30106         * config/arm/arm.c (neon_const_bounds): Rename this ...
30107         (arm_const_bounds): ... this.
30108         (arm_coproc_builtin_available): New.
30109         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
30110         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
30111         (CDP_QUALIFIERS): Define to...
30112         (arm_cdp_qualifiers): ... this. New.
30113         (void_UP): Define.
30114         (arm_expand_builtin_args): Add case for 6 arguments.
30115         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
30116         (arm_const_bounds): ... this.
30117         (arm_coproc_builtin_available): New.
30118         * config/arm/arm_acle.h (__arm_cdp): New.
30119         (__arm_cdp2): New.
30120         * config/arm/arm_acle_builtins.def (cdp): New.
30121         (cdp2): New.
30122         * config/arm/iterators.md (CDPI,CDP,cdp): New.
30123         * config/arm/neon.md: Rename all 'neon_const_bounds' to
30124         'arm_const_bounds'.
30125         * config/arm/types.md (coproc): New.
30126         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
30127         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
30128         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
30129         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
30131 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30133         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
30134         (UBINOP_QUALIFIERS): New.
30135         (si_UP): Define.
30136         (acle_builtin_data): New. Change comment.
30137         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
30138         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
30139         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
30140         arm_acle_builtins.def.
30141         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
30142         (arm_init_acle_builtins): New.
30143         (CRC32_BUILTIN): Remove.
30144         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
30145         crc32cb, crc32ch and crc32cw.
30146         (arm_init_crc32_builtins): Remove.
30147         (arm_init_builtins): Use arm_init_acle_builtins rather
30148         than arm_init_crc32_builtins.
30149         (arm_expand_acle_builtin): New.
30150         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
30151         * config/arm/arm_acle_builtins.def: New.
30153 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30155         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
30156         (arm_builtin_datum): ... this.
30157         (arm_init_neon_builtin): Rename to ...
30158         (arm_init_builtin): ... this. Add a new parameters PREFIX
30159         and USE_SIG_IN_NAME.
30160         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
30161         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
30162         'arm_builtin_datum'.
30163         (arm_init_vfp_builtins): Likewise.
30164         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
30165         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
30166         (arm_expand_neon_args): Rename to ...
30167         (arm_expand_builtin_args): ... this. Rename builtin_arg
30168         enum values and differentiate between ARG_BUILTIN_MEMORY
30169         and ARG_BUILTIN_NEON_MEMORY.
30170         (arm_expand_neon_builtin_1): Rename to ...
30171         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
30172         values, arm_expand_builtin_args and add bool parameter NEON.
30173         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
30174         (arm_expand_vfp_builtin): Likewise.
30175         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
30177 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30179         PR middle-end/77484
30180         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
30181         * predict.c (tree_estimate_probability_bb): Reverse direction of
30182         polymorphic call predictor.
30184 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
30186         * passes.c (execute_one_pass): Split out pass-skipping logic into...
30187         (determine_pass_name_match): ...this new function and...
30188         (should_skip_pass_p): ...this new function.
30190 2017-01-06  Nathan Sidwell  <nathan@acm.org>
30192         * ipa-visibility.c (function_and_variable_visibility): Reformat
30193         comments and long lines.  Remove extrneous if.
30194         * symtab.c (symtab_node::make_decl_local): Fix code format.
30195         (symtab_node::set_section_for_node): Fix comment typo.
30197 2017-01-06  Martin Liska  <mliska@suse.cz>
30199         PR bootstrap/79003
30200         * lra-constraints.c: Rename invariant to lra_invariant.
30201         * predict.c (set_even_probabilities): Initialize e to NULL.
30203 2017-01-05  Martin Sebor  <msebor@redhat.com>
30205         PR tree-optimization/78910
30206         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
30207         (format_integer): Correct off-by-one error in the handling
30208         of precision with negative numbers in signed conversions..
30210 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
30212         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
30214 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
30216         PR tree-optimization/71016
30217         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
30218         factor_out_conditional_conversion.  Formatting fix.
30219         (factor_out_conditional_conversion): Add cond_stmt argument.
30220         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
30221         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
30222         Formatting fix.
30224 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
30226         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
30227         read-rtl-function.o, and selftest-rtl.o.
30228         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
30229         (selftest::aarch64_test_loading_full_dump): New function.
30230         (selftest::aarch64_run_selftests): New function.
30231         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
30232         selftest::aarch64_run_selftests.
30233         * config/i386/i386.c
30234         (selftest::ix86_test_loading_dump_fragment_1): New function.
30235         (selftest::ix86_test_loading_call_insn): New function.
30236         (selftest::ix86_test_loading_full_dump): New function.
30237         (selftest::ix86_test_loading_unspec): New function.
30238         (selftest::ix86_run_selftests): Call the new functions.
30239         * emit-rtl.c (maybe_set_max_label_num): New function.
30240         * emit-rtl.h (maybe_set_max_label_num): New decl.
30241         * function.c (instantiate_decls): Guard call to
30242         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
30243         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
30244         "static".
30245         * gensupport.c (gen_reader::gen_reader): Pass "false"
30246         for new "compact" param of rtx_reader.
30247         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
30248         rather than an empty string for NULL strings.
30249         * read-md.c: Potentially include config.h rather than bconfig.h.
30250         Wrap include of errors.h with #ifdef GENERATOR_FILE.
30251         (have_error): New global, copied from errors.c.
30252         (md_reader::read_name): Rename to...
30253         (md_reader::read_name_1): ...this, adding "out_loc" param,
30254         and converting "missing name or number" to returning false, rather
30255         than failing.
30256         (md_reader::read_name): Reimplement in terms of read_name_1.
30257         (md_reader::read_name_or_nil): New function.
30258         (md_reader::read_string): Handle "(nil)" by returning NULL.
30259         (md_reader::md_reader): Add new param "compact".
30260         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
30261         (md_reader::read_file): New method.
30262         * read-md.h (md_reader::md_reader): Add new param "compact".
30263         (md_reader::read_file): New method.
30264         (md_reader::is_compact): New accessor.
30265         (md_reader::read_name): Convert return type from void to file_location.
30266         (md_reader::read_name_or_nil): New decl.
30267         (md_reader::read_name_1): New decl.
30268         (md_reader::m_compact): New field.
30269         (noop_reader::noop_reader): Pass "false" for new "compact" param
30270         of rtx_reader.
30271         (rtx_reader::rtx_reader): Add new "compact" param.
30272         (rtx_reader::read_rtx_operand): Make virtual and convert return
30273         type from void to rtx.
30274         (rtx_reader::read_until): New decl.
30275         (rtx_reader::handle_any_trailing_information): New virtual function.
30276         (rtx_reader::postprocess): New virtual function.
30277         (rtx_reader::finalize_string): New virtual function.
30278         (rtx_reader::m_in_call_function_usage): New field.
30279         (rtx_reader::m_reuse_rtx_by_id): New field.
30280         * read-rtl-function.c: New file.
30281         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
30282         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
30283         (selftest::verify_three_block_rtl_cfg): New decl.
30284         * read-rtl-function.h: New file.
30285         * read-rtl.c: Potentially include config.h rather than bconfig.h.
30286         For host, include function.h, memmodel.h, and emit-rtl.h.
30287         (one_time_initialization): New function.
30288         (struct compact_insn_name): New struct.
30289         (compact_insn_names): New array.
30290         (find_code): Handle insn codes in compact dumps.
30291         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
30292         (bind_subst_iter_and_attr): Likewise.
30293         (add_condition_to_string): Likewise.
30294         (add_condition_to_rtx): Likewise.
30295         (apply_attribute_uses): Likewise.
30296         (add_current_iterators): Likewise.
30297         (apply_iterators): Likewise.
30298         (initialize_iterators): Guard usage of apply_subst_iterator with
30299         #ifdef GENERATOR_FILE.
30300         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
30301         (md_reader::read_mapping): Likewise.
30302         (add_define_attr_for_define_subst): Likewise.
30303         (add_define_subst_attr): Likewise.
30304         (read_subst_mapping): Likewise.
30305         (check_code_iterator): Likewise.
30306         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
30307         logic to...
30308         (one_time_initialization): New function.
30309         (rtx_reader::read_until): New method.
30310         (read_flags): New function.
30311         (parse_reg_note_name): New function.
30312         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
30313         Handle reuse_rtx ids.
30314         Wrap iterator lookup within #ifdef GENERATOR_FILE.
30315         Add parsing support for RTL dumps, mirroring the special-cases in
30316         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
30317         values, and calling handle_any_trailing_information.
30318         (rtx_reader::read_rtx_operand): Convert return type from void
30319         to rtx, returning return_rtx.  Handle case 'e'.  Call
30320         finalize_string on XSTR and XTMPL fields.
30321         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
30322          "(nil)" values were omitted.  Call the postprocess vfunc on the
30323         return_rtx.
30324         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
30325         class ctor.  Initialize m_in_call_function_usage.  Call
30326         one_time_initialization.
30327         * rtl-tests.c (selftest::test_uncond_jump): Call
30328         set_new_first_and_last_insn.
30329         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
30330         * selftest-rtl.c: New file.
30331         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
30332         (selftest::get_insn_by_uid): New decl.
30333         * selftest-run-tests.c (selftest::run_tests): Call
30334         read_rtl_function_c_tests.
30335         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
30336         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
30337         dumps.
30339 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
30341         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
30342         operands in a special way.  Assert that pos+len <= mode precision.
30344 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
30346         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
30347         3 argument Alias with unlimited for the negative form.
30348         (fno-vect-cost-model): Removed.
30350 2017-01-05  Martin Liska  <mliska@suse.cz>
30352         * hsa-gen.c (gen_hsa_divmod): New function.
30353         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
30355 2017-01-05  Martin Liska  <mliska@suse.cz>
30357         PR pch/78970
30358         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
30359         header.
30361 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30363         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
30364         small constant length operands.
30366 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30368         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
30369         between loop iterations.
30371 2017-01-05  Martin Liska  <mliska@suse.cz>
30373         PR sanitizer/78815
30374         * gimplify.c (gimplify_decl_expr): Compare to
30375         asan_poisoned_variables instread of checking flags.
30376         (gimplify_target_expr): Likewise.
30377         (gimplify_expr): Likewise.
30378         (gimplify_function_tree): Conditionally initialize
30379         asan_poisoned_variables.
30381 2017-01-04  Jeff Law  <law@redhat.com>
30383         PR tree-optimizatin/78812
30384         * rtl.h (contains_mem_rtx_p): Prototype.
30385         * ifcvt.c (containts_mem_rtx_p): Move from here to...
30386         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
30387         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
30388         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
30389         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
30391 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30393         * input.c (assert_char_at_range): Default-initialize actual_range.
30395 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30397         * df-scan.c (df_ref_create_structure): Make regno unsigned,
30398         to match the caller.
30400 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30402         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
30403         insns after final jump in test to emit dummy move.
30405 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30407         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
30408         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
30410 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30412         * multiple_target.c (create_dispatcher_calls): Init e_next.
30413         * tree-ssa-loop-split.c (split_loop): Init border.
30414         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
30415         scalar_type.
30417 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
30419         PR target/71977
30420         PR target/70568
30421         PR target/78823
30422         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
30423         (altivec_register_operand): Do not return true if the operand
30424         contains a SUBREG mixing SImode and SFmode.
30425         (vsx_register_operand): Likewise.
30426         (vsx_reg_sfsubreg_ok): New predicate.
30427         (vfloat_operand): Do not return true if the operand contains a
30428         SUBREG mixing SImode and SFmode.
30429         (vint_operand): Likewise.
30430         (vlogical_operand): Likewise.
30431         (gpc_reg_operand): Likewise.
30432         (int_reg_operand): Likewise.
30433         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
30434         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
30435         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
30436         SImode and SFmode.
30437         (rs6000_emit_move_si_sf_subreg): New helper function.
30438         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
30439         fixup SUBREGs involving SImode and SFmode.
30440         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
30441         numbers for the new peephole2 optimization.
30442         (peephole2 for SFmode unions): New peephole2 to optimize cases in
30443         the GLIBC math library that do AND/IOR/XOR operations on single
30444         precision floating point.
30445         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
30446         target macros to say whether we need to avoid SUBREGs mixing
30447         SImode and SFmode.
30448         (TARGET_ALLOW_SF_SUBREG): Likewise.
30449         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
30450         (UNSPEC_SI_FROM_SF): Likewise.
30451         (iorxor): Change spacing.
30452         (and_ior_xor): New iterator for AND, IOR, and XOR.
30453         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
30454         (movdi_from_sf_zero_ext): Likewise.
30455         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
30456         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
30457         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
30458         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
30459         (fms<mode>4): Likewise.
30460         (fnma<mode>4): Likewise.
30461         (fnms<mode>4): Likewise.
30462         (nfma<mode>4): Likewise.
30463         (nfms<mode>4): Likewise.
30465 2017-01-04  Marek Polacek  <polacek@redhat.com>
30467         PR c++/64767
30468         * doc/invoke.texi: Document -Wpointer-compare.
30470 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30472         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
30473         RejectNegative.
30475         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
30476         descriptions for -gdwarf-5 and emit them as uleb128 instead of
30477         2-byte data.
30479 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30481         PR target/78056
30482         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
30483         documentation of the powerpc_popcntb_ok attribute.
30484         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
30485         code to issue warning messages if a requested CPU configuration is
30486         not supported by the binary (assembler and loader) toolchain.
30487         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
30488         made to define a built-in function that has been disabled.
30489         (paired_init_builtins): Add assertion to prevent ICE if attempt is
30490         made to define a built-in function that has been disabled.
30491         (altivec_init_builtins): Add comment explaining why definition
30492         of the DST built-in functions is not preceded by an assertion
30493         check.  Add assertions to prevent ICE if attempts are made to
30494         define an altivec predicate or an abs* built-in function that has
30495         been disabled.
30496         (htm_init_builtins): Add comment explaining why definition of the
30497         htm built-in functions is not preceded by an assertion check.
30499 2017-01-04  Jeff Law  <law@redhat.com>
30501         PR tree-optimizatin/67955
30502         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
30503         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
30504         the points-to solution does not include pt_null.  Use DECL_PT_UID
30505         unconditionally.
30507 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
30509         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
30510         Use gen_int_mode instead of gen_lopwart for const_int operands.
30512 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30514         PR tree-optimization/71563
30515         * match.pd: Simplify X << Y into X if Y is known to be 0 or
30516         out of range value - has low bits known to be zero.
30518 2017-01-04  Alan Modra  <amodra@gmail.com>
30520         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
30521         * configure: Regenerate.
30522         * config.in: Regenerate.
30524 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30526         PR bootstrap/77569
30527         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
30528         a substring of the message, but strcmp with the whole message.  Ifdef
30529         ENABLE_NLS, translate the message first using dgettext.
30531 2017-01-03  Jeff Law  <law@redhat.com>
30533         PR tree-optimizatin/78856
30534         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
30535         (mark_threaded_blocks): Remove code to truncate thread paths that
30536         cross multiple loop headers.  Instead invalidate the cached loop
30537         iteration information and handle case of a thread path walking
30538         into an irreducible region.
30540 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
30542         PR target/78900
30543         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
30544         assertions.  Add support for doing the signbit if the IEEE 128-bit
30545         floating point value is in a GPR.
30546         * config/rs6000/rs6000.md (Fsignbit): Delete.
30547         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
30548         Update the length attribute if the value is in a GPR.
30549         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
30550         the sign or zero extension instruction, since the value is always 0/1.
30551         (signbit<mode>2_dm2): Delete using <Fsignbit>.
30553         PR target/78953
30554         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
30555         extracting SImode to a GPR register so that we can generate a
30556         store, limit the vector to be in a traditional Altivec register
30557         for the vextuwrx instruction.
30559 2017-01-03  Ian Lance Taylor  <iant@google.com>
30561         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
30563 2017-01-03  Martin Sebor  <msebor@redhat.com>
30565         PR tree-optimization/78696
30566         * gimple-ssa-sprintf.c (format_floating): Correct handling of
30567         precision.  Use MPFR for %f for greater fidelity.  Correct handling
30568         of %g.
30569         (pass_sprintf_length::compute_format_length): Set width and precision
30570         specified by asrerisk to void_node for vararg functions.
30571         (try_substitute_return_value): Adjust dump output.
30573 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
30575         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
30577 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
30579         * doc/invoke.texi (SPARC options): Document -mlra as the default.
30580         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
30581         -mlra/-mno-lra was passed to the compiler.
30583 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
30585         PR rtl-optimization/65618
30586         * emit-rtl.c (try_split): Move initialization of "before" and
30587         "after" to just before the call to emit_insn_after_setloc.
30589 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
30591         * doc/md.texi (Standard Names): Remove reference to Java frontend.
30593 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
30595         * dwarf2out.c (gen_enumeration_type_die): When
30596         -gno-strict-dwarf, add a DW_AT_encoding attribute.
30598 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
30600         PR tree-optimization/78965
30601         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
30602         Change first argument from const call_info & to call_info &.  For %n
30603         set info.nowrite to false.
30605         PR middle-end/78901
30606         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
30607         possibly throwing calls.
30609         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
30610         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
30611         and fns handling, rather than in a separate case SSA_NAME.
30613 2017-01-02  Jeff Law  <law@redhat.com>
30615         * config/darwin-driver.c (darwin_driver_init): Const-correctness
30616         fixes for first_period and second_period variables.
30618 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
30620         PR target/78967
30621         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
30622         (*insvqi_1): New insn pattern.
30623         (*insvqi_1_mem_rex64): Ditto.
30624         (*insvqi_2): Ditto.
30625         (*insvqi_3): Rename from *insvqi.
30627         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
30629 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
30631         * doc/cfg.texi (Edges): Remove reference to Java.
30632         (Maintaining the CFG): Ditto.
30634 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30636         PR middle-end/77674
30637         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
30638         transparent aliases.
30640 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30642         PR middle-end/77484
30643         * predict.def (PRED_CALL): Update hitrate.
30644         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
30645         * predict.c (tree_estimate_probability_bb): Split CALL predictor
30646         into direct/indirect/polymorphic variants.
30648 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
30650         Update copyright years.
30652         * gcc.c (process_command): Update copyright notice dates.
30653         * gcov-dump.c (print_version): Ditto.
30654         * gcov.c (print_version): Ditto.
30655         * gcov-tool.c (print_version): Ditto.
30656         * gengtype.c (create_file): Ditto.
30657         * doc/cpp.texi: Bump @copying's copyright year.
30658         * doc/cppinternals.texi: Ditto.
30659         * doc/gcc.texi: Ditto.
30660         * doc/gccint.texi: Ditto.
30661         * doc/gcov.texi: Ditto.
30662         * doc/install.texi: Ditto.
30663         * doc/invoke.texi: Ditto.
30665 Copyright (C) 2017 Free Software Foundation, Inc.
30667 Copying and distribution of this file, with or without modification,
30668 are permitted in any medium without royalty provided the copyright
30669 notice and this notice are preserved.