PR rtl-optimization/87817
[official-gcc.git] / gcc / ChangeLog
blob6f9b26e465c5c0a05b334c5f9834def5b99722d2
1 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
3         PR rtl-optimization/87817
4         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
5         last argument has low 8 bits clear, fold to 0.
7 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
9         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
10         MAX_OFILE_ALIGNMENT as needed.
12 2018-11-14  Richard Biener  <rguenther@suse.de>
14         PR tree-optimization/88019
15         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
16         COND_EXPR arguments to non-trapping overflow.
18 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
20         * config/arc/arc.h (reg_class): Reorder registers classes, remove
21         unused register classes.
22         (REG_CLASS_NAMES): Likewise.
23         (REG_CLASS_CONTENTS): Likewise.
24         (FIXED_REGISTERS): Make lp_count fixed.
25         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
26         (PROGRAM_COUNTER_REGNO): Remove.
27         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
28         register classes, use constants for register numbers, remove
29         reg_class_contents references.
30         (arc_process_double_reg_moves): Add asserts.
31         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
32         lra_in_progress predicate.
33         (arc_init_reg_tables): Remove unused register classes.
34         (arc_register_move_cost): Likewise.
35         (arc_preferred_reload_class): Likewise.
36         (hwloop_optimize): Update rtx patterns involving lp_count
37         register.
38         (arc_return_address_register): Rename ILINK1, INLINK2 regnums
39         macros.
40         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
41         CHEAP_CORE_REGS.  Former one will be used for LRA.
42         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
43         one will be used for LRA.
44         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
45         one will be used for LRA.
46         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
47         Former one will be used for LRA.
48         ("f"): Delete constraint.
49         ("k"): Likewise.
50         ("e"): Likewise.
51         ("l"): Change it from register constraint to constraint.
52         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
53         (movhi_insn): Likewise.
54         (movsi_insn): Update pattern.
55         (arc_lp): Likewise.
56         (dbnz): Likewise.
57         (stack_tie): Remove 'b' constraint letter.
58         (R4_REG): Define.
59         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
60         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
61         (R57_REG, R59_REG, PCL_REG): Likewise.
62         (ILINK1_REGNUM): Renamed to ILINK1_REG.
63         (ILINK2_REGNUM): Renamed to ILINK2_REG.
64         (Rgp): Remove.
65         (SP_REGS): Likewise.
66         (Rcw): Remove unused reg classes.
67         * config/arc/predicates.md (dest_reg_operand): Just default on
68         register_operand predicate.
69         (mpy_dest_reg_operand): Likewise.
70         (move_dest_operand): Use macros instead of constants.
71         * config/arc/arc.opt (mlra): Switch to lra as default.
73 2018-11-14  Richard Biener  <rguenther@suse.de>
75         PR tree-optimization/87974
76         * tree-vect-loop.c (vectorizable_reduction): When computing
77         the vectorized reduction PHI vector type ignore constant
78         and external defs.
80 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
82         PR tree-optimization/87977
83         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
84         stmt, build a new one and replace the old one with it.  Formatting fix.
85         Call release_ssa_name (x) if !has_other_use and !delete_div.
86         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
87         verify lhs of stmt is still def.
89 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
91         PR rtl-optimization/87507
92         * lower-subreg.c (operand_for_swap_move_operator): New function.
93         (simple_move): Strip simple operators.
94         (find_pseudo_copy): Likewise.
95         (resolve_operand_for_swap_move_operator): New function.
96         (resolve_simple_move): Strip simple operators and swap operands.
98 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
100         PR tree-optimization/87898
101         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
102         (ipa_simd_modify_function_body): Remove debug stmts where the first
103         argument was changed into a non-decl.
105 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
107         PR rtl-optimization/87899
108         * lra-lives.c (start_living): Update white space in comment.
109         (enum point_type): New.
110         (sparseset_contains_pseudos_p): New function.
111         (update_pseudo_point): Likewise.
112         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
113         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
114         handling.  Move early exit after adding conflicts.
115         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
116         if regno is already live.  Remove all handling of program points.
117         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
118         after adding conflicts.  Remove all handling of program points and
119         ignore_reg_for_conflicts.
120         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
121         and do not guard call to mark_pseudo_live.
122         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
123         and do not guard call to mark_pseudo_dead.
124         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
125         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
126         Use new function update_pseudo_point.  Handle register copies by
127         removing the source register from the live set.  Handle INOUT operands.
128         Update to the next program point using the unused_set, dead_set and
129         start_dying sets.
130         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
132 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
134         * builtins.c: Replace "source_location" with "location_t".
135         * diagnostic-show-locus.c: Likewise.
136         * diagnostic.c: Likewise.
137         * dumpfile.c: Likewise.
138         * gcc-rich-location.h: Likewise.
139         * genmatch.c: Likewise.
140         * gimple.h: Likewise.
141         * gimplify.c: Likewise.
142         * input.c: Likewise.
143         * input.h: Likewise.  Eliminate the typedef.
144         * omp-expand.c: Likewise.
145         * selftest.h: Likewise.
146         * substring-locations.h (get_source_location_for_substring):
147         Rename to..
148         (get_location_within_string): ...this.
149         * tree-cfg.c: Replace "source_location" with "location_t".
150         * tree-cfgcleanup.c: Likewise.
151         * tree-diagnostic.c: Likewise.
152         * tree-into-ssa.c: Likewise.
153         * tree-outof-ssa.c: Likewise.
154         * tree-parloops.c: Likewise.
155         * tree-phinodes.c: Likewise.
156         * tree-phinodes.h: Likewise.
157         * tree-ssa-loop-ivopts.c: Likewise.
158         * tree-ssa-loop-manip.c: Likewise.
159         * tree-ssa-phiopt.c: Likewise.
160         * tree-ssa-phiprop.c: Likewise.
161         * tree-ssa-threadupdate.c: Likewise.
162         * tree-ssa.c: Likewise.
163         * tree-ssa.h: Likewise.
164         * tree-vect-loop-manip.c: Likewise.
166 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
168         * doc/extend.texi: Fix typo in the weakref description.
170 2018-11-13  Richard Biener  <rguenther@suse.de>
172         PR tree-optimization/86991
173         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
174         group building until we have successfully detected the SLP
175         reduction.
176         (vect_is_simple_reduction): Remove fixup code here.
178 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
180         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
181         (dump_gimple_stmt): Use it.
182         (dump_gimple_stmt_loc): Likewise.
183         (dump_gimple_expr): Likewise.
184         (dump_gimple_expr_loc): Likewise.
185         (dump_generic_expr): Likewise.
186         (dump_generic_expr_loc): Likewise.
187         (dump_printf): Likewise.
188         (dump_printf_loc): Likewise.
189         (dump_dec): Likewise.
190         (dump_dec): Likewise.
191         (dump_hex): Likewise.
192         (dump_symtab_node): Likewise.
193         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
194         Guard dump call with dump_enabled_p.
195         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
196         * graphite-optimize-isl.c (optimize_isl): Likewise.
197         * graphite.c (graphite_transform_loops): Likewise.
198         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
199         * tree-parloops.c (parallelize_loops): Likewise.
200         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
201         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
202         (vect_prune_runtime_alias_test_list): Likewise.
203         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
204         (vect_estimate_min_profitable_iters): Likewise.
205         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
206         (vect_build_slp_tree_2): Likewise.
207         (vect_supported_load_permutation_p): Likewise.
208         (vect_slp_analyze_operations): Likewise.
209         (vect_slp_analyze_bb_1): Likewise.
210         (vect_slp_bb): Likewise.
211         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
212         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
213         (pass_slp_vectorize::execute): Likewise.
214         (increase_alignment): Likewise.
216 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
218         PR ipa/87955
219         * ipa-inline.c (report_inline_failed_reason): Guard calls to
220         cl_target_option_print_diff and cl_optimization_print_diff with
221         if (dump_file).
223 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
225         * doc/invoke.texi (-fsave-optimization-record): Note that the
226         output is compressed.
227         * optinfo-emit-json.cc: Include <zlib.h>.
228         (optrecord_json_writer::write): Compress the output.
230 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
232         * tree-vrp.c (value_range_base::dump): Dump type.
233         Do not use INF nomenclature for 1-bit types.
234         (dump_value_range): Group all variants to common dumping code.
235         (debug): New overloaded functions for value_ranges.
236         (value_range_base::dump): Remove no argument version.
237         (value_range::dump): Same.
239 2018-11-13  Richard Biener  <rguenther@suse.de>
241         PR tree-optimization/87931
242         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
243         nested cycles we support to latch computations vectorizable_reduction
244         handles.
246 2018-11-13  Martin Liska  <mliska@suse.cz>
248         PR tree-optimization/87885
249         * cfghooks.c (account_profile_record): Rename
250         to ...
251         (profile_record_check_consistency): ... this.
252         Calculate missing num_mismatched_freq_in.
253         (profile_record_account_profile): New function
254         that calculates time and size of a function.
255         * cfghooks.h (struct profile_record): Remove
256         all tuples.
257         (struct cfg_hooks): Remove after_pass flag.
258         (account_profile_record): Rename to ...
259         (profile_record_check_consistency): ... this.
260         (profile_record_account_profile): New.
261         * cfgrtl.c (rtl_account_profile_record): Remove
262         after_pass flag.
263         * passes.c (check_profile_consistency): Do only
264         checking.
265         (account_profile): Calculate size and time of
266         function only.
267         (pass_manager::dump_profile_report): Reformat
268         output.
269         (execute_one_ipa_transform_pass): Call
270         consistency check before clean upand call account_profile
271         after a clean up is done.
272         (execute_one_pass): Call check_profile_consistency and
273         account_profile instead of using after_pass flag..
274         * tree-cfg.c (gimple_account_profile_record): Likewise.
276 2018-11-13  Martin Liska  <mliska@suse.cz>
278         PR sanitizer/87930
279         * config/i386/i386.c (ix86_option_override_internal): Error
280         about usage -mabi=ms and -fsanitize={,kernel-}address.
282 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
284         * config/aarch64/aarch64.c
285         (aarch64_vectorize_preferred_vector_alignment): Change return type to
286         poly_uint64.
287         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
288         alignment being a poly int.
289         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
290         return type to poly_uint64.
291         * target.def (default_preferred_vector_alignment): Likewise.
292         * targhooks.c (default_preferred_vector_alignment): Likewise.
293         * targhooks.h (default_preferred_vector_alignment): Likewise.
294         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
295         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
296         poly int.
297         (vect_update_misalignment_for_peel): Likewise.
298         (vect_enhance_data_refs_alignment): Likewise.
299         (vect_find_same_alignment_drs): Likewise.
300         (vect_duplicate_ssa_name_ptr_info): Likewise.
301         (vect_setup_realignment): Likewise.
302         (vect_can_force_dr_alignment_p): Change alignment parameter type to
303         poly_uint64.
304         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
305         mask with a compile time variable vector alignment.
306         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
307         int.
308         (vect_do_peeling): Exit early if vector alignment is not constant.
309         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
310         a poly int.
311         (vectorizable_store): Likewise.
312         (vectorizable_load): Likweise.
313         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
314         poly_uint64.
315         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
316         poly int.
317         (vect_can_force_dr_alignment_p): Change alignment parameter type to
318         poly_uint64.
320 2018-11-13  Richard Biener  <rguenther@suse.de>
322         PR tree-optimization/87962
323         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
324         detect outer reduction for disqualifying in-loop uses.
326 2018-11-13  Richard Biener  <rguenther@suse.de>
328         PR tree-optimization/87967
329         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
330         for constants for the scalar loop.
332 2018-11-13  Alan Modra  <amodra@gmail.com>
334         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
335         integer constants when -mcmodel=medium.
337 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
339         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
340         * config/arc/elf.h (PROFILE_HOOK): Define.
341         * config/arc/linux.h (PROFILE_HOOK): Likewise.
343 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
345         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
346         jump table data in the text section.
348 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
350         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
351         to fit the eh_return pattern.
352         * config/arc/arc.md (eh_return): Define.
353         (VUNSPEC_ARC_EH_RETURN): Likewise.
354         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
355         new implementation.
356         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
359 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
361         * common/config/arc/arc-common.c (arc_option_optimization_table):
362         Millicode optimization is default on for size optimizations.
363         * config/arc/arc-protos.h (arc_check_multi): New function.
364         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
365         (ENTER_LEAVE_START_REG): Define.
366         (ENTER_LEAVE_END_REG): Likewise.
367         (arc_override_options): Disable millicode when long calls option
368         is on.
369         (arc_frame_info): Change it from int to bool.
370         (arc_compute_frame_size): Clean up.
371         (arc_save_restore): Remove.
372         (frame_save_reg): New function.
373         (frame_restore_reg): Likewise.
374         (arc_enter_leave_p): Likewise.
375         (arc_save_callee_saves): Likewise.
376         (arc_restore_callee_saves): Likewise.
377         (arc_save_callee_enter): Likewise.
378         (arc_restore_callee_leave): Likewise.
379         (arc_save_callee_milli): Likewise.
380         (arc_restore_callee_milli): Likewise.
381         (arc_expand_prologue): Reimplement to emit enter/leave
382         instructions.
383         (arc_expand_epilogue): Likewise.
384         (arc_check_multi): New function.
385         * config/arc/arc.md (push_multi_fp): New pattern.
386         (push_multi_fp_blink): Likewise.
387         (pop_multi_fp): Likewise.
388         (pop_multi_fp_blink): Likewise.
389         (pop_multi_fp_ret): Likewise.
390         (pop_multi_fp_blink_ret): Likewise.
391         * config/arc/arc.opt (mmillicode): Update option.
392         (mcode-density-frame): New option.
393         * config/arc/predicates.md (push_multi_operand): New predicate.
394         (pop_multi_operand): Likewise.
395         * doc/invoke.texi (ARC): Update ARC options information.
398 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
400         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
401         * config/arc/arc.c (operands_ok_ldd_std): New function.
402         (mem_ok_for_ldd_std): Likewise.
403         (gen_operands_ldd_std): Likewise.
404         * config/arc/arc.md: Add peephole2 rules for std/ldd.
406 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
408         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
409         test on stack_usage_file.
410         (lang_dependent_init): Do not open the .su file if generating LTO.
412 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
414         PR rtl-optimization/87918
415         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
416         simplify_gen_relational rather than simplify_gen_binary.
418 2018-11-13  Richard Biener  <rguenther@suse.de>
420         * tree-ssanames.h (set_range_info): Use value_range_base.
421         (get_range_info): Likewise.
422         * tree-ssanames.c (set_range_info): Likewise.
423         (get_range_info): Likewise.
424         * tree-vrp.c (value_range_base::union_helper): Split
425         out common parts of value_range[_base]::union_.
426         (value_range_base::union_): Update.
427         (value_range::union_): Likewise.
428         (determine_value_range_1): Use value_range_base.
429         (determine_value_range): Likewise.
430         * tree-vrp.h (value_range_base::union_helper): Move ...
431         (value_range::union_helper): ... from here.
433 2018-11-13  Alan Modra  <amodra@gmail.com>
435         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
436         offset for PRE_DEC.
437         (rs6000_secondary_reload_gpr): Don't call find_replacement.
439 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
441         PR middle-end/59634
442         * doc/invoke.texi (Optimize Options): Clarify that the
443         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
444         apply to data cache size.
446 2018-11-13  Alan Modra  <amodra@gmail.com>
448         * config/rs6000/predicates.md (logical_const_operand),
449         (logical_operand): Correct comment.
450         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
452 2018-11-13  Alan Modra  <amodra@gmail.com>
454         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
456 2018-11-13  Alan Modra  <amodra@gmail.com>
458         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
459         description.
460         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
461         covered by alternative.
462         (movcc_internal1): Ignore h for register preference.
463         (mov<mode>_hardfloat64): Likewise.
464         (mov<mode>_softfloat): Ignore c, l, h for register preference.
466 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
468         PR preprocessor/47823
469         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
470         documentation to...
471         (Pragmas): ...here.
472         * doc/extend.texi (Pragmas): Note additional pragmas documented
473         in the CPP manual.
475 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
477         PR middle-end/86677
478         PR middle-end/87528
479         * tree-scalar-evolution.c (expression_expensive_p): Make BUILTIN POPCOUNT
480         as expensive when backend does not define it.
482 2018-11-12  Fredrik Noring  <noring@nocrew.org>
484         * config.gcc: Update with-llsc defaults for MIPS r5900.
486 2018-11-12  Martin Liska  <mliska@suse.cz>
488         PR gcov-profile/87442
489         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
490         options.
491         * doc/invoke.texi: Document them.
492         * tree-profile.c (parse_profile_filter): New.
493         (parse_profile_file_filtering): Likewise.
494         (release_profile_file_filtering): Likewise.
495         (include_source_file_for_profile): Likewise.
496         (tree_profiling): Filter source files based on the
497         newly added options.
499 2018-11-12  Martin Liska  <mliska@suse.cz>
501         PR target/87903
502         * doc/extend.texi: Add missing values for __builtin_cpu_is and
503         __builtin_cpu_supports for x86 target.
505 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
507         PR middle-end/21110
508         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
509         have to be Pmode.
510         (Arithmetic): Likewise for "lo_sum".
512 2018-11-12  Renlin Li  <renlin.li@arm.com>
514         PR target/87815
515         * dse.c (get_stored_val): Add check for compile-time constantness
516         of gap.
518 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
520         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
521         (ARMv8_5a): New fgroup.
522         (armv8.5-a): New arch.
523         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
524         sb and predres.
525         * config/arm/arm-tables.opt: Regenerate.
526         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
527         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
528         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
529         Add matching rules for -march=armv8.5-a and extensions.
530         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
531         Add sb and predres to all armv8-a except armv8.5-a.
533 2018-11-12  Richard Biener  <rguenther@suse.de>
535         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
536         overload for single value.
537         (value_range[_base]::set_nonnull): New.
538         (value_range[_base]::set_null): Likewise.
539         (value_range): Document bitmap copying behavior, mark
540         copy constructor and assignment operator deleted.
541         (value_range::move): New.
542         (value_range::set_and_canonicalize): Default bitmap to zero.
543         (set_value_range_to_nonnull): Remove.
544         (set_value_range_to_null): Likewise.
545         (set_value_range): Likewise.
546         (set_value_range_to_value): Likewise.
547         (extract_range_from_unary_expr): Work on value_range_base.
548         (extract_range_from_binary_expr_1): Likewise.  Rename to...
549         (extract_range_from_binary_expr): ... this.
550         * tree-vrp.c (value_range::update): Clear equiv bitmap
551         if required.
552         (value_range::move): New, move equiv bitmap.
553         (value_range_base::set_undefined): Avoid assignment.
554         (value_range::set_undefined): Likewise.
555         (value_range_base::set_varying): Likewise.
556         (value_range::set_varying): Likewise.
557         (set_value_range): Remove.
558         (value_range_base::set): New overload for value.
559         (value_range::set): Likewise.
560         (set_value_range_to_nonnull): Remove.
561         (value_range_base::set_nonnull): New.
562         (value_range::set_nonnull): Likewise.
563         (set_value_range_to_null): Remove.
564         (value_range_base::set_null): New.
565         (value_range::set_null): Likewise.
566         (range_is_null): Work on value_range_base.
567         (range_is_nonnull): Likewise.
568         (ranges_from_anti_range): Likewise.
569         (extract_range_into_wide_ints): Likewise.
570         (extract_range_from_multiplicative_op): Likewise.
571         (extract_range_from_binary_expr): Likewise.  Update for API changes.
572         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
573         handling.
574         (value_range::intersect_helper): Avoid copy and assignment.
575         (value_range::union_helper): Likewise.
576         (determine_value_range_1): Adjust.
577         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
578         Avoid assignment by using move.
579         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
580         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
581         Likewise.
582         * tree-ssanames.c (get_range_info): Likewise.
583         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
584         * vr-values.c (vr_values::get_value_range): Adjust.
585         (vr_values::update_value_range): Likewise.
586         (symbolic_range_based_on_p): Work on value_range_base.
587         (vr_values::extract_range_from_binary_expr): Use value_range_base.
588         (vr_values::extract_range_from_unary_expr): Likewise.
589         (vr_values::extract_range_from_cond_expr): Avoid assignment.
590         (vr_values::extract_range_from_comparison): Adjust.
591         (vr_values::check_for_binary_op_overflow): Use value_range_base.
592         (vr_values::extract_range_basic): Adjust.
593         (vr_values::adjust_range_with_scev): Likewise.
594         (vr_values::vrp_visit_assignment_or_call): Likewise.
595         (vr_values::get_vr_for_comparison): Change API to avoid
596         assignment and copy construction.
597         (vr_values::compare_name_with_value): Adjust accordingly.
598         (vr_values::compare_names): Likewise.
599         (vr_values::extract_range_from_phi_node): Avoid assignment and
600         bogus in-place modify of equiv bitmap.
601         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
602         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
603         for extract_range_from_unary_expr API change.
604         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
606 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
608         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
610 2018-11-12  Richard Biener  <rguenther@suse.de>
612         * tree-vrp.h (value_range_base::symbolic_p,
613         value_range_base::constant_p, value_range_base::zero_p,
614         value_range_base::singleton_p): Move from value_range.
615         (value_range::dump): Add.
616         * gimple-ssa-evrp-analyze.c
617         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
618         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
619         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
620         Use set_varying.
621         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
622         (value_range::constant_p): Likewise.
623         (value_range::singleton_p): Likewise.
624         (value_range_base::dump): Add.
625         (set_value_range_to_undefined): Remove.
626         (set_value_range_to_varying): Likewise.
627         (range_int_cst_p): Take value_range_base argument.
628         (range_int_cst_singleton_p): Likewise.
629         (value_range_constant_singleton): Likewise.
630         (vrp_set_zero_nonzero_bits): Likewise.
631         (extract_range_from_multiplicative_op): Use set_varying.
632         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
633         (extract_range_from_unary_expr): Likewise.
634         (dump_value_range_base): Change to overload of dump_value_range.
635         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
636         (vrp_prop::visit_stmt): Likewise.
637         (value_range::intersect_helper): Likewise.
638         (value_range::union_helper): Likewise.
639         (determine_value_range_1): Likewise.
641 2018-11-12  Richard Biener  <rguenther@suse.de>
643         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
644         (set_value_range_to_null): Likewise.
645         * vr-values.c (vr_values::extract_range_from_comparison):
646         Clear equiv for constant singleton ranges.
648 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
650         * config/i386/sse.md: Combine VFIXUPIMM* patterns
651         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
652         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
653         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
654         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
655         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
656         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
658 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
660         PR c/69502
661         * doc/extend.texi (Common Type Attributes): For the align type
662         attribute, copy language about decreasing alignment from the
663         corresponding variable attribute.
665 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
667         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
668         -frounding-math.
670 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
672         PR c++/43105
673         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
674         -frtti and -fno-rtti code.
676 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
678         PR c/26366
679         * doc/extend.texi (Other Builtins): Document probability associated
680         with __builtin_expect.
682 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
684         PR target/87928
685         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
686         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
687         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
688         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
690 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
692         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
694 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
696         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
698 2018-11-11  Richard Biener  <rguenther@suse.de>
700         * tree-vrp.h (class value_range_base): New base class for
701         value_range containing all but the m_equiv member.
702         (dump_value_range_base): Add.
703         (range_includes_zero_p): Work on value_range_base.
704         * tree-vrp.c (value_range_base::set): Split out base handling
705         from...
706         (value_range::set): this.
707         (value_range::set_equiv): New.
708         (value_range_base::value_range_base): New constructors.
709         (value_range_base::check): Split out base handling from...
710         (value_range::check): this.
711         (value_range::equal_p): Refactor in terms of
712         ignore_equivs_equal_p which is now member of the base.
713         (value_range_base::set_undefined): New.
714         (value_range_base::set_varying): Likewise.
715         (value_range_base::dump):Split out base handling from...
716         (value_range::dump): this.
717         (value_range_base::set_and_canonicalize): Split out base handling
718         from...
719         (value_range::set_and_canonicalize): this.
720         (value_range_base::union_): New.
721         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
722         for m_vr.
723         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
724         instead of value_range everywhere.
725         (ipcp_vr_lattice::print): Use dump_value_range_base.
726         (ipcp_vr_lattice::meet_with): Adjust.
727         (ipcp_vr_lattice::meet_with_1): Likewise.
728         (ipa_vr_operation_and_type_effects): Likewise.
729         (propagate_vr_across_jump_function): Likewise.
730         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
731         (ipa_get_value_range): Likewise.
732         (ipa_set_jfunc_vr): Likewise.
733         (ipa_compute_jump_functions_for_edge): Likewise.
735 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
737         PR middle-end/65703
738         * doc/invoke.texi (Optimize Options): Add @opindex entries
739         for the positive forms of -fno-xxx and -mno-xxx options
740         that were lacking them.
742 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
744         * combine.c (make_more_copies): Only make an intermediate copy if the
745         dest of a move is a pseudo.
747 2018-11-09  Maya Rashish  <coypu@sdf.org>
749         PR target/87221
750         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
751         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
753 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
755         PR driver/41179
756         PR middle-end/65703
757         * doc/invoke.texi (Optimize Options): Clarify default behavior
758         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
760 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
762         PR tree-optimization/87940
763         * expr.c (string_constant): Don't strip NOPS in subexpressions.
764         Fold PLUS_EXPR correctly.
766 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
768         PR target/87762
769         * config/s390/s390.c (s390_safe_relative_long_p): New function.
770         (annotate_constant_pool_refs): Skip insns which support
771         relative addressing.
772         (annotate_constant_pool_refs_1): New helper function.
773         (find_constant_pool_ref): Skip insns which support relative
774         addression.
775         (find_constant_pool_ref_1): New helper function.
776         (replace_constant_pool_ref): Skip insns which support
777         relative addressing.
778         (replace_constant_pool_ref_1): New helper function.
779         (s390_mainpool_start): Adapt to the new signature.
780         (s390_mainpool_finish): Likewise.
781         (s390_chunkify_start): Likewise.
782         (s390_chunkify_finish): Likewise.
783         (pass_s390_early_mach::execute): Likewise.
784         (s390_prologue_plus_offset): Likewise.
785         (s390_emit_prologue): Likewise.
786         (s390_emit_epilogue): Likewise.
788 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
790         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
791         but unsupported lastprivate with conditional modifier.
793 2018-11-09  Jeff Law  <law@redhat.com>
795         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
796         unused argument better.  Add gcc_unreachable to silence warning.
798 2018-11-09  Martin Sebor  <msebor@redhat.com>
800         PR middle-end/81824
801         * attribs.c (has_attribute): New helper function.
802         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
803         * attribs.h (decls_mismatched_attributes): Declare.
804         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
805         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
806         * common.opt (-Wattribute-alias): Take an argument.
807         (-Wno-attribute-alias): New option.
808         * doc/extend.texi (Common Function Attributes): Document copy.
809         (Common Variable Attributes): Same.
810         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
811         (-Wattribute-alias): Document new option argument.
813 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
815         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
816         matching criteria.  Remove unused array initializer.
818 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
819             Jinsong Ji  <jji@us.ibm.com>
821         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
822         constraints by introducing a new temporary.
823         (_mm_cvtss_si64): Likewise.
825 2018-11-09  Martin Liska  <mliska@suse.cz>
827         * common.opt: Add -fipa-stack-alignment flag.
828         * doc/invoke.texi: Document it.
829         * final.c (rest_of_clean_state): Guard stack
830         shrinking with flag.
832 2018-11-09  Martin Liska  <mliska@suse.cz>
834         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
835         to ...
836         (ipa_discover_variable_flags): ... this.
837         * common.opt: Come up with new flag -fipa-reference-addressable.
838         * doc/invoke.texi: Document it.
839         * ipa-reference.c (propagate): Call the renamed fn.
840         * ipa-visibility.c (whole_program_function_and_variable_visibility):
841         Likewise.
842         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
843         ...
844         (ipa_discover_variable_flags): ... this.  Discover
845         non-addressable variables only with the newly added flag.
846         * opts.c: Enable the newly added flag with -O1 and higher
847         optimization level.
849 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
851         * json.cc (selftest::test_writing_literals): Fix comment.
853 2018-11-09  Martin Liska  <mliska@suse.cz>
855         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
856         string to a stack buffer.
857         (aarch64_parse_cpu): Likewise.
858         (aarch64_parse_tune): Likewise.
860 2018-11-09  Richard Biener  <rguenther@suse.de>
862         PR tree-optimization/87953
863         * tree-vect-loop.c (vectorizable_reduction): For analysis
864         always pass ops[0] to vectorizable_condition.
866 2018-11-09  Stafford Horne  <shorne@gmail.com>
867             Richard Henderson  <rth@twiddle.net>
868             Joel Sherrill  <joel@rtems.org>
870         * common/config/or1k/or1k-common.c: New file.
871         * config/or1k/*: New.
872         * config.gcc (or1k*-*-*): New.
873         * configure.ac (or1k*-*-*): New test for openrisc tls.
874         * configure: Regenerated.
875         * doc/install.texi: Document OpenRISC triplets.
876         * doc/invoke.texi: Document OpenRISC arguments.
877         * doc/md.texi: Document OpenRISC.
879 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
881         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
882         (arm7tdmi-s): Delete CPU.
883         (arm710t): Add aliases for arm720t and arm740t.
884         (arm720t, arm740t): Delete CPUs.
885         (arm920t): Add aliases for arm920, arm922t and arm940t.
886         (arm920, arm922t, arm940t): Delete CPUs.
887         (arm10tdmi): Add alias for arm1020t.
888         (arm1020t): Delete CPU.
889         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
890         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
891         (arm10e): Add aliases for arm1020e and arm1022e.
892         (arm1020e, arm1022e): Delete CPU.
893         * config/arm/arm.md (generic_sched): Remove entries that are now
894         handled by aliases.
895         (generic_vfp): Likewise.
896         * config/arm/arm1020e.md: Simplify tuning selection based on alias
897         changes.
898         * config/arm/arm-tune.md: Regenerated.
899         * config/arm/arm-tables.opt: Regenerated.
901 2018-11-09  Richard Biener  <rguenther@suse.de>
903         PR tree-optimization/87621
904         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
905         op with only phi inputs.
906         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
907         (ch_base::copy_headers): Run CSE on copied loop headers.
908         (pass_ch_vect::process_loop_p): Simplify.
910 2018-11-09  Alexandre Oliva <oliva@adacore.com>
912         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
913         for non-w64 x86_64 biarch.
915 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
917         PR rtl-optimization/86438
918         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
919         of in_b for the compare if in_b is SET_DEST.
921         PR target/87793
922         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
923         non-toplevel UNSPEC.
925 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
927         * tree-vrp.c (value_range::check): Do not access internals
928         directly.
929         (value_range::singleton_p): Same.
930         (value_range::type): Same.
931         (vrp_finalize): Use value_range API.
933 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
935         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
937 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
939         * vr-values.c (vr_values::get_value_range): Use value_range API
940         instead of piecing together ranges.
941         (vr_values::update_value_range): Same.
943 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
945         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
946         of performing ad-hoc calculations.
947         * tree-ssanames.c (set_range_info): New overloaded function
948         accepting value_range &.
949         (get_range_info): Same.
950         * tree-ssanames.h (set_range_info_raw): Remove.
951         (set_range_info): New prototype.
952         (get_range_info): Same.
953         * tree-vrp.h (value_range::null_p): Rename to zero_p.
954         * tree-vrp.c (value_range::null_p): Same.
956 2018-11-09  Jan Hubicka  <jh@suse.cz>
958         * tree.c (fld_type_variant_equal_p): Test user align flag.
959         (flt_type_variant): Copy user align flag.
960         (fld_incomplete_type_of): Clear it.
962 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
964         * config/arm/neon.md (div<mode>3): New pattern.
966 2018-11-08  Andi Kleen  <ak@linux.intel.com>
968         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
969         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
970         (ix86_handle_option): Handle OPT_mptwrite.
971         * config/i386/cpuid.h (bit_PTWRITE): Add.
972         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
973         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
974         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
975         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
976         (ix86_option_override_internal): Handle PTA_PTWRITE.
977         (ix86_valid_target_attribute_inner_p): Define ptwrite.
978         (def_builtin2): Force UINT64 to be 64bit only.
979         * config/i386/i386.h (TARGET_PTWRITE): Add.
980         (TARGET_PTWRITE_P): Add.
981         (PTA_PTWRITE): Add.
982         * config/i386/i386.md: Define ptwrite.
983         * config/i386/i386.opt: Add -mptwrite.
984         * config/i386/immintrin.h (_ptwrite64): Add.
985         (_ptwrite32): Add
986         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
987         * doc/invoke.texi: Document -mptwrite.
989 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
991         PR rtl-optimization/87600
992         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
993         * lra-constraints.c (process_alt_operands): Skip illegal hard
994         register usage.  Prefer reloading non hard register operands.
996 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
998         PR other/36572
999         * doc/invoke.texi (Optimize Options): Clarify default behavior
1000         for -fno-sched-interblock and -fno-sched-spec.
1002 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
1004         * collect2.c (linker_select):  Add USE_LLD_LD.
1005         (ld_suffixes): Add ld.lld.
1006         (main): Handle -fuse-ld=lld.
1007         * common.opt (-fuse-ld=lld): New option.
1008         * doc/invoke.texi (-fuse-ld=lld): Document.
1009         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1011 2018-11-08  Paul Koning  <ni1d@arrl.net>
1013         * config/pdp11/constraints.md: Add "Z" series constraints for use
1014         with pre-dec and post-inc addressing.
1015         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1016         (pdp11_expand_operands): Add int argument (word count).
1017         (pdp11_sp_frame_offset): Delete.
1018         (pdp11_cmp_length): New function.
1019         (pushpop_regeq): New function.
1020         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1021         Add hook.
1022         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1023         frame layout.
1024         (pdp11_initial_elimination_offset): Ditto.
1025         (pdp11_expand_operands): Add word count argument.  Bugfixes.
1026         (output_move_multiple): Change how pointer adjustment is done.
1027         (pdp11_gen_int_label): Correct format.
1028         (output_ascii): Ditto.
1029         (pdp11_asm_output_var): Add code for DEC assembler case.
1030         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1031         value.
1032         (legitimate_const_double_p): Ditto.
1033         (pdp11_register_move_cost): Adjust for new register classes.
1034         (pdp11_regno_reg_class): Ditto.
1035         (expand_block_move): Delete.
1036         (pushpop_regeq): New function.
1037         (pdp11_legitimate_address_p): Bugfix in check for constant
1038         offset.
1039         (pdp11_sp_frame_offset): Delete.
1040         (pdp11_reg_save_size): New helper function for new frame layout.
1041         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1042         (pdp11_expand_shift): Bugfix in check for constant shift count.
1043         (pdp11_shift_length): Ditto.
1044         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1045         (pdp11_cmp_length): New function.
1046         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1047         some compile options.
1048         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1049         (CALL_USED_REGISTERS): Ditto.
1050         (ELIMINABLE_REGS): Ditto.
1051         (REGISTER_NAMES): Ditto.
1052         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1053         constraints.
1054         (REG_CLASS_NAMES): Ditto.
1055         (REG_CLASS_CONTENTS): Ditto.  Also remove
1056         HARD_FRAME_POINTER_REGNUM.
1057         (CPU_REG_CLASS): New macro.
1058         (CLASS_MAX_NREGS): Adjust for new register classes.
1059         (FUNCTION_PROFILER): Make no-op.
1060         (may_call_alloca): Remove unused declaration.
1061         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1062         (ASM_OUTPUT_SKIP): Fix format.
1063         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1064         (HARD_FRAME_POINTER_REGNUM): Remove.
1065         (return): Delete.
1066         (*rts): Rename.  Remove epilogue related checks.
1067         (cmpsi, cmpdi): New insn.
1068         (cbranch<mode>4): Change to apply to SI and DI modes as well.
1069         (mov<mode>): Change constraints to enforce that push/pop
1070         destination cannot use the same register as source.
1071         (*mov<mode><cc_cc>): Ditto.
1072         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1073         at assembly output rather than as RTL expander.
1074         (zero_extendqihi2): Bugfix in check for same registers.
1075         (adddi3_nocc): Bugfix in check for constant operand.
1076         (addsi3_nocc): Ditto.
1077         (subdi3_nocc): Ditto.
1078         (subsi3_nocc): Ditto.
1079         (negdi2_nocc): Copy input to pdp11_expand_operands.
1080         (negsi2_nocc): Ditto.
1081         (bswap2_nocc): Ditto.
1082         * config/pdp11/pdp11.opt (mlra): Fix documentation.
1083         * config/pdp11/t-pdp11: Use -Os.
1085 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
1087         * config/arm/parsecpu.awk (/alias/): New parsing rule.
1088         (/begin cpu/): Check that the cpu name hasn't been previously defined.
1089         (gen_comm_data): Print out CPU alias tables.
1090         (check_cpu): Match aliases when checking the CPU name.
1091         * config/arm/arm-protos.h (cpu_alias): New structure.
1092         (cpu_option): Add entry for aliases.
1093         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1094         strongarm1100 and strongarm1110.
1095         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1096         (config/arm/arm-generic.md): Remove redundant references to
1097         strongarm110, strongarm1100 and strongarm1110.
1098         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1099         Scan aliases for additional hints.
1100         (arm_parse_cpu_option_name): Also match a cpu name against the list
1101         of aliases.
1102         * config/arm/arm-tables.opt: Regenerated.
1103         * config/arm/arm-tune.md: Regenerated.
1105 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
1107         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1108         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1109         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1110         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1111         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1112         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1113         * gengtype.c (open_base_files): Add omp-general.h.
1114         * gimple.c (gimple_build_omp_critical):
1115         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
1116         gimple_omp_taskgroup_set_clauses.
1117         (gimple_build_omp_atomic_load): Add mo argument, call
1118         gimple_omp_atomic_set_memory_order.
1119         (gimple_build_omp_atomic_store): Likewise.
1120         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1121         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1122         instead of GSS_OMP.
1123         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1124         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1125         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1126         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
1127         different value for GF_OMP_ATOMIC_NEED_VALUE.
1128         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1129         comments.
1130         (struct gimple_statement_omp_single_layout): And remove here.
1131         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1132         than gimple_statement_omp_single_layout.
1133         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1134         GIMPLE_OMP_TEAMS.
1135         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1136         (gimple_omp_subcode): Formatting fix.
1137         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1138         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1139         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1140         gimple_omp_teams_host, gimple_omp_teams_set_host,
1141         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1142         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1143         gimple_omp_taskgroup_set_clauses): New inline functions.
1144         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1145         (gimple_build_omp_atomic_store): Likewise.
1146         (gimple_omp_atomic_seq_cst_p): Remove.
1147         (gimple_omp_atomic_memory_order): New function.
1148         (gimple_omp_atomic_set_seq_cst): Remove.
1149         (gimple_omp_atomic_set_memory_order): New function.
1150         (gimple_build_omp_taskgroup): Add clauses argument.
1151         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1152         (dump_gimple_omp_task): Print taskwait with depend clauses.
1153         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1154         dump_omp_atomic_memory_order.
1155         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1156         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1157         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1158         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1159         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1160         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1161         ORT_UNTIED_TASKLOOP enumerators.
1162         (enum gimplify_defaultmap_kind): New.
1163         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1164         target_map_pointers_as_0len_arrays members, add defaultmap.
1165         (new_omp_context): Initialize defaultmap member.
1166         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1167         (maybe_fold_stmt): Don't fold even in host teams regions.
1168         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1169         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
1170         ctx->omp_firstprivatize_variable.
1171         (omp_add_variable): Don't add private/firstprivate for VLAs in
1172         ORT_TASKGROUP.
1173         (omp_default_clause): Print "taskloop" rather than "task" if
1174         ORT_*TASKLOOP.
1175         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1176         Handle new defaultmap clause kinds.
1177         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
1178         iterator to be lastprivate or private.  Fix up diagnostics if linear
1179         is used on collapse>1 simd iterator.
1180         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1181         (gimplify_omp_depend): New function.
1182         (gimplify_scan_omp_clauses): Add shared clause on parallel for
1183         combined parallel master taskloop{, simd} if taskloop has
1184         firstprivate, lastprivate or reduction clause.  Handle
1185         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
1186         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
1187         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
1188         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
1189         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
1190         lastprivate.
1191         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
1192         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.  
1193         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
1194         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1195         (gimplify_omp_task): Handle taskwait with depend clauses.
1196         (gimplify_omp_for): Add shared clause on parallel for combined
1197         parallel master taskloop{, simd} if taskloop has firstprivate,
1198         lastprivate or reduction clause.  Use ORT_TASKLOOP or
1199         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
1200         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
1201         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
1202         __for_end and __for_range temporaries on OMP_PARALLEL for
1203         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
1204         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1205         sandwiched in between two taskloops.
1206         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1207         instead of ctx->omp_firstprivatize_variable.
1208         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1209         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
1210         host teams, use gimplify_and_return_first etc. for body like
1211         for target or target data constructs, and at the end call
1212         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1213         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1214         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1215         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1216         gimple_omp_atomic_set_seq_cst calls.
1217         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1218         case, handle taskgroup clauses.
1219         * lto-streamer-out.c (hash_tree): Handle
1220         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1221         * Makefile.in (GTFILES): Add omp-general.h.
1222         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1223         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1224         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1225         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1226         BUILT_IN_GOMP_LOOP_DOACROSS_START,
1227         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1228         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1229         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1230         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1231         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1232         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1233         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1234         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1235         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1236         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1237         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1238         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1239         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1240         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1241         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1242         * omp-expand.c (workshare_safe_to_combine_p): Return false for
1243         non-worksharing loops.
1244         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1245         (determine_parallel_type): Don't combine parallel with worksharing
1246         which has _reductemp_ clause.
1247         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1248         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1249         if there is nonmonotonic modifier or if there is no modifier and no
1250         ordered clause.  For dynamic and guided schedule without monotonic
1251         and nonmonotonic modifier, default to nonmonotonic.
1252         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
1253         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1254         task reductions.
1255         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1256         there are any reduction clauses.
1257         (expand_taskwait_call): New function.
1258         (expand_teams_call): New function.
1259         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1260         expand_teams_call for it.  Formatting fix.  Handle taskwait with
1261         depend clauses.
1262         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
1263         of worksharing loops with task reductions.
1264         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1265         expansion of worksharing loops with task reductions.
1266         (expand_omp_sections): Handle expansion of sections with task
1267         reductions.
1268         (expand_omp_synch): For host teams call expand_omp_taskreg.
1269         (omp_memory_order_to_memmodel): New function.
1270         (expand_omp_atomic_load, expand_omp_atomic_store,
1271         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1272         instead of gimple_omp_atomic_seq_cst_p.
1273         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1274         depend clauses as a standalone directive.
1275         * omp-general.c (enum omp_requires): New variable.
1276         (omp_extract_for_data): Initialize have_reductemp member.  Allow
1277         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1278         GT_EXPR loops depending on incr sign.  Formatting fixes.
1279         * omp-general.h (struct omp_for_data): Add have_reductemp member.
1280         (enum omp_requires): New enum.
1281         (omp_requires_mask): Declare.
1282         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1283         Fix comment typos.
1284         * omp-low.c (struct omp_context): Add task_reductions and
1285         task_reduction_map fields.
1286         (is_host_teams_ctx): New function.
1287         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1288         (use_pointer_for_field): Use is_global_var instead of
1289         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1290         in outer contexts.
1291         (build_outer_var_ref): Ignore taskgroup outer contexts.
1292         (delete_omp_context): Release task_reductions and task_reduction_map.
1293         (scan_sharing_clauses): Don't add any fields for reduction clause on
1294         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
1295         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1296         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
1297         Handle OMP_CLAUSE_NONTEMPORAL.
1298         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1299         needed.
1300         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1301         clauses with task modifier.
1302         (scan_omp_task): Handle taskwait with depend clauses.
1303         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1304         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1305         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1306         (scan_omp_for): Fix comment formatting.
1307         (scan_omp_teams): Handle host teams constructs.
1308         (check_omp_nesting_restrictions): Allow teams with no outer
1309         OpenMP context.  Adjust diagnostics for teams strictly nested into
1310         some explicit OpenMP construct other than target.  Allow OpenMP atomics
1311         inside of simd regions.
1312         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1313         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1314         taskreg_nesting_level while scanning host teams construct.
1315         (task_reduction_read): New function.
1316         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1317         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1318         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
1319         second argument create_tmp_var if it is NULL.  Don't ignore shared
1320         clauses in is_host_teams_ctx contexts.  Handle
1321         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1322         clauses.
1323         (lower_reduction_clauses): Ignore reduction clauses with task
1324         modifier.  Remove second argument create_tmp_var if it is NULL.
1325         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1326         (lower_send_clauses): Ignore reduction clauses with task modifier.
1327         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
1328         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
1329         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1330         rely that it is the last stmt in body so far.  Ignore outer taskgroup
1331         contexts.
1332         (omp_task_reductions_find_first, omp_task_reduction_iterate,
1333         lower_omp_task_reductions): New functions.
1334         (lower_omp_sections): Handle reduction clauses with taskgroup
1335         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
1336         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1337         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
1338         modifiers.
1339         (lower_omp_taskgroup): Handle taskgroup reductions.
1340         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1341         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1342         (lower_depend_clauses): If there are any
1343         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1344         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
1345         seen, assume lowering is done already and return early.  Set kind
1346         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1347         (lower_omp_taskreg): Handle reduction clauses with task modifier on
1348         parallel construct.  Handle reduction clause on taskloop construct.
1349         Handle taskwait with depend clauses.
1350         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1351         for host teams constructs.
1352         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1353         nontemporal and _reductemp_ clause entries.
1354         (omp_clause_code_name): Likewise.
1355         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1356         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1357         * tree-core.h (enum omp_clause_code): Add
1358         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1359         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1360         (struct tree_base): Add omp_atomic_memory_order field into union.
1361         Remove OMP_ATOMIC_SEQ_CST comment.
1362         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1363         and OMP_CLAUSE_DEPEND_DEPOBJ.
1364         (struct tree_omp_clause): Add subcode.defaultmap_kind.
1365         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1366         OpenMP constructs with body and clauses operands.
1367         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1368         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1369         (OMP_TASKGROUP_CLAUSES): Define.
1370         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1371         OMP_CLAUSE__LOOPTEMP_.
1372         (OMP_ATOMIC_SEQ_CST): Remove.
1373         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1374         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1375         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1376         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1377         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1378         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1379         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1380         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1381         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1382         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1383         Define.
1384         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1385         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1386         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1387         (convert_local_omp_clauses): Likewise.  Remove useless test.
1388         * tree-parloops.c (create_call_for_reduction_1): Pass
1389         OMP_MEMORY_ORDER_RELAXED as new argument to
1390         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1391         * tree-pretty-print.c (dump_omp_iterators): New function.
1392         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1393         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
1394         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1395         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
1396         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
1397         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
1398         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1399         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1400         (dump_omp_atomic_memory_order): New function.
1401         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
1402         taskwait with depend clauses.
1403         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1404         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1405         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1406         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1407         write_ts_omp_clause_tree_pointers): Likewise.
1409 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1411         PR ipa/86395
1412         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1413         "-missed", "-note", and "-all" sub-options.
1414         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1415         API.
1416         (can_early_inline_edge_p): Likewise.
1417         (want_early_inline_function_p): Likewise.
1418         (want_inline_self_recursive_call_p): Likewise.
1419         (recursive_inlining): Likewise.
1420         (inline_small_functions): Likewise.
1421         (flatten_function): Likewise.
1422         (ipa_inline): Likewise.
1423         (inline_always_inline_functions): Likewise.
1424         (early_inline_small_functions): Likewise.
1425         (early_inliner): Likewise.
1426         * tree-inline.c (expand_call_inline): Likewise.
1428 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1430         * pretty-print.c (pp_format): Handle %f.
1431         (selftest::test_pp_format): Add test of %f.
1432         * pretty-print.h (pp_double): New macro.
1434 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1436         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1437         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1438         (dump_pretty_printer::decode_format): Implement "%C" for
1439         cgraph_node *.
1440         (selftest::test_capture_of_dump_calls): Rename "where" to
1441         "stmt_loc".  Convert test_decl to a function decl and set its
1442         location.  Add a symbol_table_test RAII instance and a
1443         cgraph_node, using it to test "%C" and dump_symtab_node.
1445 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1447         PR middle-end/87916
1448         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1450 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1452         * cgraph.c: Include "selftest.h".
1453         (saved_symtab): New variable.
1454         (selftest::symbol_table_test::symbol_table_test): New ctor.
1455         (selftest::symbol_table_test::~symbol_table_test): New dtor.
1456         (selftest::test_symbol_table_test): New test.
1457         (selftest::cgraph_c_tests): New.
1458         * cgraph.h (saved_symtab): New decl.
1459         (selftest::symbol_table_test): New class.
1460         * selftest-run-tests.c (selftest::run_tests): Call
1461         selftest::cgraph_c_tests.
1462         * selftest.h (selftest::cgraph_c_tests): New decl.
1464 2018-11-08  Richard Biener  <rguenther@suse.de>
1466         * tree-data-ref.h (lambda_int): New typedef.
1467         (lambda_vector_gcd): Adjust.
1468         (lambda_vector_new): Likewise.
1469         (lambda_matrix_new): Likewise.
1470         * tree-data-ref.c  (print_lambda_vector): Adjust.
1472 2018-11-08  Richard Biener  <rguenther@suse.de>
1474         PR tree-optimization/87929
1475         * tree-complex.c (expand_complex_comparison): Clean EH.
1477 2018-11-08  Martin Liska  <mliska@suse.cz>
1479         * doc/extend.texi: Reword.
1480         * predict.c (expr_expected_value_1): Likewise.
1482 2018-11-08  Richard Biener  <rguenther@suse.de>
1484         PR tree-optimization/87913
1485         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1486         of extreme values to ordered comparisons.
1488 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1490         PR middle-end/42726
1491         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1493 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1495         * doc/invoke.texi: Remove leading dash from @opindex entries
1496         throughout the file.
1498 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1500         PR driver/80828
1501         * doc/invoke.texi (Option Summary): Add -e and --entry.
1502         (Link Options): Likewise.
1504 2018-11-07  Nathan Sidwell  <nathan@acm.org>
1506         PR 87926
1507         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1508         --disable-checking bootstrap.
1510 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1512         * configure: Regenerated.
1514 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1516         PR c/87691
1517         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1518         to the mode of the widest field iff the widest field has mode class
1519         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1520         reference.
1522 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
1524         * common.opt: Add -Wattribute-warning.
1525         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1526         * expr.c (expand_expr_real_1): Add new attribute to warning_at
1527         call to allow user configure behavior of "warning" attribute.
1529 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
1531         * target.def: Put @: after every vs., e.g., and i.e. where it is
1532         followed by whitespace.
1533         * doc/extend.texi: Ditto.
1534         * doc/fragments.texi: Ditto.
1535         * doc/gimple.texi: Ditto.
1536         * doc/implement-c.texi: Ditto.
1537         * doc/install.texi: Ditto.
1538         * doc/invoke.texi: Ditto.
1539         * doc/md.texi: Ditto.
1540         * doc/plugins.texi: Ditto.
1541         * doc/rtl.texi: Ditto.
1542         * doc/sourcebuild.texi: Ditto.
1543         * doc/tm.texi.in: Ditto.
1544         * doc/ux.texi: Ditto.
1545         * doc/tm.texi: Regenerate.
1547 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1549         * config/arm/arm-cpus.in (ares): New entry.
1550         * config/arm/arm-tables.opt: Regenerate.
1551         * config/arm/arm-tune.md: Likewise.
1552         * doc/invoke.texi (ARM Options): Document ares.
1554 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1556         * config/aarch64/aarch64-cores.def (ares): Define.
1557         * config/aarch64/aarch64-tune.md: Regenerate.
1558         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1560 2018-11-07  Jan Hubicka  <jh@suse.cz>
1562         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1563         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1564         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1565         TYPE_DECL.
1567 2018-11-07  Richard Biener  <rguenther@suse.de>
1569         PR tree-optimization/87914
1570         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1571         of nested cycles.
1572         (vectorizable_reduction): Handle shifts and rotates by dispatching
1573         to vectorizable_shift.
1574         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1575         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
1576         def cases.
1577         (vectorizable_shift): Export and handle being called as
1578         vect_nested_cycle.
1579         (vect_analyze_stmt): Call vectorizable_shift after
1580         vectorizable_reduction.
1581         * tree-vectorizer.h (vectorizable_shift): Declare.
1583 2018-11-07  Jan Hubicka  <jh@suse.cz>
1585         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1586         than const decls in TREE_VALUE of enum.
1587         (dump_type_inheritance_graph): Improve duplicate dumping.
1588         (free_enum_values): New.
1589         (build_type_inheritance_graph): Use it.
1590         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1591         which are not main variants or not ODR types.
1592         (verify_type_variant): Expect variants to have no TYPE_VALUES.
1594 2018-11-07  Richard Biener  <rguenther@suse.de>
1596         * ipa-inline.c (want_inline_small_function_p): Compute
1597         big_speedup_p lazily and last.
1599 2018-11-07  Jan Hubicka  <jh@suse.cz>
1601         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1602         building incomplete variant of complete type.
1603         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1604         variant of complete type.
1606 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1608         * config/mips/mips.c: Fix typo in documentation of
1609         mips_loongson_ext2_prefetch_cookie.
1610         (mips_option_override): fix brain twister logical.
1611         * config/mips/mips.h: Fix typo in documentation of
1612         ISA_HAS_CTZ_CTO and define pattern.
1613         * config/mips/mips.md (prefetch): Hoist EXT2 above
1614         the 2EF/EXT block.
1615         (prefetch_indexed): Hoist EXT2 above the EXT block.
1617 2018-11-07  Jan Hubicka  <jh@suse.cz>
1619         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1620         return and parameter types of function and method types.
1621         (free_lang_data_in_cgraph): Update.
1623 2018-11-07  Martin Liska  <mliska@suse.cz>
1625         PR rtl-optimization/87868
1626         * postreload-gcse.c (eliminate_partially_redundant_load): Set
1627         threshold to max_count if we would overflow.
1628         * profile-count.h: Make max_count a public constant.
1630 2018-11-07  Martin Liska  <mliska@suse.cz>
1632         * mem-stats.h: Fix GNU coding style.
1634 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1636         * config/mips/gs264e.md: New.
1637         * config/mips/mips-cpus.def: Define gs264e.
1638         * config/mips/mips-tables.opt: Regenerate.
1639         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1640         gs264e.
1641         (mips_issue_rate): Add support for gs264e.
1642         (mips_multipass_dfa_lookahead): Likewise.
1643         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1644         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1645         (MIPS_ASE_MSA_SPEC): New.
1646         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1647         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1648         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1649         * config/mips/mips.md: Include gs264e.md.
1650         (processor): Add gs264e.
1651         * config/mips/mips.opt (MSA): Use Mask instead of Var.
1652         * doc/invoke.texi: Add gs264e to supported architectures.
1654 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1656         * config/mips/gs464e.md: New.
1657         * config/mips/mips-cpus.def: Define gs464e.
1658         * config/mips/mips-tables.opt: Regenerate.
1659         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1660         gs464e.
1661         (mips_issue_rate): Add support for gs464e.
1662         (mips_multipass_dfa_lookahead): Likewise.
1663         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1664         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1665         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1666         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1667         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1668         * config/mips/mips.md: Include gs464e.md.
1669         (processor): Add gs464e.
1670         * doc/invoke.texi: Add gs464e to supported architectures.
1672 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1674         * config/mips/loongson3a.md: Rename to ...
1675         * config/mips/gs464.md: ... here.
1676         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1677         as an alias of gs464 processor.
1678         * config/mips/mips-tables.opt: Regenerate.
1679         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1680         instead of PROCESSOR_LOONGSON_3A.
1681         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1682         TUNE_LOONGSON_3A.
1683         (mips_option_override): Enable MMI and EXT for gs464.
1684         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1685         Rename TUNE_LOONGSON_3A to TUNE_GS464.
1686         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1687         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1688         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1689         TARGET_LOONGSON_3A.
1690         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1691         (processor): Add gs464;
1692         * doc/invoke.texi: Add gs464 to supported architectures.
1694 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1696         * config/mips/mips-protos.h
1697         (mips_loongson_ext2_prefetch_cookie): New prototype.
1698         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1699         (mips_option_override): Enable TARGET_LOONGSON_EXT when
1700         TARGET_LOONGSON_EXT2 is true.
1701         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1702         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1703         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1704         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1705         TARGET_LOONGSON_EXT2.
1706         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1707         (define_insn "ctz<mode>2"): New insn pattern.
1708         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1709         (define_insn "prefetch_indexed_<mode>"): Include
1710         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1711         * config/mips/mips.opt (-mloongson-ext2): Add option.
1712         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1714 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1716         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1717         __mips_loongson_ext.
1718         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1719         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1720         -mloongson-ext.
1721         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1722         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1723         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1724         instead of TARGET_LOONGSON_3A.
1725         * config/mips/mips.opt (-mloongson-ext): Add option.
1726         * gcc/doc/invoke.texi (-mloongson-ext): Document.
1728 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1730         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1731         * config/mips/loongson.md: Move to ...
1732         * config/mips/loongson-mmi.md: here; Adjustment.
1733         * config/mips/loongson.h: Move to ...
1734         State as deprecated. Include loongson-mmiintrin.h for back
1735         compatibility and warning.
1736         * config/mips/loongson-mmiintrin.h: ... here.
1737         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1738         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1739         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1740         (mips_option_override): Make sure MMI use hard float;
1741         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1742         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1743         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1744         TARGET_LOONGSON_VECTORS.
1745         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1746         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1747         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1748         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1749         -mloongson-mmi.
1750         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1751         TARGET_LOONGSON_VECTORS.
1752         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1753         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1754         (Loongson MMI patterns): Include loongson-mmi.md instead of
1755         loongson.md.
1756         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1757         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1759 2018-11-07  Richard Biener  <rguenther@suse.de>
1761         PR lto/87906
1762         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1763         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1765 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
1767         PR rtl-optimization/87874
1768         * lra.c (lra_substitute_pseudo): Do not create a subreg for
1769         const wide ints.
1771 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
1773         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1774         if not in indexed or indirect form.
1775         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1776         (bswap<mode>2_store): Ditto.
1778 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
1780         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1781         the UNSPEC.
1783 2018-11-06  Richard Biener  <rguenther@suse.de>
1785         PR tree-optimization/86850
1786         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1787         instead of src.m_vec.
1789 2018-11-06  Jan Hubicka  <jh@suse.cz>
1791         * tree.c (fld_simplified_type_name): Break out form ...
1792         (free_lang_data_in_type): ... here.
1793         (fld_type_variant_equal_p): Use it.
1795 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1797         * config/default-d.c: Include memmodel.h.
1799         * config/sol2-d.c: New file.
1800         * config/t-sol2 (sol2-d.o): New rule.
1801         * config.gcc <*-*-solaris2*>: Set d_target_objs,
1802         target_has_targetdm.
1804 2018-11-06  Jan Hubicka  <jh@suse.cz>
1806         * tree.c (fld_type_variant): Also copy alignment; be sure that
1807         new variant is equal.
1809 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1811         PR target/87762
1812         * config/s390/s390.md: Add relative_long attribute.
1814 2018-11-06  Jan Hubicka  <jh@suse.cz>
1816         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1817         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1818         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1819         stream TYPE_NEEDS_CONSTRUCTING.
1820         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1821         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1823 2018-11-06  Richard Biener  <rguenther@suse.de>
1825         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1826         dump-scope ...
1827         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1829 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1831         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1832         REG_CLASS_CONTENTS[GEN_REGS].
1833         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1835 2018-11-06  Jan Hubicka  <jh@suse.cz>
1837          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1839 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1841         PR sanitizer/80953
1842         * config/sol2.h (ASAN_CC1_SPEC): Define.
1843         (LD_WHOLE_ARCHIVE_OPTION): Define.
1844         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1845         (ASAN_REJECT_SPEC): Provide default.
1846         (LIBASAN_EARLY_SPEC): Define.
1847         (LIBTSAN_EARLY_SPEC): Define.
1848         (LIBLSAN_EARLY_SPEC): Define.
1849         * config/i386/sol2.h (CC1_SPEC): Redefine.
1850         (ASAN_REJECT_SPEC): Define.
1852         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1853         (TARGET_ASAN_SHADOW_OFFSET): Define.
1854         (sparc_asan_shadow_offset): New function.
1855         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1856         (ASAN_REJECT_SPEC): Define.
1858 2018-11-06  Jan Hubicka  <jh@suse.cz>
1860         * tree.c (fld_type_variant): Copy canonical type.
1861         (fld_incomplete_type_of): Check that canonical types looks sane;
1862         copy canonical type.
1863         (verify_type): Accept when incomplete type has complete canonical type.
1865 2018-11-06  Jan Hubicka  <jh@suse.cz>
1867         * tree.c (free_lang_data): Reset overwite_assembler_name,
1868         print_xnode, print_decl, print_type and print_identifier of
1869         langhooks.
1871 2018-11-06  Richard Biener  <rguenther@suse.de>
1873         PR tree-optimization/87889
1874         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1875         Do nothing if old and new arg are the same
1877 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1879         PR target/87723
1880         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1881         attributes for operands 3 and 4.
1883 2018-11-06  Richard Biener  <rguenther@suse.de>
1885         PR middle-end/18041
1886         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1887         matching bitfield insertion.
1889 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
1891         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
1892         (reg_next_debug_use): New.
1893         (attempt_change): Propagate adjusted expression into affected
1894         debug insns.
1895         (merge_in_block): Track uses in debug insns.
1896         (pass_inc_dec::execute): Allocate and release
1897         reg_next_debug_use.
1899 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1901         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1902         (_mm512_fixupimm_round_pd): Update parameters and builtin.
1903         (_mm512_maskz_fixupimm_round_pd): Ditto.
1904         (_mm512_fixupimm_round_ps): Ditto.
1905         (_mm512_maskz_fixupimm_round_ps): Ditto.
1906         (_mm_fixupimm_round_sd): Ditto.
1907         (_mm_maskz_fixupimm_round_sd): Ditto.
1908         (_mm_fixupimm_round_ss): Ditto.
1909         (_mm_maskz_fixupimm_round_ss): Ditto.
1910         (_mm512_fixupimm_pd): Ditto.
1911         (_mm512_maskz_fixupimm_pd): Ditto.
1912         (_mm512_fixupimm_ps): Ditto.
1913         (_mm512_maskz_fixupimm_ps): Ditto.
1914         (_mm_fixupimm_sd): Ditto.
1915         (_mm_maskz_fixupimm_sd): Ditto.
1916         (_mm_fixupimm_ss): Ditto.
1917         (_mm_maskz_fixupimm_ss): Ditto.
1918         (_mm512_mask_fixupimm_round_pd): Update builtin.
1919         (_mm512_mask_fixupimm_round_ps): Ditto.
1920         (_mm_mask_fixupimm_round_sd): Ditto.
1921         (_mm_mask_fixupimm_round_ss): Ditto.
1922         (_mm512_mask_fixupimm_pd): Ditto.
1923         (_mm512_mask_fixupimm_ps): Ditto.
1924         (_mm_mask_fixupimm_sd): Ditto.
1925         (_mm_mask_fixupimm_ss): Ditto.
1926         * config/i386/avx512vlintrin.h:
1927         (_mm256_fixupimm_pd): Update parameters and builtin.
1928         (_mm256_maskz_fixupimm_pd): Ditto.
1929         (_mm256_fixupimm_ps): Ditto.
1930         (_mm256_maskz_fixupimm_ps): Ditto.
1931         (_mm_fixupimm_pd): Ditto.
1932         (_mm_maskz_fixupimm_pd): Ditto.
1933         (_mm_fixupimm_ps): Ditto.
1934         (_mm_maskz_fixupimm_ps): Ditto.
1935         (_mm256_mask_fixupimm_pd): Update builtin.
1936         (_mm256_mask_fixupimm_ps): Ditto.
1937         (_mm_mask_fixupimm_pd): Ditto.
1938         (_mm_mask_fixupimm_ps): Ditto.
1939         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1940         * config/i386/i386-builtin.def: Update builtin definitions.
1941         * config/i386/i386.c: Handle new builtin types and remove useless ones.
1942         * config/i386/sse.md: Update VFIXUPIMM* patterns.
1943         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1944         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1945         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1946         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1947         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1948         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1949         * config/i386/subst.md:
1950         (round_saeonly_sd_mask_operand4): Add new subst_attr.
1951         (round_saeonly_sd_mask_op4): Ditto.
1952         (round_saeonly_expand_operand5): Ditto.
1953         (round_saeonly_expand): Update.
1955 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
1957         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1959 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
1961         PR rtl-optimization/87871
1962         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1964 2018-11-05  Paul Koning  <ni1d@arrl.net>
1966         * doc/sourcebuild.texi (target attributes): Document new "inf"
1967         effective target keyword.
1969 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1971         * config/s390/s390.c (s390_register_move_cost): Increase costs for
1972         moves involving the CC reg.
1974 2018-11-05  Richard Biener  <rguenther@suse.de>
1976         PR tree-optimization/87873
1977         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1978         argument.
1979         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1980         * tree-vect-loop.c (vect_transform_loop): When splitting the
1981         loop exit also create forwarder PHIs for constants.
1982         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1983         Handle constant to_arg, add extra checking we match up the correct
1984         PHIs.
1986 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1988         * config/s390/s390.md: QImode and HImode for load on condition.
1990 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1992         * config/s390/predicates.md: Fix typo.
1993         * config/s390/s390.md: Allow immediates for load on condition.
1995 2018-11-05  Martin Liska  <mliska@suse.cz>
1997         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1998         * bitmap.h (struct bitmap_usage): Likewise.
1999         * ggc-common.c (SCALE): Remove.
2000         (LABEL): Likewise.
2001         (struct ggc_usage): Use SIZE_AMOUNT. And update
2002         compare method.
2003         * ggc-page.c (SCALE): Remove.
2004         (STAT_LABEL): Remove.
2005         (ggc_print_statistics): Use SIZE_AMOUNT.
2006         * gimple.h (SCALE): Remove.
2007         (LABEL): Likewise.
2008         * input.c (ONE_K): Remove.
2009         (ONE_M): Likewise.
2010         (SCALE): Likewise.
2011         (STAT_LABEL): Likewise.
2012         (FORMAT_AMOUNT): Likewise.
2013         (dump_line_table_statistics): Use SIZE_AMOUNT.
2014         * mem-stats.h (struct mem_usage): Likewise.
2015         * rtl.c (dump_rtx_statistics): Likewise.
2016         (rtx_alloc_counts): Change type to size_t.
2017         (rtx_alloc_sizes): Likewise.
2018         (rtx_count_cmp): New.
2019         (dump_rtx_statistics): Sort first based on counts.
2020         * tree.c (tree_nodes_cmp): New.
2021         (tree_codes_cmp): New.
2022         (dump_tree_statistics): Sort first based on counts.
2023         * system.h (ONE_K): New.
2024         (ONE_M): Likewise.
2025         (SIZE_SCALE): Likewise.
2026         (SIZE_LABEL): Likewise.
2027         (SIZE_AMOUNT): Likewise.
2028         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2029         * tree-dfa.c (dump_dfa_stats): Likewise.
2030         * tree-phinodes.c (phinodes_print_statistics): Likewise.
2031         * tree-ssanames.c (ssanames_print_statistics): Likewise.
2032         * tree.c (dump_tree_statistics): Likewise.
2033         * vec.c (struct vec_usage): Likewise.
2034         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2035         trigger a -Werror=format-overflow with
2036         --enable-gather-detailed-stats.
2038 2018-11-05  Martin Liska  <mliska@suse.cz>
2040         * mem-stats.h (mem_alloc_description::release_instance_overhead):
2041         Return T *.
2042         * vec.c (struct vec_usage): Register m_element_size.
2043         (vec_prefix::register_overhead): New arguments: elements and
2044         element_size.
2045         (vec_prefix::release_overhead): Subtract elements.
2046         * vec.h (struct vec_prefix): Change signature.
2047         (va_heap::reserve): Pass proper arguments.
2048         (va_heap::release): Likewise.
2050 2018-11-05  Martin Liska  <mliska@suse.cz>
2052         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2053         style.
2054         * vec.c: Likewise.
2056 2018-11-05  Richard Biener  <rguenther@suse.de>
2058         * tree-scalar-evolution.h (final_value_replacement_loop): Update
2059         prototype.
2060         * tree-scalar-evolution.c (final_value_replacement_loop): Return
2061         whether anything was done.
2062         (scev_const_prop): Remove constant propagation part, fold
2063         remains into ...
2064         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2065         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2066         conditionally.
2068 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
2070         PR tree-optimization/87859
2071         * gimple-ssa-store-merging.c (struct merged_store_group): Add
2072         only_constants and first_nonmergeable_order members.
2073         (merged_store_group::merged_store_group): Initialize them.
2074         (merged_store_group::do_merge): Clear only_constants member if
2075         adding something other than INTEGER_CST store.
2076         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2077         stores with order >= first_nonmergeable_order.  Use
2078         merged_store->only_constants instead of always recomputing it.
2079         Set merged_store->first_nonmergeable_order if we've skipped any
2080         stores.  Attempt to merge overlapping INTEGER_CST stores that
2081         we would otherwise skip.
2083         PR sanitizer/87837
2084         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2086 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
2088         PR target/87853
2089         * config/i386/emmintrin.h (__v16qs): New to cope with option
2090         -funsigned-char.
2091         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2092         (_mm_cmplt_epi8): Likewise.
2093         (_mm_cmpgt_epi8): Likewise.
2095 2018-11-05  Richard Biener  <rguenther@suse.de>
2097         PR rtl-optimization/87852
2098         * fwprop.c (use_killed_between): Only consider single-defs of the
2099         use whose definition statement dominates the use.
2101 2018-11-05  Martin Liska  <mliska@suse.cz>
2103         PR web/87829
2104         * doc/invoke.texi: Remove options that are
2105         not disabled with -Os.
2107 2018-11-05  Martin Liska  <mliska@suse.cz>
2109         PR c/87811
2110         * doc/extend.texi: Update constrain about the last argument
2111         of __builtin_expect_with_probability.
2113 2018-11-05  Martin Liska  <mliska@suse.cz>
2115         PR c/87811
2116         * predict.c (expr_expected_value_1): Verify
2117         that last argument is a real constants and emit
2118         error.
2120 2018-11-05  Martin Liska  <mliska@suse.cz>
2122         PR gcov-profile/77698
2123         * ipa-profile.c (ipa_profile): Adjust hotness threshold
2124         only in LTO mode.
2126 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2128         PR tree-optimization/86572
2129         * builtins.c (c_strlen): Handle negative offsets in a safe way.
2131 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2133         PR tree-optimization/87672
2134         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2135         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2137 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
2139         PR middle-end/58372
2140         * cfgexpand.c (pass_expand::execute): Move the call to
2141         finish_eh_generation in front of the call to expand_stack_alignment.
2143 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2145         * common/config/i386/i386-common.c (processor_alias_table): Add
2146         znver2 entry.
2147         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2148         (case ${target}): Add znver2.
2149         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2150         -march=native recognize znver2 processors.
2151         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2152         * config/i386/i386.c (m_znver2): New definition.
2153         (m_ZNVER): New definition.
2154         (m_AMD_MULTIPLE): Includes m_znver2.
2155         (processor_cost_table): Add znver2 entry.
2156         (processor_target_table): Add znver2 entry.
2157         (get_builtin_code_for_version): Set priority for
2158         PROCESSOR_ZNVER2.
2159         (processor_model): Add M_AMDFAM17H_ZNVER2.
2160         (arch_names_table): Ditto.
2161         (ix86_reassociation_width): Include znver2.
2162         * config/i386/i386.h (TARGET_znver2): New definition.
2163         (struct ix86_size_cost): Add TARGET_ZNVER2.
2164         (enum processor_type): Add PROCESSOR_ZNVER2.
2165         * config/i386/i386.md (define_attr "cpu"): Add znver2.
2166         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2167         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2168         (ix86_adjust_cost): Add znver2.
2169         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
2170         * gcc/doc/extend.texi: Add details about znver2.
2171         * gcc/doc/invoke.texi: Add details about znver2.
2173 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
2175         PR target/87079
2177         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2178         pattern.
2180 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2182         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2183         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2185 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
2187         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2188         shrink-wrapping when -mtrack-speculation.
2190 2018-11-02  Richard Biener  <rguenther@suse.de>
2192         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2193         (pop_cost_one_pair): Do not free pair.
2194         (pop_best_coalesce): Likewise.
2195         (create_coalesce_list): Initialize obstack.
2196         (delete_coalesce_list): Free obstack.
2197         (find_coalesce_pair): Obstack-allocate coalesce pairs.
2198         (add_cost_one_coalesce): Likewise.
2199         (struct live_track): Remove bitmap pointer indirections.
2200         (new_live_track): Adjust.
2201         (delete_live_track): Likewise.
2202         (live_track_remove_partition): Likewise.
2203         (live_track_add_partition): Likewise.
2204         (live_track_live_p): Likewise.
2205         (live_track_process_def): Likewise.
2206         (live_track_clear_base_vars): Likewise.
2208 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2210         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2211         * configure: Regenerate.
2212         * config.in: Regenerate.
2213         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2214         HAVE_AS_REGISTER_PSEUDO_OP guard.
2215         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2216         !HAVE_AS_REGISTER_PSEUDO_OP support.
2217         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2218         guard.
2220 2018-11-02  Richard Biener  <rguenther@suse.de>
2222         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2223         with is_type_die.
2225 2018-11-02  Richard Biener  <rguenther@suse.de>
2227         PR tree-optimization/87776
2228         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2229         executable when iterating but running into rpo-vn-max-loop-depth
2230         and not eliding the iteration.
2232 2018-11-30  Jan Hubicka  <jh@suse.cz>
2234         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2235         TYPE_DECL.
2237 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
2239         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2240         prototype.
2241         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2242         Combine with rs6000_address_for_fpconvert.
2243         (rs6000_address_for_fpconvert): Combine with
2244         rs6000_force_indexed_or_indirect_mem.
2245         (rs6000_expand_vector_init): Change function call from
2246         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2247         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2248         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2249         (floatsi<mode>2_lfiwax_mem): Ditto.
2250         (floatunssi<mode>2_lfiwzx): Ditto.
2251         (floatunssi<mode>2_lfiwzx_mem): Ditto.
2252         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2253         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2254         (fix_trunc<mode>si2_stfiwx): Ditto.
2255         (fixuns_trunc<mode>si2_stfiwx): Ditto.
2256         (float_<mode>si2_hw): Ditto.
2257         (floatuns_<mode>si2_hw): Ditto.
2258         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2259         (vsx_splat_<mode>): Ditto.
2261 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
2263         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2264         at end of assembler input text.
2265         * configure: Regenerate.
2267 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
2269         PR tree-optimization/87826
2270         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2271         negative or larger or equal to type's precision.
2273 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
2275         * opts.c (default_options_table): Do not enable
2276         OPT_fdelayed_branch at -Og.
2277         * doc/invoke.texi (-fdelayed-branch): Document it.
2279 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2281         * optabs-libfuncs.c (build_libfunc_function_visibility):
2282         New, split out from...
2283         (build_libfunc_function): ... here.
2284         (init_one_libfunc_visibility): New, split out from ...
2285         (init_one_libfunc): ... here.
2287         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2288         scratch register need not be early-clobber.  Document the reason
2289         why we cannot use ST<OP>.
2291 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
2293         PR bootstrap/82856
2294         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
2295         line for second argument of AC_DEFINE_UNQUOTED.
2296         * doc/install.texi (Tools/packages necessary for modifying GCC):
2297         Update to autoconf 2.69 and automake 1.15.1.
2298         * aclocal.m4, config.in, configure: Regenerate.
2300 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
2302         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2303         initialization.
2305 2018-10-31  Martin Liska  <mliska@suse.cz>
2307         PR driver/83193
2308         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2309         Add new argument invalid_extension.
2310         (aarch64_get_all_extension_candidates): New function.
2311         (aarch64_rewrite_selected_cpu): Add NULL to function call.
2312         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2313         new argument.
2314         (aarch64_get_all_extension_candidates): New function.
2315         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2316         argument invalid_extension.
2317         (aarch64_parse_cpu): Likewise.
2318         (aarch64_print_hint_for_extensions): New function.
2319         (aarch64_validate_mcpu): Provide hint about invalid extension.
2320         (aarch64_validate_march): Likewise.
2321         (aarch64_handle_attr_arch): Pass new argument.
2322         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2323         (aarch64_handle_attr_isa_flags): Likewise.
2325 2018-10-31  Richard Biener  <rguenther@suse.de>
2327         PR middle-end/70359
2328         PR middle-end/86270
2329         * tree-outof-ssa.c (insert_backedge_copies): Restrict
2330         copy generation to useful cases.  Place the copy before
2331         the definition of the backedge value when possible.
2333 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2335         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2336         * config/arc/arc.c (arc_active_insn): New function.
2337         (check_store_cacheline_hazard): Likewise.
2338         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2339         (arc_override_options): Disable delay slot scheduler for older
2340         A7.
2341         (arc_store_addr_hazard_p): New implementation, old one renamed to
2342         ...
2343         (arc_store_addr_hazard_internal_p): Renamed.
2344         (arc_reorg): Don't combine into brcc instructions which are part
2345         of hardware hazard solution.
2346         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2347         (tune_arc700): Likewise.
2348         * config/arc/arc.opt (arc7xx): New tune value.
2349         * config/arc/arc700.md: Improve A7 scheduler.
2351 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2353         * config/arc/arc.c (arc_override_options): Remove
2354         TARGET_COMPACT_CASESI.
2355         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2356         (CASE_VECTOR_MODE): Likewise.
2357         (CASE_VECTOR_PC_RELATIVE): Likewise.
2358         (CASE_VECTOR_SHORTEN_MODE): Likewise.
2359         (CASE_VECTOR_SHORTEN_MODE1): Delete.
2360         (ADDR_VEC_ALIGN): Update.
2361         (ASM_OUTPUT_CASE_LABEL): Undefine.
2362         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2363         (TARGET_BI_BIH): Define.
2364         (DEFAULT_BRANCH_INDEX): Likewise.
2365         * config/arc/arc.md (casesi): Rework to accept BI/BIH
2366         instructions, remove compact_casesi use case.
2367         (casesi_compact_jump): Remove.
2368         (casesi_dispatch): New pattern.
2369         * config/arc/arc.opt: Add mbranch-index option. Deprecate
2370         compact_casesi option.
2371         * doc/invoke.texi: Document mbranch-index option.
2373 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2375         * config/arc/arc.c (arc_get_tp): Remove function.
2376         (arc_emit_call_tls_get_addr): Likewise.
2377         (arc_call_tls_get_addr): New function.
2378         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2379         * config/arc/arc.md (tls_load_tp_soft): Remove.
2380         (tls_gd_get_addr): Likewise.
2382 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2384         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2385         (mulsi3_600_lib): Remove pattern.
2386         (umulsi3_highpart_600_lib_le): Likewise.
2387         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2388         (umulsidi3): Remove call to umulsidi3_600_lib.
2389         (umulsidi3_600_lib): Remove pattern.
2390         (peephole2): Remove peephole using the above deprecated patterns.
2392 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2394         PR target/87374
2395         * config/arm/arm.c (arm_option_check_internal): Disable the combined
2396         use of -mslow-flash-data and -mword-relocations.
2397         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2398         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2399         flag_pic.
2400         * doc/invoke.texi (-mword-relocations): Mention conflict with
2401         -mslow-flash-data.
2402         (-mslow-flash-data): Reciprocally.
2404 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2406         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2407         16-byte modes held in GP registers to use an even regno.
2409         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2410         (aarch64_atomic_ldop_supported_p): Remove.
2411         (aarch64_gen_atomic_ldop): Remove.
2412         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2413         Fully expand LSE operations here.
2414         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2415         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2416         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2417         and use ATOMIC_LDOP instead; use register_operand for the input;
2418         drop the split and emit insns directly.
2419         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2420         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2421         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2423         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2424         (aarch64_gen_atomic_ldop): Don't call it.
2425         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2426         Use aarch64_reg_or_zero.
2427         (aarch64_atomic_exchange<ALLI>): Likewise.
2428         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2429         operand 0; use aarch64_reg_or_zero for input; merge ...
2430         (@aarch64_atomic_swp<ALLI>): ... this and remove.
2432         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2433         (aarch64_split_compare_and_swap): Use it.
2434         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
2435         test oldval against the proper predicate.
2436         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2437         Use nonmemory_operand for expected.
2438         (cas_short_expected_pred): New.
2439         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2440         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2441         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2442         (aarch64_plushi_operand): New.
2444         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2445         Force oldval into the rval register for TARGET_LSE; emit the compare
2446         during initial expansion so that it may be deleted if unused.
2447         (aarch64_gen_atomic_cas): Remove.
2448         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2449         Change =&r to +r for operand 0; use match_dup for operand 2;
2450         remove is_weak and mod_f operands as unused.  Drop the split
2451         and merge with...
2452         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2453         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2454         (@aarch64_atomic_cas<GPI>): Similarly.
2456 2018-10-31  Richard Biener  <rguenther@suse.de>
2458         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2459         using ABSU_EXPR.
2461 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2463         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2464         * config/aarch64/aarch64.md: Include saphira.md
2465         * config/aarch64/saphira.md: New file for pipeline description.
2467 2018-10-30  Martin Sebor  <msebor@redhat.com>
2469         PR middle-end/87041
2470         * gimple-ssa-sprintf.c (format_directive): Use %G to include
2471         inlining context.
2472         (sprintf_dom_walker::compute_format_length):
2473         Avoid setting POSUNDER4K here.
2474         (get_destination_size): Handle null argument values.
2475         (get_user_idx_format): New function.
2476         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2477         functions, including user-defined with attribute format printf.
2478         Use %G to include inlining context.
2479         Set POSUNDER4K here.
2481 2018-10-30  Jan Hubicka  <jh@suse.cz>
2483         * params.def (lto-partitions): Bump from 32 to 128.
2485 2018-10-30  Jan Hubicka  <jh@suse.cz>
2487         * tree.c
2488         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2489         head in file.
2490         (free_lang_data_in_type): Forward declare.
2491         (fld_type_variant_equal_p): New function.
2492         (fld_type_variant): New function
2493         (fld_incomplete_types): New hash.
2494         (fld_incomplete_type_of): New function
2495         (fld_simplfied-type): New function.
2496         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2497         (free_lang_data): Allocate and free fld_incomplete_type; update call
2498         of free_lang_data_in_decl.
2500 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
2502         * gcov.c (output_lines): Remove duplicate line.
2504 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
2506         * config/rs6000/rs6000.md (bswapdi2): Force address into register
2507         if not in indexed or indirect form.
2508         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2509         (bswapdi2_store): Ditto.
2510         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2511         helper function.
2512         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2513         Prototype for helper function.
2515 2018-10-30  Martin Sebor  <msebor@redhat.com>
2517         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2518         (target, pragma GCC optimize, pragma GCC target): Ditto.
2520 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
2522         * doc/extend.texi: Fix prototype and description of
2523         __builtin_expect_with_probability.
2525 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
2527         * cgraph.h (clone_function_name_1): Replaced by new
2528           clone_function_name_numbered that takes name as string; for
2529           privatize_symbol_name_1 use only.
2530           (clone_function_name): Renamed to
2531           clone_function_name_numbered to be explicit about numbering.
2532           (clone_function_name): New two-argument function that does
2533           not number its output.
2534           (clone_function_name): New three-argument function that
2535           takes a number to append to its output.
2536         * cgraphclones.c (duplicate_thunk_for_node):
2537           (clone_function_name_1): Renamed.
2538           (clone_function_name_numbered): Two new functions.
2539           (clone_function_name): Improved documentation.
2540           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2541         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2542         * final.c (final_scan_insn_1): Use the new clone_function_name
2543           without numbering.
2544         * multiple_target.c (create_dispatcher_calls): Ditto.
2545           (create_target_clone): Ditto.
2546         * omp-expand.c (grid_expand_target_grid_body): Ditto.
2547         * omp-low.c (create_omp_child_function_name): Ditto.
2548         * omp-simd-clone.c (simd_clone_create): Ditto.
2549         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2550           new clone_function_name without numbering.
2552 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
2554         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2555         Assert that the allocation size is not zero.
2557 2018-10-30  Richard Biener  <rguenther@suse.de>
2559         PR tree-optimization/87800
2560         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2561         non-induction or reduction PHIs.
2563 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2565         * config/aarch64/falkor-tag-collision-avoidance.c
2566         (execute_tag_collision_avoidance): Call df_note_add_problem.
2568 2018-10-30  Martin Liska  <mliska@suse.cz>
2570         * doc/extend.texi: Fix typo in documentation
2571         of __builtin_expect_with_probability.
2573 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2575         PR c++/87721
2576         * input.c (get_substring_ranges_for_loc): Detect if
2577         linemap_resolve_location gives us a NULL map, and reject
2578         this case.
2580 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
2582         * config.gcc (xstormy16-*-elf): Set tm_d_file.
2584 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2585             Martin Sebor  <msebor@redhat.com>
2586             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2588         * doc/ux.texi (Quoting): New subsection, adapted from material at
2589         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2590         MartinSebor and ManuelLopezIbanez.
2591         (Fix-it hints): Note that fix-it hints shouldn't be marked for
2592         translation.
2594 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
2596         PR middle-end/87469
2597         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2598         max value.
2600 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
2602         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2604 2018-10-29  Paul Koning  <ni1d@arrl.net>
2606         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2608 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
2610         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2611         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2612         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2613         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2614         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2615         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2616         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2617         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2618         Change 'vector' to '__vector'.
2619         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2620         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2621         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2622         _mm_avg_pu16): Likewise.  And, whitespace corrections.
2624 2018-10-29  Richard Biener  <rguenther@suse.de>
2626         PR tree-optimization/87785
2627         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2628         internal defs.
2630 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2632         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2634 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2636         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2637         ports configuration macro, defaults to "gnu".
2638         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2639         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2641 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2643         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2645 2018-10-29  Richard Biener  <rguenther@suse.de>
2647         PR tree-optimization/87790
2648         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2649         (vect_make_slp_decision): Adjust.
2650         (vect_slp_analyze_bb_1): Likewise.
2651         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2652         edges.
2654 2018-10-29  Richard Biener  <rguenther@suse.de>
2656         PR tree-optimization/87785
2657         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2658         and processing.
2659         (vect_build_slp_tree): Likewise.
2660         (vect_gather_slp_loads): New function.
2661         (vect_analyze_slp_instance): Gather loads separately from the
2662         SLP tree build.
2664 2018-10-29  Martin Liska  <mliska@suse.cz>
2666         * Makefile.in: Make dependency to json.o.
2667         * doc/gcov.texi: Document new JSON format, remove
2668         old intermediate format documentation.
2669         * gcov.c (struct function_info): Come up with m_name and
2670         m_demangled_name.
2671         (function_info::function_info): Initialize it.
2672         (function_info::~function_info): Release it.
2673         (main): Rename flag_intermediate_format to flag_json_format.
2674         (print_usage): Describe --json-format.
2675         (process_args): Set flag_json_format.
2676         (output_intermediate_line): Remove.
2677         (output_intermediate_json_line): Likewise.
2678         (get_gcov_intermediate_filename): Return new extension
2679         ".gcov.json.gz".
2680         (output_intermediate_file): Implement JSON emission.
2681         (output_json_intermediate_file): Implement JSON emission.
2682         (generate_results): Use ::get_name for function name.
2683         Handle JSON output file.
2684         (read_graph_file): Use ::get_name instead of cplus_demangle.
2685         (read_count_file): Likewise.
2686         (solve_flow_graph): Likewise.
2687         (add_line_counts): Likewise.
2688         (accumulate_line_counts): Use new flag_json_format.
2689         (output_function_details): Use ::get_name instead of cplus_demangle.
2690         (output_lines): Likewise.
2691         * json.cc (test_writing_literals): Add new tests.
2692         * json.h (class literal): Add new boolean constructor.
2694 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
2696         PR rtl-optimization/87701
2697         PR rtl-optimization/87780
2698         * combine.c (make_more_copies): Rewrite.
2700 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
2702         * doc/generic.texi (ABSU_EXPR): Document.
2703         * match.pd (absu(x)*absu(x) -> x*x): Handle.
2704         (absu(absu(X)) -> absu(X)): Likewise.
2705         (absu(-X) -> absu(X)): Likewise.
2706         (absu(X)  where X is nonnegative -> X): Likewise.
2708 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
2710         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2711         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2712         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2713         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2714         (s-tm-texi): Also check timestamp on d-target.def.
2715         (generated_files): Add TM_D_H and d-target-hooks-def.h.
2716         (build/genhooks.o): Also depend on D_TARGET_DEF.
2717         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2718         variables.
2719         * config/aarch64/aarch64-d.c: New file.
2720         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2721         Define.
2722         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2723         prototype.
2724         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2725         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2726         * config/arm/arm-d.c: New file.
2727         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2728         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2729         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2730         * config/arm/t-arm (arm-d.o): New rule.
2731         * config/default-d.c: New file.
2732         * config/glibc-d.c: New file.
2733         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2734         * config/i386/i386-d.c: New file.
2735         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2736         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2737         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2738         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2739         * config/i386/t-i386 (i386-d.o): New rule.
2740         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2741         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2742         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2743         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2744         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2745         * config/mips/mips-d.c: New file.
2746         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2747         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2748         * config/mips/t-mips (mips-d.o): New rule.
2749         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2750         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2751         * config/powerpcspe/powerpcspe-d.c: New file.
2752         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2753         New prototype.
2754         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2755         Support GNU D by using 0 as the language type.
2756         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2757         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2758         * config/riscv/riscv-d.c: New file.
2759         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2760         prototype.
2761         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2762         * config/riscv/t-riscv (riscv-d.o): New rule.
2763         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2764         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2765         * config/rs6000/rs6000-d.c: New file.
2766         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2767         prototype.
2768         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2769         Support GNU D by using 0 as the language type.
2770         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2771         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2772         * config/s390/s390-d.c: New file.
2773         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2774         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2775         * config/s390/t-s390 (s390-d.o): New rule.
2776         * config/sparc/sparc-d.c: New file.
2777         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2778         prototype.
2779         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2780         * config/sparc/t-sparc (sparc-d.o): New rule.
2781         * config/t-glibc (glibc-d.o): New rule.
2782         * configure: Regenerated.
2783         * configure.ac (tm_d_file): New variable.
2784         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2785         * doc/contrib.texi (Contributors): Add self for the D frontend.
2786         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2787         * doc/install.texi (Configuration): Mention libphobos as an option for
2788         --enable-shared.  Mention d as an option for --enable-languages.
2789         (Testing): Mention check-d as a target.
2790         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2791         name suffixes.  Mention d as a -x option.
2792         * doc/sourcebuild.texi (Top Level): Mention libphobos.
2793         * doc/standards.texi (Standards): Add section on D language.
2794         * doc/tm.texi: Regenerated.
2795         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2796         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2797         * dwarf2out.c (is_dlang): New function.
2798         (gen_compile_unit_die): Use DW_LANG_D for D.
2799         (declare_in_namespace): Return module die for D, instead of adding
2800         extra declarations into the namespace.
2801         (gen_namespace_die): Generate DW_TAG_module for D.
2802         (gen_decl_die): Handle CONST_DECLSs for D.
2803         (dwarf2out_decl): Likewise.
2804         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2805         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2806         kinds of aggregates.
2807         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2808         * genhooks.c: Include d/d-target.def.
2810 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
2812         PR target/85669
2813         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2814         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2815         (STACK_DYNAMIC_OFFSET): Likewise.
2817 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
2819         PR target/80024
2820         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2821         error message.
2823 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
2825         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2826         return type and other typos.
2828 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2830         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2831         a shorter sequence with fewer branches.
2832         (emit_final_str_compare_gpr): Ditto.
2834 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2836         * config/rs6000/tmmintrin.h: New file.
2837         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2839 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2841         * config/rs6000/mmintrin.h: Enable 32bit compilation.
2842         * config/rs6000/xmmintrin.h: Likewise.
2844 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2846         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2848 2018-10-26  Richard Biener  <rguenther@suse.de>
2850         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2851         and wrapper.
2852         (vect_mark_slp_stmts_relevant): Likewise.
2853         (vect_detect_hybrid_slp_stmts): Likewise.
2854         (vect_bb_slp_scalar_cost): Likewise.
2855         (vect_remove_slp_scalar_calls): Likewise.
2857 2018-10-26  Jan Hubicka  <jh@suse.cz>
2859         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2860         (warn_types_mismatch): Fix walk of DECL_NAME.
2861         (odr_types_equivalent_p): Fix overactive assert.
2863 2018-10-26  Richard Biener  <rguenther@suse.de>
2865         PR tree-optimization/87105
2866         * tree-vectorizer.h (_slp_tree::refcnt): New member.
2867         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2868         refcnt.
2869         (vect_create_new_slp_node): Initialize refcnt to one.
2870         (bst_traits): Move.
2871         (scalar_stmts_set_t, bst_fail): Remove.
2872         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2873         (vect_build_slp_tree): Add bst_map argument and lookup
2874         already created SLP nodes.
2875         (vect_print_slp_tree): Handle a SLP graph, print SLP node
2876         addresses.
2877         (vect_slp_rearrange_stmts): Handle a SLP graph.
2878         (vect_analyze_slp_instance): Adjust and free SLP nodes from
2879         the CSE map.  Fix indenting.
2880         (vect_schedule_slp_instance): Add short-cut.
2882 2018-10-26  Martin Liska  <mliska@suse.cz>
2884         PR testsuite/86158
2885         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2886         addr_expr and not with pointers.
2888 2018-10-26  Jan Hubicka  <jh@suse.cz>
2890         * tree.c (free_lang_data_in_type): Only check main variants.
2891         * ipa-devirt.c (warn_odr): Make static.
2892         (types_same_for_odr): Drop strict variant.
2893         (types_odr_comparable): Likewise.
2894         (odr_or_derived_type_p): Look for main variants.
2895         (odr_name_hasher::equal): Cleanup comment.
2896         (odr_subtypes_equivalent): Add warn and warned arguments; check main
2897         variants.
2898         (type_variants_equivalent_p): break out from ...
2899         (odr_types_equivalent): ... here; go for main variants where needed.
2900         (warn_odr): ... here; turn static.
2901         (warn_types_mismatch): Compare mangled names of main variants.
2902         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2903         (type_with_linkage_p): Sanity check that we look at main variant.
2904         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2905         * tree.h (types_same_for_odr): Drop strict argument.
2907 2018-10-26  Richard Biener  <rguenther@suse.de>
2909         PR tree-optimization/87746
2910         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2911         Simplify and fix WRT strided store groups with size not
2912         equal to step in element count.
2913         (vect_analyze_group_access_1): Dump the whole group.
2915 2018-10-25  Carl Love  <cel@us.ibm.com>
2917         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2918         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2919         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
2920         precicion entry for each overloaded builtin.
2921         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2922         VSCEDPUO): Rename overloaded name.
2923         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2924         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2925         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2926         define_expand for xscmpexqp instruction.
2927         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2929 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2930             Jinsong Ji <jji@us.ibm.com>
2932         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2933         function with vec_sl.
2934         (_mm_slli_epi32): Likewise.
2935         (_mm_slli_epi64): Likewise.
2936         (_mm_srai_epi16): Replace deprecated function with vec_sra.
2937         (_mm_srai_epi32): Likewise.
2938         (_mm_srli_epi16): Replace deprecated function with vec_sr.
2939         (_mm_srli_epi32): Likewise.
2940         (_mm_srli_epi64): Likewise.
2941         (_mm_sll_epi16): Replace deprecated function with vec_sl.
2942         (_mm_sll_epi32): Likewise.
2943         (_mm_sll_epi64): Likewise.
2944         (_mm_sra_epi16): Replace deprecated function with vec_sra.
2945         (_mm_sra_epi32): Likewise.
2946         (_mm_srl_epi16): Replace deprecated function with vec_sr.
2947         (_mm_srl_epi32): Likewise.
2948         (_mm_srl_epi64): Likewise.
2950 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2951             Jinsong Ji <jji@us.ibm.com>
2953         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2954         comparison operators with vec_cmp* for compatibility due to
2955         unfortunate history; clean up formatting and use types more
2956         appropriately.
2957         (_mm_sll_epi32): Likewise.
2958         (_mm_sll_epi64): Likewise.
2959         (_mm_srl_epi16): Likewise.
2960         (_mm_srl_epi32): Likewise.
2961         (_mm_srl_epi64): Likewise.
2963 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2964             Jinsong Ji <jji@us.ibm.com>
2966         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2967         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2968         __vector __bool int.  Use vec_cmpgt in preference to deprecated
2969         function vec_vcmpgtfp.
2970         (_mm_max_ps): Likewise.
2972 2018-10-25  Jeff Law  <law@redhat.com>
2974         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2975         if returning false.
2977 2018-10-25  Martin Sebor  <msebor@redhat.com>
2979         * doc/extend.texi (aligned): Expand attribute description.
2980         (Alignment): Rename section.  Discuss function arguments.
2982 2018-10-25  Jan Hubicka  <jh@suse.cz>
2984         * ipa-devirt.c (main_odr_variant): Remove.
2985         (hash_odr_name, types_same_for_odr, types_odr_comparable,
2986         odr_name_hasher::equal, odr_subtypes_equivalent_p):
2987         Drop use of main_odr_variant.
2988         (add_type_duplicate): Silence confused warnings on integer types.
2989         (get_odr_type): Always look for main variant.
2990         (register_odr_type): Simplify.
2992 2018-10-25  Richard Biener  <rguenther@suse.de>
2994         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2995         Initialize ng to silence error with release checking bootstrap.
2997 2018-10-25  Richard Biener  <rguenther@suse.de>
2999         * tree-if-conv.c: Include tree-ssa-sccvn.h.
3000         (tree_if_conversion): Run CSE on the if-converted loop body.
3002 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3004         * config/s390/constraints.md (ZL): New constraint.
3005         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3006         operands.
3007         * config/s390/s390.md (movdi_larl): Remove.
3008         (movdi_64): Add the LARL alternative.
3010 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3012         PR bootstrap/87747
3013         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3014         (RTX_CODE_HWINT_P): New macro.
3015         (rtx_code_size): Use RTX_CODE_HWINT_P ().
3017 2018-10-25  Jan Hubicka  <jh@suse.cz>
3019         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3020         is anonymous.
3022 2018-10-25  Richard Biener  <rguenther@suse.de>
3024         PR tree-optimization/87665
3025         PR tree-optimization/87745
3026         * tree-vectorizer.h (get_earlier_stmt): Remove.
3027         (get_later_stmt): Pick up UID from the original non-pattern stmt.
3029 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
3031         * options.texi (Deprecated): Move list to Var section.
3033 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
3034             Jinsong Ji <jji@us.ibm.com>
3036         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3037         __vector long to __vector long long.
3038         (_mm_cvtpd_ps): Likewise.
3039         (_mm_cvttpd_epi32): Likewise.
3040         (_mm_cvtpi32_pd): Likewise.
3041         (_mm_unpackhi_epi64): Likewise.
3042         (_mm_unpacklo_epi64): Likewise.
3044 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
3046         PR rtl-optimization/87720
3047         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3049 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
3051         * gimple-ssa-isolate-paths.c
3052         (find_implicit_erroneous_behavior): Do not change code if the
3053         pass is running for warnings only.
3054         (find_explicit_erroneous_behavior): Likewise.
3056 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
3058         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3059         Define as rs6000_mangle_decl_assembler_name.
3060         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3061         long double to IEEE long double, switch the names of the long
3062         double built-in functions to be <func>f128 instead of <func>l.
3064 2018-10-24  Martin Sebor  <msebor@redhat.com>
3066         * doc/extend.texi (nonnull): List no-argument form.  Reference
3067         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3069 2018-10-24  Richard Biener  <rguenther@suse.de>
3071         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3073 2018-10-24  Martin Liska  <mliska@suse.cz>
3075         PR tree-optimization/84436
3076         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3077         Remove.
3078         (switch_conversion::contains_linear_function_p): New.
3079         (switch_conversion::build_one_array): Support linear
3080         transformation on input.
3081         * tree-switch-conversion.h (struct switch_conversion): Add
3082         contains_linear_function_p declaration.
3084 2018-10-24  Richard Biener  <rguenther@suse.de>
3086         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3087         if its argument is CONSTANT_CLASS_P.
3089 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
3091         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3092         it is wrong for forward declarations.
3094 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3096         * config/s390/s390.c (s390_check_qrst_address): Add the missing
3097         SYMBOL_REF_P () check.
3099 2018-10-24  Richard Biener  <rguenther@suse.de>
3101         PR tree-optimization/87105
3102         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3103         dump classification.
3104         (vect_analyze_data_ref_accesses): Handle duplicate loads and
3105         stores by splitting the affected group after the fact.
3106         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3107         fail the SLP build because of size constraints.
3109 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3111         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3112         * configure: Regenerate.
3113         * config.in: Regenerate.
3114         * varasm.c (mergeable_string_section): Use readonly_data_section
3115         if linker doesn't support SHF_MERGE with alignment > 8.
3116         (mergeable_constant_section): Likewise.
3118 2018-10-24  Richard Biener  <rguenther@suse.de>
3120         PR tree-optimization/84013
3121         * tree-ssa-structalias.c (struct msdi_data): New struct for
3122         marshalling data to walk_stmt_load_store_ops.
3123         (maybe_set_dependence_info): Refactor as callback for
3124         walk_stmt_load_store_ops.
3125         (compute_dependence_clique): Set restrict info on all stmt kinds.
3127 2018-10-24  Martin Liska  <mliska@suse.cz>
3129         * cgraph.c (cgraph_node::dump):
3130         Remove reduntant dumps and make tp_first_run dump more compact.
3132 2018-10-24  Richard Biener  <rguenther@suse.de>
3134         PR tree-optimization/87665
3135         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3136         to reflect reality.
3138 2018-10-12  Jeff Law  <law@redhat.com>
3140         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3141         for H8/S.
3143 2018-10-23  Richard Biener  <rguenther@suse.de>
3145         * tree-vrp.c (add_assert_info): Guard dump_printf with
3146         dump_enabled_p.
3147         * gimple-ssa-evrp-analyze.c
3148         (evrp_range_analyzer::record_ranges_from_incoming_edge):
3149         Use value_range::ignore_equivs_equal_p.
3151 2018-10-23  Richard Biener  <rguenther@suse.de>
3153         PR tree-optimization/87105
3154         PR tree-optimization/87608
3155         * passes.def (pass_all_early_optimizations): Add early phi-opt
3156         after dce.
3157         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3158         addition to debug stmts.
3159         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3160         and abs replacement early.
3161         * tree-cfg.c (gimple_empty_block_p): Likewise.
3163 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
3165         PR target/86383
3166         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3167         specified to configure.
3168         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3170 2018-10-23  Richard Biener  <rguenther@suse.de>
3172         PR tree-optimization/87700
3173         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3175 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
3177         PR target/87674
3178         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3179         second argument from __mmask16 to __mmask8.
3180         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3181         _mm_mask_packs_epi32): Likewise.
3182         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3183         Likewise.
3184         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
3186 2018-10-23  Richard Biener  <rguenther@suse.de>
3188         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3190 2018-10-23  Richard Biener  <rguenther@suse.de>
3192         PR tree-optimization/86144
3193         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3194         over simd attribute.
3196 2018-10-23  Richard Biener  <rguenther@suse.de>
3198         PR tree-optimization/87693
3199         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3200         the case we do not find the taken edge.
3202 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
3203             Jinsong Ji  <jji@us.ibm.com>
3205         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3206         (_mm_store_pd): Use unaligned vector type for pointer cast.
3207         (_mm_maskmoveu_si128): Likewise.
3208         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3209         (_mm_store_ps): Use unaligned vector type for pointer cast.
3211 2018-10-22  Paul Koning  <ni1d@arrl.net>
3213         * symtab.c (symtab_node::increase_alignment): Correct max
3214         alignment check.
3216 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
3218         PR tree-optimization/87633
3219         * match.pd: Do not generate unordered integer comparisons.
3221 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3223         PR rtl-optimization/87600
3224         * combine.c: Add include of expr.h.
3225         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3226         register to a pseudo.
3227         (make_more_copies): New function, add a copy to a new pseudo after
3228         the moves from hard registers into pseudos.
3229         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3230         later.  Call make_more_copies.
3232 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
3234         * lra-constraints.c (process_alt_operands): New local array,
3235         matching_early_clobber.  Check matching_early_clobber before
3236         decrementing reject, and set matching_early_clobber after.
3238 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3240         PR target/87598
3241         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3242         call output_addr_const and hope for the best.
3244 2018-10-22  Richard Biener  <rguenther@suse.de>
3246         * gimple-ssa-evrp-analyze.c
3247         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3248         smarter about what ranges to use.
3249         * tree-vrp.c (add_assert_info): Dump here.
3250         (register_edge_assert_for_2): Instead of here at multiple but
3251         not all places.
3253         * gcc.dg/tree-ssa/evrp12.c: New testcase.
3254         * gcc.dg/predict-6.c: Adjust.
3255         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3256         * gcc.dg/tree-ssa/vrp02.c: Likewise.
3257         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3259 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
3260         Richard Biener  <rguenther@suse.de>
3262         * bitmap.h: Update data structure documentation, including a
3263         description of bitmap views as either linked-lists or splay trees.
3264         (struct bitmap_element_def): Update comments for splay tree bitmaps.
3265         (struct bitmap_head_def): Likewise.
3266         (bitmap_list_view, bitmap_tree_view): New prototypes.
3267         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3268         tree_form fields.
3269         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3270         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3271         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3272         released bitmap element here.
3273         (bitmap_element_free): Remove.
3274         (bitmap_elt_clear_from): Work on splay tree bitmaps.
3275         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
3276         this function similar ones such that linked-list bitmap implementation
3277         functions are grouped.
3278         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3279         and moved for grouping.
3280         (bitmap_list_insert_element_after): Renamed from
3281         bitmap_elt_insert_after, and moved for grouping.
3282         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3283         (bitmap_tree_link_left, bitmap_tree_link_right,
3284         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3285         bitmap_tree_link_element, bitmap_tree_unlink_element,
3286         bitmap_tree_find_element): New functions for splay-tree bitmap
3287         implementation.
3288         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3289         Renamed and moved, see above entries.
3290         (bitmap_tree_listify_from): New function to convert part of a splay
3291         tree bitmap to a linked-list bitmap.
3292         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3293         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3294         (bitmap_find_bit): Remove.
3295         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3296         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3297         Handle splay tree bitmaps.
3298         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3299         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3300         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3301         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3302         bitmap_intersect_compl_p, bitmap_ior_and_compl,
3303         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3304         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
3305         corresponding changes to use linked-list specific bitmap_element
3306         manipulation functions as applicable for efficiency.
3307         (bitmap_tree_to_vec): New function.
3308         (debug_bitmap_elt_file): New function split out from ...
3309         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
3310         (bitmap_print): Likewise.
3312         PR tree-optimization/63155
3313         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3314         SSA edge worklists.
3315         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3316         in tree-view.
3318 2018-10-22  Martin Liska  <mliska@suse.cz>
3320         PR tree-optimization/87686
3321         Revert
3322         2018-08-29  Martin Liska  <mliska@suse.cz>
3324         * tree-switch-conversion.c (switch_conversion::expand):
3325         Strenghten assumption about gswitch statements.
3327 2018-10-22  Martin Liska  <mliska@suse.cz>
3329         * ipa-icf.c (sem_item::compare_attributes): Remove.
3330         (sem_item::compare_referenced_symbol_properties): Use
3331         attribute_list_equal instead.
3332         (sem_function::equals_wpa): Likewise.
3333         * ipa-icf.h: Remove compare_attributes.
3335 2018-10-22  Richard Biener  <rguenther@suse.de>
3337         PR middle-end/87682
3338         * mem-stats.h (mem_usage::operator==): Fix pasto.
3340 2018-10-22  Richard Biener  <rguenther@suse.de>
3342         PR tree-optimization/87640
3343         * tree-vrp.c (set_value_range_with_overflow): Decompose
3344         incomplete result.
3345         (extract_range_from_binary_expr_1): Adjust.
3347 2018-10-22  Martin Jambor  <mjambor@suse.cz>
3349         * tree-eh.h (stmt_could_throw_p): Add function parameter.
3350         (stmt_can_throw_external): Likewise.
3351         (stmt_can_throw_internal): Likewise.
3352         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3353         (lower_eh_constructs_2): Likewise.
3354         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3355         (stmt_can_throw_external): Likewise.
3356         (stmt_can_throw_internal): Likewise.
3357         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3358         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3359         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3360         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3361         (pass_lower_eh_dispatch::execute): Pass cfun to
3362         stmt_can_throw_external.
3363         (cleanup_empty_eh): Likewise.
3364         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3365         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3366         stmt_can_throw_external instead of pushing it to cfun.
3367         (symbol_table::create_edge): Likewise.
3368         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3369         stmt_can_throw_internal.
3370         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3371         to stmt_could_throw_p.
3372         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3373         stmt_can_throw_internal.
3374         (pass_store_merging::execute): Likewise.
3375         * gimple-ssa-strength-reduction.c
3376         (find_candidates_dom_walker::before_dom_children): Pass cfun to
3377         stmt_could_throw_p.
3378         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3379         stmt_can_throw_internal.
3380         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3381         to stmt_can_throw_external.
3382         (check_stmt): Pass cfun to stmt_could_throw_p.
3383         (check_stmt): Pass cfun to stmt_can_throw_external.
3384         (pass_nothrow::execute): Likewise.
3385         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3386         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3387         stmt_can_throw_internal.
3388         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3389         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3390         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3391         * tree-complex.c (expand_complex_libcall): Pass cfun to
3392         stmt_could_throw_p and to stmt_can_throw_internal.
3393         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3394         * tree-inline.c (copy_edges_for_bb): Likewise.
3395         (maybe_move_debug_stmts_to_successors): Likewise.
3396         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3397         stmt_could_throw_p.
3398         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3399         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3400         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3401         stmt_can_throw_internal.
3402         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3403         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3404         stmt_could_throw_p.
3405         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3406         stmt_can_throw_internal.
3407         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3408         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3409         stmt_could_throw_p.
3410         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3411         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3412         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3413         (convert_mult_to_fma_1): Likewise.
3414         (convert_to_divmod): Likewise.
3415         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3416         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3417         * tree-ssa-propagate.c
3418         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3419         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3420         (maybe_optimize_range_tests): Likewise.
3421         (linearize_expr_tree): Likewise.
3422         (reassociate_bb): Likewise.
3423         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3424         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3425         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3426         (handle_char_store): Likewise.
3427         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3428         stmt_can_throw_internal.
3429         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3430         stmt_could_throw_p.
3431         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3432         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3433         (vectorizable_simd_clone_call): Likewise.
3434         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3435         (gimple_stringop_fixed_value): Likewise.
3437 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
3439         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3440         literal pool references.
3441         (s390_check_qrst_address): Adapt to the new behavior of
3442         s390_loadrelative_operand_p ().
3444 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3446         PR target/72782
3447         * config/i386/sse.md (*andnot<mode>3_bcst): New.
3449 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3451         PR target/72782
3452         * config/i386/sse.md (*<code><mode>3_bcst): New.
3454 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3456         PR target/72782
3457         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3458         V4DI, V16SI and V8DI.
3459         (*sub<mode>3<mask_name>_bcst): New.
3460         (*add<mode>3<mask_name>_bcst): Likewise.
3462 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
3463             Jinsong Ji  <jji@us.ibm.com>
3465         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3466         __m64 with __vector unsigned long long for compatibility.
3467         (_mm_movemask_epi8): Likewise.
3468         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3469         (_mm_cvttps_pi32): Likewise.
3470         (_mm_cvtpi32_ps): Likewise.
3471         (_mm_cvtps_pi16): Likewise.
3472         (_mm_loadh_pi): Likewise.
3473         (_mm_storeh_pi): Likewise.
3474         (_mm_movehl_ps): Likewise.
3475         (_mm_movelh_ps): Likewise.
3476         (_mm_loadl_pi): Likewise.
3477         (_mm_storel_pi): Likewise.
3478         (_mm_movemask_ps): Likewise.
3479         (_mm_shuffle_pi16): Likewise.
3481 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3483         PR target/72782
3484         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3485         __builtin_ia32_vfnmsubpd512_mask.
3486         (_mm512_mask_fnmsub_round_pd): Likewise.
3487         (_mm512_fnmsub_pd): Likewise.
3488         (_mm512_mask_fnmsub_pd): Likewise.
3489         (_mm512_maskz_fnmsub_round_pd): Use
3490         __builtin_ia32_vfnmsubpd512_maskz.
3491         (_mm512_maskz_fnmsub_pd): Likewise.
3492         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3493         (_mm512_mask_fnmsub_round_ps): Likewise.
3494         (_mm512_fnmsub_ps): Likewise.
3495         (_mm512_mask_fnmsub_ps): Likewise.
3496         (_mm512_maskz_fnmsub_round_ps): Use
3497         __builtin_ia32_vfnmsubps512_maskz.
3498         (_mm512_maskz_fnmsub_ps): Likewise.
3499         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3500         __builtin_ia32_vfnmsubpd256_mask.
3501         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3502         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3503         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3504         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3505         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3506         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3507         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3508         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3509         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3510         __builtin_ia32_vfnmsubpd.
3511         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3512         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3513         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3514         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3515         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3516         * config/i386/i386-builtin.def: Add
3517         __builtin_ia32_vfnmsubpd256_mask,
3518         __builtin_ia32_vfnmsubpd256_maskz,
3519         __builtin_ia32_vfnmsubpd128_mask,
3520         __builtin_ia32_vfnmsubpd128_maskz,
3521         __builtin_ia32_vfnmsubps256_mask,
3522         __builtin_ia32_vfnmsubps256_maskz,
3523         __builtin_ia32_vfnmsubps128_mask,
3524         __builtin_ia32_vfnmsubps128_maskz,
3525         __builtin_ia32_vfnmsubpd512_mask,
3526         __builtin_ia32_vfnmsubpd512_maskz,
3527         __builtin_ia32_vfnmsubps512_mask,
3528         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3529         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3530         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3531         __builtin_ia32_vfnmsubpd256.
3532         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3533         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3534         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3535         Likewise.
3536         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3537         Likewise.
3538         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3539         Likewise.
3540         (fmai_vmfnmsub_<mode><round_name>): Likewise.
3542 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3544         PR target/72782
3545         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3546         __builtin_ia32_vfnmaddpd512_mask.
3547         (_mm512_mask_fnmadd_round_pd): Likewise.
3548         (_mm512_fnmadd_pd): Likewise.
3549         (_mm512_mask_fnmadd_pd): Likewise.
3550         (_mm512_maskz_fnmadd_round_pd): Use
3551         __builtin_ia32_vfnmaddpd512_maskz.
3552         (_mm512_maskz_fnmadd_pd): Likewise.
3553         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3554         (_mm512_mask_fnmadd_round_ps): Likewise.
3555         (_mm512_fnmadd_ps): Likewise.
3556         (_mm512_mask_fnmadd_ps): Likewise.
3557         (_mm512_maskz_fnmadd_round_ps): Use
3558         __builtin_ia32_vfnmaddps512_maskz.
3559         (_mm512_maskz_fnmadd_ps): Likewise.
3560         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3561         __builtin_ia32_vfnmaddpd256_mask.
3562         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3563         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3564         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3565         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3566         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3567         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3568         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3569         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3570         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3571         __builtin_ia32_vfnmaddpd.
3572         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3573         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3574         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3575         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3576         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3577         * config/i386/i386-builtin.def: Add
3578         __builtin_ia32_vfnmaddpd256_mask,
3579         __builtin_ia32_vfnmaddpd256_maskz,
3580         __builtin_ia32_vfnmaddpd128_mask,
3581         __builtin_ia32_vfnmaddpd128_maskz,
3582         __builtin_ia32_vfnmaddps256_mask,
3583         __builtin_ia32_vfnmaddps256_maskz,
3584         __builtin_ia32_vfnmaddps128_mask,
3585         __builtin_ia32_vfnmaddps128_maskz,
3586         __builtin_ia32_vfnmaddpd512_mask,
3587         __builtin_ia32_vfnmaddpd512_maskz,
3588         __builtin_ia32_vfnmaddps512_mask,
3589         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3590         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3591         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3592         __builtin_ia32_vfnmaddpd256.
3593         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3594         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3595         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3596         Likewise.
3597         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3598         Likewise.
3599         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3600         Likewise.
3601         (fmai_vmfnmadd_<mode><round_name>): Likewise.
3603 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3605         PR target/72782
3606         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3607         __builtin_ia32_vfmsubpd512_mask.
3608         (_mm512_mask_fmsub_round_pd): Likewise.
3609         (_mm512_fmsub_pd): Likewise.
3610         (_mm512_mask_fmsub_pd): Likewise.
3611         (_mm512_maskz_fmsub_round_pd): Use
3612         __builtin_ia32_vfmsubpd512_maskz.
3613         (_mm512_maskz_fmsub_pd): Likewise.
3614         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3615         (_mm512_mask_fmsub_round_ps): Likewise.
3616         (_mm512_fmsub_ps): Likewise.
3617         (_mm512_mask_fmsub_ps): Likewise.
3618         (_mm512_maskz_fmsub_round_ps): Use
3619         __builtin_ia32_vfmsubps512_maskz.
3620         (_mm512_maskz_fmsub_ps): Likewise.
3621         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3622         __builtin_ia32_vfmsubpd256_mask.
3623         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3624         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3625         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3626         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3627         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3628         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3629         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3630         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3631         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3632         __builtin_ia32_vfmsubpd.
3633         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3634         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3635         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3636         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3637         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3638         * config/i386/i386-builtin.def: Add
3639         __builtin_ia32_vfmsubpd256_mask,
3640         __builtin_ia32_vfmsubpd256_maskz,
3641         __builtin_ia32_vfmsubpd128_mask,
3642         __builtin_ia32_vfmsubpd128_maskz,
3643         __builtin_ia32_vfmsubps256_mask,
3644         __builtin_ia32_vfmsubps256_maskz,
3645         __builtin_ia32_vfmsubps128_mask,
3646         __builtin_ia32_vfmsubps128_maskz,
3647         __builtin_ia32_vfmsubpd512_mask,
3648         __builtin_ia32_vfmsubpd512_maskz,
3649         __builtin_ia32_vfmsubps512_mask,
3650         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3651         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3652         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3653         __builtin_ia32_vfmsubpd256.
3654         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3655         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3656         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3657         Likewise.
3658         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3659         Likewise.
3660         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3661         Likewise.
3662         (fmai_vmfmsub_<mode><round_name>): Likewise.
3664 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3666         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3667         Remove plus.  Renamed to ...
3668         (*sub<mode>3<mask_name>_bcst): This.
3669         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3670         (*add<mode>3<mask_name>_bcst): This.
3672 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3674         PR target/72782
3675         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3677 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3679         PR target/87662
3680         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3681         (_mm_or_epi32): Likewise.
3682         (_mm256_xor_epi32): Likewise.
3683         (_mm_xor_epi32): Likewise.
3684         (_mm256_or_epi64): Likewise.
3685         (_mm_or_epi64): Likewise.
3686         (_mm256_xor_epi64): Likewise.
3687         (_mm_xor_epi64): Likewise.
3689 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
3691         PR target/72782
3692         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3694 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
3696         PR middle-end/87647
3697         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3699 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
3701         * doc/ux.texi: Move @section directly after @node.
3703 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
3705         PR middle-end/85488
3706         PR middle-end/87649
3707         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3708         depend closely nested inside of loop with ordered clause with
3709         a parameter.
3711 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
3713         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3714         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3715         * doc/ux.texi: New file.
3717 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
3719         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3720         be the first CR field allocated.
3722 2018-10-19  Richard Biener  <rguenther@suse.de>
3724         PR target/87657
3725         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3726         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3728 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3730         PR target/72782
3731         * config/i386/sse.md
3732         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3733         (*add<mode>3<mask_name>_bcst_2): Likewise.
3735 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3737         * config/i386/sse.md
3738         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3739         Replace nonimmediate_operand with register_operand.
3740         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3741         Likewise.
3742         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3743         Likewise.
3745 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3747         PR rtl-optimization/87596
3748         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3749         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3750         for instructions in FROM..TO range.
3752 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
3754         * cfgexpand.c (expand_one_var): Use specific wording in error message
3755         for non-local frame variables.
3756         * stor-layout.c (layout_decl): Do not issue a warning for them.
3758 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
3760         * haifa-sched.c (priority): Add force_recompute parameter.
3761         (apply_replacement): Call priority () with force_recompute = true.
3762         (restore_pattern): Likewise.
3764 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3766         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3767         HOST_BITS_PER_WIDE_INT.
3768         (test_vector_ops_duplicate): Likewise.
3770 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3772         PR target/72782
3773         * config/i386/sse.md (VF_AVX512): New.
3774         (avx512bcst): Likewise.
3775         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3776         Likewise.
3777         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3778         Likewise.
3779         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3780         Likewise.
3782 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
3784         * doc/invoke.texi (-dumpversion): Improve grammar.
3785         (-dumpfullversion): Make more consistent with -dumpversion.
3787 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
3789         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3790         Set JUMP_LABEL to the jump insn.
3791         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3792         Predict emitted jump and add label to jump insn.
3794 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
3796         PR tree-optimization/87562
3797         * input.c (get_substring_ranges_for_loc): Use
3798         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3799         getting the linemap for the endpoint.  Verify that it's either
3800         in the same linemap as the start point's spelling location, or
3801         at least in the same file.
3803 2018-10-18  Richard Biener  <rguenther@suse.de>
3805         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3806         feed width-specific load/store costs through ix86_vec_cost.
3807         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3808         (k8_cost): Likewise.
3809         (bdver_cost): Likewise.
3810         (znver1_cost): Likewise.
3811         (btver1_cost): Likewise.
3812         (btver2_cost): Likewise.
3814 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3816         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3817         to simplify subreg of vec_merge.
3819 2018-10-18  Richard Biener  <rguenther@suse.de>
3821         * config/i386/i386.c: Fix costing of vector FMA.
3823 2018-10-18  Richard Biener  <rguenther@suse.de>
3825         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3826         and argument.
3827         (ix86_builtin_vectorization_cost): For vec_construct properly
3828         cost insertion into SSE regs.
3829         (...): Adjust calls to ix86_vec_cost.
3831 2018-10-18  Richard Biener  <rguenther@suse.de>
3833         PR middle-end/87087
3834         Revert
3835         2018-02-07  Richard Biener  <rguenther@suse.de>
3837         PR tree-optimization/84204
3838         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3839         this place.
3841 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3843         PR target/87537
3844         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3845         of vec_duplicate.
3846         (test_vector_ops_duplicate): Add test for a scalar subreg of a
3847         VEC_MERGE of a VEC_DUPLICATE.
3849 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3851         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3852         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3853         * doc/standards.texi (C Language): Document C2X.
3854         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3855         (rl78_option_override): Handle "GNU C2X" language name.
3857 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3859         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3860         Document C17 as published in 2018.
3862 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
3864         PR middle-end/87623
3865         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3866         bail out if both sides do not have the same storage order.
3868 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3870         * bitmap.c (bitmap_head::dump): New.
3871         * bitmap.h (bitmap_head): Add dump().
3872         * gimple-ssa-evrp-analyze.c
3873         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3874         (evrp_range_analyzer::set_ssa_range_info): Same.
3875         (evrp_range_analyzer::record_ranges_from_phis): Same.
3876         (evrp_range_analyzer::record_ranges_from_stmt): Same.
3877         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3878         * gimple-ssa-sprintf.c (get_int_range): Same.
3879         (format_integer): Same.
3880         (sprintf_dom_walker::handle_gimple_call): Same.
3881         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3882         (ipcp_vr_lattice::top_p): Same.
3883         (ipcp_vr_lattice::bottom_p): Same.
3884         (ipcp_vr_lattice::set_to_bottom): Same.
3885         (ipa_vr_operation_and_type_effects): Same.
3886         (propagate_vr_across_jump_function): Same.
3887         (ipcp_store_vr_results): Same.
3888         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3889         (ipa_print_node_jump_functions_for_edge): Same.
3890         (ipa_get_value_range): Same.
3891         (ipa_compute_jump_functions_for_edge): Same.
3892         (ipa_write_jump_function): Same.
3893         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3894         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3895         Same.
3896         * vr-values.c (set_value_range_to_nonnegative): Same.
3897         (set_value_range_to_truthvalue): Same.
3898         (vr_values::get_value_range): Same.
3899         (vr_values::set_defs_to_varying): Same.
3900         (vr_values::update_value_range): Same.
3901         (symbolic_range_based_on_p): Same.
3902         (vr_values::op_with_boolean_value_range_p): Same.
3903         (vr_values::extract_range_for_var_from_comparison_expr): Same.
3904         (vr_values::extract_range_from_ssa_name): Same.
3905         (vr_values::extract_range_from_binary_expr): Same.
3906         (vr_values::extract_range_from_unary_expr): Same.
3907         (vr_values::extract_range_from_cond_expr): Same.
3908         (vr_values::extract_range_from_comparison): Same.
3909         (vr_values::check_for_binary_op_overflow): Same.
3910         (vr_values::extract_range_basic): Same.
3911         (vr_values::extract_range_from_assignment): Same.
3912         (compare_ranges): Same.
3913         (compare_range_with_value): Same.
3914         (vr_values::adjust_range_with_scev): Same.
3915         (vrp_valueize): Same.
3916         (vrp_valueize_1): Same.
3917         (vr_values::get_vr_for_comparison): Same.
3918         (vr_values::compare_name_with_value): Same.
3919         (vr_values::compare_names): Same.
3920         (vr_values::vrp_evaluate_conditional): Same.
3921         (find_case_label_ranges): Same.
3922         (vr_values::vrp_visit_switch_stmt): Same.
3923         (vr_values::extract_range_from_phi_node): Same.
3924         (vr_values::simplify_div_or_mod_using_ranges): Same.
3925         (vr_values::simplify_bit_ops_using_ranges): Same.
3926         (test_for_singularity): Same.
3927         (range_fits_type_p): Same.
3928         (vr_values::simplify_cond_using_ranges_1): Same.
3929         (vr_values::simplify_switch_using_ranges): Same.
3930         (vr_values::simplify_float_conversion_using_ranges): Same.
3931         (vr_values::two_valued_val_range_p): Same.
3932         (vr_values::add_equivalence): Move to value_range::equiv_add.
3933         * vr-values.h (vr_values::add_equivalence): Remove.
3934         (VR_INITIALIZER): Remove.
3935         * tree-vrp.c (value_range::set): New.
3936         (value_range::equiv_add): New.
3937         (value_range::value_range): New.
3938         (value_range::deep_copy): New.
3939         (value_range::check): New.
3940         (value_range::equal_p): New.
3941         (value_range::ignore_equivs_equal_p): New.
3942         (value_range::operator==): New.
3943         (value_range::operator!=): New.
3944         (value_range::symbolic_p): New.
3945         (value_range::numeric_p): New.
3946         (value_range::set_undefined): New.
3947         (value_range::set_varying): New.
3948         (value_range::may_contain_p): New.
3949         (value_range::equiv_clear): New.
3950         (value_range::singleton_p): New.
3951         (value_range::intersect): New.
3952         (value_range::dump): New.
3953         (value_range::set_and_canonicalize): New.
3954         (set_value_range): Adjust for value_range API.
3955         (set_value_range_to_undefined): Same.
3956         (set_value_range_to_varying): Same.
3957         (set_and_canonicalize_value_range): Same.
3958         (set_value_range_to_nonnull): Same.
3959         (set_value_range_to_null): Same.
3960         (range_is_null): Same.
3961         (range_is_nonnull): Same.
3962         (range_int_cst_p): Same.
3963         (range_int_cst_singleton_p): Same.
3964         (symbolic_range_p): Same.
3965         (range_includes_zero_p): Same.
3966         (value_range_constant_singleton): Same.
3967         (vrp_set_zero_nonzero_bits): Same.
3968         (ranges_from_anti_range): Same.
3969         (extract_range_into_wide_ints): Same.
3970         (extract_range_from_multiplicative_op): Same.
3971         (set_value_range_with_overflow): Same.
3972         (extract_range_from_binary_expr_1): Same.
3973         (extract_range_from_unary_expr): Same.
3974         (dump_value_range): Same.
3975         (debug_value_range): Same.
3976         (vrp_prop::check_array_ref): Same.
3977         (vrp_prop::check_mem_ref): Same.
3978         (vrp_prop::vrp_initialize): Same.
3979         (vrp_prop::visit_stmt): Same.
3980         (intersect_ranges): Same.
3981         (vrp_prop::visit_phi): Same.
3982         (vrp_prop::vrp_finalize): Same.
3983         (determine_value_range_1): Same.
3984         (determine_value_range): Same.
3985         (vrp_intersect_ranges_1): Rename to...
3986         (vrp_intersect_1): this.
3987         (vrp_intersect_ranges): Rename to...
3988         (value_range::intersect_helper): ...this.
3989         (vrp_meet_1): Rename to...
3990         (value_range::union_helper): ...this.
3991         (vrp_meet): Rename to...
3992         (value_range::union_): ...this.
3993         (copy_value_range): Remove.
3994         * tree-vrp.h (struct value_range): Rewrite into a proper class.
3995         (value_range::vrtype): New.
3996         (value_range::type): New.
3997         (value_range::equiv): New.
3998         (value_range::min): New.
3999         (value_range::max): New.
4000         (value_range::varying_p): New.
4001         (value_range::undefined_p): New.
4002         (value_range::null_p): New.
4003         (value_range::equiv_add): New.
4004         (copy_value_range): Remove.
4006 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
4008         * Makefile.in (SELFTEST_TARGETS): New.
4009         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4010         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4011         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4012         c/Make-lang.in.
4013         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4014         (selftest-c++-gdb, selftest-c++-valgrind): Move to
4015         cp/Make-lang.in.
4016         * configure: Regenerate.
4017         * configure.ac (selftest_languages): New.
4019 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4021         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4022         overflow wraps argument.
4023         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4024         wide_int_range_multiplicative_op.
4025         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4026         overflow wraps argument.
4027         (wide_int_range_multiplicative_op): Same.
4028         (wide_int_range_lshift): Same.
4029         (wide_int_range_div): Same.
4030         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4031         (wide_int_range_lshift): Same.
4032         (wide_int_range_div): Same.
4034 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4036         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4037         use sign as argument.
4038         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4039         wide_int_range_shift_undefined_p.
4041 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4043         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4044         Rename to...
4045         (@despeculate_copy<ALLI_TI:mode>): ... This.
4046         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4047         switch statement.
4049 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4051         * config.gcc: Obsolete *-*-solaris2.10*.
4052         * doc/install.texi (Specific, *-*-solaris2*): Document it.
4054 2018-10-12  Jeff Law  <law@redhat.com>
4056         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4057         reg + sym +- const_int addressing modes.
4059 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
4061         * common.opt (fdiagnostics-minimum-margin-width=): New option.
4062         * diagnostic-show-locus.c (layout::layout): Apply the minimum
4063         margin width.
4064         (layout::start_annotation_line): Only print up to 3 of the
4065         margin character, to avoid touching the left-hand side.
4066         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4067         minimum margin width, as set by test_diagnostic_context's ctor.
4068         (selftest::test_fixit_insert_containing_newline): Likewise.
4069         (selftest::test_fixit_insert_containing_newline_2): Likewise.
4070         (selftest::test_line_numbers_multiline_range): Clear
4071         dc.min_margin_width.
4072         * diagnostic.c (diagnostic_initialize): Initialize
4073         min_margin_width.
4074         * diagnostic.h (struct diagnostic_context): Add field
4075         "min_margin_width".
4076         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4077         * opts.c (common_handle_option): Handle
4078         OPT_fdiagnostics_minimum_margin_width_.
4079         * selftest-diagnostic.c
4080         (selftest::test_diagnostic_context::test_diagnostic_context):
4081         Initialize min_margin_width to 6.
4082         * toplev.c (general_init): Initialize global_dc->min_margin_width.
4084 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
4086         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4087         Fix usage of "error_at_rich_loc" in the comment.
4089 2018-10-15  Renlin Li  <renlin.li@arm.com>
4091         PR target/87563
4092         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4093         if-conversioned loop when it contains ifn with types not
4094         supported by backend.
4095         * internal-fn.c (expand_direct_optab_fn): Add an assert.
4096         (direct_internal_fn_supported_p): New helper function.
4097         * internal-fn.h (direct_internal_fn_supported_p): Declare.
4099 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
4101         PR target/87572
4102         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4103         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4104         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4106 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
4108         PR tree-optimization/87022
4109         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4110         bits in dist vector rather than the first one.
4112 2018-10-15  Richard Biener  <rguenther@suse.de>
4114         PR middle-end/87610
4115         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4116         (visit_loadstore): When a used restrict tag escaped verify that
4117         the points-to solution of "other" pointers do not include
4118         escaped.
4119         (compute_dependence_clique): If a used restrict tag escaped
4120         communicated that down to visit_loadstore.
4122 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
4124         * config/s390/s390.c (s390_expand_vec_init): Force vector element
4125         into reg if it isn't a general operand.
4127 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
4129         PR target/87599
4130         * config/i386/sse.md (*vec_dupv2di): Add register source to
4131         movddup.
4133 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
4135         PR target/87572
4136         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4137         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4138         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4139         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4141 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
4143         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4144         (notice_args_size): Set it in the current trace if no insn that can
4145         throw internally has been seen yet.
4146         (connect_traces): When connecting args_size between traces, allow the
4147         incoming values not to match if there is an insn setting it before the
4148         first insn that can throw internally; in that case, force the creation
4149         of a CFI note on this latter insn.
4151 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
4153         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4154         the base class, because using the injected-class-name was not clearly
4155         specified until DR 176.
4157 2018-10-12  Paul Koning  <ni1d@arrl.net>
4159         * config/pdp11/pdp11.md (doloop_end): New expander.
4160         (doloop_end_insn): renamed from "doloop_end".
4161         (addqi3): New pattern.
4162         (subqi3): New pattern.
4163         * config/pdp11/predicates.md (incdec_operand): New predicate.
4165 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
4167         PR middle-end/81376
4168         * real.c (format_helper::can_represent_integral_type_p): New function
4169         * real.h (format_helper::can_represent_integral_type_p): Ditto.
4170         * match.pd: New pattern.
4172 2018-10-12  Alexandre Oliva <oliva@adacore.com>
4174         * configure.ac: Introduce --enable-large-address-aware
4175         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4176         * doc/install.texi: Document it.
4177         * configure, config.in: Rebuilt.
4178         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4179         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4180         (LINK_SPEC): Insert it.
4181         * config/i386/mingw-w64.h: Likewise.
4183         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4185 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
4187         PR rtl-optimization/87600
4188         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4190 2018-10-12  Paul Koning  <ni1d@arrl.net>
4192         * doc/md.texi (doloop_end): Document that the pattern code may
4193         need to check operand mode.
4195 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
4197         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4198         to zero-extend between int and floating-point registers.
4199         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4200         ldp into floating-point registers.  Add type and arch attributes.
4201         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4202         Use f_loads for type attribute.
4204 2018-10-11  Martin Sebor  <msebor@redhat.com>
4206         * doc/extend.texi (attribute packed): Correct typos.
4208 2018-10-11  Martin Sebor  <msebor@redhat.com>
4210         * doc/extend.texi (attribute flatten): Mention interaction with
4211         noinline.
4213 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
4215         PR target/87156
4216         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4217         Set new_decl virtual flag to zero.
4219 2018-10-11  Martin Sebor  <msebor@redhat.com>
4221         PR middle-end/87593
4222         * doc/extend.texi (attribute format_arg): Discuss using multiple
4223         attributes on a single function.
4225 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4227         PR tree-optimization/86829
4228         * match.pd (sin (atan (x))): New simplification rules.
4229         (cos (atan (x))): Likewise.
4230         * real.c (build_sinatan_real): New function.
4231         * real.h (build_sinatan_real): Prototype.
4233 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
4235         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4236         function.
4237         (fold_mergeeo_helper): New helper function.
4238         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4239         intrinsics.  Correct some whitespace indentation issues.
4241 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
4243         PR target/87511
4244         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4245         Use HOST_WIDE_INT_1U for shift.
4247 2018-10-11  Doug Rupp  <rupp@adacore.com>
4248             Olivier Hainque  <hainque@adacore.com>
4250         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4251         Pass --relax to the linker for RTPs.
4252         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4254 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
4255             Jan Hubicka  <jh@suse.cz>
4256             Martin Jambor  <mjambor@suse.cz>
4258         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4259         the same elements are repeated rather than printing all of them.
4260         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4261         "repeated" elements.
4262         * read-rtl-function.c (test_loading_repeat): New function.
4263         (read_rtl_function_c_tests): Call test_loading_repeat.
4264         * rtl-tests.c (test_dumping_repeat): New function.
4265         (rtl_tests_c_tests): Call test_dumping_repeat.
4267 2018-10-11  Richard Biener  <rguenther@suse.de>
4269         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4270         bdver?_cost): Unify to ...
4271         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4272         * config/i386/i386.c (processor_cost_table): Adjust.
4274 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
4276         PR middle-end/87574
4277         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4278         the thunk when expanding to GIMPLE.
4280 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4282         * varasm.c (mergeable_string_section): Don't try to move zero-length
4283         strings to the merge section.
4285 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
4287         PR target/87573
4288         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4290 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
4292         PR target/87550
4293         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4294         to special_args set.
4296 2018-10-10  Richard Biener  <rguenther@suse.de>
4298         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4299         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4300         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4301         and recursing and pattern terminating the recursion on SSE
4302         vector width using ix86_expand_reduc.
4303         (reduc_sminmax_scal_<mode>): Split into part reducing to half
4304         width and recursing and SSE2 vector variant doing the final
4305         reduction with ix86_expand_reduc.
4306         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4307         with terminating the recursion at AVX level, splitting that
4308         to SSE there.
4310 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
4312         * genmatch.c (error_cb): Rename to...
4313         (diagnostic_cb): ...this, converting int params to enums.
4314         (fatal_at): Update for renaming.
4315         (warning_at): Likewise.
4316         (main): Likewise.
4317         * input.c (selftest::ebcdic_execution_charset::apply):
4318         Update for renaming of...
4319         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4320         to...
4321         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4322         converting level and reason to enums.
4323         (class selftest::lexer_error_sink): Rename to...
4324         (class selftest::lexer_test_options): ...this, renaming field
4325         "m_errors" to "m_diagnostics".
4326         (selftest::lexer_test_options::apply): Update for renaming of...
4327         (selftest::lexer_test_options::on_error): ...this, renaming to...
4328         (selftest::lexer_test_options::on_diagnostic): ...this
4329         converting level and reason to enums.
4330         (selftest::test_lexer_string_locations_raw_string_unterminated):
4331         Update for renamings.
4332         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4333         "reason".
4335 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
4337         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4338         * config/rs6000/pmmintrin.h: New file.
4340 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
4342         PR tree-optimization/86659
4343         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4345 2018-10-09  Richard Biener  <rguenther@suse.de>
4347         PR tree-optimization/63155
4348         * tree-ssa-structalias.c: Include tree-ssa.h.
4349         (get_constraint_for_ssa_var): For undefs return nothing_id.
4350         (find_func_aliases): Cleanup PHI handling.
4352 2018-10-09  Richard Biener  <rguenther@suse.de>
4354         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4355         replacements.
4357 2018-10-09  Martin Liska  <mliska@suse.cz>
4359         * asan.c (asan_emit_stack_protection): If a stack variable
4360         is located in a same file as current function, then emit
4361         line info into variable definition string.
4363 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4365         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4366         information.
4368 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4370         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4371         on the thunk.
4373 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4375         PR tree-optimization/86659
4376         * gimple-match.h (struct gimple_match_op): Add reverse field.
4377         (gimple_match_op::set_op): New overloaded method.
4378         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4379         the REF_REVERSE_STORAGE_ORDER flag on the value.
4380         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4381         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4382         
4383 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
4385         PR middle-end/63155
4386         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4387         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4389 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
4391         PR target/87517
4392         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4393         Defined with __builtin_ia32_vfmaddsubpd512_mask.
4395 2018-10-08  Richard Biener  <rguenther@suse.de>
4397         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4398         cost the same as AVX128 ones.
4400 2018-10-08  Paul Koning  <ni1d@arrl.net>
4402         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4403         (expand_block_move): New function.
4404         * config/pdp11/pdp11.c (output_block_move): Remove.
4405         (expand_block_move): New function.
4406         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4407         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4408         (*movmemhi1): Remove.
4410 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
4412         * config/s390/2827.md: Increase latencies for some FP instructions.
4414 2018-10-08  Richard Biener  <rguenther@suse.de>
4416         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4417         Open a dump scope.
4418         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4419         * tree-vectorizer.h (dump_stmt_cost): Adjust.
4420         (add_stmt_cost): Dump return value of the hook.
4422 2018-10-08  Richard Biener  <rguenther@suse.de>
4424         PR tree-optimization/63155
4425         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4426         (ssa_propagation_engine::ssa_propagate): Remove redundant
4427         bitmap bit clearing.
4429 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
4431         PR rtl-optimization/86939
4432         PR rtl-optimization/87479
4433         * ira.h (non_conflicting_reg_copy_p): New prototype.
4434         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4435         (make_hard_regno_dead): Don't add conflicts for register
4436         ignore_reg_for_conflicts.
4437         (make_object_dead): Likewise.
4438         (non_conflicting_reg_copy_p): New function.
4439         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4440         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4441         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4442         (make_hard_regno_dead): Don't add conflicts for register
4443         ignore_reg_for_conflicts.  Remove special conflict handling of
4444         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
4445         check_pic_pseudo_p and update callers.
4446         (mark_pseudo_dead): Don't add conflicts for register
4447         ignore_reg_for_conflicts.
4448         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4450 2018-10-05  Andrew Waterman  <andrew@sifive.com>
4451             Jim Wilson  <jimw@sifive.com>
4453         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4454         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
4455         new pattern using HONOR_SNANS that emits one extra instruction.
4457 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
4459         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4460         patterns): Merge SI and DI patterns to a GPR pattern.
4461         (unnamed define_insn and define_split for record form of that): Merge
4462         to a single define_insn_and_split pattern.
4464 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
4466         PR c++/56856
4467         * input.c (expand_location_to_spelling_point): Add param "aspect"
4468         and use rather than hardcoding LOCATION_ASPECT_CARET.
4469         (get_substring_ranges_for_loc): Handle the case of a single token
4470         within a macro expansion.
4471         * input.h (expand_location_to_spelling_point): Add "aspect" param,
4472         defaulting to LOCATION_ASPECT_CARET.
4474 2018-10-05  Paul Koning  <ni1d@arrl.net>
4476         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4477         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4478         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4479         (pdp11_guard_type): New function.
4481 2018-10-05  Paul Koning  <ni1d@arrl.net>
4483         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4484         * config/pdp11/pdp11.opt (mfloat32): Remove.
4485         (mfloat64): Remove.
4486         * doc/invoke.texi (pdp11 -mfloat32): Remove:
4487         (pdp11 -mfloat64): Remove.
4489 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4491         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4492         (*cmp<mode>_cc_i387): Ditto.
4493         (*cmpu<mode>_cc_i387): Ditto.
4494         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4495         * config/i386/i386.c (ix86_expand_fp_compare): Remove
4496         "scratch" argument.
4497         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4498         Emit x86_sahf_1 pattern.
4499         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4500         (ix86_expand_carry_flag_compare): Ditto.
4502 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4504         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4505         to reg_or_0_operand.  Add "C" constraint.
4506         (*cmpxf_cc_i387): Ditto.
4507         (*cmp<mode>_i387): Change operand 2 predicate
4508         to nonimm_or_0_operand.  Add "C" constraint.
4509         (*cmp<mode>_cc_i387): Ditto.
4510         (*cmp<mode>_0_i387): Remove insn pattern.
4511         (*cmp<mode>_0_cc_i387): Ditto.
4513 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4515         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4516         * config/i386/predicates.md (nonimm_or_0_operand): Rename
4517         from vector_move_operand.  Update all uses.
4519 2018-10-05  Martin Sebor  <msebor@redhat.com>
4521         PR tree-optimization/87490
4522         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4523         consistently.
4525 2018-10-05  Richard Biener  <rguenther@suse.de>
4527         PR tree-optimization/63155
4528         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4529         vertical space in dumpfiles.
4530         * tree-ssa-propagate.h
4531         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4532         * tree-ssa-propagate.c (cfg_blocks_back): New global.
4533         (ssa_edge_worklist_back): Likewise.
4534         (curr_order): Likewise.
4535         (cfg_blocks_get): Remove abstraction.
4536         (cfg_blocks_add): Likewise.
4537         (cfg_blocks_empty_p): Likewise.
4538         (add_ssa_edge): Add to current or next worklist based on
4539         RPO index.
4540         (add_control_edge): Likewise.
4541         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4542         into ...
4543         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
4544         iteration from CFG and SSA edge worklist so we process
4545         everything in RPO order, prioritizing forward progress
4546         over iteration.
4547         (ssa_prop_init): Allocate new worklists, do not dump
4548         immediate uses.
4549         (ssa_prop_fini): Free new worklists.
4551 2018-10-05  Richard Biener  <rguenther@suse.de>
4553         * tree-core.h (tree_block::abstract_flag): Remove.
4554         (tree_block::block_num): Make full 32bits.
4555         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4556         * tree.h (BLOCK_ABSTRACT): Remove.
4557         * dwarf2out.c (gen_lexical_block_die): Remove dead code
4558         resulting from BLOCK_ABSTRACT being always false.
4559         (gen_inlined_subroutine_die): Likewise.
4560         (gen_block_die): Likewise.
4561         * tree.c (block_ultimate_origin): Likewise.
4562         * tree-pretty-print.c (dump_block_node): Remove code dealing
4563         with BLOCK_ABSTRACT.
4564         * tree-ssa-live.c (dump_scope_block): Likewise.
4565         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4566         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4568 2018-10-05   Richard Biener  <rguenther@suse.de>
4570         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4571         is asked for initialize mode to the component mode of the
4572         vector type.
4574 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
4576         PR target/87522
4577         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4578         assembler for -mavx.
4579         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4581 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
4583         PR target/87509
4584         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4585         RS6000_BTM_DFP.
4586         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4587         to be DImode.  When using mffscrn, force the operand to a register.
4589 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
4591         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4592         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4593         X87MODEF mode iterator.
4594         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4595         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4596         X87MODEF mode iterator.
4598 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
4600         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4601         -Wno-prio-ctor-dtor.
4603 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4605         * Makefile.in (OBJS): Add opt-problem.o.
4606         * dump-context.h: Include "selftest.h.
4607         (selftest::temp_dump_context): New forward decl.
4608         (class dump_context): Make friend of class
4609         selftest::temp_dump_context.
4610         (dump_context::dump_loc_immediate): New decl.
4611         (class dump_pretty_printer): Move here from dumpfile.c.
4612         (class temp_dump_context): Move to namespace selftest.
4613         (temp_dump_context::temp_dump_context): Add param
4614         "forcibly_enable_dumping".
4615         (selftest::verify_dumped_text):
4616         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4617         (selftest::verify_item):
4618         (ASSERT_IS_TEXT): Move here from dumpfile.c.
4619         (ASSERT_IS_TREE): Likewise.
4620         (ASSERT_IS_GIMPLE): Likewise.
4621         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4622         to...
4623         (dump_context::dump_loc_immediate): ...this new function.
4624         (class dump_pretty_printer): Move to dump-context.h.
4625         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4626         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4627         (temp_dump_context::temp_dump_context): Move to "selftest"
4628         namespace.  Add param "forcibly_enable_dumping", and use it to
4629         conditionalize the use of m_pp;
4630         (selftest::verify_dumped_text): Make non-static.
4631         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4632         (selftest::verify_item): Make non-static.
4633         (ASSERT_IS_TEXT): Move to dump-context.h.
4634         (ASSERT_IS_TREE): Likewise.
4635         (ASSERT_IS_GIMPLE): Likewise.
4636         (selftest::test_capture_of_dump_calls): Pass "true" for new
4637         param of temp_dump_context.
4638         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4639         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
4640         TDF_COMPARE_DEBUG.
4641         * opt-problem.cc: New file.
4642         * opt-problem.h: New file.
4643         * optinfo-emit-json.cc
4644         (selftest::test_building_json_from_dump_calls): Pass "true" for
4645         new param of temp_dump_context.
4646         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4647         (optinfo::emit_for_opt_problem): New function.
4648         (optinfo::emit): Clarity which emit_item is used.
4649         * optinfo.h (optinfo::get_dump_location): New accessor.
4650         (optinfo::emit_for_opt_problem): New decl.
4651         (optinfo::emit): Make const.
4652         * selftest-run-tests.c (selftest::run_tests): Call
4653         selftest::opt_problem_cc_tests.
4654         * selftest.h (selftest::opt_problem_cc_tests): New decl.
4655         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4656         bool to opt_result, converting fprintf messages to
4657         opt_result::failure_at calls.  Add "stmt" param for use by the
4658         failure_at calls.
4659         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4660         (runtime_alias_check_p): Convert return type from bool to
4661         opt_result, converting dump_printf calls to
4662         opt_result::failure_at, using the statement DDR_A for their
4663         location.
4664         (find_data_references_in_stmt): Convert return type from bool to
4665         opt_result, converting "return false" to opt_result::failure_at
4666         with a new message.
4667         * tree-data-ref.h: Include "opt-problem.h".
4668         (dr_analyze_innermost): Convert return type from bool to opt_result,
4669         and add a const gimple * param.
4670         (find_data_references_in_stmt): Convert return type from bool to
4671         opt_result.
4672         (runtime_alias_check_p): Likewise.
4673         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4674         dr_analyze_innermost.
4675         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4676         Convert return type from bool to opt_result, adding a message for
4677         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4678         (vect_analyze_data_ref_dependence): Convert return type from bool
4679         to opt_result.  Change sense of return type from "false"
4680         effectively meaning "no problems" to "false" meaning a problem,
4681         so that "return false" becomes "return opt_result::success".
4682         Convert "return true" calls to opt_result::failure_at, using
4683         the location of statement A rather than vect_location.
4684         (vect_analyze_data_ref_dependences): Convert return type from bool
4685         to opt_result.
4686         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4687         calls to opt_result::failure_at, using the stmt location rather
4688         than vect_location.
4689         (vect_verify_datarefs_alignment): Convert return type from bool
4690         to opt_result.
4691         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
4692         into multiple more-tightly-scoped copies.
4693         (vect_analyze_data_refs_alignment): Convert return type from bool
4694         to opt_result.
4695         (vect_analyze_data_ref_accesses): Likewise, converting a
4696         "return false" to a "return opt_result::failure_at", adding a
4697         new message.
4698         (vect_prune_runtime_alias_test_list): Convert return type from
4699         bool to opt_result, converting dump_printf_loc to
4700         opt_result::failure_at.  Add a %G to show the pertinent statement,
4701         and use the stmt's location rather than vect_location.
4702         (vect_find_stmt_data_reference): Convert return type from
4703         bool to opt_result, converting dump_printf_loc to
4704         opt_result::failure_at, using stmt's location.
4705         (vect_analyze_data_refs):  Convert return type from bool to
4706         opt_result.  Convert "return false" to "return
4707         opt_result::failure_at", adding messages as needed.
4708         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4709         type from bool to opt_result.
4710         (vect_determine_vf_for_stmt): Likewise.
4711         (vect_determine_vectorization_factor): Likewise, converting
4712         dump_printf_loc to opt_result::failure_at, using location of phi
4713         rather than vect_location.
4714         (vect_analyze_loop_form_1): Convert return type from bool to
4715         opt_result, converting dump_printf_loc calls, retaining the use of
4716         vect_location.
4717         (vect_analyze_loop_form): Convert return type from loop_vec_info
4718         to opt_loop_vec_info.
4719         (vect_analyze_loop_operations): Convert return type from bool to
4720         opt_result, converting dump_printf_loc calls, using the location
4721         of phi/stmt rather than vect_location where available.  Convert
4722         various "return false" to "return opt_result::failure_at" with
4723         "unsupported phi" messages.
4724         (vect_get_datarefs_in_loop): Convert return type from bool to
4725         opt_result.  Add a message for the
4726         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4727         (vect_analyze_loop_2): Convert return type from bool to
4728         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
4729         each "goto again;", adding new messages where needed.
4730         Add "unsupported grouped {store|load}" messages.
4731         (vect_analyze_loop): Convert return type from loop_vec_info to
4732         opt_loop_vec_info.
4733         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4734         bool to opt_result.
4735         * tree-vect-stmts.c (process_use): Likewise, converting
4736         dump_printf_loc call and using stmt location, rather than
4737         vect_location.
4738         (vect_mark_stmts_to_be_vectorized): Likeise.
4739         (vect_analyze_stmt): Likewise, adding a %G.
4740         (vect_get_vector_types_for_stmt): Convert return type from bool to
4741         opt_result, converting dump_printf_loc calls and using stmt
4742         location, rather than vect_location.
4743         (vect_get_mask_type_for_stmt): Convert return type from tree to
4744         opt_tree, converting dump_printf_loc calls and using stmt location.
4745         * tree-vectorizer.c: Include "opt-problem.h.
4746         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4747         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
4748         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
4749         enabled, use it to report at the top level "couldn't vectorize
4750         loop" followed by the problem.
4751         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4752         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4753         to opt_result.
4754         (vect_analyze_stmt): Likewise.
4755         (vect_get_vector_types_for_stmt): Likewise.
4756         (tree vect_get_mask_type_for_stmt): Likewise.
4757         (vect_analyze_data_ref_dependences): Likewise.
4758         (vect_enhance_data_refs_alignment): Likewise.
4759         (vect_analyze_data_refs_alignment): Likewise.
4760         (vect_verify_datarefs_alignment): Likewise.
4761         (vect_analyze_data_ref_accesses): Likewise.
4762         (vect_prune_runtime_alias_test_list): Likewise.
4763         (vect_find_stmt_data_reference): Likewise.
4764         (vect_analyze_data_refs): Likewise.
4765         (vect_analyze_loop): Convert return type from loop_vec_info to
4766         opt_loop_vec_info.
4767         (vect_analyze_loop_form): Likewise.
4768         (vect_analyze_slp): Convert return type from bool to opt_result.
4770 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4772         * doc/invoke.texi (-fopt-info): Document new "internals"
4773         sub-option.
4774         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4775         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4776         MSG_ALL_KINDS.
4777         (optinfo_verbosity_options): Add "internals".
4778         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4779         (dump_context::apply_dump_filter_p): New member function.
4780         (dump_context::dump_loc): Use apply_dump_filter_p rather than
4781         explicitly masking the dump_kind.
4782         (dump_context::begin_scope): Increment the scope depth first.  Use
4783         apply_dump_filter_p rather than explicitly masking the dump_kind.
4784         (dump_context::emit_item): Use apply_dump_filter_p rather than
4785         explicitly masking the dump_kind.
4786         (dump_dec): Likewise.
4787         (dump_hex): Likewise.
4788         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4789         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4790         (opt_info_switch_p): Update handling of default
4791         MSG_OPTIMIZED_LOCATIONS to cope with default of
4792         MSG_PRIORITY_USER_FACING.
4793         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4794         masking the dump_kind.
4795         (selftest::test_capture_of_dump_calls): Update test_dump_context
4796         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4797         than MSG_ALL.  Generalize scope test to be run at all four
4798         combinations of with/without MSG_PRIORITY_USER_FACING and
4799         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4800         for each of the two values.
4801         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4802         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
4803         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4804         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4805         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4806         with MSG_PRIORITY_*.
4807         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4808         dump messages as MSG_PRIORITY_USER_FACING.
4809         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4810         about the interaction with MSG_PRIORITY_*.
4812 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4814         * varasm.c (output_constant): Add new parameter merge_strings.
4815         Make strings properly zero terminated in merge string sections.
4816         (mergeable_string_section): Don't fail if the last char is non-zero.
4817         (assemble_variable_contents): Handle merge string sections.
4818         (assemble_variable): Likewise.
4819         (assemble_constant_contents): Likewise.
4820         (output_constant_def_contents): Likewise.
4821         (output_constructor_array_range,
4822         output_constructor_regular_field): Adjust call to output_constant.
4823         (output_object_block): Adjust call to assemble_constant_contents
4824         and assemble_variable_contents.
4826 2018-10-04  Martin Liska  <mliska@suse.cz>
4828         PR c/87483
4829         * cgraphunit.c (process_function_and_variable_attributes):
4830         Warn about a function with alias attribute and a body.
4832 2018-10-04  Martin Liska  <mliska@suse.cz>
4834         PR ipa/82625
4835         * multiple_target.c (redirect_to_specific_clone): New function.
4836         (ipa_target_clone): Use it.
4837         * tree-inline.c: Fix comment.
4839 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4841         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4842         fields.
4843         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4844         (gcc::dump_manager::register_pass): New member function, adapted
4845         from loop body in gcc::pass_manager::register_pass, adding a
4846         call to update_dfi_for_opt_info.
4847         (gcc::dump_manager::opt_info_enable_passes): Store the
4848         -fopt-info options into the new fields.  Move the loop
4849         bodies into...
4850         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4851         function.
4852         * dumpfile.h (struct opt_pass): New forward decl.
4853         (gcc::dump_manager::register_pass): New decl.
4854         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4855         (class gcc::dump_manager): Add fields "m_optgroup_flags",
4856         "m_optinfo_flags", and "m_optinfo_filename".
4857         * passes.c (gcc::pass_manager::register_pass): Move all of the
4858         dump-handling code to gcc::dump_manager::register_pass.
4860 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
4862         PR rtl-optimization/87466
4863         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4864         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4865         * doc/tm.texi: Regenerate.
4866         * ira-lives.c (process_bb_node_lives): Use the new target hook.
4867         * lra-lives.c (process_bb_lives): Likewise.
4868         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4869         Define.
4871 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
4873         * params.c (add_params): Fix initialization.
4875 2018-10-04  Martin Liska  <mliska@suse.cz>
4877         PR gcov-profile/84107
4878         * tree-profile.c (init_ic_make_global_vars):
4879         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4880         Come up with new ic_tuple* variables.  Emit
4881         __gcov_indirect_call{,_topn} variables.
4882         (gimple_gen_ic_profiler): Access the variable
4883         and emit gimple.
4884         (gimple_gen_ic_func_profiler): Access
4885         __gcov_indirect_call.callee field.
4886         (gimple_init_gcov_profiler): Use ptr_type_node.
4887         * value-prof.c (gimple_ic): Use ptr_type_node.
4889 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4891         PR tree-optimization/85787
4892         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4893         into this function and add support for detecting multiple phis.
4894         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4896 2018-10-04  Martin Liska  <mliska@suse.cz>
4898         PR ipa/87491
4899         * ipa-inline.c (inline_to_all_callers_1):
4900         Call ultimate_alias_target for node being inlined.
4902 2018-10-03  Jeff Law  <law@redhat.com>
4904         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4905         target's wchar_t.
4906         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4907         * tree.h (get_typenode_from_name): Prototype.
4909 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4911         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4912         Change operand 2 predicate to nonimmediate_operand.
4913         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4915 2018-10-03  Martin Sebor  <msebor@redhat.com>
4916             Jeff Law  <law@redhat.com>
4918         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4919         initialize it.
4920         (get_string_length): Detect unterminated arrays.
4921         (format_string): Same.
4922         (format_directive): Warn about unterminated arrays.
4923         (handle_gimple_call): Mark statements with no_warning as needed.
4925 2018-10-03  Jim Wilson  <jimw@sifive.com>
4927         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4928         also define __riscv_abi_rve.  Delete trailing white space.
4930 2018-10-03  Paul Koning  <ni1d@arrl.net>
4932         Enable LRA register allocator for PDP11.
4933         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4934         (R): Likewise.
4935         (D): Likewise.
4936         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4937         * config/pdp11/pdp11.opt (-mlra): New option.
4938         * doc/invoke.texi (PDP-11 Options): Document -mlra.
4940 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4942         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4943         (*<absneg:code>extend<mode>xf2): Ditto.
4945 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4947         PR tree-optimization/87415
4948         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4949         precision fields.
4951 2018-10-02  Jeff Law  <law@redhat.com>
4953         * gimple-fold.c (get_range_strlen): Only set *nonstr when
4954         an unterminated string is discovered.  Bubble up range
4955         even for unterminated strings.
4956         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4957         indicates the string was not terminated via NONSTR.
4959 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4961         * tree-vrp.c (extract_range_from_unary_expr): Special case all
4962         pointer conversions.
4963         Do not do anything special for anti-ranges.
4965 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
4967         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4968         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4970 2018-10-03  Martin Liska  <mliska@suse.cz>
4972         PR gcov-profile/86109
4973         * coverage.c (coverage_begin_function): Do not
4974         mark lambdas as artificial.
4975         * tree-core.h (struct GTY): Remove tm_clone_flag
4976         and introduce new lambda_function.
4977         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4979 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4981         PR target/87474
4982         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4983         P8_VECTOR and VSX are enabled.
4985 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4987         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4988         0x3907 as CPU model number.
4990 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4992         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4993         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4994         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4995         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4996         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4997         * config/s390/s390.md: Likewise. Rename also the cpu attribute
4998         value from arch12 to z14.
5000 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
5002         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5003         (isinfxf2): Ditto.
5004         (isinf<mode>2): Ditto.
5006 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
5008         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5009         before emitting fxam.  Perform calculations in XFmode.
5011 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
5013         * match.pd (((X /[ex] A) +- B) * A): New transformation.
5015 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
5017         PR middle-end/87319
5018         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5019         * tree.c (signed_or_unsigned_type_for): Handle complex.
5021 2018-10-02  Jeff Law  <law@redhat.com>
5023         * gimple-fold.c (get_range_strlen): Remove dead code.
5025 2018-10-02  Martin Sebor  <msebor@redhat.com>
5026             Jeff Law  <law@redhat.com>
5028         * builtins.c (unterminated_array): Add new arguments.
5029         If argument is not terminated, bubble up size and exact
5030         state to callers.
5031         (expand_builtin_strnlen): Detect, avoid expanding
5032         and diagnose unterminated arrays.
5033         (c_strlen): Fill in offset of start of unterminated strings.
5034         * builtins.h (unterminated_array): Update prototype.
5036 2018-10-02  Richard Biener  <rguenther@suse.de>
5038         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5039         of haddv4df, first reduce to SSE width and exploit the fact
5040         that we only need element zero with the reduction result.
5041         (reduc_plus_scal_v2df): Likewise.
5043 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5045         * dojump.h (do_jump): Delete.
5046         (do_jump_1): Likewise.
5047         (split_comparison): Move around.
5048         * dojump.c (do_jump): Make static.
5049         (do_jump_1): Likewise.
5050         (jumpifnot): Move around.
5051         (jumpifnot_1): Likewise.
5052         (jumpif): Likewise.
5053         (jumpif_1): Likewise.
5054         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5056 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5058         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5059         insns in the delay slot and add_insn_after for the jump insn.
5061 2018-10-02  Richard Biener  <rguenther@suse.de>
5063         * tree-inline.c (expand_call_inline): Use the location of
5064         the callee declaration for the inline-entry marker.
5065         * final.c (notice_source_line): Remove special-casing of
5066         NOTE_INSN_INLINE_ENTRY.
5068 2018-10-01  Carl Love  <cel@us.ibm.com>
5070         PR 69431
5071         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5072         (__builtin_mtfsb0): New.
5073         (__builtin_mtfsb1): New.
5074         ( __builtin_set_fpscr_rn): New.
5075         (__builtin_set_fpscr_drn): New.
5076         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5077         (rs6000_expand_set_fpscr_rn_builtin): Add.
5078         (rs6000_expand_set_fpscr_drn_builtin): Add.
5079         (rs6000_expand_builtin): Add case statement entries for
5080         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5081         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5082         RS6000_BUILTIN_MFFSL.
5083         (rs6000_init_builtins): Add ftype initialization and def_builtin
5084         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5085         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5086         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5087         rs6000_mffscdrn): Add define_insn.
5088         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5089         * doc/extend.texi: Add documentation for the builtins.
5091 2018-10-01  Richard Biener  <rguenther@suse.de>
5093         PR tree-optimization/87465
5094         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5095         causing branch miscounts.
5097 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5099         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5100         aarch64_option_default_param):  New.
5101         (params.h): Include.
5102         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5103         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5104         stack-clash protection validation code.
5106 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5108         * params.c (validate_param): New.
5109         (add_params): Use it.
5110         (set_param_value): Refactor param validation into validate_param.
5111         (diagnostic.h): Include.
5112         * diagnostic.h (diagnostic_ready_p): New.
5114 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5116         * params.c (set_param_value):
5117         Add index of parameter being validated.
5118         * common/common-target.def (option_validate_param): New.
5119         * common/common-targhooks.h (default_option_validate_param): New.
5120         * common/common-targhooks.c (default_option_validate_param): New.
5121         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5122         * doc/tm.texi: Regenerate.
5124 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5126         PR target/86486
5127         * config/aarch64/aarch64.c (aarch64_override_options_internal):
5128         Add validation for stack-clash parameters and set defaults.
5130 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5132         PR target/86486
5133         * configure.ac: Add stack-clash-protection-guard-size.
5134         * doc/install.texi: Document it.
5135         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5136         * params.def: Update comment for guard-size.
5137         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5138         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5139         * configure: Regenerate.
5141 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5143         PR target/86486
5144         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5145         STACK_DYNAMIC_OFFSET): New.
5146         * config/aarch64/aarch64.c (aarch64_layout_frame):
5147         Update outgoing args size.
5148         (aarch64_stack_clash_protection_alloca_probe_range,
5149         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5151 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5153         PR target/86486
5154         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5155         probe ranges.
5156         * target.def (stack_clash_protection_alloca_probe_range): New.
5157         (stack_clash_protection_final_dynamic_probe): Remove.
5158         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5159         (default_stack_clash_protection_final_dynamic_probe): Remove.
5160         * targhooks.c: Likewise.
5161         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5162         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5163         * doc/tm.texi: Regenerate.
5165 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5167         PR target/86486
5168         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5169         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5170         aarch64_clamp_to_uimm12_shift): New.
5171         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5172         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5174 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5176         PR target/86486
5177         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5179 2018-10-01  Jeff Law  <law@redhat.com>
5180             Richard Sandiford <richard.sandiford@linaro.org>
5181             Tamar Christina  <tamar.christina@arm.com>
5183         PR target/86486
5184         * config/aarch64/aarch64.md
5185         (probe_stack_range): Add k (SP) constraint.
5186         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5187         STACK_CLASH_MAX_UNROLL_PAGES): New.
5188         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5189         stack probes for stack clash.
5190         (aarch64_allocate_and_probe_stack_space): New.
5191         (aarch64_expand_prologue): Use it.
5192         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5193         (aarch64_sub_sp): Add emit_move_imm optional param.
5195 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
5197         PR tree-optimization/87261
5198         * match.pd: Remove trailing whitespace.
5199         Add (x & y) | ~(x | y) -> ~(x ^ y),
5200         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5202 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5204         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5205         constraints.
5206         (ashlsi3_insn): Update instruction constraints.
5207         (ashrsi3_insn): Likewise.
5208         (rotrsi3): Likewise.
5209         (add_shift): Likewise.
5210         * config/arc/constraints.md (Csz): New 32 bit constraint. It
5211         avoids placing in the limm field small constants which, otherwise,
5212         could end into a small instruction.
5214 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5216         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5217         destination register is not odd-even.
5218         (umaddsidi4_split): Likewise.
5220 2018-10-01  Richard Biener  <rguenther@suse.de>
5222         * tree-inline.c (expand_call_inline): Store origin of fn
5223         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5224         * tree.c (block_ultimate_origin): Simplify and do some
5225         checking.
5227 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
5229         * config/i386/mmx.md (EMMS): New int iterator.
5230         (emms): New int attribute.
5231         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5232         EMMS int iterator.  Explicitly declare clobbers.
5233         (mmx_emms): Remove expander.
5234         (mmx_femms): Ditto.
5235         * config/i386/predicates.md (emms_operation): Remove predicate.
5236         (vzeroall_pattern): New predicate.
5237         (vzeroupper_pattern): Rename from vzeroupper_operation.
5238         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5239         vzeroupper_pattern and vzeroall_pattern predicates.
5241 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
5243         PR rtl-optimization/86939
5244         * ira-lives.c (make_hard_regno_born): Rename from this...
5245         (make_hard_regno_live): ... to this.  Remove update to conflict
5246         information.  Update function comment.
5247         (make_hard_regno_dead): Add conflict information update.  Update
5248         function comment.
5249         (make_object_born): Rename from this...
5250         (make_object_live): ... to this.  Remove update to conflict information.
5251         Update function comment.
5252         (make_object_dead):  Add conflict information update.  Update function
5253         comment.
5254         (mark_pseudo_regno_live): Call make_object_live.
5255         (mark_pseudo_regno_subword_live): Likewise.
5256         (mark_hard_reg_dead): Update function comment.
5257         (mark_hard_reg_live): Call make_hard_regno_live.
5258         (process_bb_node_lives): Likewise.
5259         * lra-lives.c (make_hard_regno_born): Rename from this...
5260         (make_hard_regno_live): ... to this.  Remove update to conflict
5261         information.  Remove now uneeded check_pic_pseudo_p argument.
5262         Update function comment.
5263         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5264         to conflict information.  Update function comment.
5265         (mark_pseudo_live): Remove update to conflict information.  Update
5266         function comment.
5267         (mark_pseudo_dead): Add conflict information update.
5268         (mark_regno_live): Call make_hard_regno_live.
5269         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5270         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5272 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
5274         PR target/87370
5275         * config/i386/i386.c (construct_container): Use TImode for
5276         BLKmode values in 2 integer registers.
5278 2018-09-29  Jeff Law  <law@redhat.com>
5280         * builtins.c (unterminated_array): Pass in c_strlen_data * to
5281         c_strlen rather than just a tree *.
5282         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5283         Update recursive calls appropriately.  If caller did not provide a
5284         suitable data pointer, create a local one.  When a non-terminated
5285         string is discovered, bubble up information about the string via the
5286         c_strlen_data object.
5287         * builtins.h (c_strlen): Update prototype.
5288         (c_strlen_data): New structure.
5289         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5290         For a type 2 call, if c_strlen indicates a non-terminated string
5291         use the length of the non-terminated string.
5292         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5294 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
5296         PR target/87467
5297         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5298         __m512d type for __A argument rather than __m512.
5300 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
5302         * match.pd (simple_comparison): Don't optimize if either operand is
5303         a function pointer when target needs function pointer canonicalization.
5305 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5307         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5308         power5 .. power9 to remove indirection.
5309         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5310         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5311         ASM_CPU_476_SPEC): Delete.
5312         (ASM_CPU_SPEC): Adjust.
5313         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5314         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5316 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5318         * config.in: Delete HAVE_AS_DCI.
5319         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5320         * config/rs6000/rs6000.h: Ditto.
5321         * configure.ac: Delete HAVE_AS_DCI.
5322         * configure: Regenerate.
5324 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5326         * config.in (HAVE_AS_LWSYNC): Delete.
5327         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5328         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5329         do it as a .long .
5330         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5331         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5332         as a .long .
5333         * configure.ac: Delete HAVE_AS_LWSYNC.
5334         * configure: Regenerate.
5336 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5337             Pierre-Marie de Rodat  <derodat@adacore.com>
5339         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5340         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5341         (cgraph_node::create_thunk): Add indirect_offset parameter.
5342         (thunk_adjust): Likewise.
5343         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5344         and initialize the corresponding field with it.
5345         (cgraph_node::dump): Dump indirect_offset field.
5346         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5347         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5348         (thunk_adjust): Add indirect_offset parameter and deal with it.
5349         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5350         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
5351         or if the thunk is external or local.  Fix formatting.  Do not chain
5352         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
5353         if any, in the GIMPLE representation.
5354         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5355         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5356         (input_node): Read indirect_offset field.
5357         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5358         call to thunk_adjust.
5359         * tree-nested.c (struct nesting_info): Add thunk_p field.
5360         (create_nesting_tree): Set it.
5361         (convert_all_function_calls): Copy static chain from targets to thunks.
5362         (finalize_nesting_tree_1): Return early for thunks.
5363         (unnest_nesting_tree_1): Do not finalize thunks.
5364         (gimplify_all_functions): Do not gimplify thunks.
5366 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5368         * opt-suggestions.c (option_proposer::build_option_suggestions):
5369         Release "option_values".
5371 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5373         * coverage.c (get_coverage_counts): Convert problem-reporting dump
5374         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5375         * dumpfile.c (kind_as_string): New function.
5376         (dump_loc): Rather than a hardcoded prefix of "note: ", use
5377         kind_as_string to vary the prefix based on dump_kind.
5378         (selftest::test_capture_of_dump_calls): Update for above.
5380 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5382         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5383         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
5385 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5387         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5388         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5389         INVALID_REGNUM instead of FPSR_REG.
5390         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5391         * config/i386/i386.md: Update comment of FP compares.
5392         (fldenv): Do not clobber FPSR_REG.
5394 2018-09-28  Richard Biener  <rguenther@suse.de>
5396         * tree.h (BLOCK_ORIGIN): New.
5397         * omp-expand.c (grid_expand_target_grid_body): Assign
5398         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5399         * tree-inline.c (remap_block): Likewise.
5400         * auto-profile.c (get_function_decl_from_block): Simplify
5401         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5402         * langhooks.c (lhd_print_error_function): Likewise.
5403         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5404         Likewise.
5405         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5406         * tree.c (block_nonartificial_location): Likewise.
5407         (block_ultimate_origin): Likewise.
5408         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
5409         no longer needed LTO case.
5411 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
5412             Jan Hubicka  <jh@suse.cz>
5413             Martin Jambor  <mjambor@suse.cz>
5415         * simplify-rtx.c (simplify_merge_mask): New function.
5416         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5417         same masks are used in op1 or op2.
5418         (test_vec_merge): New function.
5419         (test_vector_ops): Call test_vec_merge.
5421 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5423         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5424         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5425         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5426         (cypress_costs): Set it.
5427         (supersparc_costs): Likewise.
5428         (hypersparc_costs): Likewise.
5429         (leon_cost): Likewise.
5430         (leon3_costs): Likewise.
5431         (sparclet_costs): Likewise.
5432         (ultrasparc_costs): Likewise.
5433         (ultrasparc_costs): Likewise.
5434         (niagara_costs): Likewise.
5435         (niagara2_costs): Likewise.
5436         (niagara3_costs): Likewise.
5437         (niagara4_costs): Likewise.
5438         (niagara7_costs): Likewise.
5439         (m8_costs): Likewise.
5440         (TARGET_CAN_FOLLOW_JUMP): Define.
5441         (pass_work_around_errata::gate): Minor tweak.
5442         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5443         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5444         Automaitcally clear MASK_FSMULD mask for V7 processors.
5445         (sparc_can_follow_jump): New static function.
5446         (output_ubranch): Deal with CROSSING_JUMP_P.
5447         (sparc_use_sched_lookahead): Rewrite using switch statement.
5448         (sparc_issue_rate): Reorder.
5449         (sparc_branch_cost): New function.
5451 2018-09-27  Martin Sebor  <msebor@redhat.com>
5453         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5454         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5455         (int_fits_type_p): Same.
5457 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
5459         * config/i386/i386.md (FPCR_REG): Remove.
5460         (UNSPEC_FLDCW): Remove.
5461         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5462         (x86_fldcw_1): Remove insn pattern.
5463         (fnstenv): Do not clobber FPCR_REG.
5464         (fldenv): Ditto.
5465         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5466         (CALL_USED_REGISTERS): Ditto.
5467         (REG_ALLOC_ORDER): Ditto.
5468         (REG_CLASS_CONTENTS): Ditto.
5469         (HI_REGISTER_NAMES): Ditto.
5470         (ADDITIONAL_REGISTER_NAMES): Use defines instead
5471         of numerical constants.
5472         * config/i386/i386.c (regclass_map): Remove fpsr register.
5473         (dbx_register_map): Ditto.
5474         (dbx64_register_map): Ditto.
5475         (svr4_dbx_register_map): Ditto.
5476         (print_reg): Do not handle FPCR_REG.
5478 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
5480         PR target/87149
5481         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5482         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5483         Delete, always treat as true.
5484         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5485         Ditto.  Simplify remaining code.
5486         * config/powerpcspe/powerpcspe.h: Ditto.
5487         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5488         Simplify remaining code.
5489         (rs6000_expand_builtin): Ditto.
5490         * config/rs6000/rs6000.h: Ditto.
5491         * configure.ac: Ditto.
5492         * configure: Regenerate.
5494 2018-09-27  Martin Liska  <mliska@suse.cz>
5496         * coverage.c (get_coverage_counts): Revert the formatting
5497         of missing profile opt info.
5499 2018-09-27  Richard Biener  <rguenther@suse.de>
5501         PR debug/37801
5502         PR debug/87440
5503         * dwarf2out.c (set_block_origin_self): Do not mark outermost
5504         block as we do not output that.
5505         (gen_inlined_subroutine_die): Elide the originally outermost
5506         block, matching what we do for concrete instances.
5507         (decls_for_scope): Add parameter specifying whether to recurse
5508         to subblocks.
5510 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
5511             Tom de Vries  <tom@codesourcery.com>
5513         PR 82089
5515         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5516         STORE_FLAG_VALUE == 1.
5518 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
5520         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5521         constant definitions.
5522         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5523         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5524         ("speculation_barrier"): New expander definition.
5526 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
5528         PR gcov-profile/86957
5529         * common.opt: New warning option -Wmissing-profile.
5530         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5531         * doc/invoke.texi: Document -Wmissing-profile.
5533 2018-09-26  Jim Wilson  <jimw@sifive.com>
5535         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5536         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5538 2018-09-26  Martin Sebor  <msebor@redhat.com>
5540         * tree.c (zerop): Change return type to bool.
5541         (integer_zerop, integer_onep, integer_each_onep): Same.
5542         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5543         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5544         (real_onep, real_minus_onep, chain_index): Same.
5545         (print_type_hash_statistics, type_list_equal): Same.
5546         * tree.h (zerop): Same.
5547         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5548         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5549         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5550         (real_onep, real_minus_onep, chain_index): Same.
5551         (print_type_hash_statistics, type_list_equal): Same.
5553 2018-09-26  Jim Wilson  <jimw@sifive.com>
5555         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5557 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
5559         PR target/87414
5560         * config/i386/i386.c: Include debug.h and dwarf2out.h.
5561         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5562         call.
5564 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
5566         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5568 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
5570         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5571         and FP_SECOND_SSE_REGS.
5572         (REG_CLASS_NAMES): Ditto.
5573         (REG_CLASS_CONTENTS): Ditto.
5574         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5575         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5576         (ix86_preferred_output_reload_class): Ditto.
5577         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5578         clobber constraint to "=&f".
5579         (fix_truncdi_i387): Ditto.
5580         (lrintxfdi2): Ditto.
5581         (fistdi2_<rounding>): Ditto.
5582         (fpremxf4_i387): Change "=u" constraint to "=f".
5583         (fprem1xf4_i387): Ditto.
5584         (sincosxf3): Ditto.
5585         (fptanxf4_i387): Ditto.
5586         (fxtractxf3_i387): Ditto.
5587         (fscalexf4_i387): Ditto.
5588         (atan2xf3): Change "u" constraint to "f".
5589         (fyl2xxf3_i387): Ditto.
5590         (fyl2xp1xf3_i387): Ditto.
5592 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
5594         PR target/87439
5595         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5596         for removed I387_MASK_PM entity.
5599 2018-09-26  Jeff Law  <law@redhat.com>
5600         Revert
5601         2018-09-26  Alexey Neyman  <stilor@att.net>
5603         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5604         headers are no longer pulled in by <isl/val.h>.
5606 2018-09-26  Richard Biener  <rguenther@suse.de>
5608         PR debug/87443
5609         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5610         or concrete instance DIE to the tree.  Create abstract origin
5611         attributes also for concrete instances.
5613 2018-09-26  Alexey Neyman  <stilor@att.net>
5615         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5616         headers are no longer pulled in by <isl/val.h>.
5618 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
5620         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5621         Use new helper functions.
5622         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5623         Use new helper functions.
5624         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5625         aarch_mm_needs_release): New declarations.
5626         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5627         aarch_mm_needs_release): New.
5629 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
5631         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5632         (arm32_output_mi_thunk): Deal with long calls.
5634 2018-09-26  Richard Biener  <rguenther@suse.de>
5636         PR debug/87428
5637         PR debug/87362
5638         * tree-inline.c (expand_call_inline): When the location
5639         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5640         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5641         the inserted BLOCK to make inlined_function_outer_scope_p
5642         recognize it.
5643         * dwarf2out.c (add_call_src_coords_attributes): Do not add
5644         coords for reserved locations.
5646 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5648         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5649         (*call_indirect_nonlocal_sysv<mode>): Ditto.
5650         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5651         (*sibcall_nonlocal_sysv<mode>): Ditto.
5652         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5653         (<bd>_<mode>): Ditto.
5654         (<bd>tf_<mode>): Ditto.
5656 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5658         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5659         control string as a list of templates instead of as C code.
5660         (*altivec_movti): Ditto.
5661         * config/rs6000/darwin.md (movdf_low_di): Ditto.
5663 2018-09-25  Jim Wilson  <jimw@sifive.com>
5665         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5666         when target symbol is weak.
5668 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5670         PR c/87387
5671         * builtins.c (unterminated_array): Simplify.
5672         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
5673         where pointer arithmetic is safe.
5675 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5677         PR target/86987
5678         * config/rs6000/altivec.md (altivec_vspltb): Use
5679         const_0_to_15_operand instead of u5bit_cint_operand.
5680         (*altivec_vspltb_internal): Ditto.
5681         (altivec_vspltb_direct): Ditto.
5682         (altivec_vsplth): Use const_0_to_7_operand instead of
5683         u5bit_cint_operand.
5684         (*altivec_vsplth_internal): Ditto.
5685         (altivec_vsplth_direct): Ditto.
5686         (altivec_vspltw): Use const_0_to_3_operand instead of
5687         u5bit_cint_operand.
5688         (*altivec_vspltw_internal): Ditto.
5689         (altivec_vspltw_direct): Ditto.
5690         (altivec_vspltsf): Ditto.
5691         (*altivec_vspltsf_internal): Ditto.
5692         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5693         various splats with the proper size immediate.  Reorder the various
5694         cases by ascending size of immediate, and put all such together.
5696 2018-09-25  Richard Biener  <rguenther@suse.de>
5698         PR debug/83941
5699         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5700         GC-ification.
5701         (maybe_create_die_with_external_ref): Do not create
5702         DW_TAG_imported_unit here.
5703         (add_abstract_origin_attribute): Handle external BLOCK refs.
5704         (dwarf2out_abstract_function): Simplify LTO case.
5705         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5706         rather than using maybe_create_die_with_external_ref.
5708 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
5710         PR target/71278
5711         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5712         (frndintxf2_mask_pm_i387): Ditto.
5713         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5714         Enable for !flag_trapping_math.
5715         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5716         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5717         Change operand 1 predicate to nonimmediate_operand.
5718         (attr "i387_cw"): Remove mask_pm.
5719         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5720         (enum ix86_entity): Remove I387_MASK_PM.
5721         * config/i386/i386.c (ix86_i387_mode_needed): Do not
5722         handle I387_MASK_PM.
5723         (ix86_mode_needed): Ditto.
5724         (ix86_mode_after): Ditto.
5725         (ix86_mode_entry): Ditto.
5726         (ix86_mode_exit): Ditto.
5727         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5729 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
5731         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5732         to_update_switch_stmts to vNULL instead of calling create on them
5733         immediately.
5735 2018-09-25  Richard Biener  <rguenther@suse.de>
5737         PR tree-optimization/87402
5738         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5739         (visit_phi): Re-instantiate handling of supposed to be VARYING
5740         but non-VARYING backedge value.
5742 2018-09-25  Richard Biener  <rguenther@suse.de>
5744         PR debug/83941
5745         * dwarf2out.c (struct sym_off_pair): New.
5746         (external_die_map): New global.
5747         (lookup_decl_die): When in LTO create DIEs lazily from the
5748         external_die_map.
5749         (lookup_block_die): New function, create DIEs lazily in LTO.
5750         (equate_block_to_die): New function.
5751         (dwarf2out_die_ref_for_decl): During WPA get the association
5752         from the external DIE map.
5753         (dwarf2out_register_external_die): Record mapping into the
5754         external DIE map.
5755         (maybe_create_die_with_external_ref): New function split out from
5756         DIE generation part of old dwarf2out_register_external_die.
5757         (add_abstract_origin_attribute): Do not return the DIE.  When
5758         in LTO reference externals directly.
5759         (dwarf2out_abstract_function): When in LTO ignore calls for
5760         decls with external DIEs (already present abstract instances).
5761         (gen_call_site_die): Adjust.
5762         (add_high_low_attributes): Likewise.
5763         (gen_lexical_block_die): Likewise.
5764         (gen_inlined_subroutine_die): Likewie.
5765         (gen_block_die): Likewise.
5766         (dwarf2out_inline_entry): Likewise.
5767         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5768         DIEs.
5770 2018-09-25  Martin Liska  <mliska@suse.cz>
5772         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5773         integers and not by a float value.
5775 2018-09-25  Martin Liska  <mliska@suse.cz>
5777         PR fortran/87394
5778         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5779         instead of NULL.
5780         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5781         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5782         * godump.c (go_format_type): Remove extra parenthesis.
5784 2018-09-25  Martin Liska  <mliska@suse.cz>
5786         * alias.c (set_dest_equal_p): Remove unused function.
5787         * config/i386/i386.c (def_builtin_pure2): Likewise.
5788         * diagnostic-show-locus.c (class layout): Remove
5789         unused field.
5790         (layout::layout): Likewise here.
5791         * dump-context.h (class temp_dump_context): Likewise.
5792         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5793         (add_AT_loclistsptr): Likewise.
5794         (add_AT_offset): Likewise.
5795         (get_AT_hi_pc): Likewise.
5796         (is_comdat_die): Likewise.
5797         (type_is_enum): Likewise.
5798         (ceiling): Likewise.
5799         (add_AT_vms_delta): Likewise.
5800         (is_class_die): Likewise.
5801         * edit-context.c (class line_event): Remove unused field.
5802         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5803         unused function.
5804         * ipa-cp.c (ipa_get_vr_lat): Likewise.
5805         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5806         (ok_for_base_p_nonstrict): Likewise.
5807         * tree-chrec.c (is_not_constant_evolution): Likewise.
5808         (chrec_fold_poly_cst): Likewise.
5809         * tree-if-conv.c (has_pred_critical_p): Likewise.
5810         * tree-ssa-coalesce.c (print_exprs): Likewise.
5811         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5812         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5813         * tree-vrp.c (value_ranges_intersect_p): Likewise.
5814         (value_range_nonnegative_p): Likewise.
5816 2018-09-25  Martin Liska  <mliska@suse.cz>
5818         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5819         Do not handle "GNU Pascal".
5820         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5821         Likewise.
5822         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5823         from documentation. Likewise.
5824         * dbxout.c (dbxout_range_type): Likewise.
5825         * doc/cpp.texi: Likewise.
5826         * doc/extend.texi: Likewise.
5827         * doc/frontends.texi: Likewise.
5828         * doc/invoke.texi: Remove Pascal entry.
5829         * tree.def (CLEANUP_POINT_EXPR): Likewise.
5830         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5832 2018-09-25  Martin Liska  <mliska@suse.cz>
5834         PR middle-end/86078
5835         * doc/invoke.texi: Document all parameters and remove default
5836         of the parameters.
5838 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
5840         PR bootstrap/87417
5841         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5842         contains HOST_WIDE_INTs when computing its size.
5844 2018-09-24  Jim Wilson  <jimw@sifive.com>
5846         PR target/87391
5847         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5848         not TARGET_RVE.
5849         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5851 2018-09-24  Andrew Pinski  <apinski@marvell.com>
5853         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5854         access prev before checking it for NULLness in the
5855         AARCH64_FUSE_CMP_BRANCH case.
5857 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
5859         PR target/82699
5860         * config/i386/i386.c (rest_of_insert_endbranch): Set
5861         endbr_queued_at_entrance to true and don't insert ENDBR if
5862         x86_function_profiler will be called.
5863         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5864         is true.
5865         * config/i386/i386.h (machine_function): Add
5866         endbr_queued_at_entrance.
5868 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5870         * genattrtab.c (mk_attr_alt): Use alternative_mask.
5871         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5872         types.
5873         (check_attr_test): Use alternative_mask.
5874         (get_attr_value): Likewise.
5875         (compute_alternative_mask): Use alternative_mask and XWINT.
5876         (make_alternative_compare): Use alternative_mask.
5877         (attr_alt_subset_p): Use XWINT.
5878         (attr_alt_subset_of_compl_p): Likewise.
5879         (attr_alt_intersection): Use alternative_mask and XWINT.
5880         (attr_alt_union): Likewise.
5881         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5882         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5883         (simplify_test_exp): Use alternative_mask and XWINT.
5884         (write_test_expr): Use alternative_mask and XWINT, adjust bit
5885         number calculation to support 64 bits.  Generate code that
5886         checks 64-bit masks.
5887         (main): Use alternative_mask.
5888         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5890 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5892         PR target/80080
5893         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5894         RETURN+USE when returning via %r14.
5896 2018-09-24  Martin Liska  <mliska@suse.cz>
5898         * gcov.c (output_lines): Print colorization legend
5899         for both flag_use_colors and flag_use_hotness_colors.
5900         Reword the help.
5902 2018-09-24  Martin Liska  <mliska@suse.cz>
5904         * coverage.c (get_coverage_counts): Use warning_at
5905         with current_function_decl location. Use %qD in warning
5906         message.
5908 2018-09-24  Martin Liska  <mliska@suse.cz>
5910         * memory-block.h (memory_block_pool::release): Annotate with
5911         valgrind that the memory is not accessible.
5913 2018-09-24  Martin Liska  <mliska@suse.cz>
5915         PR sanitizer/85774
5916         * asan.c: Make asan_handled_variables extern.
5917         * asan.h: Likewise.
5918         * cfgexpand.c (expand_stack_vars): Make sure
5919         a representative is unpoison if another
5920         variable in the partition is handled by
5921         use-after-scope sanitization.
5923 2018-09-24  Richard Biener  <rguenther@suse.de>
5925         PR tree-optimization/63155
5926         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5927         the worklist when the edge of the respective argument isn't
5928         executable.
5930 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5932         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5933         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5934         (MASK_CLASS_P): Update for rename.
5935         (MAYBE_MASK_CLASS_P): Ditto.
5936         (REG_CLASS_NAMES): Update.
5937         (REG_CLASS_CONTENT): Update.
5938         * config/i386/i386.c (regclass_map): Update for MASK_REG
5939         and ALL_MASK_REGS rename.
5940         * config/i386/constraints.md (Yk): Update for rename.
5941         (k): Ditto.
5943 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5945         * config/i386/i386.h (enum reg_class): Remove
5946         EVEX_SSE_REGS and MOD4_SSE_REGS.
5947         (REG_CLASS_NAMES): Update.
5948         (REG_CLASS_CONTENT): Update.
5949         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5950         registers as ALL_SSE_REGS.
5951         (ix86_additional_allocno_class_p): Remove.
5952         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5953         (ix86_register_priority): Lower priority of EVEX SSE registers.
5954         Use IN_RANGE macro where appropriate.
5955         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5956         AVX-5124VNNIW checks.
5957         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5958         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5959         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5960         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5961         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5962         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5963         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5964         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5965         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5966         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5967         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5968         * config/i386/constraints.md (Yh): Remove.
5970 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5972         * config/i386/i386.c (regclass_map): Declare integer REX registers
5973         as GENERAL_REGS.
5975 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
5977         * doc/service.texi (Service): Switch the fsf.org link to https.
5979 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
5981         PR target/86798
5982         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5983         Define to speculation_safe_value_not_needed.
5985 2018-09-21  Florian Weimer  <fweimer@redhat.com>
5987         PR middle-end/81035
5988         * doc/extend.texi (Common Function Attributes): Mention that
5989         noreturn suppresses tail call optimization.
5991 2018-09-21  Jeff Law  <law@redhat.com>
5993         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5994         vr_values::cleanup_edges_and_switches.
5995         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5996         vr_values class.
5997         (identify_jump_threads): Remove EDGE_IGNORE handling.
5998         (execute_vrp): Move handling of to_remove_edges and
5999         to_update_switch_stmts into vr_values class member functions.
6000         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6001         (to_update_switch_stmts): Likewise.
6002         * vr-values.c: Include cfghooks.h.
6003         (vr_values::vr_values): Initialize to_remove_edges and
6004         to_update_switch_stmts.
6005         (vr_values::~vr_values): Verify to_remove_edges and
6006         to_update_switch_stmts are empty.
6007         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6008         (vr_values::cleanup_edges_and_switches): New member function.
6009         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6010         function.  Add new data members.
6012 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
6014         PR tree-optimization/87309
6015         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6016         calls with pflags and alt_flags.
6017         (selftest::test_capture_of_dump_calls): Add test of interaction of
6018         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6020 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6022         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6024 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6026         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6028 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6030         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6031         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6032         (VXWORKS_LIBS_RTP): Minor reordering.
6034 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6036         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6037         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6039 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6041         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6042         (PTRDIFF_TYPE): Likewise.
6044 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6046         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6047         triplet, similar to support for VxWorks7.
6048         * config/vxworks-dummy.h: Provide a default definition
6049         of TARGET_VXWORKS64 to 0.
6051 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6053         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6054         * config/vxworks-dummy.h: here.
6056 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6058         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6060 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
6061             Bo Zhou  <zbo.zhou@hisilicon.com>
6063         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6064         * config/aarch64/aarch64-tune.md: Regenerated.
6065         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6066         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6067         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6069 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
6070             Julian Brown  <julian@codesourcery.com>
6072         * builtins.c (get_builtin_sync_mem): Handle address spaces.
6074 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
6076         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6077         if the call takes a static chain.
6079 2018-09-21  Martin Liska  <mliska@suse.cz>
6081         * auto-profile.c (autofdo_source_profile::read): Do not
6082         set sum_all.
6083         (read_profile): Do not add working sets.
6084         (read_autofdo_file): Remove sum_all.
6085         (afdo_callsite_hot_enough_for_early_inline): Remove const
6086         qualifier.
6087         * coverage.c (struct counts_entry): Remove gcov_summary.
6088         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6089         do not support GCOV_TAG_PROGRAM_SUMMARY.
6090         (get_coverage_counts): Remove summary and expected
6091         arguments.
6092         * coverage.h (get_coverage_counts): Likewise.
6093         * doc/gcov-dump.texi: Remove -w option.
6094         * gcov-dump.c (dump_working_sets): Remove.
6095         (main): Do not support '-w' option.
6096         (print_usage): Likewise.
6097         (tag_summary): Likewise.
6098         * gcov-io.c (gcov_write_summary): Do not dump
6099         histogram.
6100         (gcov_read_summary): Likewise.
6101         (gcov_histo_index): Remove.
6102         (gcov_histogram_merge): Likewise.
6103         (compute_working_sets): Likewise.
6104         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6105         it not obsolete.
6106         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6107         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6108         (GCOV_HISTOGRAM_SIZE): Remove.
6109         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6110         (struct gcov_summary): Simplify rapidly just
6111         to runs and sum_max fields.
6112         (gcov_histo_index): Remove.
6113         (NUM_GCOV_WORKING_SETS): Likewise.
6114         (compute_working_sets): Likewise.
6115         * gcov-tool.c (print_overlap_usage_message): Remove
6116         trailing empty line.
6117         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6118         (output_lines): Remove program related line.
6119         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6120         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6121         histogram.
6122         (input_profile_summary): Do not read it.
6123         (merge_profile_summaries): And do not merge it.
6124         (input_symtab): Do not call removed function.
6125         * modulo-sched.c (sms_schedule): Do not print sum_max.
6126         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6127         removed when histogram method was invented.
6128         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6129         mode.
6130         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6131         GCOV coding style.
6132         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6133         and dump selected value.
6134         * profile.c (add_working_set): Remove.
6135         (get_working_sets): Likewise.
6136         (find_working_set): Likewise.
6137         (get_exec_counts): Do not work with working sets.
6138         (read_profile_edge_counts): Do not inform as sum_max is removed.
6139         (compute_branch_probabilities): Likewise.
6140         (compute_value_histograms): Remove argument for call of
6141         get_coverage_counts.
6142         * profile.h: Do not make gcov_summary const.
6144 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
6146         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6148 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
6150         PR tree-optimization/86990
6151         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6152         Check that the entire merged store group is made of constants only for
6153         overlapping stores.
6155 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
6157         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6158         (VTABLE_VERIFICATION_SPEC): Likewise.
6159         (SANITIZER_EARLY_SPEC): Likewise.
6160         (SANITIZER_SPEC): Likewise.
6161         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6162         * doc/invoke.texi (Link Options): Document -r.
6164 2018-09-20  Richard Biener <rguenther@suse.de>
6166         PR middle-end/87054
6167         * gimplify.c (gimplify_expr): Retain alignment of
6168         addressable lvalue in dereference.
6170 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
6172         PR bootstrap/87013
6173         * configure.ac: Check for .loc is_stmt support.
6174         * configure, config.in: Rebuilt.
6175         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6176         if not supported.
6178 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6180         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6181         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6182         -misel=no.
6184 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6186         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6187         VECTOR_OTHER.
6188         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6189         case VECTOR_OTHER.
6191 2018-09-20  Marek Polacek  <polacek@redhat.com>
6193         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6195 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6197         PR tree-optimization/87288
6198         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6199         into account when determining PEELING_FOR_NITERS.
6201 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6203         PR tree-optimization/86877
6204         * tree-vect-loop.c (vect_analyze_loop_2): Call
6205         vect_verify_datarefs_alignment.
6207 2018-09-19  Marek Polacek  <polacek@redhat.com>
6209         * doc/invoke.texi: Document -Wclass-conversion.
6211 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
6213         * config/pa/pa.c (pa_adjust_priority): Delete.
6214         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6216         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6217         (atomic_storehi): Likewise.
6218         (atomic_storesi): Likewise.
6219         (atomic_loaddi): Restore compare and swap exchange loop code.
6221 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
6223         PR rtl-optimization/86902
6224         * combine.c (try_combine): When changing the CC mode used, don't change
6225         an unrelated mode in other_insn to that new CC mode.
6227 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
6229         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6230         with %T in place of calls to dump_generic_expr.
6231         (prune_runtime_alias_test_list): Likewise.
6232         (create_runtime_alias_checks): Likewise.
6233         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6234         (vect_analyze_data_ref_dependence): Likewise.
6235         (vect_slp_analyze_data_ref_dependence): Likewise.
6236         (vect_record_base_alignment): Likewise.  Use %G in place of call
6237         to dump_gimple_stmt.
6238         (vect_compute_data_ref_alignment): Likewise.
6239         (verify_data_ref_alignment): Likewise.
6240         (vect_find_same_alignment_drs): Likewise.
6241         (vect_analyze_group_access_1): Likewise.
6242         (vect_analyze_data_ref_accesses): Likewise.
6243         (dependence_distance_ge_vf): Likewise.
6244         (dump_lower_bound): Likewise.
6245         (vect_prune_runtime_alias_test_list): Likewise.
6246         (vect_find_stmt_data_reference): Likewise.
6247         (vect_analyze_data_refs): Likewise.
6248         (vect_create_addr_base_for_vector_ref): Likewise.
6249         (vect_create_data_ref_ptr): Likewise.
6250         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6251         (vect_can_advance_ivs_p): Likewise.
6252         (vect_update_ivs_after_vectorizer): Likewise.
6253         (vect_gen_prolog_loop_niters): Likewise.
6254         (vect_prepare_for_masked_peels): Likewise.
6255         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6256         (vect_determine_vectorization_factor): Likewise.
6257         (vect_is_simple_iv_evolution): Likewise.
6258         (vect_analyze_scalar_cycles_1): Likewise.
6259         (vect_analyze_loop_operations): Likewise.
6260         (report_vect_op): Likewise.
6261         (vect_is_slp_reduction): Likewise.
6262         (check_reduction_path): Likewise.
6263         (vect_is_simple_reduction): Likewise.
6264         (vect_create_epilog_for_reduction): Likewise.
6265         (vect_finalize_reduction:): Likewise.
6266         (vectorizable_induction): Likewise.
6267         (vect_transform_loop_stmt): Likewise.
6268         (vect_transform_loop): Likewise.
6269         (optimize_mask_stores): Likewise.
6270         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6271         (vect_split_statement): Likewise.
6272         (vect_recog_over_widening_pattern): Likewise.
6273         (vect_recog_average_pattern): Likewise.
6274         (vect_determine_min_output_precision_1): Likewise.
6275         (vect_determine_precisions_from_range): Likewise.
6276         (vect_determine_precisions_from_users): Likewise.
6277         (vect_mark_pattern_stmts): Likewise.
6278         (vect_pattern_recog_1): Likewise.
6279         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6280         (vect_record_max_nunits): Likewise.
6281         (vect_build_slp_tree_1): Likewise.
6282         (vect_build_slp_tree_2): Likewise.
6283         (vect_print_slp_tree): Likewise.
6284         (vect_analyze_slp_instance): Likewise.
6285         (vect_detect_hybrid_slp_stmts): Likewise.
6286         (vect_detect_hybrid_slp_1): Likewise.
6287         (vect_slp_analyze_operations): Likewise.
6288         (vect_slp_analyze_bb_1): Likewise.
6289         (vect_transform_slp_perm_load): Likewise.
6290         (vect_schedule_slp_instance): Likewise.
6291         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6292         (vect_mark_stmts_to_be_vectorized): Likewise.
6293         (vect_init_vector_1): Likewise.
6294         (vect_get_vec_def_for_operand): Likewise.
6295         (vect_finish_stmt_generation_1): Likewise.
6296         (vect_check_load_store_mask): Likewise.
6297         (vectorizable_call): Likewise.
6298         (vectorizable_conversion): Likewise.
6299         (vectorizable_operation): Likewise.
6300         (vectorizable_load): Likewise.
6301         (vect_analyze_stmt): Likewise.
6302         (vect_is_simple_use): Likewise.
6303         (vect_get_vector_types_for_stmt): Likewise.
6304         (vect_get_mask_type_for_stmt): Likewise.
6305         * tree-vectorizer.c (increase_alignment): Likewise.
6307 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
6309         * doc/rtl.texi: Adjust vec_select description.
6310         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6311         non-constant selectors.
6313 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
6315         * config/aarch64/aarch64-protos.h
6316         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6317         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6318         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6319         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6320         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6321         (AARCH64_FL_PROFILE): Move index so flags are ordered.
6322         (AARCH64_ISA_RCPC8_4): New flag.
6323         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6324         to aarch64_offset_9bit_signed_unscaled_p.
6325         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6326         and use stlur.
6327         * config/aarch64/constraints.md (Ust): New constraint.
6328         * config/aarch64/predicates.md.
6329         (aarch64_9bit_offset_memory_operand): New predicate.
6330         (aarch64_rcpc_memory_operand): New predicate.
6332 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
6334         PR rtl-optimization/87361
6335         * rtlanal.c (nonzero_bits1): Revert accidental change.
6337 2018-09-19  Richard Biener  <rguenther@suse.de>
6339         PR tree-optimization/87349
6340         PR tree-optimization/87342
6341         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6343 2018-09-18  Marek Polacek  <polacek@redhat.com>
6345         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6346         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6348 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6350         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6352 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6354         PR rtl-optimization/86882
6355         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6357 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
6359         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6360         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6362 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
6364         PR other/87353
6365         * doc/invoke.texi (Link Options): Fix formatting and grammar.
6367 2018-09-18  Richard Biener  <rguenther@suse.de>
6369         PR middle-end/63155
6370         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6371         (compute_samebase_partition_bases): Likewise.
6372         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6373         (gimple_can_coalesce_p): Simplify.
6375 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
6377         Handle a library implementation of ffs calling __builtin_ffs.
6378         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6379         (mmix_init_libfuncs): New function: make __builtin_ffs expand
6380         to __ffsdi2.
6382 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6384         * diagnostic-show-locus.c (class layout_range): Add field
6385         "m_original_idx".
6386         (layout_range::layout_range): Add "original_idx" param and use it
6387         to initialize new field.
6388         (make_range): Use 0 for original_idx.
6389         (layout::layout): Pass in index to calls to
6390         maybe_add_location_range.
6391         (layout::maybe_add_location_range): Add param "original_idx" and
6392         pass it on to layout_range.
6393         (layout::print_any_labels): Pass on range->m_original_idx to
6394         get_text call.
6395         (gcc_rich_location::add_location_if_nearby): Use 0 for
6396         original_idx.
6397         * gcc-rich-location.h (text_range_label::get_text): Update for new
6398         param.
6399         (range_label_for_type_mismatch::get_text): Likewise.
6401 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6403         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6405 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6407         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6408         format_string_diagnostic_t.
6409         (fmtwarn_n): Likewise.
6410         * substring-locations.c
6411         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6412         (format_warning_n_va): Convert to...
6413         (format_string_diagnostic_t::emit_warning_n_va): ...this.
6414         (format_warning_va): Convert to...
6415         (format_string_diagnostic_t::emit_warning_va): ...this.
6416         (format_warning_at_substring): Convert to...
6417         (format_string_diagnostic_t::emit_warning): ...this.
6418         (format_warning_at_substring_n): Convert to...
6419         (format_string_diagnostic_t::emit_warning_n): ...this.
6420         * substring-locations.h (class format_string_diagnostic_t): New
6421         class.
6422         (format_warning_va): Convert to
6423         format_string_diagnostic_t::emit_warning_va.
6424         (format_warning_n_va): Convert to
6425         format_string_diagnostic_t::emit_warning_n_va.
6426         (format_warning_at_substring): Convert to
6427         format_string_diagnostic_t::emit_warning.
6428         (format_warning_at_substring_n): Convert to
6429         format_string_diagnostic_t::emit_warning_n.
6431 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
6432             Bernd Schmidt <bernds_cb1@t-online.de>
6434         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6435         SImode args.
6437 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6439         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6440         operand 0 predicate to nonimmediate operand.
6441         (rint<mode>2_frndint): Remove insn pattern.
6442         (rint<mode>2): Change operand 1 predicate to general_operand.
6443         Extend operand 1 to XFmode and generate rintxf2 insn.
6444         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6445         Do not use X87MODEF mode macro.
6446         (frndintxf2_<rounding>_i387): Rename from
6447         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
6448         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6449         to XFmode and generate significandxf3 insn.
6451 2018-09-17  Richard Biener  <rguenther@suse.de>
6453         PR tree-optimization/87328
6454         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6455         visiting unexecutable backedges when not iterating.
6456         (do_rpo_vn): Mark all edges not executable even when not
6457         iterating.
6459 2018-09-17  Martin Jambor  <mjambor@suse.cz>
6461         PR c/63886
6462         * doc/invoke.texi (Warning Options): Likewise.
6464 2018-09-17  Richard Biener  <rguenther@suse.de>
6466         PR tree-optimization/87301
6467         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6468         clean EH info from leftover copy assignments.
6470 2018-09-17  Martin Liska  <mliska@suse.cz>
6472         PR gcov-profile/85871
6473         * gcov.c (output_intermediate_file): Fix out of bounds
6474         access.
6476 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
6478         * config/arc/arc.c: Object attributes for core4 not reflected
6479         correctly.
6480         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6481         core3).
6483 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
6485         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6487 2018-09-17  Martin Liska  <mliska@suse.cz>
6489         * doc/gcov.texi: Document new option --use-hotness-colors.
6490         * gcov.c (struct source_info): Declare new field.
6491         (source_info::source_info): Set default for maximum_count.
6492         (print_usage): Add new -q option.
6493         (process_args): Process it.
6494         (accumulate_line_info): Save src->maximum_count.
6495         (output_line_beginning): Make color line number if
6496         flag_use_hotness_colors is set.
6497         (output_line_details): Pass default argument value.
6498         (output_lines): Pass src->maximum_count.
6500 2018-09-17  Martin Liska  <mliska@suse.cz>
6502         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6503         Use processor_names table.
6504         * config/i386/i386.c (ix86_default_align): Use
6505         processor_cost_table for alignment values.
6506         (ix86_option_override_internal): Use processor_names.
6507         (ix86_function_specific_print): Likewise.
6508         * config/i386/i386.h (struct processor_costs):
6509         Add alignment values.
6510         (struct ptt): Remove and replace with const char *.
6511         * config/i386/x86-tune-costs.h (struct processor_costs):
6512         Declare default alignments for all costs.
6514 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
6516         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6517         symbolics or VR_VARYING ranges for ABS_EXPR.
6518         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6519         when range will wrap.
6521 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
6523         PR middle-end/86864
6524         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6525         before and after a JUMP_TABLE_DATA.
6527 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
6529         PR middle-end/87188
6530         * dojump.c (do_compare_and_jump): Canonicalize function pointers
6531         when one operand is a function pointer.  Use POINTER_TYPE_P and
6532         FUNC_OR_METHOD_TYPE_P.
6533         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6534         * fold-const.c (build_range_check): Likewise.
6535         * match.pd (simple_comparison): Likewise.
6537 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
6539         PR c/82967
6540         * spellcheck.c (get_edit_distance_cutoff): New function.
6541         (selftest::test_edit_distance_unit_test_oneway): Rename to...
6542         (selftest::test_get_edit_distance_one_way): ...this.
6543         (selftest::test_get_edit_distance_unit): Rename to...
6544         (selftest::test_get_edit_distance_both_ways): ...this.
6545         (selftest::test_edit_distances): Move tests to this new function,
6546         and test some more pairs of strings.  Update for above renaming.
6547         (selftest::get_old_cutoff): New function.
6548         (selftest::test_get_edit_distance_cutoff): New function.
6549         (selftest::assert_suggested_for): New function.
6550         (ASSERT_SUGGESTED_FOR): New macro.
6551         (selftest::assert_not_suggested_for): New function.
6552         (ASSERT_NOT_SUGGESTED_FOR): New macro.
6553         (selftest::test_suggestions): New function.
6554         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6555         tests to selftest::test_edit_distances and call it.  Add calls to
6556         selftest::test_get_edit_distance_cutoff and
6557         selftest::test_suggestions.
6558         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6559         (best_match::consider): Replace hard-coded cutoff calculation with
6560         a call to...
6561         (best_match::get_cutoff): New declaration.
6562         (best_match::get_best_meaningful_candidate): Likewise.
6564 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6566         * builtins.c (fold_builtin_strlen): Remove TODO comment.
6568 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6570         revert:
6571         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6573         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6574         terminated string literal.
6576 2018-09-14  Martin Sebor  <msebor@redhat.com>
6578         * builtins.c (unterminated_array): Handle ARRAY_REF.
6579         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6580         * builtins.h (unterminated_array): Declare extern.
6581         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6582         arrays.
6583         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6584         calls.
6586 2018-09-14  Martin Sebor  <msebor@redhat.com>
6587             Jeff Law  <law@redhat.com>
6589         * builtins.c (unterminated_array): New.
6590         (expand_builtin_strcpy): Adjust.
6591         (expand_builtin_strcpy_args): Detect unterminated arrays.
6592         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
6593         unterminated arrays.
6594         * gimple-fold.h (get_maxval_strlen): Add argument.
6595         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6597         * gimple-fold.c (get_range_strlen): Add argument.
6598         (get_maxval_strlen): Adjust.
6599         * gimple-fold.h (get_range_strlen): Add argument.
6601 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
6603         * config/i386/movdirintrin.h: Fix copyright year.
6605 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
6607         * reg-stack.c: Include regs.h.
6608         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6609         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6610         FIRST_STACK_REG, not DFmode.
6611         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6612         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
6613         (change stack): Default register mode to the reg_raw_mode of
6614         FIRST_STACK_REG, not DFmode.
6615         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6616         (*swapxf): Rename from swapxf.
6618 2018-09-14  Carl Love  <cel@us.ibm.com>
6620         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6621         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6623 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
6625         PR target/87224
6626         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6627         alternatives.
6629 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
6631         PR target/85628
6632         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6634 2018-09-14  Jason Merrill  <jason@redhat.com>
6636         Fix --enable-gather-detailed-mem-stats.
6637         * hash-table.c (hash_table_usage): Change from variable to function.
6638         * hash-table.h: Adjust.
6639         * Makefile.in: Add missing dependencies on hash-table.h.
6641 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6643         PR tree-optimization/87259
6644         PR lto/87283
6645         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6646         execute_cse_reciprocals_1 has tried transforming.
6648 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
6650         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6651         VR_VARYING for PLUS/MINUS_EXPR.
6653 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
6655         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6656         formatting.
6658 2018-09-14  Richard Biener  <rguenther@suse.de>
6660         PR middle-end/63155
6661         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6662         bits for the merged partition.
6664 2018-09-13  Martin Sebor  <msebor@redhat.com>
6665             Bernd Edlinger  <bernd.edlinger@hotmail.de>
6667         * builtins.h (c_srlen): Add argument.
6668         * builtins.c (warn_string_no_nul): New function.
6669         (c_strlen): Add argument and use it.  Update recursive calls.
6670         Pass DECL argument to string_constant to get info on non
6671         terminated strings.  Update *NONSTR as needed.
6672         (fold_builtin_strlen): Add argument to calls to c_strlen.
6673         Warn for unterminated arrays.
6674         (warn_string_no_null): Add prototype.
6675         * expr.c (string_constant): Update arguments.  Update recursive
6676         calls appropriately.  Detect missing NUL terminator and outermost
6677         declaration its missing in.
6678         Improve checks for arrays with nonzero lower bound or elements
6679         that are not a single byte.  Simplify offset computation.
6680         Simplify checks for non-NUL terminated strings.
6681         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6682         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6684 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6686         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6687         correctly.
6688         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
6689         argument.  Fix range checks.
6690         * fold-const.h (c_getstr): Adjust protoype.
6691         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6692         string is constant but contains no NUL byte.
6694         * expr.c (string_constant): Adjust function comment.
6695         Remove bogus check for zero termination.
6697         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6699         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6700         (get_constant_size): Don't make STRING_CSTs larger than they are.
6701         (check_string_literal): New check function for STRING_CSTs.
6702         (output_constant): Use it.
6704 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
6706         PR target/86812
6707         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6709 2018-09-13  Richard Biener  <rguenther@suse.de>
6711         PR tree-optimization/87263
6712         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6713         (struct unwind_state): Add max_rpo field.
6714         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6715         Compute max_rpo, the max RPO number a block can be backwards reached
6716         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
6717         separating it from the iterating mode.
6719 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6721         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6722         (rfs_decision): New scheduling decision.
6724 2018-09-13  Richard Biener  <rguenther@suse.de>
6726         PR bootstrap/87134
6727         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6728         (vn_nary_op_insert_pieces_predicated): Do not write useless
6729         valid_dominated_by_p entry outside of the allocated storage.
6731 2018-09-13  Omar Sandoval  <osandov@osandov.com>
6732             Tom de Vries  <tdevries@suse.de>
6734         PR debug/86985
6735         * dwarf2out.c (is_c): New function.
6736         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6738 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
6740         PR target/85628
6741         * config/aarch64/aarch64.md (*aarch64_bfxil):
6742         Define.
6743         * config/aarch64/constraints.md (Ulc): Define.
6744         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6745         Define.
6746         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6747         New function.
6749 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6751         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6752         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6753         aarch64_layout_frame call.
6754         (aarch64_expand_epilogue): Likewise.
6755         (aarch64_initial_elimination_offset): Likewise.
6756         (aarch64_get_separate_components): Likewise.
6757         (aarch64_use_return_insn_p): Likewise.
6758         (aarch64_layout_frame): Remove unneeded check.
6760 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6762         * configure.ac: Only append
6763         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6764         gcc_config_arguments if it was never reconfigured or last reconfigure
6765         was with different arguments.
6766         * configure: Regenerated.
6768 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6769             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6771         PR middle-end/87290
6772         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6773         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6775 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6777         PR tree-optimization/87287
6778         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6779         X % C == 0 to X % (unsigned) C == 0 optimization to ...
6780         * match.pd (X % C == 0): ... here.  New optimization.
6782 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6784         PR middle-end/82853
6785         * expr.h (maybe_optimize_mod_cmp): Declare.
6786         * expr.c (mod_inv): New function.
6787         (maybe_optimize_mod_cmp): New function.
6788         (do_store_flag): Use it.
6789         * cfgexpand.c (expand_gimple_cond): Likewise.
6791 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
6792             Julian Brown  <julian@codesourcery.com>
6794         PR middle-end/86336
6795         * gimplify.c (gimplify_scan_omp_clauses): Set
6796         target_firstprivatize_array_bases in OpenACC parallel and kernels
6797         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6798         OpenACC data regions.
6800 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
6802         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6803         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6805 2018-09-12  Richard Biener  <rguenther@suse.de>
6807         PR tree-optimization/87280
6808         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6809         edge but unreachable target.
6810         (do_rpo_vn): For conservatively handling a PHI only mark
6811         the backedge executable but not the block reachable.
6813 2018-09-12  Richard Biener  <rguenther@suse.de>
6815         PR tree-optimization/87266
6816         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6817         visited blocks.
6819 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
6821         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6822         constants.
6823         ("trunc<BFP:mode><DFP_ALL:mode>2")
6824         ("trunc<DFP_ALL:mode><BFP:mode>2")
6825         ("extend<BFP:mode><DFP_ALL:mode>2")
6826         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6827         according to the target operand type.
6829 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6830             Andreas Krebbel  <krebbel@linux.ibm.com>
6832         PR tree-optimization/86844
6833         * gimple-ssa-store-merging.c
6834         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6835         there are any overlapping stores in between them, make sure they are
6836         also coalesced or we give up completely.
6838 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6840         PR middle-end/87248
6841         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6842         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
6844 2018-09-12  Tom de Vries  <tdevries@suse.de>
6846         * common.opt (gdescribe-dies): Add option.
6847         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6848         attribute for artifical and nameless decls.
6849         (dwarf2out_register_external_die): Add description attribute to
6850         external reference die.
6851         (add_desc_attribute): New functions.
6852         (gen_subprogram_die): Add description attribute to
6853         DW_TAG_call_site_parameter.
6854         * tree-pretty-print.c (print_generic_expr_to_str): New function.
6855         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6856         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6857         -gno-describe-dies.
6858         (@item -gdescribe-dies): Add.
6860 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
6862         * tree-vrp.c (vrp_shift_undefined_p): Remove.
6863         (extract_range_from_binary_expr_1: Call
6864         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6865         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6866         depend on sign.
6868 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
6870         * gimple-ssa-warn-alloca.c
6871         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6872         field for ALLOCA_BOUND_*_LARGE.
6874 2018-09-11  Nathan Sidwell  <nathan@acm.org>
6876         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6878 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6880         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6881         for clobbers.  Remove obsolete comment.
6883 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6885         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6886         mpxchk, mpxld and mpxst types.
6887         (define_attr length_immediate): Remove all processing of mpx types.
6888         (define_attr prefix_0f): Ditto.
6889         (define_attr memory): Ditto.
6891 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6893         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6894         (log<mode>2): Change operand 1 predicate to general_operand.
6895         Extend operand 1 to XFmode and generate logxf3 insn.
6896         (log10<mode>2): Change operand 1 predicate to general_operand.
6897         Extend operand 1 to XFmode and generate log10xf3 insn.
6898         (log2<mode>2): Change operand 1 predicate to general_operand.
6899         Extend operand 1 to XFmode and generate log2xf3 insn.
6900         (fyl2xp1_extend<mode>xf3_i387): Remove.
6901         (log1p<mode>2): Change operand 1 predicate to general_operand.
6902         Extend operand 1 to XFmode and generate log1pxf3 insn.
6903         (fxtract_extend<mode>xf3_i387): Remove.
6904         (logb<mode>2): Change operand 1 predicate to general_operand.
6905         Extend operand 1 to XFmode and generate logbxf3 insn.
6906         (ilogb<mode>2): Change operand 1 predicate to general_operand.
6907         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6908         (significand<mode>2): Change operand 1 predicate to general_operand.
6909         Extend operand 1 to XFmode and generate significandxf3 insn.
6911 2018-09-11  Nathan Sidwell  <nathan@acm.org>
6913         * gcc.c (perror_with_name, pfatal_with_name): Delete.
6914         (load_specs): Use fatal_error.
6915         (DELETE_IF_ORDINARY, process_command): Use error.
6916         (execute, run_attempt): Use fatal_error.
6918 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
6920         * diagnostic-core.h (sorry_at): New prototype.
6921         * diagnostic.c (sorry_at): New function.
6923 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
6925         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6926         by zero as VR_UNDEFINED.
6928 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6930         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6931         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6932         (<sincos>mode2): New expander.
6933         (sincos_extend<mode>xf3_i387): Remove insn pattern.
6934         (sincos -> sin, cos splitters): Remove splitter patterns.
6935         (sincos<mode>3): Change operand 2 predicate to general_operand.
6936         Extend operand 2 to XFmode and generate sincosxf3 insn.
6937         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6938         Change operand 3 predicate to const1_operand.
6939         (fptan_extend<mode>xf4_i387): Remove insn pattern.
6940         (tanxf2): Update operands in the call to fptanxf4_i387.
6941         (tan<mode>2): Change operand 1 predicate to general_operand.
6942         Extend operand 1 to XFmode and generate tanxf3 insn.
6943         (atan2xf3): Rename from *fpatanxf3_i387.
6944         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6945         (atan2xf3): Remove expander.
6946         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
6947         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6948         (atan<mode>2): Change operand 1 predicate to general_operand.
6949         Extend operand 1 to XFmode and generate atanxf3 insn.
6951 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6953         * config/i386/i386.md (x87/SSE constant load splitter): Use
6954         memory_operand instead of nonimmediate_operand for input operand
6955         predicate.
6957 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
6959         * config/i386/i386.md (float partial SSE register stall splitter): Move
6960         splitter near its instruction pattern.
6961         (float_extend partial SSE register stall splitter): Ditto.
6962         (float_truncate partial SSE register stall splitter): Ditto.
6964 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
6966         PR target/86794
6967         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6968         to speculation_safe_value_not_needed.
6970         PR target/85666
6971         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6972         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6973         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6974         leaf_function_p, instead use has_hard_reg_initial_val.
6976 2018-09-09  Nathan Sidwell  <nathan@acm.org>
6978         * gcc.h (pfatal_with_name): Don't declare here.
6979         * gcc.c (pfatal_with_name): Make static.
6981 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
6983         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6984         earlyclobber.
6986 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
6988         PR rtl-optimization/85458
6989         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6990         priority hook to reduce the priority of EXPR.
6992 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
6994         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6995         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
6996         with X87_ENABLE_FLOAT.  Remove preparation code.
6997         (*float<SWI48:mode><MODEF:mode>2): Rename from
6998         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
6999         math using "enabled" attribute.
7000         (*floatdi<MODEF:mode>2_i387): Rename from
7001         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
7002         enable for 32bit targets only.
7003         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7004         splitter.
7005         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7006         as operand 1 predicate.  Rewrite as define_insn_and_split.
7007         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7009 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
7011         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7012         to fallthru to FLOAT case.
7014 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7016         PR target/86731
7017         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7018         around folding of vec_sl to handle out of range shift values.
7020 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
7022         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7023         Update callers to gen_fix_trunc<mode>_i387_fisttp
7024         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7025         nonimmediate_operand.
7026         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7027         and corresponding splitters.
7028         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7029         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7030         (fix_truncdi_i387_with_temp): Remove insn pattern
7031         and corresponding splitters.
7032         (fix_trunc<mode>_i387): Change operand 0 predicate to
7033         nonimmediate_operand.
7034         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7035         and corresponding splitters.
7036         (*fistdi2_1): Remove.
7037         (fistdi2): Ditto.
7038         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7039         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
7040         (*fist<mode>2_1): Remove.
7041         (fist<mode>2): Ditto.
7042         (fist<mode>2_with_temp): Remove insn pattern and corresponding
7043         splitters.
7044         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
7045         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7046         (fistdi2_<rounding>): Change operand 0 predicate to
7047         nonimmediate_operand.
7048         (fistdi2_<rounding>_with_temp): Remove insn pattern
7049         and corresponding splitters.
7050         (fist<mode>2_<rounding>): Change operand 0 predicate to
7051         nonimmediate_operand.
7052         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7053         and corresponding splitters.
7055         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7057 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7059         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7060         the init value.
7062 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7064         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7065         early gimple folding of vec_splat().
7066         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7067         * gimple-fold.h: Add an extern define for tree_vec_extract().
7069 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7071         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7072         wrappers around TREE_TYPE comparisons.
7074 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7076         PR target/80080
7077         * config/s390/predicates.md: Add nonsym_memory_operand.
7078         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7079         contains a SYMBOL_REF, load it into an intermediate pseudo.
7080         (s390_emit_compare_and_swap): Legitimize operand.
7081         * config/s390/s390.md: Use the new nonsym_memory_operand
7082         with UNSPECV_CAS patterns.
7084 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7086         PR target/80080
7087         * config/s390/s390-passes.def: New file.
7088         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7089         declaration.
7090         (make_pass_s390_early_mach): Add declaration.
7091         * config/s390/s390.c (make_pass_s390_early_mach):
7092         (s390_option_override): Remove dynamic registration.
7093         * config/s390/t-s390: Add s390-passes.def.
7095 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7097         * config/s390/s390.c (s390_decompose_constant_pool_ref):
7098         Remove UNSPEC_LTREL_BASE check.
7099         (annotate_constant_pool_refs): Likewise.
7100         (find_constant_pool_ref): Likewise.
7101         (find_ltrel_base): Removed.
7102         (replace_ltrel_base): Removed.
7103         (s390_mainpool_finish): Remove replace_ltrel_base call.
7104         (s390_chunkify_start): Remove pending LTREL_BASE logic.
7105         (s390_chunkify_finish): Remove replace_ltrel_base call.
7106         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7108 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
7110         PR target/86779
7111         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7112         to speculation_safe_value_not_needed.
7114 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
7115             Bernd Schmidt  <bernds_cb1@t-online.de>
7117         * config/nvptx/nvptx-opts.h: New file.
7118         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7119         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7120         (ASM_SPEC): Define.
7121         (TARGET_SM35): New macro.
7122         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7123         correct predicate.
7124         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7125         values.
7126         (misa=): New option.
7127         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7129 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
7131         * config/i386/i386.md (truncdfsf2): Remove expander.
7132         (truncdfsf2_with_temp): Ditto.
7133         (truncxf<mode>2): Ditto.
7134         (*truncdfsf_fast_mixed): Remove insn pattern.
7135         (*truncdfsf_fast_i387): Ditto.
7136         (*truncdfsf_mixed): Ditto.
7137         (*truncdfsf_i387): Ditto.
7138         (*truncdfsf2_i387_1): Ditto.
7139         (*truncxfsf2_mixed): Ditto.
7140         (*truncxfdf2_mixed): Ditto.
7141         (*truncxf<mode>2_i387_noop): Ditto. Update callers
7142         to call gen_truncxf<mode>2 instead.
7143         (*truncxf<mode>2_i387): Remove.
7144         (reg->reg splitters): Remove splitter pattern.
7145         (reg->mem splitters): Ditto.
7147         (truncdfsf2): New insn pattern.
7148         (truncxf<mode>2): Ditto.
7150 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7152         * tree-ssa-math-opts.c (is_mult_by): New function.
7153         (is_square_of): Use the above.
7154         (optimize_recip_sqrt): New function.
7155         (pass_cse_reciprocals::execute): Use the above.
7157 2018-09-05  Richard Biener  <rguenther@suse.de>
7159         PR bootstrap/87134
7160         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7161         to zero-init the emplaced vec.
7163 2018-09-05  Martin Liska  <mliska@suse.cz>
7165         PR tree-optimization/87205
7166         * tree-switch-conversion.c (pass_lower_switch::execute):
7167         Group cases for switch statements.
7169 2018-09-05  Richard Biener  <rguenther@suse.de>
7171         PR tree-optimization/87217
7172         * tree-ssa-sccvn.c (vuse_valueize): New.
7173         (vn_reference_lookup_pieces): Use it.
7174         (vn_reference_lookup): Likewise.
7176 2018-09-05  Nathan Sidwell  <nathan@acm.org>
7178         PR c++/87137
7179         * stor-layout.c (place_field): Scan forwards to check last
7180         bitfield when ms_bitfield_placement is in effect.
7182 2018-09-05  Richard Biener  <rguenther@suse.de>
7184         PR bootstrap/87225
7185         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7186         return.
7188 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7189             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
7191         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7192         * config.gcc (extra_objs): Build it.
7193         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7194         Likewise.
7195         * config/aarch64/aarch64-passes.def
7196         (pass_tag_collision_avoidance): New pass.
7197         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7198         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7199         (aarch64_classify_address): Remove static qualifier.
7200         (aarch64_address_info, aarch64_address_type): Move to...
7201         * config/aarch64/aarch64-protos.h: ... here.
7202         (make_pass_tag_collision_avoidance): New function.
7203         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7204         New tuning flag.
7206 2018-09-05  Martin Liska  <mliska@suse.cz>
7208         * doc/gcov.texi: Update documentation of humar
7209         readable mode.
7210         * gcov.c (format_count): Print one decimal place, it provides
7211         more fine number of situations like '1G' vs. '1.4G'.
7213 2018-09-05  Martin Liska  <mliska@suse.cz>
7215         PR target/87164
7216         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7217         * optc-gen.awk: Allow 'Var' for Deprecated options in order
7218         to generate a MASK value.
7220 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
7222         PR debug/86593
7223         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7224         if frame pointer isn't used.
7225         (compute_frame_pointer_to_fb_displacement): Likewise.
7227 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
7229         PR target/87198
7230         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7231         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7232         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7233         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7234         and OPTION_MASK_ISA_XSAVEC_UNSET.
7236 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
7238         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7239         XOR operations in NAND case.
7241 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7243         * wide-int-range.cc (wide_int_range_convert): New.
7244         * wide-int-range.h (wide_int_range_convert): New.
7245         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7246         code into wide_int_range_convert.
7247         (extract_range_into_wide_ints): Do not munge anti range constants
7248         into the entire domain.  Just return the range back.
7250 2018-09-04  Martin Liska  <mliska@suse.cz>
7252         * genmatch.c (output_line_directive): Add new argument
7253         fnargs.
7254         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7256 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7258         * doc/invoke.texi (Option Summary): Add whitespace.
7260         * doc/invoke.texi (Option Summary): Add -Waligned-new.
7262 2018-09-04  Richard Biener  <rguenther@suse.de>
7264         PR tree-optimization/87211
7265         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7266         backedge value we're supposed to treat as VARYING also number
7267         the PHI to VARYING in case it got a different value-number already.
7269 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7271         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7272         (extract_range_from_binary_expr_1): Do not call
7273         vrp_can_optimize_bit_op.
7274         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7275         static.
7276         (wide_int_range_get_mask_and_bounds): New.
7277         (wide_int_range_optimize_bit_op): New.
7278         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7279         (wide_int_range_bit_and): Same.
7280         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7281         (wide_int_range_optimize_bit_op): New.
7282         (wide_int_range_get_mask_and_bounds): New.
7284 2018-09-04  Richard Biener  <rguenther@suse.de>
7286         PR tree-optimization/87176
7287         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7288         variable.  When value-numbering a virtual PHI node make sure
7289         to not value-number to the backedge value.
7291 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7293         * doc/extend.texi (Long Long, Hex Floats): Document support for
7294         long long and hex floats in more recent versions of ISO C++.
7296 2018-09-03  Richard Biener  <rguenther@suse.de>
7298         PR tree-optimization/87177
7299         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7300         cleanup.
7302 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7304         * bb-reorder.c (edge_order): Convert to C-qsort-style
7305         tri-state comparator.
7306         (reorder_basic_blocks_simple): Change std::stable_sort to
7307         gcc_stablesort.
7309 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7311         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7312         tri-state comparator.
7313         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7315 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7317         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
7318         (mergesort): ... here as maximum count for using netsort.
7319         (gcc_qsort): Set nlim to 3 if stable sort is requested.
7320         (gcc_stablesort): New.
7321         * system.h (gcc_stablesort): Declare.
7323 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7325         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7326         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
7327         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
7329 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
7331         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7332         lxsdx and stxsdx alternatives.
7333         (*mov<mode>_hardfloat64): Ditto.
7334         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7336 2018-09-03  Richard Biener  <rguenther@suse.de>
7338         PR tree-optimization/87200
7339         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7340         simplify result.
7342 2018-09-03  Martin Liska  <mliska@suse.cz>
7344         PR tree-optimization/87201
7345         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7346         Fix parenthesis in an expression.
7348 2018-09-03  Richard Biener  <rguenther@suse.de>
7350         PR tree-optimization/87197
7351         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7352         visited.  CSE the VN_INFO hashtable lookup.
7354         PR tree-optimization/87169
7355         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7356         iterating make sure there's no extra backedges from irreducible
7357         regions feeding the header.  Mark the destination block
7358         executable.
7360 2018-09-03  Martin Liska  <mliska@suse.cz>
7362         PR driver/83193
7363         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7364         * common/common-targhooks.c (default_get_valid_option_values):
7365         New function.
7366         * common/common-targhooks.h (default_get_valid_option_values):
7367         Likewise.
7368         * common/config/i386/i386-common.c: Move processor_target_table
7369         from i386.c.
7370         (ix86_get_valid_option_values): New function.
7371         (TARGET_GET_VALID_OPTION_VALUES): New macro.
7372         * config/i386/i386.c (struct ptt): Move to i386-common.c.
7373         (PTA_*): Move all defined masks into i386-common.c.
7374         (ix86_function_specific_restore): Use new processor_cost_table.
7375         * config/i386/i386.h (struct ptt): Moved from i386.c.
7376         (struct pta): Likewise.
7377         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7378         * doc/tm.texi.in: Likewise.
7379         * opt-suggestions.c (option_proposer::suggest_option):
7380         Pass prefix to build_option_suggestions.
7381         (option_proposer::get_completions): Likewise.
7382         (option_proposer::build_option_suggestions): Use the new target
7383         hook.
7384         * opts.c (struct option_help_tuple): New struct.
7385         (print_filtered_help): Use the new target hook.
7387 2018-09-03  Martin Liska  <mliska@suse.cz>
7389         PR middle-end/59521
7390         * predict.c (set_even_probabilities): Add likely_edges
7391         argument and handle cases where we have precisely one
7392         likely edge.
7393         (combine_predictions_for_bb): Catch also likely_edges.
7394         (tree_predict_by_opcode): Handle gswitch statements.
7395         * tree-cfg.h (find_case_label_for_value): New declaration.
7396         (find_taken_edge_switch_expr): Likewise.
7397         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7398         Find pivot in decision tree based on probabily, not by number of
7399         nodes.
7401 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
7403         * doc/standards.texi (Standards): Update Objective-C reference.
7405 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7407         * doc/install.texi (Prerequisites): Update link for MPC.
7409 2018-09-01  Michael Matz  <matz@suse.de>
7411         PR tree-optimization/87074
7412         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7413         PHIs for outer-loop uses.
7415 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7417         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7418         * doc/invoke.texi (C Dialect Options): Ditto.
7420 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7422         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7424 2018-08-31  Richard Biener  <rguenther@suse.de>
7426         PR tree-optimization/87168
7427         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7428         (rpo_elim::eliminate_avail): When OP was not visited it must
7429         be available.
7431 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
7433         * tree-vrp.c (copy_value_range): Convert param "from" from
7434         "value_range *" to "const value_range *".
7435         (range_is_null): Likewise for param "vr".
7436         (range_int_cst_p): Likewise.
7437         (range_int_cst_singleton_p): Likewise.
7438         (symbolic_range_p): Likewise.
7439         (value_ranges_intersect_p): Likewise for both params.
7440         (value_range_nonnegative_p): Likewise for param "vr".
7441         (value_range_constant_singleton): Likewise.
7442         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7443         (extract_range_into_wide_ints): Likewise for param "vr".
7444         (extract_range_from_multiplicative_op): Likewise for params "vr0"
7445         and "vr1".
7446         (vrp_can_optimize_bit_op): Likewise.
7447         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7448         "vr1_".
7449         (extract_range_from_unary_expr): Likewise.
7450         (debug_value_range): Likewise for param "vr".
7451         (value_range::dump): Add "const" qualifier.
7452         (vrp_prop::check_array_ref): Convert local "vr" from
7453         "value_range *" to "const value_range *".
7454         (vrp_prop::check_mem_ref): Likewise.
7455         (vrp_prop::visit_stmt): Likewise for local "old_vr".
7456         (vrp_intersect_ranges_1): Likewise for param "vr_1".
7457         (vrp_intersect_ranges): Likewise.
7458         (simplify_stmt_for_jump_threading): Likewise for local "vr".
7459         (vrp_prop::vrp_finalize): Likewise.
7460         * tree-vrp.h (value_range::dump): Add "const" qualifier.
7461         (vrp_intersect_ranges): Add "const" qualifier to params as above.
7462         (extract_range_from_unary_expr): Likewise.
7463         (value_range_constant_singleton): Likewise.
7464         (symbolic_range_p): Likewise.
7465         (copy_value_range): Likewise.
7466         (extract_range_from_binary_expr_1): Likewise.
7467         (range_int_cst_p): Likewise.
7468         (vrp_set_zero_nonzero_bits): Likewise.
7469         (range_int_cst_singleton_p): Likewise.
7471 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
7473         * config/aarch64/arm_neon.h (vabsd_s64): New.
7474         (vnegd_s64): Likewise.
7476 2018-08-31  Martin Jambor  <mjambor@suse.cz>
7478         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7480 2018-08-31  Martin Liska  <mliska@suse.cz>
7482         * ipa-icf.c (sem_item::add_type): Use
7483         sem_item::m_type_hash_cache.
7484         * ipa-icf.h: Move the cache from sem_item_optimizer
7485         to sem_item.
7487 2018-08-31  Nathan Sidwell  <nathan@acm.org>
7489         * doc/extend.texi (Backwards Compatibility): Remove implicit
7490         extern C leeway of () being (...).
7492 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7494         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7496 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
7498         PR target/86684
7499         PR target/87149
7500         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7502 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
7504         PR middle-end/87138
7505         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7506         gen_int_mode.  Formatting fixes.
7508 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
7510         * target.def (custom_function_descriptors): Improve documentation.
7511         * doc/tm.texi.in (Trampolines): Expand discussion of function
7512         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7513         beginning of the section.
7514         * doc/tm.texi: Regenerated.
7516 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
7518         * cfg.h (class auto_edge_flag): Spell out the template-id of the
7519         base class in the initializer list.  This is a workaround for
7520         building with older GCC.
7521         (class auto_bb_flag): Likewise.
7523 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
7525         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7526         (altivec_vcmpequ<VI_char>_p): Remove star.
7527         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7528         vector load modes.
7529         (expand_strncmp_vec_sequence): New function.
7530         (emit_final_str_compare_vec): New function.
7531         (expand_strn_compare): Add support for vector strncmp.
7532         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7533         length specification to bytes.
7534         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7535         (vcmpnezb_p): New pattern.
7536         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7537         for option -mstring-compare-inline-limit.
7539 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
7541         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7542         (PTA_SKYLAKE): Add PTA_AES.
7543         (PTA_GOLDMONT): Likewise.
7545 2018-08-29  Jan Hubicka  <jh@suse.cz>
7547         PR lto/86517
7548         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7549         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7551 2018-08-29  Jan Hubicka  <jh@suse.cz>
7553         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7554         TYPE_STUB_DECL.
7555         (hash_tree): Do not visit TYPE_STUB_DECL.
7556         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7557         stream TYPE_STUB_DECL.
7558         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7559         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7560         after free_lang_data.
7561         (type_in_anonymous_namespace_p): Likewise.
7563 2018-08-29  Jan Hubicka  <jh@suse.cz>
7565         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7566         comment that it has to be even number.
7567         (class sreal): Change m_sig type to int32_t.
7568         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7569         int64_t for temporary calculations.
7570         (sreal_verify_basics): Drop one bit from minimum and maximum.
7572 2018-08-30  Richard Biener  <rguenther@suse.de>
7574         PR tree-optimization/87147
7575         * tree-ssa-sccvn.c (SSA_VISITED): New function.
7576         (visit_phi): When the degenerate result is from the backedge and
7577         we didn't visit its definition yet drop to VARYING.
7578         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7580 2018-08-29  Jan Hubicka  <jh@suse.cz>
7582         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7583         DECL_VINDEX.
7584         (hash_tree): Likewise.
7586 2018-08-29  Jan Hubicka  <jh@suse.cz>
7588         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7589         and TYPE_NEXT_REF_TO.
7591 2018-08-29  Jan Hubicka  <jh@suse.cz>
7593         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7594         comment that it has to be even number.
7595         (class sreal): Change m_sig type to int32_t.
7596         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7597         int64_t for temporary calculations.
7598         (sreal_verify_basics): Drop one bit from minimum and maximum.
7600 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
7602         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7604 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
7606         PR middle-end/86995
7607         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7608         if to_add is negative.
7610 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7612         PR middle-end/87053
7613         * builtins.c (c_strlen): Improve range checks.
7615 2018-08-29  Martin Sebor  <msebor@redhat.com>
7616             Jeff Law  <law@redhat.com>
7618         PR tree-optimization/86714
7619         PR tree-optimization/86711
7620         * builtins.c (c_strlen): Add arguments to call to string_constant.
7621         * expr.c (string_constant): Add argument.  Detect missing nul
7622         terminator and outermost declaration it's missing in.
7623         * expr.h (string_constant): Add argument.
7624         * fold-const.c (read_from_constant_string): Add arguments to call to
7625         string_constant.
7626         (c_getstr): Likewise.
7627         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7628         to string_constant.
7629         * tree-ssa-strlen.c (get_stridx): Likewise.
7631 2018-08-29  Jan Hubicka  <jh@suse.cz>
7633         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7634         Do not stream DECL_VINDEX.
7635         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7636         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7637         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7639 2018-08-29  Richard Biener  <rguenther@suse.de>
7641         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7642         virtual operands that are not default defs to honor region
7643         boundaries.
7644         (rpo_vn_valueize): Remove ineffective code here.
7646 2018-08-29  Richard Biener  <rguenther@suse.de>
7648         PR tree-optimization/87132
7649         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7650         when skipping defs reachable over backedges.
7652 2018-08-29  Richard Biener  <rguenther@suse.de>
7654         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7655         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7656         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7657         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7658         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7659         (vn_reference_lookup_3): Remove use of const_parms.
7660         (free_rpo_vn): Do not free const_parms.
7661         (do_rpo_vn): Do not call init_const_parms.
7662         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7663         SSA_NAME_POINTS_TO_READONLY_MEMORY.
7664         (call_may_clobber_ref_p_1): Likewise.
7666 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
7668         PR other/86726
7669         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7670         (-O): Ditto.
7671         (-ftree-scev-cprop): Document.
7673 2018-08-29  Jan Hubicka  <jh@suse.cz>
7675         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7676         parameters.
7677         (sreal constructor): Update.
7678         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7679         sreal:operator/): Update.
7681 2018-08-29  Martin Liska  <mliska@suse.cz>
7683         * tree-switch-conversion.c (switch_conversion::expand):
7684         Strenghten assumption about gswitch statements.
7686 2018-08-29  Richard Biener  <rguenther@suse.de>
7688         PR tree-optimization/87117
7689         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7690         re-value-number released SSA VDEFs.
7692 2018-08-29  Richard Biener  <rguenther@suse.de>
7694         PR tree-optimization/87126
7695         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7697 2018-08-28  Jim Wilson  <jimw@sifive.com>
7699         * config/riscv/pic.md: Rewrite.
7700         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7701         invalid address.
7702         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7703         (SOFTF, default_load, softload, softstore): New.
7705 2018-08-28  Jeff Law  <law@redhat.com>
7707         * fold-const.c (fold_binary_loc): Remove recently added assert.
7709 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
7711         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7712         to OP parmeter of generated function.
7714 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
7716         PR tree-optimization/87009
7717         * match.pd: Add boolean optimizations.
7719 2018-08-28  Martin Sebor  <msebor@redhat.com>
7721         PR middle-end/86631
7722         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7723         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7724         (pass_walloca::gate): Use it.
7725         (alloca_call_type): Same.
7726         (pass_walloca::execute): Same.
7727         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7729 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
7731         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7732         GCC_VERSION for usage of "__gcc_dump_printf__" format from
7733         >= 3005 to >= 9000.
7735 2018-08-28  Richard Biener  <rguenther@suse.de>
7737         PR tree-optimization/87124
7738         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7739         constants before looking up avail.
7741 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
7743         PR middle-end/87099
7744         * calls.c (maybe_warn_nonstring_arg): Punt early if
7745         warn_stringop_overflow is zero.  Don't call get_range_strlen
7746         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7747         Swap comparison operands to have constants on rhs.  Only use
7748         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
7749         increment lenrng[0].
7751 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
7753         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7754         use of tree_to_shwi.  Remove duplicated test for the size being
7755         a whole number of bytes.
7757 2018-08-28  Richard Biener  <rguenther@suse.de>
7759         PR tree-optimization/87117
7760         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7761         Handle removed stmt without LHS (GIMPLE_NOP).
7763 2018-08-28  Richard Biener  <rguenther@suse.de>
7765         PR tree-optimization/87117
7766         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7767         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7769 2018-08-28  Richard Biener  <rguenther@suse.de>
7771         PR tree-optimization/87117
7772         * tree-ssa-pre.c (compute_avail): Do not make expressions
7773         with predicated values available.
7774         (get_expr_value_id): Assert we do not run into predicated value
7775         expressions.
7777 2018-08-28  Richard Biener  <rguenther@suse.de>
7779         PR tree-optimization/87117
7780         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7781         get virtual operands.
7782         (get_expr_operands): Handle STRING_CST like other decls.
7784 2018-08-28  Martin Liska  <mliska@suse.cz>
7786         * tree.h: Update documentation of fndecl_built_in_p
7787         functions.
7790 2018-08-27  Jeff Law  <law@redhat.com>
7791         PR tree-optimization/87110
7792         * tree-ssa-dse.c (compute_trims): Handle non-constant
7793         TYPE_SIZE_UNIT.
7795 2018-08-27  Martin Sebor  <msebor@redhat.com>
7797         PR tree-optimization/86914
7798         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7800 2018-08-27  Martin Sebor  <msebor@redhat.com>
7802         PR tree-optimization/87112
7803         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7804         the type of the bound argument.
7806 2018-08-27  Jeff Law  <law@redhat.com>
7808         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7809         type does not have a TYPE_SIZE_UNIT.
7811 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
7813         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7814         with include of backend.h.
7816 2018-08-27  Richard Biener  <rguenther@suse.de>
7818         PR tree-optimization/86927
7819         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7820         use const cond reduction code.
7822 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
7824         PR tree-optimization/85758
7825         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7827 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
7829         PR c++/87091
7830         * diagnostic-show-locus.c (class layout_range): Update for
7831         conversion of show_caret_p to a tri-state.
7832         (layout_range::layout_range): Likewise.
7833         (make_range): Likewise.
7834         (layout::maybe_add_location_range): Likewise.
7835         (layout::should_print_annotation_line_p): Don't show annotation
7836         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7837         (layout::get_state_at_point): Update for conversion of
7838         show_caret_p to a tri-state.  Bail out early for
7839         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7840         underlining or source colorization.
7841         (gcc_rich_location::add_location_if_nearby): Update for conversion
7842         of show_caret_p to a tri-state.
7843         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7844         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7845         Likewise.
7846         (selftest::test_one_liner_labels): Likewise.
7847         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7848         conversion of show_caret_p to a tri-state.
7849         * pretty-print.c (text_info::set_location): Likewise.
7850         * pretty-print.h (text_info::set_location): Likewise.
7851         * substring-locations.c (format_warning_n_va): Likewise.
7852         * tree-diagnostic.c (default_tree_printer): Likewise.
7853         * tree-pretty-print.c (newline_and_indent): Likewise.
7855 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
7857         PR c++/87091
7858         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7859         line above for line-insertion fix-it hints.
7860         (selftest::test_fixit_insert_containing_newline): Update the
7861         expected results, and add a test with line-numbering enabled.
7863 2018-08-27  Martin Liska  <mliska@suse.cz>
7865         PR sanitizer/86962
7866         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7867         params with DECL_HAS_VALUE_EXPR_P.
7869 2018-08-27  Martin Liska  <mliska@suse.cz>
7871         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7872         selected expansion strategy.
7874 2018-08-27  Martin Liska  <mliska@suse.cz>
7876         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7877         * builtins.c (is_builtin_fn): Likewise.
7878         * attribs.c (diag_attr_exclusions): Use new function
7879         fndecl_built_in_p and remove check for FUNCTION_DECL if
7880         possible.
7881         (builtin_mathfn_code): Likewise.
7882         (fold_builtin_expect): Likewise.
7883         (fold_call_expr): Likewise.
7884         (fold_builtin_call_array): Likewise.
7885         (fold_call_stmt): Likewise.
7886         (set_builtin_user_assembler_name): Likewise.
7887         (is_simple_builtin): Likewise.
7888         * calls.c (gimple_alloca_call_p): Likewise.
7889         (maybe_warn_nonstring_arg): Likewise.
7890         * cfgexpand.c (expand_call_stmt): Likewise.
7891         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7892         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7893         (cgraph_node::verify_node): Likewise.
7894         * cgraphclones.c (build_function_decl_skip_args): Likewise.
7895         (cgraph_node::create_clone): Likewise.
7896         * config/arm/arm.c (arm_insert_attributes): Likewise.
7897         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7898         * dse.c (scan_insn): Likewise.
7899         * expr.c (expand_expr_real_1): Likewise.
7900         * fold-const.c (operand_equal_p): Likewise.
7901         (fold_binary_loc): Likewise.
7902         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7903         * gimple-low.c (lower_stmt): Likewise.
7904         * gimple-pretty-print.c (dump_gimple_call): Likewise.
7905         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7906         Likewise.
7907         * gimple.c (gimple_build_call_from_tree): Likewise.
7908         (gimple_call_builtin_p): Likewise.
7909         (gimple_call_combined_fn): Likewise.
7910         * gimplify.c (gimplify_call_expr): Likewise.
7911         (gimple_boolify): Likewise.
7912         (gimplify_modify_expr): Likewise.
7913         (gimplify_addr_expr): Likewise.
7914         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7915         * ipa-cp.c (determine_versionability): Likewise.
7916         * ipa-fnsummary.c (compute_fn_summary): Likewise.
7917         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7918         * ipa-split.c (visit_bb): Likewise.
7919         (split_function): Likewise.
7920         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7921         * lto-cgraph.c (input_node): Likewise.
7922         * lto-streamer-out.c (write_symbol): Likewise.
7923         * omp-low.c (setjmp_or_longjmp_p): Likewise.
7924         (lower_omp_1): Likewise.
7925         * predict.c (strip_predict_hints): Likewise.
7926         * print-tree.c (print_node): Likewise.
7927         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7928         * trans-mem.c (is_tm_irrevocable): Likewise.
7929         (is_tm_load): Likewise.
7930         (is_tm_simple_load): Likewise.
7931         (is_tm_store): Likewise.
7932         (is_tm_simple_store): Likewise.
7933         (is_tm_abort): Likewise.
7934         (tm_region_init_1): Likewise.
7935         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7936         * tree-cfg.c (verify_gimple_call): Likewise.
7937         (move_stmt_r): Likewise.
7938         (stmt_can_terminate_bb_p): Likewise.
7939         * tree-eh.c (lower_eh_constructs_2): Likewise.
7940         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7941         * tree-inline.c (remap_gimple_stmt): Likewise.
7942         (copy_bb): Likewise.
7943         (estimate_num_insns): Likewise.
7944         (fold_marked_statements): Likewise.
7945         * tree-sra.c (scan_function): Likewise.
7946         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7947         (optimize_stack_restore): Likewise.
7948         (pass_fold_builtins::execute): Likewise.
7949         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7950         (mark_all_reaching_defs_necessary_1): Likewise.
7951         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7952         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7953         (pass_forwprop::execute): Likewise.
7954         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7955         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7956         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7957         * tree-ssa-strlen.c (get_string_length): Likewise.
7958         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7959         (find_func_aliases_for_call): Likewise.
7960         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7961         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7962         * tree-tailcall.c (find_tail_calls): Likewise.
7963         * tree.c (need_assembler_name_p): Likewise.
7964         (free_lang_data_in_decl): Likewise.
7965         (get_call_combined_fn): Likewise.
7966         * ubsan.c (is_ubsan_builtin_p): Likewise.
7967         * varasm.c (incorporeal_function_p): Likewise.
7968         * tree.h (DECL_BUILT_IN): Remove and replace with
7969         fndecl_built_in_p.
7970         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7971         (fndecl_built_in_p): New.
7973 2018-08-27  Martin Liska  <mliska@suse.cz>
7975         PR tree-optimization/86847
7976         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7977         Dump also subtree probability.
7978         (switch_decision_tree::do_jump_if_equal): New function.
7979         (switch_decision_tree::emit_case_nodes): Handle special
7980         situations in balanced tree that can be emitted much simpler.
7981         Fix calculation of probabilities that happen in tree expansion.
7982         * tree-switch-conversion.h (struct cluster): Add
7983         is_single_value_p.
7984         (struct simple_cluster): Likewise.
7985         (struct case_tree_node): Add new function has_child.
7986         (do_jump_if_equal): New.
7988 2018-08-27  Martin Liska  <mliska@suse.cz>
7990         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7991         Add new argument to bit_test_cluster constructor.
7992         (bit_test_cluster::emit): Set bits really number of values
7993         handlel by a test.
7994         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7995         probability argument.
7996         * tree-switch-conversion.h (struct bit_test_cluster):
7997         Add m_handles_entire_switch.
7999 2018-08-27  Martin Liska  <mliska@suse.cz>
8001         PR tree-optimization/86702
8002         * tree-switch-conversion.c (jump_table_cluster::emit):
8003         Make probabilities even for values in jump table
8004         according to number of cases handled.
8005         (switch_decision_tree::compute_cases_per_edge): Pass
8006         argument to reset_out_edges_aux function.
8007         (switch_decision_tree::analyze_switch_statement): Likewise.
8008         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8009         Make it static.
8011 2018-08-27  Martin Liska  <mliska@suse.cz>
8013         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8014         cfun argument explicitly.
8015         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8016         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8017         function gimple_switch_default_bb.
8018         (convert_switch_statements):
8019         (expand_builtins):
8020         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8021         * stmt.c (label_to_block_fn): Use label_to_block and pass
8022         cfun argument explicitly and use gimple_switch_label_bb.
8023         (expand_case): Likewise.
8024         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8025         cfun argument explicitly. Likewise.
8026         (make_edges_bb): Likewise.
8027         (make_cond_expr_edges): Likewise.
8028         (get_cases_for_edge): Likewise.
8029         (make_gimple_switch_edges): Likewise.
8030         (label_to_block_fn): Likewise.
8031         (label_to_block): Likewise.
8032         (make_goto_expr_edges): Likewise.
8033         (make_gimple_asm_edges): Likewise.
8034         (main_block_label): Likewise.
8035         (group_case_labels_stmt): Likewise.
8036         (find_taken_edge_computed_goto): Likewise.
8037         (find_taken_edge_switch_expr): Likewise.
8038         (gimple_verify_flow_info): Likewise.
8039         (gimple_redirect_edge_and_branch): Likewise.
8040         (gimple_switch_label_bb): New function.
8041         (gimple_switch_default_bb): Likewise.
8042         (gimple_switch_edge): Likewise.
8043         (gimple_switch_default_edge): Likewise.
8044         * tree-cfg.h (label_to_block_fn): Remove and replace ...
8045         (label_to_block): ... with this.
8046         (gimple_switch_label_bb): New.
8047         (gimple_switch_default_bb): Likewise.
8048         (gimple_switch_edge): Likewise.
8049         (gimple_switch_default_edge): Likewise.
8050         * tree-cfgcleanup.c (convert_single_case_switch): Use
8051         new gimple functions and pass new argument to label_to_block.
8052         (cleanup_control_flow_bb):
8053         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8054         cfun argument explicitly.
8055         (make_eh_edges): Likewise.
8056         (redirect_eh_dispatch_edge): Likewise.
8057         (lower_resx): Likewise.
8058         (lower_eh_dispatch): Likewise.
8059         (maybe_remove_unreachable_handlers): Likewise.
8060         (unsplit_eh): Likewise.
8061         (cleanup_empty_eh): Likewise.
8062         (verify_eh_edges): Likewise.
8063         (verify_eh_dispatch_edge): Likewise.
8064         * tree-ssa-dom.c (record_edge_info): Likewise.
8065         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8066         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8067         (thread_through_normal_block): Likewise.
8068         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8069         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8070         * tree-switch-conversion.c (switch_conversion::collect): Use new
8071         gimple functions.
8072         (switch_conversion::check_final_bb): Likewise.
8073         (switch_conversion::gather_default_values): Pass new argument
8074         to label_to_block.
8075         (switch_conversion::build_constructors): Likewise.
8076         (switch_decision_tree::compute_cases_per_edge): Use new
8077         gimple_switch_edge function.
8078         (switch_decision_tree::analyze_switch_statement): Pass new argument
8079         to label_to_block.
8080         (switch_decision_tree::try_switch_expansion): Use
8081         gimple_switch_default_edge.
8082         * tree-vrp.c (find_switch_asserts): Pass new argument
8083         to label_to_block.
8084         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8085         (vr_values::simplify_switch_using_ranges): Likewise.
8087 2018-08-27  Richard Biener  <rguenther@suse.de>
8089         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8090         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8092         * tree-ssa-sccvn.h (struct vn_pval): New structure.
8093         (struct vn_nary_op_s): Add unwind_to member.  Add
8094         predicated_values flag and put result into a union together
8095         with a linked list of vn_pval.
8096         (struct vn_ssa_aux): Add name member to make maintaining
8097         a map of SSA name to vn_ssa_aux possible.  Remove no longer
8098         needed info, dfsnum, low, visited, on_sccstack, use_processed
8099         and range_info_anti_range_p members.
8100         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8101         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8102         New functions.
8103         (vn_valueize): New global.
8104         (vn_context_bb): Likewise.
8105         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8106         VN_INFO_PTR_INFO): Remove.
8107         * tree-ssa-sccvn.c: ... (rewrite)
8108         (pass_fre::execute): For -O2+ initialize loops and run
8109         RPO VN in optimistic mode (iterating).  For -O1 and -Og
8110         run RPO VN in non-optimistic mode.
8111         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8112         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8113         * doc/invoke.texi (sccvn-max-scc-size): Remove.
8114         (rpo-vn-max-loop-depth): Document.
8115         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8116         when valuezing the VUSE signals we walked out of the region.
8117         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8118         (phi_translate): Set VN context block to use for availability
8119         lookup.
8120         (compute_avail): Likewise.
8121         (pre_valueize): New function.
8122         (pass_pre::execute): Adjust to the RPO VN API.
8124         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8125         (propagate_constants_for_unrolling): Remove.
8126         (tree_unroll_loops_completely): Perform value-numbering
8127         on the unrolled bodies loop parent.
8129 2018-08-27  Richard Biener  <rguenther@suse.de>
8131         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8132         for partial antic compute.
8134 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
8136         PR rtl-optimization/87065
8137         * combine.c (simplify_if_then_else): Formatting fix.
8138         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8139         check.
8140         (known_cond): Don't return const_true_rtx for vector modes.  Use
8141         CONST0_RTX instead of const0_rtx.  Formatting fixes.
8143 2018-08-27  Martin Liska  <mliska@suse.cz>
8145         PR gcov-profile/87069
8146         * gcov.c (process_file): Record files already processed
8147         and warn about a file being processed multiple times.
8149 2018-08-27  Martin Liska  <mliska@suse.cz>
8151         PR driver/83193
8152         * config/aarch64/aarch64.c (aarch64_override_options_internal):
8153         Set default values for x_aarch64_*_string strings.
8154         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8155         prefix.  For -mabi do not print '=ABI' in help and use
8156         <option_value> format for -msve-vector-bits and -moverride
8157         options.
8159 2018-08-26  Jeff Law  <law@redhat.com>
8161         * config/mips/frame-header-opt.c: Include "backend.h" rather than
8162         "cfg.h"
8164 2018-08-26  Marek Polacek  <polacek@redhat.com>
8166         PR c++/87029, Implement -Wredundant-move.
8167         * doc/invoke.texi: Document -Wredundant-move.
8169 2018-08-25  Martin Sebor  <msebor@redhat.com>
8171         PR tree-optimization/87059
8172         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8173         to the same type as the other.
8174         * fold-const.c (fold_binary_loc): Assert expectation.
8176 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
8178         * config/darwin.c (machopic_legitimize_pic_address): Clean up
8179         extraneous parentheses, dead code section and formatting.
8181 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
8183         PR c++/87091
8184         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8185         wide enough for jumps in the line-numbering to be visible.
8186         (layout::print_gap_in_line_numbering): New member function.
8187         (layout::calculate_line_spans): When using line numbering, merge
8188         line spans that are only 1 line apart.
8189         (diagnostic_show_locus): When printing line numbers, show gaps in
8190         line numbering directly, rather than printing headers.
8191         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8192         line-numbering with multiple line spans.
8193         (selftest::test_fixit_insert_containing_newline_2): Add test of
8194         line-numbering, in which the spans are close enough to be merged.
8196 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8198         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8199         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
8200         * tree-vrp.c (range_is_nonnull): Remove.
8201         (range_includes_zero_p): Accept value_range instead of min/max.
8202         (extract_range_from_binary_expr_1): Do not early bail on
8203         POINTER_PLUS_EXPR.
8204         Use range_includes_zero_p instead of range_is_nonnull.
8205         (extract_range_from_unary_expr): Use range_includes_zero_p instead
8206         of range_is_nonnull.
8207         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
8208         special case VR_ANTI_RANGE.
8209         (vrp_finalize): Same.
8210         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8211         instead of min/max.
8212         (range_is_nonnull): Remove.
8213         * vr-values.c (vrp_stmt_computes_nonzero): Use
8214         range_includes_zero_p instead of range_is_nonnull.
8215         (extract_range_basic): Pass value_range to range_includes_zero_p
8216         instead of range_is_nonnull.
8218 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
8220         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8221         * emit-rtl.h (rtl_data): Remove return_bnd.
8222         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8223         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8224         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8225         (POINTER_BOUNDS_MODE): Remove definition.
8226         (make_pointer_bounds_mode): Remove.
8227         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8228         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8229         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8230         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8231         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8232         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8233         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8235         * config/i386/i386-modes.def (BND32, BND64): Remove.
8236         * config/i386/i386.c (dbx_register_map): Remove bound registers.
8237         (dbx64_register_map): Ditto.
8238         (svr4_dbx_register_map): Ditto.
8239         (indirect_thunk_bnd_needed): Remove.
8240         (indirect_thunks_bnd_used): Ditto.
8241         (indirect_return_bnd_needed): Ditto.
8242         (indirect_return_via_cx_bnd): Ditto.
8243         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8244         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8245         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
8246         (output_indirect_thunk_function): Remove handling of
8247         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8248         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8249         (ix86_save_reg): Remove handling of crtl->return_bnd.
8250         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8251         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8252         and UNSPEC_BNDLX_ADDR.
8253         (ix86_output_indirect_branch_via_reg): Remove handling of
8254         indirect_thunk_prefix_bnd.
8255         (ix86_output_indirect_branch_via_push): Ditto.
8256         (ix86_output_function_return): Ditto.
8257         (ix86_output_indirect_function_return): Ditto.
8258         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8259         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8260         (CALL_USED_REGISTERS): Ditto.
8261         (REG_ALLOC_ORDER): Update for removal of bound registers.
8262         (HI_REGISTER_NAMES): Ditto.
8263         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8264         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8265         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8266         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8267         (FIRST_PSEUDO_REG): Update.
8268         (BND): Remove mode iterator.
8269         * config/i386/predicates.md (bnd_mem_operator): Remove.
8271 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8273         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8274         vectors.
8276 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8278         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8279         the case in which the permute needs only a single element and
8280         repeats for every vector of the result.  Extend that case to
8281         handle variable-length vectors.
8282         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8284 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
8286         PR debug/79342
8287         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8288         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8290 2018-08-24  Richard Biener  <rguenther@suse.de>
8292         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8293         bb_flags_allocated members.
8294         (auto_flag): New RAII class for allocating flags.
8295         (auto_edge_flag): New RAII class for allocating edge flags.
8296         (auto_bb_flag): New RAII class for allocating bb flags.
8297         * cfgloop.c (verify_loop_structure): Allocate temporary edge
8298         flag dynamically.
8299         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8300         in favor of temporarily allocated BB flag.
8301         * hsa-brig.c: Re-order includes.
8302         * hsa-dump.c: Likewise.
8303         * hsa-regalloc.c: Likewise.
8304         * print-rtl.c: Likewise.
8305         * profile-count.c: Likewise.
8307 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
8309         PR target/86989
8310         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8311         the TOC register.
8313 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8315         PR 87073/bootstrap
8316         * wide-int-range.cc (wide_int_range_div): Do not ignore result
8317         from wide_int_range_multiplicative_op.
8319 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8321         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8322         "permutaion".
8324 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
8326         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8327         to 'expanded'.
8329 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
8331         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8332         full GENERIC expression used for replacement.
8334 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
8336         * tree-vrp.c (abs_extent_range): Remove.
8337         (extract_range_into_wide_ints): Pass wide ints by reference.
8338         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8339         Pass wide ints by reference in all calls to
8340         extract_range_into_wide_ints.
8341         * wide-int-range.cc (wide_int_range_div): New.
8342         * wide-int-range.h (wide_int_range_div): New.
8343         (wide_int_range_includes_zero_p): New.
8344         (wide_int_range_zero_p): New.
8346 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
8348         * config/aarch64/aarch64.md (arches): New enum.
8349         (arch): New enum attr.
8350         (arch_enabled): New attr.
8351         (enabled): Now uses arch_enabled only.
8352         (simd, sve, fp16): Removed attribute.
8353         (fp): Attr now defined in terms of 'arch'.
8354         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8355         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8356         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8357         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8358         attributes into 'arch'.
8359         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8360         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8361         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8362         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8363         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8364         'simd' attribute into 'arch'.
8365         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8366         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8367         Convert use of 'fp' attribute to 'arch'.
8368         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8369         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8370         into 'arch'.
8371         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8372         (different modes) Merge 'fp' and 'simd' into 'arch'.
8373         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8374         'simd' into 'arch'.
8376 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
8378         PR rtl-optimization/87026
8379         * expmed.c (canonicalize_comparison): If we can no longer create
8380         pseudoregisters, don't.
8382 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
8384         PR target/86951
8385         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8386         prototype.
8387         * config/arm/arm.c (speculation_barrier_libfunc): New static
8388         variable.
8389         (arm_init_libfuncs): Initialize it.
8390         (arm_emit_speculation_barrier): New function.
8391         * config/arm/arm.md (speculation_barrier): Call
8392         arm_emit_speculation_barrier for architectures that do not have
8393         DSB or ISB.
8394         (speculation_barrier_insn): Only match on Armv7 or later.
8396 2018-08-23  Richard Biener  <rguenther@suse.de>
8398         PR middle-end/87024
8399         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8400         calls.
8402 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8404         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8405         of single-vector TBLs.
8406         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8407         one input is given.
8409 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8411         PR target/85910
8412         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8413         aarch64_evpc_tbl guard.
8415 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8417         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8418         behaviour.
8420 2018-08-22  Martin Sebor  <msebor@redhat.com>
8422         PR middle-end/87052
8423         * tree-pretty-print.c (pretty_print_string): Add argument.
8424         (dump_generic_node): Call to pretty_print_string with string size.
8426 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
8428         PR rtl-optimization/86771
8429         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8430         of two SETs into those two SETs, one to be placed at i2, if that SETs
8431         destination is modified between i2 and i3.
8433 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8435         PR tree-optimization/86725
8436         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8437         function.
8438         (vect_analyze_scalar_cycles_1): Check it.
8440 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8442         PR tree-optimization/86725
8443         * tree-vect-loop.c (vect_is_simple_reduction): When treating
8444         an outer loop phi as a double reduction, make sure that the
8445         single user of the phi result is an inner loop phi.
8447 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8449         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8450         grouped stores with gaps to a strided group.
8452 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8454         * tree-vect-stmts.c (get_group_load_store_type)
8455         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8456         first statement in a group.
8458 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8460         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8461         the sequence used in gcc/gcc.c.
8463 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8465         PR other/704
8466         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8467         building it.
8469 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8471         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8472         Darwin10-specific unwinder-shim.
8473         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8474         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8475         New to cater for Darwin10 Rosetta.
8477 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8479         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8480         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8482 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8484         PR bootstrap/81033
8485         PR target/81733
8486         PR target/52795
8487         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8488         (dwarf2out_switch_text_section): Generate a local label for the
8489         second function sub-section and apply it as the second FDE start
8490         label.
8491         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8492         second sub-section start.
8494 2018-08-22  Richard Biener  <rguenther@suse.de>
8496         PR tree-optimization/86988
8497         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8499 2018-08-22  Richard Biener  <rguenther@suse.de>
8501         PR tree-optimization/86945
8502         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8504 2018-08-22  Alexandre Oliva <oliva@adacore.com>
8506         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8507         a comment about how uses of r2 for .sdata2 come about.
8509 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
8511         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8513 2018-08-21  Marek Polacek  <polacek@redhat.com>
8515         PR c++/86981, Implement -Wpessimizing-move.
8516         * doc/invoke.texi: Document -Wpessimizing-move.
8518 2018-08-21  Jan Hubicka  <jh@suse.cz>
8520         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8521         * tree.h (is_redundant_typedef): Remove.
8522         * dwarf2out.c (is_redundant_typedef): Turn into static function.
8524 2018-08-21  Jan Hubicka  <jh@suse.cz>
8526         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8527         when possible.
8529 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
8531         * expmed.c (extract_low_bits): Reject invalid subregs early.
8533 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8535         PR middle-end/86121
8536         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8537         behaviour.
8539 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8541         * config/vxworks.h: Guard vxworks_asm_out_constructor and
8542         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8543         * config/vxworks.c: Likewise.
8545 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8547         * config/vxworks.c: Set targetm.have_ctors_dtors
8548         if HAVE_INITFINI_ARRAY_SUPPORT.
8549         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8550         if HAVE_INITFINI_ARRAY_SUPPORT.
8552 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8554         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8555         default search path for VxWorks < 7.
8557 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8559         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8560         (get_format_string): Refer to c_getstr.
8562 2018-08-21  Tom de Vries  <tdevries@suse.de>
8564         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8565         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8566         (debuginfo_early_stop): Declare.
8567         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8568         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8569         (debuginfo_early_stop): New function.
8570         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8571         and debuginfo_early_stop.
8572         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8573         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8574         (general_init): Call debuginfo_early_init.
8575         (finalize): Call debuginfo_fini.
8576         (do_compile): Call debuginfo_init.
8577         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8578         -fdump-early-debug.
8579         (@item -fdump-debug, @item -fdump-earlydebug): Add.
8581 2018-08-21  Tom de Vries  <tdevries@suse.de>
8583         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8584         flag_dump_noaddr and flag_dump_unnumbered.
8586 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
8588         * wide-int-range.cc (wide_int_range_abs): New.
8589         (wide_int_range_order_set): Rename from wide_int_range_min_max.
8590         * wide-int-range.h (wide_int_range_abs): New.
8591         (wide_int_range_min_max): New.
8592         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8593         case to call wide_int_range_abs.
8594         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8595         (extract_range_from_abs_expr): Delete.
8597 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
8599         PR target/87033
8600         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8601         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8602         for indexed loads.
8604 2018-08-20  Nathan Sidwell  <nathan@acm.org>
8605             Jeff Law <law@redhat.com>
8607         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8608         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8610 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
8612         PR other/84889
8613         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8614         (decl_attributes): Likewise.
8615         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8616         instance.
8617         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8618         * diagnostic-core.h (class auto_diagnostic_group): New class.
8619         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8620         (diagnostic_report_diagnostic): Handle the first diagnostics within
8621         a group.
8622         (emit_diagnostic): Add auto_diagnostic_group instance.
8623         (inform): Likewise.
8624         (inform_n): Likewise.
8625         (warning): Likewise.
8626         (warning_at): Likewise.
8627         (warning_n): Likewise.
8628         (pedwarn): Likewise.
8629         (permerror): Likewise.
8630         (error): Likewise.
8631         (error_n): Likewise.
8632         (error_at): Likewise.
8633         (sorry): Likewise.
8634         (fatal_error): Likewise.
8635         (internal_error): Likewise.
8636         (internal_error_no_backtrace): Likewise.
8637         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8638         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8639         * diagnostic.h (struct diagnostic_context): Add fields
8640         "diagnostic_group_nesting_depth",
8641         "diagnostic_group_emission_count", "begin_group_cb",
8642         "end_group_cb".
8643         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8644         Add auto_diagnostic_group instance(s).
8645         (find_explicit_erroneous_behavior): Likewise.
8646         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8647         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8648         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8649         (gimplify_va_arg_expr): Likewise.
8650         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8651         (HSA_SORRY_AT): Likewise.
8652         * ipa-devirt.c (compare_virtual_tables): Likewise.
8653         (warn_odr): Likewise.
8654         * multiple_target.c (expand_target_clones): Likewise.
8655         * opts-common.c (cmdline_handle_error): Likewise.
8656         * reginfo.c (globalize_reg): Likewise.
8657         * substring-locations.c (format_warning_n_va): Likewise.
8658         * tree-inline.c (expand_call_inline): Likewise.
8659         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8660         * tree-ssa-loop-niter.c
8661         (do_warn_aggressive_loop_optimizations): Likewise.
8662         * tree-ssa-uninit.c (warn_uninit): Likewise.
8663         * tree.c (warn_deprecated_use): Likewise.
8665 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
8667         PR target/87014
8668         * config/i386/i386.md (eh_return): Always update EH return
8669         address in word_mode.
8671 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
8673         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8674         TARGET_SPLIT_COMPLEX_ARG is defined.
8676 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8678         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8680 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8682         PR target/86984
8683         * expr.c (expand_assignment): Assert that bitpos is positive.
8684         (store_field): Likewise
8685         (expand_expr_real_1): Make sure that bitpos is positive.
8686         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8687         integer overflow.
8689 2018-08-20  Nathan Sidwell  <nathan@acm.org>
8691         * Makefile.in (CPP_ID_DATA_H): Delete.
8692         (CPP_INTERNAL_H): Don't add it.
8693         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8694         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8696 2018-08-20  Richard Biener  <rguenther@suse.de>
8698         PR tree-optimization/78655
8699         * tree-vrp.c (extract_range_from_binary_expr_1): Make
8700         pointer + offset nonnull if either operand is nonnull work.
8702 2018-08-20  Tom de Vries  <tdevries@suse.de>
8704         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8705         unless the referenced die describes the added property using
8706         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
8707         Otherwise, add a DW_AT_location to the referenced die.
8709 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
8711         PR target/86994
8712         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8713         register_operand when calling ix86_set_reg_reg_cost.
8714         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8715         Set *total to 0 for operands that satisfy x86_64_immediate_operand
8716         predicate and to 1 otherwise.
8718 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
8720         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8721         emit a diagnostic that it is not supported and reset the option.
8722         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8723         supported and consume the option.  (ASM_FINAL_SPEC): New.
8725 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
8727         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8728         a sentence.
8730 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
8732         C-SKY port: Documentation
8734         * doc/extend.texi (C-SKY Function Attributes): New section.
8735         * doc/invoke.texi (Option Summary): Add C-SKY options.
8736         (C-SKY Options): New section.
8737         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8739 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8740             Huibin Wang  <huibin_wang@c-sky.com>
8741             Sandra Loosemore  <sandra@codesourcery.com>
8742             Chung-Lin Tang  <cltang@codesourcery.com>
8744         C-SKY port: Backend implementation
8746         * config/csky/*: New.
8747         * common/config/csky/*: New.
8749 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8750             Huibin Wang  <huibin_wang@c-sky.com>
8751             Sandra Loosemore  <sandra@codesourcery.com>
8752             Chung-Lin Tang  <cltang@codesourcery.com>
8753             Andrew Jenner  <andrew@codesourcery.com>
8755         C-SKY port: Configury
8757         * config.gcc (csky-*-*): New.
8758         * configure.ac: Add csky to targets for dwarf2 debug_line support.
8759         * configure: Regenerated.
8761 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
8763         * dump-context.h: Include "dumpfile.h".
8764         (dump_context::dump_printf_va): Convert final param from va_list
8765         to va_list *.  Convert from ATTRIBUTE_PRINTF to
8766         ATTRIBUTE_GCC_DUMP_PRINTF.
8767         (dump_context::dump_printf_loc_va): Likewise.
8768         * dumpfile.c: Include "stringpool.h".
8769         (make_item_for_dump_printf_va): Delete.
8770         (make_item_for_dump_printf): Delete.
8771         (class dump_pretty_printer): New class.
8772         (dump_pretty_printer::dump_pretty_printer): New ctor.
8773         (dump_pretty_printer::emit_items): New member function.
8774         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8775         function.
8776         (dump_pretty_printer::emit_item): New member function.
8777         (dump_pretty_printer::stash_item): New member function.
8778         (dump_pretty_printer::format_decoder_cb): New member function.
8779         (dump_pretty_printer::decode_format): New member function.
8780         (dump_context::dump_printf_va): Reimplement in terms of
8781         dump_pretty_printer.
8782         (dump_context::dump_printf_loc_va): Convert final param from va_list
8783         to va_list *.
8784         (dump_context::begin_scope): Reimplement call to
8785         make_item_for_dump_printf.
8786         (dump_printf): Update for change to dump_printf_va.
8787         (dump_printf_loc): Likewise.
8788         (selftest::test_capture_of_dump_calls): Convert "stmt" from
8789         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
8790         with %T, %E, and %G.
8791         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8792         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8793         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8794         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8795         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8796         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8797         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8798         within a dump_printf_loc call to "%wu".
8799         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8800         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
8801         missing space after "=".
8802         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8803         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8804         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8805         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8806         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
8807         duplicate "vectorized" from message.
8809 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
8811         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8812         polyNxK_t element's TYPE_STRING_FLAG.
8814 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
8816         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8817         (they were unnamed before).  Fix comments.
8819 2018-08-17  Nathan Sidwell  <nathan@acm.org>
8821         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8823 2018-08-17  Richard Biener  <rguenther@suse.de>
8825         PR tree-optimization/86841
8826         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8828 2018-08-17  Martin Liska  <mliska@suse.cz>
8830         * common.opt: Remove Warn, Init and Report for options with
8831         Ignore/Deprecated flag. Warning is done automatically for
8832         Deprecated flags.
8833         * config/i386/i386.opt: Likewise.
8834         * config/ia64/ia64.opt: Likewise.
8835         * config/rs6000/rs6000.opt: Likewise.
8836         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8837         Remove usage of flag_check_pointer_bounds.
8838         * lto-wrapper.c (merge_and_complain): Do not handle
8839         OPT_fcheck_pointer_bounds.
8840         (append_compiler_options): Likewise.
8841         * opt-functions.awk: Do not handle Deprecated.
8842         * optc-gen.awk: Check that Var, Report and Init are not
8843         used for an option with Ignore/Deprecated flag.
8844         * opts-common.c (decode_cmdline_option): Do not report
8845         CL_ERR_DEPRECATED.
8846         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8847         options.
8848         * opts.h (struct cl_option): Remove cl_deprecated flag.
8849         (CL_ERR_DEPRECATED): Remove error enum value.
8851 2018-08-17  Richard Biener  <rguenther@suse.de>
8853         PR middle-end/86505
8854         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8855         across a va-arg-pack using call adjust its return value accordingly.
8857 2018-08-16  Martin Sebor  <msebor@redhat.com>
8859         PR tree-optimization/86853
8860         * gimple-ssa-sprintf.c (struct format_result): Rename member.
8861         (struct fmtresult): Add member and initialize it in ctors.
8862         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
8863         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
8864         (format_directive): Set POSUNDER4K when MAYFAIL is set.
8865         (parse_directive): Handle %C same as %c.
8866         (sprintf_dom_walker::compute_format_length): Adjust.
8867         (is_call_safe): Adjust.
8869 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8871         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
8872         for determining how to count the elements.
8873         * builtins.h (c_strlen): Adjust prototype.
8874         * expr.c (string_constant): Add new parameter mem_size.
8875         Set *mem_size appropriately.
8876         * expr.h (string_constant): Adjust protoype.
8877         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8878         * gimple-fold.h (get_range_strlen): Adjust prototype.
8879         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8880         (format_string): Call get_string_length with eltsize.
8882 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
8884         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8885         to emit the span, rather than setting it as the prefix.
8887 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
8889         * diagnostic-show-locus.c (layout::start_annotation_line): Add
8890         "margin_char" parameter, defaulting to space.  Use it in place
8891         of pp_space for the initial part of the margin.
8892         (layout::print_leading_fixits): Use '+' when filling the margin
8893         of line-insertion fix-it hints.
8895 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8897         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8898         Delete.
8900 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8902         * config/rs6000/altivec.md: Don't set length attribute to the default
8903         value.
8904         * config/rs6000/darwin.md: Ditto.
8905         * config/rs6000/dfp.md: Ditto.
8906         * config/rs6000/htm.md: Ditto.
8907         * config/rs6000/rs6000.md: Ditto.
8908         * config/rs6000/sync.md: Ditto.
8909         * config/rs6000/vsx.md: Ditto.
8911 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8913         * config/rs6000/altivec.md: Don't set length attribute to the default
8914         value, for branch instructions.
8915         * config/rs6000/darwin.md: Ditto.
8916         * config/rs6000/rs6000.md: Ditto.
8918 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8920         * config/rs6000/rs6000.md (length): Always define as const_int 4.
8921         (unnamed conditional branch define_insn): Set length to 4 or 8
8922         depending on offset.
8923         (<bd>_<mode>): Similar, for alternative 0.
8924         (<bd>tf_<mode>): Ditto.
8926 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8928         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8930 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
8932         * doc/rtl.texi: Replace old RTX class names with new names.
8935 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
8937         * expmed.h (canonicalize_comparison): New declaration.
8938         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8939         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8940         * optabs.c (prepare_cmp_insn): Likewise.
8941         * rtl.h (unsigned_condition_p): New function which checks if a
8942         comparison operator is unsigned.
8944 2018-08-16  Nathan Sidwell  <nathan@acm.org>
8946         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8947         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8949 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8951         PR target/84711
8952         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8953         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8954         (mov<mov>): ..this and enable unconditionally.
8956 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8958         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8960 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
8962         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8963         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8964         "Common" with "Target".
8966 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8968         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8969         * doc/invoke.texi (mmitigate-rop): Remove.
8970         * config/i386/i386.c: Do not include "regrename.h".
8971         (ix86_rop_should_change_byte_p, reg_encoded_number)
8972         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8973         Remove.
8974         (ix86_reorg): Remove call to ix86_mitigate_rop.
8975         * config/i386/i386.md (attr "modrm_class"): Remove.
8976         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8977         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8978         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8980 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
8982         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8983         allow folding of mergeh() and mergel() for the float and double types.
8984         (fold_mergehl_helper): Rework to handle building a permute tree
8985         for float vectors.
8987 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8989         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8990         for TARGET_SSE.
8992 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
8994         * common.opt (fdiagnostics-show-labels): New option.
8995         * diagnostic-show-locus.c (class layout_range): Add field
8996         "m_label".
8997         (class layout): Add field "m_show_labels_p".
8998         (layout_range::layout_range): Add param "label" and use it to
8999         initialize m_label.
9000         (make_range): Pass in NULL for new "label" param of layout_range's
9001         ctor.
9002         (layout::layout): Initialize m_show_labels_p.
9003         (layout::maybe_add_location_range): Pass in loc_range->m_label
9004         when constructing layout_range instances.
9005         (struct line_label): New struct.
9006         (layout::print_any_labels): New member function.
9007         (layout::print_line): Call it if label-printing is enabled.
9008         (selftest::test_one_liner_labels): New test.
9009         (selftest::test_diagnostic_show_locus_one_liner): Call it.
9010         * diagnostic.c (diagnostic_initialize): Initialize
9011         context->show_labels_p.
9012         * diagnostic.h (struct diagnostic_context): Add field
9013         "show_labels_p".
9014         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9015         -fno-diagnostics-show-labels.
9016         * dwarf2out.c (gen_producer_string): Add
9017         OPT_fdiagnostics_show_labels to the ignored options.
9018         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9019         param.
9020         (gcc_rich_location::maybe_add_expr): Likewise.
9021         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9022         label" param, defaulting to NULL.
9023         (gcc_rich_location::add_expr): Add "label" param.
9024         (gcc_rich_location::maybe_add_expr): Likewise.
9025         (class text_range_label): New class.
9026         (class range_label_for_type_mismatch): New class.
9027         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9028         of format_warning_va.
9029         (fmtwarn_n): Likewise for new params of format_warning_n_va.
9030         * lto-wrapper.c (merge_and_complain): Add
9031         OPT_fdiagnostics_show_labels to the "pick one setting" options.
9032         (append_compiler_options): Likewise to the dropped options.
9033         (append_diag_options): Likewise to the passed-on options.
9034         * opts.c (common_handle_option): Handle the new option.
9035         * selftest-diagnostic.c
9036         (test_diagnostic_context::test_diagnostic_context): Enable
9037         show_labels_p.
9038         * substring-locations.c: Include "gcc-rich-location.h".
9039         (format_warning_n_va): Add "fmt_label" and "param_label" params
9040         and use them as appropriate.
9041         (format_warning_va): Add "fmt_label" and "param_label" params,
9042         passing them on to format_warning_n_va.
9043         (format_warning_at_substring): Likewise.
9044         (format_warning_at_substring_n): Likewise.
9045         * substring-locations.h (format_warning_va): Add "fmt_label" and
9046         "param_label" params.
9047         (format_warning_n_va): Likewise.
9048         (format_warning_at_substring): Likewise.
9049         (format_warning_at_substring_n): Likewise.
9050         * toplev.c (general_init): Initialize global_dc->show_labels_p.
9052 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
9054         PR testsuite/86519
9055         * builtins.c (expand_builtin_memcmp): Do not expand the call
9056         when overflow is detected.
9058 2018-08-15  Martin Sebor  <msebor@redhat.com>
9060         PR tree-optimization/71625
9061         * config/aarch64/aarch64-builtins.c
9062         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9064 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
9066         * config/s390/s390.c (s390_reorg): Remove loop.
9068 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
9070         * config/darwin.c
9071          (darwin_function_switched_text_sections): Delete.
9072         * gcc/config/darwin.h
9073          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9075 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
9077         PR target/81685
9078         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9079         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
9080         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9082 2018-08-15  Martin Liska  <mliska@suse.cz>
9084         PR tree-optimization/86925
9085         * predict.c (expr_expected_value_1): When taking
9086         later predictor, assign also probability.
9087         Use fold_build2_initializer_loc in order to fold
9088         the expression in -frounding-math.
9090 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
9092         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9093         patterns.
9094         (expand_vec_perm_1): Try the new method.
9096 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
9098         PR target/86547
9099         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9100         Check whether lra_live_max_point is 0 before dividing.
9102 2018-08-14  Martin Sebor  <msebor@redhat.com>
9104         PR tree-optimization/86650
9105         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9106         (vrp_prop::check_mem_ref): Same.
9108 2018-08-13  Liu Hao <lh_mouse@126.com>
9110         * pretty-print.c (eat_esc_sequence): Swap the foreground and
9111         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9112         and clear it thereafter, as it only works for DBCS.
9114 2018-08-13  Liu Hao <lh_mouse@126.com>
9116         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9117         handle returned by _get_osf_handle().
9119 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
9121         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9122         for folding vec_perm.
9124 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
9126         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9127         Add support for gimple-folding of vec_pack() and vec_unpack()
9128         intrinsics.
9130 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
9132         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9133         vec_xst variants to the list.
9134         (rs6000_gimple_fold_builtin): Add support for folding unaligned
9135         vector loads and stores.
9137 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
9139         * config.gcc (rs6000-ibm-aix4.x): Delete.
9140         (rs6000-ibm-aix5.1): Delete.
9141         (rs6000-ibm-aix5.2): Delete.
9142         (rs6000-ibm-aix5.3): Delete.
9143         * config/rs6000/aix43.h: Delete.
9144         * config/rs6000/aix51.h: Delete.
9145         * config/rs6000/aix52.h: Delete.
9146         * config/rs6000/t-aix43: Delete.
9148 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
9150         * config/s390/s390.c (s390_decompose_constant_pool_ref):
9151         New function.
9152         (s390_decompose_address): Factor out constant pool ref
9153         decomposition.
9155 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9157         * config/nds32/nds32-predicates.c
9158         (nds32_can_use_bclr_p): Change return type as bool.
9159         (nds32_can_use_bset_p): Ditto.
9160         (nds32_can_use_btgl_p): Ditto.
9161         (nds32_can_use_bitci_p): Ditto.
9162         * config/nds32/nds32-protos.h
9163         (nds32_can_use_bclr_p): Change declaration.
9164         (nds32_can_use_bset_p): Ditto.
9165         (nds32_can_use_btgl_p): Ditto.
9166         (nds32_can_use_bitci_p): Ditto.
9168 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9170         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9171         Support -msched-prolog-epilog option.
9172         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9174 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9176         * common/config/nds32/nds32-common.c
9177         (nds32_option_optimization_table): Enalbe -malways-align.
9179 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9181         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9182         extra_headers.
9183         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9184         OPT_misr_secure_ case.
9185         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9186         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9187         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9188         secure attribute.
9189         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9190         (nds32_isr_info): New field security_level.
9191         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9192         * config/nds32/nds32.md (return_internal): Consider critical attribute.
9193         * config/nds32/nds32.opt (misr-secure): New option.
9194         * config/nds32/nds32_init.inc: New file.
9195         * config/nds32/nds32_isr.h: New file.
9197 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
9199         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9200         Update comment for atomic instructions.
9201         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9202         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9203         Remove.
9204         (atomic_loaddi): Revise fence expansion to only emit fence prior to
9205         load for __ATOMIC_SEQ_CST model.
9206         (atomic_loaddi_1): Remove float register target.
9207         (atomic_storedi): Handle CONST_INT values.
9208         (atomic_storedi_1): Remove float register source.  Add special case
9209         for zero value.
9210         (memory_barrier): New expander and insn.
9212 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
9214         PR tree-optimization/86835
9215         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9216         new_stmt after def_gsi, make sure to insert new_square_stmt after
9217         that stmt, not 2 stmts before it.
9219 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
9221         PR target/82418
9222         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9223         instead of SWI48.
9225 2018-08-10  Martin Liska  <mliska@suse.cz>
9227         PR target/83610
9228         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9229         function type.
9230         * builtins.c (expand_builtin_expect_with_probability):
9231         New function.
9232         (expand_builtin_expect_with_probability): New function.
9233         (build_builtin_expect_predicate): Add new argumnet probability
9234         for BUILT_IN_EXPECT_WITH_PROBABILITY.
9235         (fold_builtin_expect):
9236         (fold_builtin_2):
9237         (fold_builtin_3):
9238         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9239         * builtins.h (fold_builtin_expect): Set new argument.
9240         * doc/extend.texi: Document __builtin_expect_with_probability.
9241         * doc/invoke.texi: Likewise.
9242         * gimple-fold.c (gimple_fold_call): Pass new argument.
9243         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9244         also BUILT_IN_EXPECT_WITH_PROBABILITY.
9245         * predict.c (get_predictor_value): New function.
9246         (expr_expected_value): Add new argument probability. Assume
9247         that predictor and probability are always non-null.
9248         (expr_expected_value_1): Likewise.  For __builtin_expect and
9249         __builtin_expect_with_probability set probability.  Handle
9250         combination in binary expressions.
9251         (tree_predict_by_opcode): Simplify code by simply calling
9252         get_predictor_value.
9253         (pass_strip_predict_hints::execute): Add handling of
9254         BUILT_IN_EXPECT_WITH_PROBABILITY.
9255         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9256         new predictor.
9257         * tree.h (DECL_BUILT_IN_P): New function.
9259 2018-08-10  Martin Liska  <mliska@suse.cz>
9261         PR tree-optimization/85799
9262         * passes.def: Add argument for pass_strip_predict_hints.
9263         * predict.c (class pass_strip_predict_hints): Add new argument
9264         early_p.
9265         (strip_predictor_early): New function.
9266         (pass_strip_predict_hints::execute): Call the function to
9267         strip predictors.
9268         (strip_predict_hints): New function.
9269         * predict.def: Fix comment.
9271 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
9273         * Makefile.in: Clarify which tm.texi to copy over to assert the
9274         right to grant a GFDL license for all.
9276 2018-08-09  Jeff Law  <law@redhat.com>
9278         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9279         unused variable.
9281 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
9283         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9284         prototype.
9286 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9288         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9289         reductions for variable-length vectors.
9291 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
9293         PR other/84889
9294         * common.opt (fdiagnostics-show-line-numbers): New option.
9295         * diagnostic-show-locus.c (class layout): Add fields
9296         "m_show_line_numbers_p" and "m_linenum_width";
9297         (num_digits): New function.
9298         (test_num_digits): New function.
9299         (layout::layout): Initialize new fields.  Update m_x_offset
9300         logic to handle any left margin.
9301         (layout::print_source_line): Print line number when requested.
9302         (layout::start_annotation_line): New member function.
9303         (layout::print_annotation_line): Call it.
9304         (layout::print_leading_fixits): Likewise.
9305         (layout::print_trailing_fixits): Likewise.  Update calls to
9306         move_to_column for new parameter.
9307         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9308         it to potentially call start_annotation_line.
9309         (layout::show_ruler): Call start_annotation_line.
9310         (selftest::test_line_numbers_multiline_range): New selftest.
9311         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9312         and selftest::test_line_numbers_multiline_range.
9313         * diagnostic.c (diagnostic_initialize): Initialize
9314         show_line_numbers_p.
9315         * diagnostic.h (struct diagnostic_context): Add field
9316         "show_line_numbers_p".
9317         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9318         -fno-diagnostics-show-line-numbers.
9319         * dwarf2out.c (gen_producer_string): Add
9320         OPT_fdiagnostics_show_line_numbers to the ignored options.
9321         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9322         one setting" options.
9323         (append_compiler_options): Likewise to the dropped options.
9324         (append_diag_options): Likewise to the passed-on options.
9325         * opts.c (common_handle_option): Handle the new option.
9326         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9328 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9330         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9331         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
9332         third argument of type "const signed char" to descriptions of
9333         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9334         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9335         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9336         __builtin_bcdsub_ov functions.
9338 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9340         PR tree-optimization/86858
9341         * tree-vect-loop.c (vect_is_simple_reduction): Restore
9342         flow_bb_inside_loop_p calls.
9344 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9346         PR tree-optimization/86871
9347         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9348         instead of gimple_assign_lhs.
9350 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
9352         PR target/86887
9353         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9354         register constraint to operand 0.
9355         (add<mode>3_carryinC): Likewise.
9356         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9358 2018-08-09  Martin Liska  <mliska@suse.cz>
9360         PR c/86895
9361         * common.opt: Remove extra line.
9363 2018-08-09  Martin Liska  <mliska@suse.cz>
9365         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9366         at the end of a line, make first letter capital and end up
9367         a sentence with a dot.
9368         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9369         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9370         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9371         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9372         (PARAM_MAX_ISL_OPERATIONS): Likewise.
9373         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9374         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9375         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9376         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9377         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9378         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9379         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9380         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9381         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9382         (PARAM_TREE_REASSOC_WIDTH): Likewise.
9383         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9384         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9385         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9387 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
9389         PR target/84332
9390         * config/s390/s390.c (s390_option_override_internal): Reduce the
9391         stack-clash-protection-probe-interval param if it would be too big
9392         for z900.
9394 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
9396         PR target/46179
9397         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9398         * config/m68k/m68k.c (handle_move_double): Don't call
9399         m68k_final_prescan_insn.
9400         (m68k_adjust_decorated_operand): Renamed from
9401         m68k_final_prescan_insn, remove first and third operand and
9402         simplify.
9403         (print_operand): Call it.
9404         (print_operand_address): Call it.
9406 2018-08-08  Nathan Sidwell  <nathan@acm.org>
9408         * diagnostic.c (diagnostic_report_current_module): Use
9409         linemap_included_from & linemap_included_from_linemap.
9411 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
9413         * config/aarch64/aarch64-cores.def: Add phecda core.
9414         * config/aarch64/aarch64-tune.md: Regenerate.
9415         * doc/invoke.texi: Add phecda core.
9417 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9419         PR target/85295
9420         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9421         definitions.
9422         * config/s390/s390.md ("movti"): Add more alternatives for
9423         constant to GPR copies.
9425 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9427         * config/s390/s390.c: Fix whitespace damage throughout the file.
9428         * config/s390/s390.h: Likewise.
9429         * config/s390/tpf.h: Likewise.
9431 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9433         * config/s390/s390.c (s390_loadrelative_operand_p):
9434         Remove TARGET_CPU_ZARCH usages.
9435         (s390_rtx_costs): Likewise.
9436         (s390_legitimate_constant_p): Likewise.
9437         (s390_cannot_force_const_mem): Likewise.
9438         (legitimate_reload_constant_p): Likewise.
9439         (s390_preferred_reload_class): Likewise.
9440         (legitimize_pic_address): Likewise.
9441         (legitimize_tls_address): Likewise.
9442         (s390_split_branches): Removed.
9443         (s390_add_execute): Removed.
9444         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9445         (s390_mainpool_start): Likewise.
9446         (s390_mainpool_finish): Likewise.
9447         (s390_mainpool_cancel): Removed.
9448         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9449         (s390_chunkify_cancel): Likewise.
9450         (s390_return_addr_rtx): Likewise.
9451         (s390_register_info): Remove split_branches_pending_p uages.
9452         (s390_optimize_register_info): Likewise.
9453         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9454         split_branches_pending_p usages.
9455         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9456         (s390_load_got): Likewise.
9457         (s390_expand_split_stack_prologue): Likewise.
9458         (output_asm_nops): Likewise.
9459         (s390_function_profiler): Likewise.
9460         (s390_emit_call): Likewise.
9461         (s390_conditional_register_usage): Likewise.
9462         (s390_optimize_prologue): Likewise.
9463         (s390_reorg): Remove TARGET_CPU_ZARCH and
9464         split_branches_pending_p usages.
9465         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9466         usages.
9467         (s390_output_indirect_thunk_function): Likewise.
9468         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9469         (TARGET_CPU_ZARCH_P): Removed.
9470         (struct machine_function): Remove split_branches_pending_p.
9471         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9473 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9475         * common/config/s390/s390-common.c (processor_flags_table):
9476         Remove flags.
9477         * config.gcc: Remove with_arch/with_tune support.
9478         * config/s390/2064.md: Remove cpu attribute comparisons.
9479         * config/s390/driver-native.c (s390_host_detect_local_cpu):
9480         Remove MTN.
9481         * config/s390/linux.h (ASM_SPEC):
9482         Remove -march support.
9483         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9484         Use a table to get an arch level.
9485         * config/s390/s390-opts.h (enum processor_type):
9486         Remove enum values.
9487         * config/s390/s390.c
9488         (processor_table): Remove entries, add arch_level values.
9489         (s390_issue_rate): Remove cases.
9490         (s390_option_override): Adjust
9491         s390_option_override_internal() call.
9492         (s390_option_override_internal): Remove deprecation warning.
9493         (s390_valid_target_attribute_tree): Adjust
9494         s390_option_override_internal() call.
9495         * config/s390/s390.h (struct s390_processor):
9496         Share with s390-c.c, add arch_level field.
9497         * config/s390/s390.md:
9498         Remove occurrences in cpu attribute.
9499         * config/s390/s390.opt: Remove -march/-mtune support.
9500         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9501         * doc/invoke.texi: Remove deprecation warning.
9503 2018-08-08  Luis Machado  <luis.machado@linaro.org>
9505         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9506         global.
9507         (qdf24xx_tunings): Set vector cost structure to
9508         qdf24xx_vector_cost.
9510         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9511         <register_sextend>: Set to 3.
9513 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
9515         PR target/86838
9516         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9517         * config/aarch64/aarch64-simd.md
9518         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9519         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9520         (aarch64_frecpx<mode>): ...this new pattern.
9521         * config/aarch64/aarch64-simd-builtins.def: Remove comment
9522         about aarch64_frecp<FRECP:frecp_suffix><mode>.
9524 2018-08-07  Martin Liska  <mliska@suse.cz>
9526         PR middle-end/83023
9527         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9528         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9529         * predict.def (PRED_MALLOC_NONNULL): New predictor.
9530         * doc/extend.texi: Document that malloc attribute adds
9531         hit to compiler.
9533 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
9535         PR target/86785
9536         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9537         Define to speculation_safe_value_not_needed.
9539 2018-08-06  Jeff Law  <law@redhat.com>
9541         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9542         the vr_values instance to cprop_into_stmt.
9543         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9544         (cprop_operand): Also query EVRP to determine if OP is a constant.
9546 2018-08-06  Nathan Sidwell  <nathan@acm.org>
9548         * diagnostic.c (diagnostic_report_current_module): Reroll
9549         included-at loop.  Translate text.
9551 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
9553         * function-tests.c (selftest::test_expansion_to_rtl): Call
9554         free_after_compilation.
9556 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9558         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9560 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
9562         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9563         loops with memory block operations from getting unrolled.
9565 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
9567         PR target/86807
9568         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9569         Define to speculation_safe_value_not_needed.
9571 2018-08-06  Jeff Law  <law@redhat.com>
9573         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9574         assert.
9576 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9578         PR target/86662
9579         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9580         with all enabled __intN types.
9582         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9584 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9586         * alias.c (record_set): Check for clobber high.
9587         * cfgexpand.c (expand_gimple_stmt): Likewise.
9588         * combine-stack-adj.c (single_set_for_csa): Likewise.
9589         * combine.c (find_single_use_1): Likewise.
9590         (set_nonzero_bits_and_sign_copies): Likewise.
9591         (get_combine_src_dest): Likewise.
9592         (is_parallel_of_n_reg_sets): Likewise.
9593         (try_combine): Likewise.
9594         (record_dead_and_set_regs_1): Likewise.
9595         (reg_dead_at_p_1): Likewise.
9596         (reg_dead_at_p): Likewise.
9597         * dce.c (deletable_insn_p): Likewise.
9598         (mark_nonreg_stores_1): Likewise.
9599         (mark_nonreg_stores_2): Likewise.
9600         * df-scan.c (df_find_hard_reg_defs): Likewise.
9601         (df_uses_record): Likewise.
9602         (df_get_call_refs): Likewise.
9603         * dwarf2out.c (mem_loc_descriptor): Likewise.
9604         * haifa-sched.c (haifa_classify_rtx): Likewise.
9605         * ira-build.c (create_insn_allocnos): Likewise.
9606         * ira-costs.c (scan_one_insn): Likewise.
9607         * ira.c (equiv_init_movable_p): Likewise.
9608         (rtx_moveable_p): Likewise.
9609         (interesting_dest_for_shprep): Likewise.
9610         * jump.c (mark_jump_label_1): Likewise.
9611         * postreload-gcse.c (record_opr_changes): Likewise.
9612         * postreload.c (reload_cse_simplify): Likewise.
9613         (struct reg_use): Add source expr.
9614         (reload_combine): Check for clobber high.
9615         (reload_combine_note_use): Likewise.
9616         (reload_cse_move2add): Likewise.
9617         (move2add_note_store): Likewise.
9618         * print-rtl.c (print_pattern): Likewise.
9619         * recog.c (decode_asm_operands): Likewise.
9620         (store_data_bypass_p): Likewise.
9621         (if_test_bypass_p): Likewise.
9622         * regcprop.c (kill_clobbered_value): Likewise.
9623         (kill_set_value): Likewise.
9624         * reginfo.c (reg_scan_mark_refs): Likewise.
9625         * reload1.c (maybe_fix_stack_asms): Likewise.
9626         (eliminate_regs_1): Likewise.
9627         (elimination_effects): Likewise.
9628         (mark_not_eliminable): Likewise.
9629         (scan_paradoxical_subregs): Likewise.
9630         (forget_old_reloads_1): Likewise.
9631         * reorg.c (find_end_label): Likewise.
9632         (try_merge_delay_insns): Likewise.
9633         (redundant_insn): Likewise.
9634         (own_thread_p): Likewise.
9635         (fill_simple_delay_slots): Likewise.
9636         (fill_slots_from_thread): Likewise.
9637         (dbr_schedule): Likewise.
9638         * resource.c (update_live_status): Likewise.
9639         (mark_referenced_resources): Likewise.
9640         (mark_set_resources): Likewise.
9641         * rtl.c (copy_rtx): Likewise.
9642         * rtlanal.c (reg_referenced_p): Likewise.
9643         (single_set_2): Likewise.
9644         (noop_move_p): Likewise.
9645         (note_stores): Likewise.
9646         * sched-deps.c (sched_analyze_reg): Likewise.
9647         (sched_analyze_insn): Likewise.
9649 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9651         * cse.c (invalidate_reg): New function extracted from...
9652         (invalidate): ...here.
9653         (canonicalize_insn): Check for clobber high.
9654         (invalidate_from_clobbers): invalidate clobber highs.
9655         (invalidate_from_sets_and_clobbers): Likewise.
9656         (count_reg_usage): Check for clobber high.
9657         (insn_live_p): Likewise.
9658         * cselib.c (cselib_expand_value_rtx_1):Likewise.
9659         (cselib_invalidate_regno): Check for clobber in setter.
9660         (cselib_invalidate_rtx): Pass through setter.
9661         (cselib_invalidate_rtx_note_stores):
9662         (cselib_process_insn): Check for clobber high.
9663         * cselib.h (cselib_invalidate_rtx): Add operand.
9665 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9667         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9668         (mark_not_eliminable): Likewise.
9669         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9670         * lra-lives.c (process_bb_lives): Check for clobber high.
9671         * lra.c (new_insn_reg): Remember clobber highs.
9672         (collect_non_operand_hard_regs): Check for clobber high.
9673         (lra_set_insn_recog_data): Likewise.
9674         (add_regs_to_insn_regno_info): Likewise.
9675         (lra_update_insn_regno_info): Likewise.
9677 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9679         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9680         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9682 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9684         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9685         (copy_insn_1): Likewise.
9686         (gen_hard_reg_clobber_high): New gen function.
9687         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9688         * genemit.c (gen_exp): Likewise.
9689         (gen_emit_seq): Pass through info.
9690         (gen_insn): Check for CLOBBER_HIGH.
9691         (gen_expand): Pass through info.
9692         (gen_split): Likewise.
9693         (output_add_clobbers): Likewise.
9694         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9695         (remove_clobbers): Likewise.
9696         * rtl.h (gen_hard_reg_clobber_high): New declaration.
9698 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9700         * doc/rtl.texi (clobber_high): Add.
9701         (parallel): Add in clobber high
9702         * rtl.c (rtl_check_failed_code3): Add function.
9703         * rtl.def (CLOBBER_HIGH): Add expression.
9704         * rtl.h (RTL_CHECKC3): Add macro.
9705         (rtl_check_failed_code3): Add declaration.
9706         (XC3EXP): Add macro.
9708 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
9710         PR target/86386
9711         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9712         cfun->machine->max_used_stack_alignment if needed.
9714 2018-08-04  Martin Sebor  <msebor@redhat.com>
9716         PR tree-optimization/86571
9717         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9718         NaN output to 4.
9720 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
9722         PR target/86799
9723         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9724         Define.
9726 2018-08-03  Jeff Law  <law@redhat.com>
9728         PR target/86795
9729         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9730         Define to speculation_safe_value_not_needed.
9732 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
9734         * doc/gcov.texi (-x): Remove duplicate "to".
9735         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9736         (-Wif-not-aligned): Remove duplicate "is".
9737         (-flto): Remove duplicate "the".
9738         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9739         duplicate "v5.00.b".
9740         (MSP430 Options): Remove duplicate "and" from the description
9741         of "-mgprel-sec=regexp".
9742         (x86 Options): Remove duplicate copies of "vmldLog102" and
9743         vmlsLog104 from description of "-mveclibabi=type".
9745 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
9747         * internal-fn.h (first_commutative_argument): Declare.
9748         * internal-fn.c (first_commutative_argument): New function.
9749         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9750         restrictions for pattern statements.  Use first_commutative_argument
9751         to look for commutative operands in calls to internal functions.
9753 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
9755         * Makefile.in (wide-int-range.o): New.
9756         * tree-vrp.c: Move all the wide_int_* functions to...
9757         * wide-int-range.cc: ...here.
9758         * tree-vrp.h: Move all the wide_int_* prototypes to...
9759         * wide-int-range.h: ...here.
9761 2018-08-03  Tom de Vries  <tdevries@suse.de>
9763         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9764         UI_NONE.
9765         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9766         * except.c (output_function_exception_table): Do early exit if
9767         targetm_common.except_unwind_info (&global_options) == UI_NONE.
9769 2018-08-03  Martin Liska  <mliska@suse.cz>
9771         * predict.c (dump_prediction): Change to 2 digits
9772         in fraction part.
9774 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9776         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9777         neon_dup_q to...
9778         (falkor_am_1_gtov_gtov): ... a new insn reservation.
9780 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
9782         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9783         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9784         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9785         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9786         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9788 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
9790         * diagnostic-show-locus.c (diagnostic_show_locus): Use
9791         pp_take_prefix when saving the existing prefix.
9792         * diagnostic.c (diagnostic_append_note): Likewise.
9793         * langhooks.c (lhd_print_error_function): Likewise.
9794         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9795         param's type.  Free the existing prefix.
9796         (pp_take_prefix): New function.
9797         (pretty_printer::pretty_printer): Drop the prefix parameter.
9798         Rename the length parameter to match the comment.
9799         (pretty_printer::~pretty_printer): Free the prefix.
9800         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9801         parameter.
9802         (struct pretty_printer): Drop the "const" from "prefix" field's
9803         type and clarify memory management.
9804         (pp_set_prefix): Drop the "const" from the 2nd param.
9805         (pp_take_prefix): New decl.
9807 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
9809         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9810         for word_mode_ok here instead of passing as argument.
9811         (expand_block_compare): Change select_block_compare_mode() call.
9812         (expand_strncmp_gpr_sequence): New function.
9813         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9815 2018-08-02  Jeff Law  <law@redhat.com>
9817         PR target/86790
9818         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9819         Define to speculation_safe_value_not_needed.
9821         PR target/86784
9822         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9823         Define to speculation_safe_value_not_needed.
9825 2018-08-02  Tom de Vries  <tdevries@suse.de>
9827         PR target/86660
9828         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9829         function.  Return UI_TARGET unconditionally.
9830         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9831         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9833 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9835         * genemit.c (print_overload_test): Fix typo.
9837 2018-08-02  Richard Biener  <rguenther@suse.de>
9839         PR tree-optimization/86816
9840         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9841         which checks for value availability before querying it.
9842         (gvn_uses_equal): Use it.
9843         (same_succ_hash): Likewise.
9844         (gimple_equal_p): Likewise.
9846 2018-08-02  Nick Clifton  <nickc@redhat.com>
9848         PR target/86813
9849         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9850         Define to speculation_safe_value_not_needed.
9852         PR target/86810
9853         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9854         Define to speculation_safe_value_not_needed.
9856         PR target/86810
9857         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9858         Define to speculation_safe_value_not_needed.
9860         PR target/86803
9861         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9862         Define to speculation_safe_value_not_needed.
9864         PR target/86797
9865         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9866         Define to speculation_safe_value_not_needed.
9868         PR target/86791
9869         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9870         Define to speculation_safe_value_not_needed.
9872         PR target/86789
9873         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9874         Define to speculation_safe_value_not_needed.
9876         PR target/86787
9877         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9878         Define to speculation_safe_value_not_needed.
9880         PR target/86782
9881         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9882         speculation_safe_value_not_needed.
9884         PR target/86781
9885         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9886         to speculation_safe_value_not_needed.
9888 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9890         * doc/md.texi: Expand the documentation of instruction names
9891         to mention port-local uses.  Document '@' in pattern names.
9892         * read-md.h (overloaded_instance, overloaded_name): New structs.
9893         (mapping): Declare.
9894         (md_reader::handle_overloaded_name): New member function.
9895         (md_reader::get_overloads): Likewise.
9896         (md_reader::m_first_overload): New member variable.
9897         (md_reader::m_next_overload_ptr): Likewise.
9898         (md_reader::m_overloads_htab): Likewise.
9899         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9900         m_next_overload_ptr and m_overloads_htab.
9901         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9902         (get_mode_token, get_code_token, get_int_token): New functions.
9903         (map_attr_string): Add an optional argument that passes back
9904         the associated iterator.
9905         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9906         (md_reader::handle_overloaded_name, add_overload_instance): New
9907         functions.
9908         (apply_iterators): Handle '@' names.  Report an error if '@'
9909         is used without iterators.
9910         (initialize_iterators): Initialize the new iterator_group fields.
9911         * genopinit.c (handle_overloaded_code_for)
9912         (handle_overloaded_gen): New functions.
9913         (main): Use them to print declarations of maybe_code_for_* and
9914         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9915         * genemit.c (print_overload_arguments, print_overload_test)
9916         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9917         (main): Use it to print definitions of maybe_code_for_* and
9918         maybe_gen_* functions.
9919         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9920         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9921         instead of explicit mode checks.
9922         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9923         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9924         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9925         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9926         (aarch64_expand_compare_and_swap): Likewise
9927         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9928         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9929         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9930         (aarch64_constant_pool_reload_icode): Delete.
9931         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9932         instead of aarch64_constant_pool_reload_icode.  Use
9933         code_for_aarch64_reload_mov instead of explicit mode checks.
9934         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9935         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9936         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9937         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9938         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9939         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9940         (aarch64_atomic_load_op_code): Delete.
9941         (aarch64_emit_atomic_load_op): Likewise.
9942         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9943         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
9944         instead of aarch64_emit_atomic_load_op.
9945         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9946         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9947         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9948         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9949         character before the pattern name.
9950         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9951         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9952         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9953         (aarch64_frecps<mode>): Likewise.
9954         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9955         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9956         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9957         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9958         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9960 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9962         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9963         Allow HFmode constants if TARGET_FP_F16INST.
9965 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
9967         PR target/86014
9968         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9969         No longer check last store for clobber of address register.
9971 2018-08-02  Martin Liska  <mliska@suse.cz>
9973         PR gcov-profile/86817
9974         * gcov.c (process_all_functions): New function.
9975         (main): Call it.
9976         (process_file): Move functions processing to
9977         process_all_functions.
9979 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
9981         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9982         "const" to the "gimple *" and "rtx_insn *" parameters.
9983         * dumpfile.h (dump_user_location_t::dump_user_location_t):
9984         Likewise.
9985         (dump_location_t::dump_location_t): Likewise.
9987 2018-08-01  Martin Sebor  <msebor@redhat.com>
9989         PR tree-optimization/86650
9990         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9991         rather than a "gcall *".  Directly pass the data of interest
9992         to percent_K_format, rather than building a temporary CALL_EXPR
9993         to hold it.
9994         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9995         (gimple_fold_builtin_strncat): Adjust.
9996         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9997         gcall* argument with gimple*.
9998         * gimple-ssa-warn-restrict.c (check_call): Same.
9999         (wrestrict_dom_walker::before_dom_children): Same.
10000         (builtin_access::builtin_access): Same.
10001         (check_bounds_or_overlap): Same
10002         (maybe_diag_overlap): Same.
10003         (maybe_diag_offset_bounds): Same.
10004         * tree-diagnostic.c (default_tree_printer): Move usage of
10005         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10006         to this callsite.
10007         * tree-pretty-print.c (percent_K_format): Add argument.
10008         * tree-pretty-print.h: Add argument.
10009         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10010         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10011         (maybe_diag_stxncpy_trunc): Same.
10012         (handle_builtin_stxncpy): Same.
10013         (handle_builtin_strcat): Same.
10015 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10017         * match.pd: Optimise pointer range checks.
10019 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10021         PR tree-optimization/86758
10022         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10023         to remove pattern statements.
10025 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10027         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10028         result of dfs_enumerate_from when constructing stmt_vec_infos,
10029         instead of additionally calling get_loop_body.
10031 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10033         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10034         parameter.
10035         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10036         When creating an iv, assert that the step is not known to be zero.
10037         (vect_setup_realignment): Update call accordingly.
10038         * tree-vect-stmts.c (vectorizable_store): Likewise.
10039         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
10041 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10043         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10044         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10045         (vectorizable_reduction): Likewise.
10046         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10047         (vect_detect_hybrid_slp_stmts): Likewise.
10048         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10050 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
10052         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10053         (wide_int_set_zero_nonzero_bits): ...this.
10054         (zero_nonzero_bits_from_vr): Rename to...
10055         (vrp_set_zero_nonzero_bits): ...this.
10056         (extract_range_from_multiplicative_op_1): Abstract wide int
10057         code...
10058         (wide_int_range_multiplicative_op): ...here.
10059         (extract_range_from_binary_expr_1): Extract wide int binary
10060         operations into their own functions.
10061         (wide_int_range_lshift): New.
10062         (wide_int_range_can_optimize_bit_op): New.
10063         (wide_int_range_shift_undefined_p): New.
10064         (wide_int_range_bit_xor): New.
10065         (wide_int_range_bit_ior): New.
10066         (wide_int_range_bit_and): New.
10067         (wide_int_range_trunc_mod): New.
10068         (extract_range_into_wide_ints): New.
10069         (vrp_shift_undefined_p): New.
10070         (extract_range_from_multiplicative_op): New.
10071         (vrp_can_optimize_bit_op): New.
10072         * tree-vrp.h (value_range::dump): New.
10073         (wide_int_range_multiplicative_op): New.
10074         (wide_int_range_lshift):New.
10075         (wide_int_range_shift_undefined_p): New.
10076         (wide_int_range_bit_xor): New.
10077         (wide_int_range_bit_ior): New.
10078         (wide_int_range_bit_and): New.
10079         (wide_int_range_trunc_mod): New.
10080         (zero_nonzero_bits_from_bounds): Rename to...
10081         (wide_int_set_zero_nonzero_bits): ...this.
10082         (zero_nonzero_bits_from_vr): Rename to...
10083         (vrp_set_zero_nonzero_bits): ...this.
10084         (range_easy_mask_min_max): Rename to...
10085         (wide_int_range_can_optimize_bit_op): this.
10086         * vr-values.c (simplify_bit_ops_using_ranges): Rename
10087         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10089 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10091         * tree-vectorizer.h (vect_orig_stmt): New function.
10092         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10093         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10094         (vect_create_epilog_for_reduction): Likewise.
10095         (vectorizable_live_operation): Likewise.
10096         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10097         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10098         * tree-vect-stmts.c (vectorizable_call): Likewise.
10099         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10101 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10103         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10104         argument.
10105         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10106         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10107         (vect_transform_loop): Likewise.
10108         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10110 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10112         * tree-vectorizer.h (vect_schedule_slp): Return void.
10113         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10114         (vect_schedule_slp): Likewise.
10116 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10118         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10119         argument.
10120         (vect_transform_loop): Update calls accordingly.  Schedule SLP
10121         instances before the main loop, if any exist.
10123 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10125         PR tree-optimization/86749
10126         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10127         If the lhs is used in a COND_EXPR, check that it is being used
10128         as the "then" or "else" value.
10130 2018-08-01  Tom de Vries  <tdevries@suse.de>
10132         PR target/86800
10133         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10134         speculation_safe_value_not_needed.
10136 2018-08-01  Richard Biener  <rguenther@suse.de>
10138         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10139         as base and offset.
10141 2018-08-01  Martin Liska  <mliska@suse.cz>
10143         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10144         format how successful transformation is dumped.
10145         (gimple_mod_pow2_value_transform): Likewise.
10146         (gimple_mod_subtract_transform): Likewise.
10147         (gimple_stringops_transform): Likewise.
10149 2018-08-01  Martin Liska  <mliska@suse.cz>
10151         PR value-prof/35543
10152         * value-prof.c (interesting_stringop_to_profile_p):
10153         Simplify the code and add BUILT_IN_MEMMOVE.
10154         (gimple_stringops_transform): Likewise.
10156 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
10158         * config/aarch64/aarch64-simd.md
10159         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10160         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10161         use GPI iterator instead of SI mode.
10163 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10165         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10166         rs6000_speculation_barrier.
10167         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10168         new barrier pattern name.
10170 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10172         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10173         (speculation_barrier): New insn.
10175 2018-08-01  Richard Biener  <rguenther@suse.de>
10177         PR bootstrap/86724
10178         * graphite.h: Include isl/id.h and isl/space.h to allow build
10179         with ISL 0.20.
10181 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
10183         PR target/86651
10184         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10185         mode for COFF targets.
10186         * defaults.h (TARGET_COFF): Define.
10187         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10188         TARGET_COFF): Define.
10189         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10190         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10191         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10193 2018-07-31  Alexandre Oliva <oliva@adacore.com>
10195         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10196         * gimple-streamer-out.c (output_bb): Save it.
10197         * lto-streamer-in.c (input_struct_function_base): Restore
10198         instance discriminator if available.  Create map on demand.
10199         * lto-streamer-out.c (output_struct_function_base): Save it if
10200         available.
10201         * final.c (decl_to_instance_map): Document LTO strategy.
10203 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
10204             Olivier Hainque  <hainque@adacore.com>
10206         * debug.h (decl_to_instance_map_t): New type.
10207         (decl_to_instance_map): Declare.
10208         (maybe_create_decl_to_instance_map): New inline function.
10209         * final.c (bb_discriminator, last_bb_discriminator): New statics,
10210         to track basic block discriminators.
10211         (final_start_function_1): Initialize them.
10212         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10213         bb_discriminator.
10214         (decl_to_instance_map): New variable.
10215         (map_decl_to_instance, maybe_set_discriminator): New functions.
10216         (notice_source_line): Set discriminator.
10218 2018-07-31  Ian Lance Taylor  <iant@golang.org>
10220         * targhooks.c (default_have_speculation_safe_value): Add
10221         ATTRIBUTE_UNUSED.
10223 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10225         * dump-context.h: Include "pretty-print.h".
10226         (dump_context::refresh_dumps_are_enabled): New decl.
10227         (dump_context::emit_item): New decl.
10228         (class dump_context): Add fields "m_test_pp" and
10229         "m_test_pp_flags".
10230         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10231         (temp_dump_context::get_dumped_text): New decl.
10232         (class temp_dump_context): Add field "m_pp".
10233         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10234         (dump_context::refresh_dumps_are_enabled): ...and add a test for
10235         m_test_pp.
10236         (set_dump_file): Update for above change.
10237         (set_alt_dump_file): Likewise.
10238         (dump_loc): New overload, taking a pretty_printer *.
10239         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
10240         to any test pretty-printer.
10241         (make_item_for_dump_gimple_stmt): New function, adapted from
10242         optinfo::add_gimple_stmt.
10243         (dump_context::dump_gimple_stmt): Call it, and use the result,
10244         eliminating the direct usage of dump_file and alt_dump_file in
10245         favor of indirectly using them via emit_item.
10246         (make_item_for_dump_gimple_expr): New function, adapted from
10247         optinfo::add_gimple_expr.
10248         (dump_context::dump_gimple_expr): Call it, and use the result,
10249         eliminating the direct usage of dump_file and alt_dump_file in
10250         favor of indirectly using them via emit_item.
10251         (make_item_for_dump_generic_expr): New function, adapted from
10252         optinfo::add_tree.
10253         (dump_context::dump_generic_expr): Call it, and use the result,
10254         eliminating the direct usage of dump_file and alt_dump_file in
10255         favor of indirectly using them via emit_item.
10256         (make_item_for_dump_printf_va): New function, adapted from
10257         optinfo::add_printf_va.
10258         (make_item_for_dump_printf): New function.
10259         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10260         and use the result, eliminating the direct usage of dump_file and
10261         alt_dump_file in favor of indirectly using them via emit_item.
10262         (make_item_for_dump_dec): New function.
10263         (dump_context::dump_dec): Call it, and use the result,
10264         eliminating the direct usage of dump_file and alt_dump_file in
10265         favor of indirectly using them via emit_item.
10266         (make_item_for_dump_symtab_node): New function, adapted from
10267         optinfo::add_symtab_node.
10268         (dump_context::dump_symtab_node): Call it, and use the result,
10269         eliminating the direct usage of dump_file and alt_dump_file in
10270         favor of indirectly using them via emit_item.
10271         (dump_context::begin_scope): Reimplement, avoiding direct usage
10272         of dump_file and alt_dump_file in favor of indirectly using them
10273         via emit_item.
10274         (dump_context::emit_item): New member function.
10275         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10276         Set up test pretty-printer on the underlying context.  Call
10277         refresh_dumps_are_enabled.
10278         (temp_dump_context::~temp_dump_context): Call
10279         refresh_dumps_are_enabled.
10280         (temp_dump_context::get_dumped_text): New member function.
10281         (selftest::verify_dumped_text): New function.
10282         (ASSERT_DUMPED_TEXT_EQ): New macro.
10283         (selftest::test_capture_of_dump_calls): Run all tests twice, with
10284         and then without optinfo enabled.  Add uses of
10285         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
10286         * dumpfile.h: Update comment for the dump_* API.
10287         * optinfo-emit-json.cc
10288         (selftest::test_building_json_from_dump_calls): Update for new
10289         param for temp_dump_context ctor.
10290         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10291         and "m_owned" field.
10292         (optinfo_item::~optinfo_item): Likewise.
10293         (optinfo::add_item): New member function.
10294         (optinfo::emit): Update comment.
10295         (optinfo::add_string): Delete.
10296         (optinfo::add_printf): Delete.
10297         (optinfo::add_printf_va): Delete.
10298         (optinfo::add_gimple_stmt): Delete.
10299         (optinfo::add_gimple_expr): Delete.
10300         (optinfo::add_tree): Delete.
10301         (optinfo::add_symtab_node): Delete.
10302         (optinfo::add_dec): Delete.
10303         * optinfo.h (class dump_context): New forward decl.
10304         (optinfo::add_item): New decl.
10305         (optinfo::add_string): Delete.
10306         (optinfo::add_printf): Delete.
10307         (optinfo::add_printf_va): Delete.
10308         (optinfo::add_gimple_stmt): Delete.
10309         (optinfo::add_gimple_expr): Delete.
10310         (optinfo::add_tree): Delete.
10311         (optinfo::add_symtab_node): Delete.
10312         (optinfo::add_dec): Delete.
10313         (optinfo::add_poly_int): Delete.
10314         (optinfo_item::optinfo_item): Remove "owned" param.
10315         (class optinfo_item): Remove field "m_owned".
10317 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10319         PR middle-end/86705
10320         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10321         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10322         requested variable alignment.
10323         (expand_one_ssa_partition): Likewise.
10324         (expand_one_var): Likewise.
10326 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10328         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10329         to speculation_safe_value_not_needed.
10331 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10333         * targhooks.h (speculation_safe_value_not_needed): New prototype.
10334         * targhooks.c (speculation_safe_value_not_needed): New function.
10335         * target.def (have_speculation_safe_value): Update documentation.
10336         * doc/tm.texi: Regenerated.
10338 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10340         * config/aarch64/iterators.md (ALLI_TI): New iterator.
10341         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10342         expand.
10343         (despeculate_copy<ALLI:mode>_insn): New insn.
10344         (despeculate_copyti_insn): New insn.
10345         (despeculate_simple<ALLI:mode>): New insn
10346         (despeculate_simpleti): New insn.
10347         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10348         function.
10349         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10350         aarch64_speculation_safe_value.
10351         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10353 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10355         * config/aarch64/aarch64-speculation.cc: New file.
10356         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10357         before pass_reorder_blocks.
10358         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10359         prototype.
10360         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10361         X14 and X15 when tracking speculation.
10362         * config/aarch64/aarch64.md (register name constants): Add
10363         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10364         (unspec): Add UNSPEC_SPECULATION_TRACKER.
10365         (speculation_barrier): New insn attribute.
10366         (cmp<mode>): Allow SP in comparisons.
10367         (speculation_tracker): New insn.
10368         (speculation_barrier): Add speculation_barrier attribute.
10369         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10370         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10371         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10373 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10375         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10376         aarch64_track_speculation is true.
10377         (tb<optab><mode>1): Likewise.
10378         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10379         generate CB[N]Z when tracking speculation.
10380         (aarch64_split_compare_and_swap): Likewise.
10381         (aarch64_split_atomic_op): Likewise.
10383 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10385         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10387 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10389         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10390         (speculation_barrier): New insn.
10392 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10394         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10395         * config/arm/arm.md (speculation_barrier): New expand.
10396         (speculation_barrier_insn): New pattern.
10398 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10400         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10401         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10402         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10403         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10404         list.
10405         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10406         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10407         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10408         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10409         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10410         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10411         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10412         * builtins.c (expand_speculation_safe_value): New function.
10413         (expand_builtin): Call it.
10414         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10415         * doc/extend.texi: Document __builtin_speculation_safe_value.
10416         * doc/md.texi: Document "speculation_barrier" pattern.
10417         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10418         TARGET_HAVE_SPECULATION_SAFE_VALUE.
10419         * doc/tm.texi: Regenerated.
10420         * target.def (have_speculation_safe_value, speculation_safe_value): New
10421         hooks.
10422         * targhooks.c (default_have_speculation_safe_value): New function.
10423         (default_speculation_safe_value): New function.
10424         * targhooks.h (default_have_speculation_safe_value): Add prototype.
10425         (default_speculation_safe_value): Add prototype.
10427 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10429         * dump-context.h (dump_context::dump_loc): New decl.
10430         * dumpfile.c (dump_context::dump_loc): New member function.
10431         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10432         and dump_gimple_stmt.
10433         (dump_context::dump_gimple_expr_loc): Likewise, using
10434         dump_gimple_expr.
10435         (dump_context::dump_generic_expr_loc): Likewise, using
10436         dump_generic_expr.
10437         (dump_context::dump_printf_loc_va): Likewise, using
10438         dump_printf_va.
10439         (dump_context::begin_scope): Explicitly using the global function
10440         "dump_loc", rather than the member function.
10442 2018-07-31  Martin Sebor  <msebor@redhat.com>
10444         PR tree-optimization/86741
10445         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10447 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
10449         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10450         depend on whether prefetch instructions will be emitted or not.
10451         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10452         will be emitted or not.
10453         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10454         (TARGET_SETMEM_PFD): New macros.
10456 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10458         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10459         (NULL_STMT_VEC_INFO): Delete.
10460         (stmt_vec_info::operator*): Likewise.
10461         (stmt_vec_info::operator gimple *): Likewise.
10462         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10463         of NULL_STMT_VEC_INFO.
10464         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10465         (vect_reassociating_reduction_p): Likewise.
10466         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10467         (vectorizable_store): Likewise.
10468         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10469         (vec_info::free_stmt_vec_infos): Likewise.
10471 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10473         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10474         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10476 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10478         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10479         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10480         (vec_info::free_stmt_vec_info): New private member functions.
10481         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10482         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10483         * tree-parloops.c (gather_scalar_reductions): Remove calls to
10484         set_stmt_vec_info_vec and free_stmt_vec_infos.
10485         * tree-vect-loop.c (_loop_vec_info): Remove call to
10486         set_stmt_vec_info_vec.
10487         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10488         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10489         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10490         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10491         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
10492         assignments in {vec_info::,}new_stmt_vec_info that are redundant
10493         with the clearing in the xcalloc.
10494         (stmt_vec_info_vec): Delete.
10495         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10496         (vectorize_loops): Likewise.
10497         (vec_info::~vec_info): Remove argument from call to
10498         free_stmt_vec_infos.
10499         (vec_info::add_stmt): Remove vinfo argument from call to
10500         new_stmt_vec_info.
10502 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10504         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10505         rather than a gimple stmt.
10506         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
10507         information for pattern statements when passed the original
10508         statement; instead wait to be passed the pattern statement itself.
10509         Don't call set_vinfo_for_stmt here.
10510         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10511         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10512         stmt_vec_infos here.
10513         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10514         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10515         stmt_vec_infos entry.
10517 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10519         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10520         * tree-vectorizer.c (vec_info::replace_stmt): New function.
10521         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10522         * tree-vect-stmts.c (vectorizable_call): Likewise.
10523         (vectorizable_simd_clone_call): Likewise.
10525 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10527         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10528         * tree-vectorizer.c (vec_info::remove_stmt): New function.
10529         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10530         * tree-vect-loop.c (vect_transform_loop): Likewise.
10531         * tree-vect-slp.c (vect_schedule_slp): Likewise.
10532         * tree-vect-stmts.c (vect_remove_stores): Likewise.
10534 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10536         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10537         (vect_dr_stmt): Delete.
10538         * tree-vectorizer.c (vec_info::lookup_dr): New function.
10539         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10540         of DR_VECT_AUX.
10541         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10542         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10543         (vect_verify_datarefs_alignment, vect_peeling_supportable)
10544         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10545         (vect_analyze_data_refs): Likewise.
10546         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
10547         argument.
10548         (vect_find_same_alignment_drs): Likewise.
10549         (vect_slp_analyze_node_dependences): Update calls accordingly.
10550         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
10551         instead of DR_VECT_AUX.
10552         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10553         of a vector data references.  Use vec_info::lookup_dr instead of
10554         DR_VECT_AUX.
10555         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10556         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
10557         instead of DR_VECT_AUX.
10559 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10561         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10562         dr_vec_info.
10563         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10564         accordingly.
10565         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10566         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10567         (vect_gen_prolog_loop_niters): Likewise.
10569 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10571         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10572         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10573         (vect_known_alignment_in_bytes, vect_dr_behavior)
10574         (vect_get_scalar_dr_size): Take references as dr_vec_infos
10575         instead of data_references.  Update calls to other routines for
10576         which the same change has been made.
10577         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10578         dr_vec_infos instead of stmt_vec_infos.
10579         (vect_analyze_data_ref_dependence): Update call accordingly.
10580         (vect_slp_analyze_data_ref_dependence)
10581         (vect_record_base_alignments): Use DR_VECT_AUX.
10582         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10583         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10584         (vector_alignment_reachable_p, vect_get_data_access_cost)
10585         (vect_peeling_supportable, vect_analyze_group_access_1)
10586         (vect_analyze_group_access, vect_analyze_data_ref_access)
10587         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10588         (vect_compile_time_alias, vect_small_gap_p)
10589         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10590         (vect_supportable_dr_alignment): Take references as dr_vec_infos
10591         instead of data_references.  Update calls to other routines for
10592         which the same change has been made.
10593         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10594         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10595         (vect_slp_analyze_and_verify_node_alignment)
10596         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10597         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10598         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
10599         above changes.
10600         (_vect_peel_info::dr): Replace with...
10601         (_vect_peel_info::dr_info): ...this new field.
10602         (vect_peeling_hash_get_most_frequent)
10603         (vect_peeling_hash_choose_best_peeling): Update accordingly.
10604         (vect_peeling_hash_get_lowest_cost):
10605         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
10606         routines for which the same change has been made.
10607         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
10608         data_reference.
10609         * tree-vect-loop-manip.c (get_misalign_in_elems)
10610         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
10611         above changes.
10612         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10613         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10614         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10615         (get_group_load_store_type, get_negative_load_store_type)
10616         (vect_get_data_ptr_increment, vectorizable_store)
10617         (vectorizable_load): Likewise.
10618         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10619         Update calls to other routines for which the same change has been made.
10621 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10623         * tree-vectorizer.h (vec_info::move_dr): New member function.
10624         (dataref_aux): Rename to...
10625         (dr_vec_info): ...this and add "dr" and "stmt" fields.
10626         (_stmt_vec_info::dr_aux): Update accordingly.
10627         (_stmt_vec_info::data_ref_info): Delete.
10628         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10629         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10630         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10631         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10632         of data_ref.
10633         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
10634         (STMT_VINFO_DR_INFO): New macro.
10635         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10636         (set_dr_misalignment): Update after rename of dataref_aux.
10637         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
10638         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10639         initialization of STMT_VINFO_DATA_REF.
10640         * tree-vectorizer.c (vec_info::move_dr): New function.
10641         * tree-vect-patterns.c (vect_recog_bool_pattern)
10642         (vect_recog_mask_conversion_pattern)
10643         (vect_recog_gather_scatter_pattern): Use it.
10644         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10645         the "dr" and "stmt" fields of dr_vec_info instead of
10646         STMT_VINFO_DATA_REF.
10648 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10650         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10651         (is_pattern_stmt_p): Use it.
10652         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10653         on pattern statements.
10655 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10657         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10658         original stmt as a stmt_vec_info rather than a gimple stmt.
10659         (vect_pattern_recog_1): Take the statement directly as a
10660         stmt_vec_info, rather than via a gimple_stmt_iterator.
10661         Update call to vect_mark_pattern_stmts.
10662         (vect_pattern_recog): Update calls accordingly.
10664 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10666         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10667         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10668         a vect_def_type for the first argument.
10669         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10670         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
10671         operand if it isn't defined by a vectorized statement.
10672         (vect_build_gather_load_calls): Remove the mask_dt argument and
10673         update calls to vect_get_vec_def_for_stmt_copy.
10674         (vectorizable_bswap): Likewise the dt argument.
10675         (vectorizable_call): Update calls to vectorizable_bswap and
10676         vect_get_vec_def_for_stmt_copy.
10677         (vectorizable_simd_clone_call, vectorizable_assignment)
10678         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10679         (vectorizable_comparison): Update calls to
10680         vect_get_vec_def_for_stmt_copy.
10681         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
10682         vect_is_simple_use.
10683         (vect_get_loop_based_defs): Remove dt argument and update call
10684         to vect_get_vec_def_for_stmt_copy.
10685         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10686         and vect_get_vec_def_for_stmt_copy.
10687         (vectorizable_load): Update calls to vect_build_gather_load_calls
10688         and vect_get_vec_def_for_stmt_copy.
10689         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10690         (vectorizable_reduction, vectorizable_live_operation): Update calls
10691         to vect_get_vec_def_for_stmt_copy.
10693 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10695         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10696         and gimple stmt arguments with a stmt_vec_info.
10697         (vect_record_base_alignments): Update calls accordingly.
10698         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10699         and gimple stmt arguments with a stmt_vec_info.
10700         (vect_build_slp_tree_1): Remove vinfo argument and update call
10701         to vect_record_max_nunits.
10702         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10703         and vect_record_max_nunits.
10705 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10707         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10708         file and take a stmt_vec_info instead of a gimple stmt.
10709         (supportable_widening_operation, vect_finish_replace_stmt)
10710         (vect_finish_stmt_generation, vect_get_store_rhs)
10711         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10712         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10713         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10714         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10715         (vect_create_data_ref_ptr, bump_vector_ptr)
10716         (vect_permute_store_chain, vect_setup_realignment)
10717         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10718         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10719         (vectorizable_reduction, vectorizable_induction)
10720         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10721         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10722         than gimple stmts as arguments.
10723         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10724         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10725         (can_group_stmts_p, vect_check_gather_scatter)
10726         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10727         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10728         (vect_permute_load_chain, vect_shift_permute_load_chain)
10729         (vect_transform_grouped_load)
10730         (vect_record_grouped_load_vectors): Likewise.
10731         * tree-vect-loop.c (vect_fixup_reduc_chain)
10732         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10733         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10734         (vectorizable_reduction, vectorizable_induction)
10735         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10736         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10737         (vect_get_load_store_mask): Likewise.
10738         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10739         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10740         * tree-vect-stmts.c (vect_mark_relevant)
10741         (is_simple_and_all_uses_invariant)
10742         (exist_non_indexing_operands_for_use_p, process_use)
10743         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10744         (vect_get_vec_def_for_operand, vect_get_vec_defs)
10745         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10746         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10747         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10748         (get_negative_load_store_type, get_load_store_type)
10749         (vect_check_load_store_mask, vect_check_store_rhs)
10750         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10751         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10752         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10753         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10754         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10755         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10756         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10757         (supportable_widening_operation): Likewise.
10759 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10761         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10762         a stmt_vec_info instead of a gcall.
10763         (vect_check_gather_scatter): Update call accordingly.
10764         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10765         of a gphi.
10766         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10767         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10768         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10769         instead of a gimple stmt.
10770         (vect_transform_loop): Update calls accordingly.
10771         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10772         stmt_vec_infos instead of gimple stmts.
10773         (vect_analyze_slp_instance): Update use accordingly.
10774         * tree-vect-stmts.c (read_vector_array, write_vector_array)
10775         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10776         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10777         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10778         (vect_gen_widened_results_half, vect_get_loop_based_defs)
10779         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10780         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10781         down to subroutines.
10783 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10785         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10786         of the worklist from a vector of gimple stmts to a vector of
10787         stmt_vec_infos.
10788         * tree-vect-stmts.c (vect_mark_relevant, process_use)
10789         (vect_mark_stmts_to_be_vectorized): Likewise
10791 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10793         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10794         statement before passing it to vect_analyze_stmt.
10795         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10796         the chain of phi vector definitions.  Track the exit phi via its
10797         stmt_vec_info.
10798         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10799         STMT_VINFO_REDUC_DEF.
10800         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10801         stmt_vec_infos to handle the statement chains.
10802         (vect_get_slp_defs): Record the first statement in the node
10803         using a stmt_vec_info.
10804         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10805         statements here and pass their stmt_vec_info down to subroutines.
10806         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10807         down to vect_finish_stmt_generation.
10808         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10809         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10810         stmt_vec_infos to subroutines.
10811         (vect_remove_stores): Use stmt_vec_infos to handle the statement
10812         chains.
10814 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10816         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10817         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10818         (vect_permute_store_chain, vect_setup_realignment)
10819         (vect_permute_load_chain, vect_shift_permute_load_chain)
10820         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10821         stmts internally, and when passing values to other vectorizer routines.
10822         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10823         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10824         (vect_analyze_loop_operations, get_initial_def_for_reduction)
10825         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10826         (vectorizable_reduction, vectorizable_induction)
10827         (vectorizable_live_operation, vect_transform_loop_stmt)
10828         (vect_transform_loop): Likewise.
10829         * tree-vect-patterns.c (vect_reassociating_reduction_p)
10830         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10831         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10832         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10833         (vect_slp_analyze_node_operations_1): Likewise.
10834         * tree-vect-stmts.c (vect_mark_relevant, process_use)
10835         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10836         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10837         (vect_finish_stmt_generation_1, get_group_load_store_type)
10838         (get_load_store_type, vect_build_gather_load_calls)
10839         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10840         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10841         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10842         (vectorizable_store, vectorizable_load, vectorizable_condition)
10843         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10844         (supportable_widening_operation): Likewise.
10845         (vect_get_vector_types_for_stmt): Likewise.
10846         * tree-vectorizer.h (vect_dr_behavior): Likewise.
10848 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10850         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10851         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10852         (vect_permute_store_chain, vect_permute_load_chain)
10853         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10854         repeated stmt_vec_info lookups.
10855         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10856         (vect_update_ivs_after_vectorizer): Likewise.
10857         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10858         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10859         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10860         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10861         (vect_bb_slp_scalar_cost): Likewise.
10862         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10864 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10866         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10867         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10868         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10869         to get gassigns and gcalls, rather than operating on generc gimple
10870         stmts.
10871         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10872         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10873         (vectorizable_load, vect_analyze_stmt): Likewise.
10874         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10876 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10878         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10879         return stmt_vec_infos rather than gimple stmts.  Do not accept
10880         null arguments.
10881         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10882         of a gimple stmt.
10883         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10884         Update use of get_later_stmt.
10885         (vect_get_constant_vectors): Update call accordingly.
10886         (vect_schedule_slp_instance): Likewise
10887         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10888         (vect_slp_analyze_instance_dependence): Likewise.
10889         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10891 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10893         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10894         (stmt_info_for_cost::stmt_info): ...this new field.
10895         (add_stmt_costs): Update accordingly.
10896         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10897         (vect_get_known_peeling_cost): Likewise.
10898         (vect_estimate_min_profitable_iters): Likewise.
10899         * tree-vect-stmts.c (record_stmt_cost): Likewise.
10901 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10903         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10904         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10905         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10906         accordingly.
10907         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10909 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10911         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10912         a gimple stmt to a stmt_vec_info.
10913         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10915 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10917         * tree-vectorizer.h (vec_info::grouped_stores): Change from
10918         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10919         (_loop_vec_info::reduction_chains): Likewise.
10920         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10921         accordingly.
10922         * tree-vect-slp.c (vect_analyze_slp): Likewise.
10924 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10926         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10927         a gimple stmt to a stmt_vec_info.
10928         (_stmt_vec_info::next_element): Likewise.
10929         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10930         (vect_slp_analyze_and_verify_node_alignment)
10931         (vect_analyze_group_access_1, vect_analyze_group_access)
10932         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10933         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10934         (vect_supportable_dr_alignment): Update accordingly.
10935         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10936         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10937         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10938         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10939         * tree-vect-slp.c (vect_build_slp_tree_1)
10940         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10941         (vect_split_slp_store_group, vect_analyze_slp_instance)
10942         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10943         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10944         (get_group_load_store_type, get_load_store_type)
10945         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10946         (vect_transform_stmt, vect_remove_stores): Likewise.
10948 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10950         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10951         than a gimple stmt.
10952         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10953         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10954         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10955         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10956         (vector_alignment_reachable_p, vect_get_data_access_cost)
10957         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10958         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10959         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10960         (vect_analyze_group_access_1, vect_analyze_group_access)
10961         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10962         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10963         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10964         result of vect_dr_stmt and use the stmt_vec_info instead of
10965         the associated gimple stmt.
10966         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10967         (vect_gen_prolog_loop_niters): Likewise.
10968         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10970 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10972         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10973         to a vec<stmt_vec_info>.
10974         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10975         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10976         vec<stmt_vec_info>.
10977         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10978         to a vec<stmt_vec_info>.
10979         (bst_traits::value_type, bst_traits::value_type): Likewise.
10980         (bst_traits::hash): Update accordingly.
10981         (vect_get_and_check_slp_defs): Change the stmts parameter from
10982         a vec<gimple *> to a vec<stmt_vec_info>.
10983         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10984         (vect_build_slp_tree): Likewise.
10985         (vect_build_slp_tree_2): Likewise.  Update uses of
10986         SLP_TREE_SCALAR_STMTS.
10987         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10988         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10989         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10990         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10991         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10992         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10993         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10994         (vect_get_constant_vectors, vect_get_slp_defs)
10995         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10996         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10997         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10998         instead of gimple stmts.
10999         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11000         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11001         (vect_slp_analyze_instance_dependence): Update uses of
11002         SLP_TREE_SCALAR_STMTS.
11003         (vect_slp_analyze_and_verify_node_alignment): Likewise.
11004         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11005         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11006         (get_initial_defs_for_reduction): Likewise.
11007         (vect_create_epilog_for_reduction): Likewise.
11008         (vectorize_fold_left_reduction): Likewise.
11009         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11010         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11011         (can_vectorize_live_stmts): Likewise.
11013 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11015         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11016         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11017         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11018         than gimple stmts.
11019         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11020         of a gimple stmt.
11021         (gather_scalar_reductions): Update after above interface changes.
11022         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11023         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11024         than gimple stmts.
11025         (vect_force_simple_reduction): Likewise.
11026         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11027         LOOP_VINFO_REDUCTIONS.
11028         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11030 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11032         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11033         a gimple stmt to a stmt_vec_info.
11034         * tree-vect-loop.c (vect_active_double_reduction_p)
11035         (vect_force_simple_reduction, vectorizable_reduction): Update
11036         accordingly.
11038 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11040         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11041         vec<gimple *> to a vec<stmt_vec_info>.
11042         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11043         the reduction_phis argument from a vec<gimple *> to a
11044         vec<stmt_vec_info>.
11045         (vectorizable_reduction): Likewise the phis local variable that
11046         is passed to vect_create_epilog_for_reduction.  Update for new type
11047         of SLP_TREE_VEC_STMTS.
11048         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11049         (vectorizable_live_operation): Likewise.
11050         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11051         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11053 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11055         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11056         a gimple stmt to a stmt_vec_info.
11057         (vectorizable_condition, vectorizable_live_operation)
11058         (vectorizable_reduction, vectorizable_induction): Pass back the
11059         vectorized statement as a stmt_vec_info.
11060         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11061         use of STMT_VINFO_VEC_STMT.
11062         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11063         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11064         as stmt_vec_infos rather than gimple stmts.
11065         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11066         to a stmt_vec_info.
11067         (vectorizable_live_operation): Likewise.
11068         (vectorizable_reduction, vectorizable_induction): Likewise,
11069         updating use of STMT_VINFO_VEC_STMT.
11070         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11071         of STMT_VINFO_VEC_STMT.
11072         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11073         (vectorizable_simd_clone_call, vectorizable_conversion)
11074         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11075         (vectorizable_store, vectorizable_load, vectorizable_condition)
11076         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11077         from a gimple stmt to a stmt_vec_info.
11078         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
11079         pointer to a stmt_vec_info to the vectorizable_* routines.
11081 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11083         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11084         a gimple stmt to a stmt_vec_info.
11085         (is_pattern_stmt_p): Update accordingly.
11086         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11087         (vect_record_grouped_load_vectors): Likewise.
11088         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11089         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11090         (vect_model_reduction_cost): Likewise.
11091         (vect_create_epilog_for_reduction): Likewise.
11092         (vectorizable_reduction, vectorizable_induction): Likewise.
11093         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11094         Return the stmt_vec_info for the pattern statement.
11095         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11096         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11097         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11098         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11099         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11100         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11101         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11102         (free_stmt_vec_info, vect_is_simple_use): Likewise.
11104 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11106         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11107         (vect_finish_stmt_generation): Likewise.
11108         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11109         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11110         (vect_build_gather_load_calls): Use the return value of the above
11111         functions instead of a separate call to vinfo_for_stmt.  Use narrow
11112         scopes for the input gimple stmt and wider scopes for the associated
11113         stmt_vec_info.  Use vec_info::lookup_def when setting these
11114         stmt_vec_infos from an SSA_NAME definition.
11115         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11116         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11117         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11118         (vectorizable_store, vectorizable_load, vectorizable_condition)
11119         (vectorizable_comparison): Likewise.
11120         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11121         (vectorizable_reduction): Likewise.
11123 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11125         * tree-vectorizer.h (vect_is_simple_use): Add an optional
11126         stmt_vec_info * parameter before the optional gimple **.
11127         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11128         (process_use, vect_get_vec_def_for_operand_1): Update callers.
11129         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11130         * tree-vect-loop.c (vectorizable_reduction): Likewise.
11131         (vectorizable_live_operation): Likewise.
11132         * tree-vect-patterns.c (type_conversion_p): Likewise.
11133         (vect_look_through_possible_promotion): Likewise.
11134         (vect_recog_rotate_pattern): Likewise.
11135         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11137 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11139         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11140         a typedef to a wrapper class.
11141         (NULL_STMT_VEC_INFO): New macro.
11142         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11143         (stmt_vec_info::operator*): New function.
11144         (stmt_vec_info::operator gimple *): Likewise.
11145         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11146         (add_stmt_costs): Likewise.
11147         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11148         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11149         (vect_get_known_peeling_cost): Likewise.
11150         (vect_estimate_min_profitable_iters): Likewise.
11151         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11152         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11153         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11154         (vectorizable_store, free_stmt_vec_infos): Likewise.
11155         (new_stmt_vec_info): Change return type of xcalloc to
11156         _stmt_vec_info *.
11158 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11160         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11161         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11162         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11163         a single_imm_use-based sequence.
11164         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11166 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11168         * tree-vectorizer.h (vec_info::lookup_def): Declare.
11169         * tree-vectorizer.c (vec_info::lookup_def): New function.
11170         * tree-vect-patterns.c (vect_get_internal_def): Use it.
11171         (vect_widened_op_tree): Likewise.
11172         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11173         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11174         (vectorizable_reduction): Likewise.
11175         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11176         of a gimple *.
11177         (vect_is_slp_reduction): Update calls accordingly.  Use
11178         vec_info::lookup_def.
11179         (vect_is_simple_reduction): Likewise
11180         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11182 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11184         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11185         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11186         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11187         of vinfo_for_stmt.
11188         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11189         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11190         (vect_update_vf_for_slp, vect_analyze_loop_operations)
11191         (vect_is_slp_reduction, vectorizable_induction)
11192         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11193         * tree-vect-patterns.c (vect_init_pattern_stmt):
11194         (vect_determine_min_output_precision_1, vect_determine_precisions)
11195         (vect_pattern_recog): Likewise.
11196         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11197         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11198         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11199         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11200         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11201         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
11202         info field from a loop to a loop_vec_info.
11204 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11206         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11207         (vec_info::add_stmt): Declare.
11208         * tree-vectorizer.c (vec_info::add_stmt): New function.
11209         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11210         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11211         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11212         (vectorizable_induction): Likewise.
11213         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11214         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11215         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11216         (vectorizable_load): Likewise.
11217         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11218         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11219         (vect_recog_gather_scatter_pattern): Likewise.
11220         (append_pattern_def_seq): Likewise.  Remove a check that is
11221         performed by add_stmt itself.
11223 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11225         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11226         which make_ssa_name was called with new_stmt before new_stmt
11227         had been created.
11229 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11231         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11232         split out from...
11233         (vect_is_slp_reduction): ...here...
11234         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
11235         that are already known to be false.
11237 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11239         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11240         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
11241         STMT_VINFO_NUM_SLP_USES when it's true.
11242         (vect_free_slp_instance): Add a final_p parameter and pass it to
11243         vect_free_slp_tree.
11244         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11245         (vect_analyze_slp_instance): Likewise.
11246         (vect_slp_analyze_operations): Likewise.
11247         (vect_slp_analyze_bb_1): Likewise.
11248         * tree-vectorizer.c (vec_info): Likewise.
11249         * tree-vect-loop.c (vect_transform_loop): Likewise.
11251 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11253         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11254         function is not called for second and subsequent members of
11255         a reduction group.
11257 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11259         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11260         cases for nested loops from here to ...
11261         (vect_create_epilog_for_reduction): ...here.  Only call
11262         vect_is_simple_use for inner-loop reductions.
11264 2018-07-31  Martin Liska  <mliska@suse.cz>
11266         PR gcov-profile/85338
11267         PR gcov-profile/85350
11268         PR gcov-profile/85372
11269         * profile.c (struct location_triplet): New.
11270         (struct location_triplet_hash): Likewise.
11271         (output_location): Do not output a BB that
11272         is already recorded for a line.
11273         (branch_prob): Use streamed_locations.
11275 2018-07-31  Martin Liska  <mliska@suse.cz>
11277         PR gcov-profile/85370
11278         * coverage.c (coverage_begin_function): Do not mark target
11279         clones as artificial functions.
11281 2018-07-31  Martin Liska  <mliska@suse.cz>
11283         PR gcov-profile/83813
11284         PR gcov-profile/84758
11285         PR gcov-profile/85217
11286         PR gcov-profile/85332
11287         * profile.c (branch_prob): Do not record GOTO expressions
11288         for GIMPLE statements which locations are already streamed.
11290 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11292         * gcc.c (handle_spec_function): Accept a soft_matched_part
11293         argument, as do_spec_1.  Pass it down to ...
11294         (eval_spec_function): Accept a soft_matched_part argument,
11295         and pass it down to ...
11296         (do_spec_2): Accept a soft_matched_part argument, and pass
11297         it down to do_spec_1.
11298         (do_spec_1): Pass soft_matched_part to handle_spec_function.
11299         (handle_braces): Update call to handle_spec_function.
11300         (driver::set_up_specs): Update calls to do_spec_2.
11301         (compare_debug_dump_opt_spec_function): Likewise.
11302         (compare_debug_self_opt_spec_function): Likewise.
11304 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11306         * common.opt (nolibc): New option.
11307         * doc/invoke.texi (Link Options): Document it.
11308         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11309         * config/alpha/linux.h: Likewise.
11310         * config/arc/elf.h: Likewise.
11311         * config/arm/uclinux-elf.h: Likewise.
11312         * config/arm/unknown-elf.h: Likewise.
11313         * config/avr/avrlibc.h: Likewise.
11314         * config/bfin/bfin.h: Likewise.
11315         * config/bfin/linux.h: Likewise.
11316         * config/bfin/uclinux.h: Likewise.
11317         * config/darwin.h: Likewise.
11318         * config/darwin10.h: Likewise.
11319         * config/darwin12.h: Likewise.
11320         * config/gnu-user.h: Likewise.
11321         * config/lm32/uclinux-elf.h: Likewise.
11322         * config/pa/pa-hpux11.h: Likewise.
11323         * config/pa/pa64-hpux.h: Likewise.
11324         * config/sparc/sparc.h: Likewise.
11326 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11328         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11329         undefined variables.
11331 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11333         PR target/86640
11334         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11335         instead of GEN_INT.
11337 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11339         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11340         terminated string literal.
11342 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11344         PR rtl-optimization/85160
11345         * combine.c (is_just_move): New function.
11346         (try_combine): Allow combining two instructions into two if neither of
11347         the original instructions was a move.
11349 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
11351         PR target/86673
11352         * doc/extend.texi (Global Register Variables): Discourage use of type
11353         qualifiers.
11354         (Local Register Variables): Likewise.
11356 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
11358         PR tree-optimization/86506
11359         * hwint.h (ceil_log2): Resync with hwint.c implementation.
11361 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
11363         PR target/86547
11364         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11365         hard_regno, make sure no insn between `from` and `to` clobbers it.
11367 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
11368             Tom de Vries  <tdevries@suse.de>
11370         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11371         (PTX_DEFAULT_RUNTIME_DIM): ... this.
11372         (nvptx_goacc_validate_dims): Set default worker and gang dims to
11373         PTX_DEFAULT_RUNTIME_DIM.
11374         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11376 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
11378         * config/pa/pa.c (pa_output_addr_vec): Align address table.
11379         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11380         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11382 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
11384         * config/rs6000/constraints.md (wG constraint): Delete, no longer
11385         used.
11386         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11387         predicate to reflect toc fusion has been deleted.
11388         (toc_fusion_mem_raw): Delete, no longer used.
11389         (toc_fusion_mem_wrapped): Likewise.
11390         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11391         fusion mask bit.
11392         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11393         Delete, no longer used.
11394         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11395         meant to be used for toc fusion.
11396         (rs6000_debug_print_mode): Delete toc fusion debugging.
11397         (rs6000_debug_reg_global): Likewise.
11398         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11399         fusion and secondary reload support that were never used.
11400         (rs6000_option_override_internal): Delete TOC fusion, that was only
11401         partially defined, and it did not work unless you also used the
11402         -mcmodel= switch.
11403         (rs6000_legitimate_address_p): Delete TOC fusion support.
11404         (rs6000_opt_masks): Likewise.
11405         (fusion_wrap_memory_address): Delete function, no longer used.
11406         (fusion_split_address); Delete TOC fusion support.
11407         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11408         longer used with toc fusion being deleted.
11409         (TARGET_TOC_FUSION_FP): Likewise.
11410         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11411         UNSPEC.
11412         (toc fusion spliter): Delete TOC fusion support.
11413         (toc_fusionload_<mode>): Likewise.
11414         (toc_fusionload_di): Likewise.
11415         (fusion_gpr_load_<mode>): Delete generator function, this insn no
11416         longer needs to be named.  Rename predicate to delete TOC fusion.
11417         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11418         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11419         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11420         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11421         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11423 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11425         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11426         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
11427         __int128 in built-in function prototypes.
11428         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11429         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11431 2018-07-27  Martin Sebor  <msebor@redhat.com>
11433         PR tree-optimization/86696
11434         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11435         types, including enums.
11436         (handle_char_store): Be prepared for the above function to fail.
11438 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
11440         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11441         when optimization level is lower than 2 or optimize for size.
11443 2018-07-26  Martin Sebor  <msebor@redhat.com>
11445         PR tree-optimization/86043
11446         PR tree-optimization/86042
11447         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11448         (get_string_cst_length): Rename...
11449         (get_min_string_length): ...to this.  Add argument.
11450         (handle_char_store): Extend to handle multi-character stores by
11451         MEM_REF.
11452         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
11453         * tree.h (initializer_zerop): Add argument.
11455 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
11457         PR middle-end/86660
11458         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11459         declare target to variables if they have always,{to,from,tofrom} map
11460         kinds.
11462 2018-07-26  Martin Liska  <mliska@suse.cz>
11464         PR lto/86548
11465         * lto-wrapper.c: Add linker_output as prefix
11466         for ltrans_output_file.
11468 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
11470         PR rtl-optimization/85805
11471         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11472         value for hard registers if that was written in the same mode.
11474 2018-07-26  Martin Liska  <mliska@suse.cz>
11476         PR gcov-profile/86536
11477         * gcov.c (format_gcov): Use printf format %.*f directly
11478         and do not handle special values.
11480 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11482         * common/config/arc/arc-common.c (arc_option_optimization_table):
11483         Update default optimizations for size.
11485 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11487         * config/arc/arc.md (movsf_insn): Add short instruction selection.
11488         * config/arc/constraints.md (CfZ): New constraint.
11489         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11490         (subsf3_fpu): Likewise.
11491         (cmpsf_fpu): Likewise.
11492         (cmpsf_fpu_uneq): Likewise.
11494 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11496         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11497         accesses as well.
11498         (arc_is_uncached_mem_p): uncached applies to both the variable and
11499         the pointer.
11501 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11503         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11504         register names.
11506 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
11508         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11509         field "m_scopes" from vec to auto_vec.
11511 2018-07-25  Martin Liska  <mliska@suse.cz>
11513         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11514         return type.
11516 2018-07-25  Richard Biener  <rguenther@suse.de>
11518         PR debug/86654
11519         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11520         special wrt context_die late.
11521         (gen_subprogram_die): Re-use DIEs in local scope.
11523 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
11525         PR tree-optimization/86644
11526         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
11528 2018-07-25  Martin Liska  <mliska@suse.cz>
11530         PR middle-end/86645
11531         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11532         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11534 2018-07-25  Martin Liska  <mliska@suse.cz>
11536         PR sanitizer/79635
11537         * params.def: Explain ASan abbreviation and provide
11538         a documentation link.
11540 2018-07-24  Martin Sebor  <msebor@redhat.com>
11542         PR tree-optimization/86622
11543         PR tree-optimization/86532
11544         * builtins.h (string_length): Declare.
11545         * builtins.c (c_strlen): Correct handling of non-constant offsets.
11546         (check_access): Be prepared for non-constant length ranges.
11547         (string_length): Make extern.
11548         * expr.c (string_constant): Only handle the minor non-constant
11549         array index.  Use string_constant to compute the length of
11550         a generic string constant.
11552 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
11554         PR tree-optimization/86618
11555         * tree-vect-stmts.c (vectorizable_call): Don't take the address
11556         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11558 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
11560         PR tree-optimization/86636
11561         * json.cc (json::object::set): Fix comment.  Add assertions.
11562         (json::array::append): Move here from json.h.  Add comment and an
11563         assertion.
11564         (json::string::string): Likewise.
11565         * json.h (json::array::append): Move to json.cc.
11566         (json::string::string): Likewise.
11567         * optinfo-emit-json.cc
11568         (optrecord_json_writer::impl_location_to_json): Assert that we
11569         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11570         wrapper around it.  Expand the location once, rather than three
11571         times.
11572         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11573         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11574         wrappers.
11575         (optrecord_json_writer::optinfo_to_json): Likewise, in four
11576         places.  Fix some overlong lines.
11578 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
11580         * config/aarch64/aarch64-simd.md
11581         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11582         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11583         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11584         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11585         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11586         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11587         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11588         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11589         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11591 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
11593         PR middle-end/86627
11594         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11595         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
11596         and abs_d == d, do the power of two handling if profitable.
11598 2018-07-24  Richard Biener  <rguenther@suse.de>
11600         * match.pd: Add BIT_FIELD_REF canonicalizations.
11602 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11604         PR c/86617
11605         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11607 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11609         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11610         terminated STRING_CST object.
11612 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11614         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11616 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11618         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11619         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11620         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11621         the elements into a register.
11622         (rs6000_split_v4si_init_di_reg): Delete.
11623         (rs6000_split_v4si_init): Delete.
11624         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11625         (vsx_init_v4si): Rewrite as a define_expand.
11627 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11629         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11630         zero_extend argument from memory): New.
11632 2018-07-22  Martin Sebor  <msebor@redhat.com>
11634         PR bootstrap/86621
11635         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11636         diagnosing calls with unknown arguments unless -Walloca-larger-than
11637         is restricted to less than PTRDIFF_MAX bytes.
11639 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
11641         * doc/gcov.texi (Invoking Gcov): Editorial changes.
11643 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11645         * pretty-print.c (text_info::set_location): Remove redundant
11646         "line_table" parameter from call to rich_location::set_range.
11648 2018-07-20  Martin Sebor  <msebor@redhat.com>
11650         PR middle-end/82063
11651         * builtins.c (expand_builtin_alloca): Adjust.
11652         * calls.c (alloc_max_size): Simplify.
11653         * cgraphunit.c (cgraph_node::expand): Adjust.
11654         * common.opt (larger_than_size, warn_frame_larger_than): Remove
11655         variables.
11656         (frame_larger_than_size): Same.
11657         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11658         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11659         Initialize.
11660         * doc/invoke.texi (GCC Command Options): Document option arguments.
11661         Explain byte-size arguments and suffixes.
11662         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11663         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11664         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11665         * doc/options.texi (UInteger): Expand.
11666         (Host_Wide_Int, ByteSize): Document new properties.
11667         * final.c (final_start_function_1): Include sizes in an error message.
11668         * function.c (frame_offset_overflow): Same.
11669         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11670         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11671         Diagnose unbounded alloca calls only for limits of less than
11672         PTRDIFF_MAX.
11673         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
11674         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
11675         for alloca(0).
11676         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
11677         only for limits of less than PTRDIFF_MAX.
11678         * langhooks-def.h (lhd_handle_option): Change function argument
11679         to HOST_WIDE_INT.
11680         * langhooks.c (lhd_handle_option): Same.
11681         * langhooks.h (handle_option): Same.
11682         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11683         ByteSize flags.
11684         (var_type, var_type_struct): Same.
11685         (var_set): Handle ByteSize flag.
11686         * optc-gen.awk: Add comments to output to ease debugging.  Make
11687         use of HOST_WIDE_INT where appropriate.
11688         * opts-gen-save.awk:  Use %lx to format unsigned long.
11689         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11690         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11691         arguments.  Parse bytes-size suffixes.
11692         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11693         (enum_value_to_arg): Same.
11694         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
11695         (handle_option): Adjust.
11696         (generate_option): Change function argument to HOST_WIDE_INT.
11697         (cmdline_handle_error): Adjust.
11698         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11699         (set_option): Change function argument to HOST_WIDE_INT.
11700         (option_enabled): Handle cl_host_wide_int.
11701         (get_option_state): Handle CLVC_SIZE.
11702         (control_warning_option): Same.
11703         * opts.c (common_handle_option): Change function argument to
11704         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
11705         OPT_Wvla_larger_than_.
11706         * opts.h (enum cl_var_type): Add an enumerator.
11707         * stor-layout.c (layout_decl): Print a more meaningful warning.
11708         * toplev.c (output_stack_usage): Adjust.
11710 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
11712         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11713         call to inline_expand_builtin_string_cmp.
11714         (expand_builtin_strcmp): Likewise.
11715         (expand_builtin_strncmp): Likewise.
11716         (inline_string_cmp): Delete the last parameter, change char_type_node
11717         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11718         two operands.
11719         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11720         the inlining expansion on target where the type of the call has same or
11721         narrower precision than unsigned char.
11723 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11725         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11726         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11727         * common.opt (fsave-optimization-record): New option.
11728         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11729         * doc/invoke.texi (-fsave-optimization-record): New option.
11730         * dumpfile.c: Include "optinfo-emit-json.h".
11731         (struct kv_pair): Move to coretypes.h.
11732         (optgroup_options): Make non-static.
11733         (dump_context::end_scope): Call
11734         optimization_records_maybe_pop_dump_scope.
11735         * dumpfile.h (optgroup_options): New decl.
11736         * json.cc: New file.
11737         * json.h: New file.
11738         * optinfo-emit-json.cc: New file.
11739         * optinfo-emit-json.h: New file.
11740         * optinfo.cc: Include "optinfo-emit-json.h".
11741         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11742         (optinfo_enabled_p): Check optimization_records_enabled_p.
11743         (optinfo_wants_inlining_info_p): Likewise.
11744         * optinfo.h: Update comment.
11745         * profile-count.c (profile_quality_as_string): New function.
11746         * profile-count.h (profile_quality_as_string): New decl.
11747         (profile_count::quality): New accessor.
11748         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11749         and optinfo_emit_json_cc_tests.
11750         * selftest.h (selftest::json_cc_tests): New decl.
11751         (selftest::optinfo_emit_json_cc_tests): New decl.
11752         * toplev.c: Include "optinfo-emit-json.h".
11753         (compile_file): Call optimization_records_finish.
11754         (do_compile): Call optimization_records_start.
11755         * tree-ssa-live.c: Include optinfo.h.
11756         (remove_unused_scope_block_p): Retain inlining information if
11757         optinfo_wants_inlining_info_p returns true.
11759 2018-07-20  Richard Biener  <rguenther@suse.de>
11761         PR debug/86585
11762         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11763         to cover -flto-partition=none.
11765 2018-07-20  Martin Liska  <mliska@suse.cz>
11767         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11768         (get_decl_source_range): Remove unused function.
11770 2018-07-20  Richard Biener  <rguenther@suse.de>
11772         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11773         (struct vn_phi_s): Likewise.
11774         (struct vn_reference_s): Likewise.
11775         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11776         for searching the slot of an entry known to be in the hash itself.
11777         (vn_phi_hasher::equal): Likewise.
11778         (vn_reference_hasher::equal): Likewise.
11779         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11780         globals.
11781         (optimistic_info, current_info): Remove, keeping only valid_info.
11782         (vn_reference_lookup_1): Remove fallback lookup.
11783         (vn_reference_lookup_2): Likewise.
11784         (vn_nary_op_lookup_1): Likewise.
11785         (vn_phi_lookup): Likewise.
11786         (vn_nary_build_or_lookup_1): Make sure to not chain the built
11787         hash element.
11788         (vn_reference_insert): Adjust, chain the inserted hash element
11789         at last_inserted_ref.
11790         (vn_reference_insert_pieces): Likewise.
11791         (visit_reference_op_call): Likewise.
11792         (vn_nary_op_insert_into): Chain the inserted hash element at
11793         last_inserted_nary.
11794         (vn_nary_op_insert_pieces): Adjust.
11795         (vn_nary_op_insert): Likewise.
11796         (vn_nary_op_insert_stmt): Likewise.
11797         (vn_phi_insert): Adjust, chain the inserted hash element at
11798         last_inserted_phi.
11799         (process_scc): Remove clearing and copying the optimistic
11800         table.  Instead remove elements inserted during an optimistic
11801         iteration from the single table we maintain.
11802         (init_scc_vn): Adjust.
11803         (free_scc_vn): Likewise.
11804         (sccvn_dom_walker::record_cond): Likewise.
11805         (sccvn_dom_walker::after_dom_children): Likewise.
11807 2018-07-19  Martin Sebor  <msebor@redhat.com>
11809         PR tree-optimization/84047
11810         PR tree-optimization/83776
11811         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11812         (check_array_bounds): Call it.
11814 2018-07-19  Martin Sebor  <msebor@redhat.com>
11816         * align.h (align_flags): Use member initialization.
11818 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
11820         * Makefile.in (OBJS): Add optinfo.o.
11821         * coretypes.h (class symtab_node): New forward decl.
11822         (struct cgraph_node): New forward decl.
11823         (class varpool_node): New forward decl.
11824         * dump-context.h: New file.
11825         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11826         "tree-pass.h".
11827         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11828         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11829         (set_alt_dump_file): Likewise.
11830         (dump_context::~dump_context): New dtor.
11831         (dump_gimple_stmt): Move implementation to...
11832         (dump_context::dump_gimple_stmt): ...this new member function.
11833         Add the stmt to any pending optinfo, creating one if need be.
11834         (dump_gimple_stmt_loc): Move implementation to...
11835         (dump_context::dump_gimple_stmt_loc): ...this new member function.
11836         Start a new optinfo and add the stmt to it.
11837         (dump_gimple_expr): Move implementation to...
11838         (dump_context::dump_gimple_expr): ...this new member function.
11839         Add the stmt to any pending optinfo, creating one if need be.
11840         (dump_gimple_expr_loc): Move implementation to...
11841         (dump_context::dump_gimple_expr_loc): ...this new member function.
11842         Start a new optinfo and add the stmt to it.
11843         (dump_generic_expr): Move implementation to...
11844         (dump_context::dump_generic_expr): ...this new member function.
11845         Add the tree to any pending optinfo, creating one if need be.
11846         (dump_generic_expr_loc): Move implementation to...
11847         (dump_context::dump_generic_expr_loc): ...this new member
11848         function.  Add the tree to any pending optinfo, creating one if
11849         need be.
11850         (dump_printf): Move implementation to...
11851         (dump_context::dump_printf_va): ...this new member function.  Add
11852         the text to any pending optinfo, creating one if need be.
11853         (dump_printf_loc): Move implementation to...
11854         (dump_context::dump_printf_loc_va): ...this new member function.
11855         Start a new optinfo and add the stmt to it.
11856         (dump_dec): Move implementation to...
11857         (dump_context::dump_dec): ...this new member function.  Add the
11858         value to any pending optinfo, creating one if need be.
11859         (dump_context::dump_symtab_node): New member function.
11860         (dump_context::get_scope_depth): New member function.
11861         (dump_context::begin_scope): New member function.
11862         (dump_context::end_scope): New member function.
11863         (dump_context::ensure_pending_optinfo): New member function.
11864         (dump_context::begin_next_optinfo): New member function.
11865         (dump_context::end_any_optinfo): New member function.
11866         (dump_context::s_current): New global.
11867         (dump_context::s_default): New global.
11868         (dump_scope_depth): Delete global.
11869         (dumpfile_ensure_any_optinfo_are_flushed): New function.
11870         (dump_symtab_node): New function.
11871         (get_dump_scope_depth): Reimplement in terms of dump_context.
11872         (dump_begin_scope): Likewise.
11873         (dump_end_scope): Likewise.
11874         (selftest::temp_dump_context::temp_dump_context): New ctor.
11875         (selftest::temp_dump_context::~temp_dump_context): New dtor.
11876         (selftest::verify_item): New function.
11877         (ASSERT_IS_TEXT): New macro.
11878         (ASSERT_IS_TREE): New macro.
11879         (ASSERT_IS_GIMPLE): New macro.
11880         (selftest::test_capture_of_dump_calls): New test.
11881         (selftest::dumpfile_c_tests): Call it.
11882         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11883         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11884         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11885         descriptive comment.
11886         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11887         (dump_node, dump_bb): Move these unrelated decls.
11888         (class dump_manager): Add leading comment.
11889         * optinfo.cc: New file.
11890         * optinfo.h: New file.
11892 2018-07-19  Michael Collison  <michael.collison@arm.com>
11893             Richard Henderson <rth@redhat.com>
11895         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11896         (subti): Handle op1 zero.
11897         (subvti4, usub4ti4): New.
11898         (*sub<GPI>3_compare1_imm): New.
11899         (sub<GPI>3_carryinCV): New.
11900         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11901         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11903 2018-07-19  Michael Collison  <michael.collison@arm.com>
11904             Richard Henderson <rth@redhat.com>
11906         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11907         (addti3): Create simpler code if low part is already known to be 0.
11908         (addvti4, uaddvti4): New.
11909         (*add<GPI>3_compareC_cconly_imm): New.
11910         (*add<GPI>3_compareC_cconly): New.
11911         (*add<GPI>3_compareC_imm): New.
11912         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11913         handle constants within this pattern..
11914         (*add<GPI>3_compareV_cconly_imm): New.
11915         (*add<GPI>3_compareV_cconly): New.
11916         (*add<GPI>3_compareV_imm): New.
11917         (add<GPI>3_compareV): New.
11918         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11919         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11920         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11921         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11922         with 'comparison' operator.
11923         (*add<GPI>3_compareV_cconly_imm): Ditto.
11924         (*add<GPI>3_compareV_cconly): Ditto.
11925         (*add<GPI>3_compareV_imm): Ditto.
11926         (add<GPI>3_compareV): Ditto.
11927         (add<mode>3_carryinC): Ditto.
11928         (*add<mode>3_carryinC_zero): Ditto.
11929         (*add<mode>3_carryinC): Ditto.
11930         (add<mode>3_carryinV): Ditto.
11931         (*add<mode>3_carryinV_zero): Ditto.
11932         (*add<mode>3_carryinV): Ditto.
11934 2018-07-19  Michael Collison  <michael.collison@arm.com>
11935             Richard Henderson <rth@redhat.com>
11937         * config/aarch64/aarch64-modes.def (CC_V): New.
11938         * config/aarch64/aarch64-protos.h
11939         (aarch64_addti_scratch_regs): Declare
11940         (aarch64_subvti_scratch_regs): Declare.
11941         (aarch64_expand_subvti): Declare.
11942         (aarch64_gen_unlikely_cbranch): Declare
11943         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11944         for signed overflow using CC_Vmode.
11945         (aarch64_get_condition_code_1): Handle CC_Vmode.
11946         (aarch64_gen_unlikely_cbranch): New function.
11947         (aarch64_addti_scratch_regs): New function.
11948         (aarch64_subvti_scratch_regs): New function.
11949         (aarch64_expand_subvti): New function.
11951 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11953         * config/aarch64/aarch64-option-extensions.def: New entry for profile
11954         extension.
11955         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11956         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11957         extension.
11959 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11961         PR target/83009
11962         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11963         address check not strict.
11965 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11967         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11968         Umq with Umn.
11969         (store_pair_lanes<mode>): Likewise.
11970         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11971         enum value 'ADDR_QUERY_LDP_STP_N'.
11972         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11973         (aarch64_print_address_internal): Add declaration.
11974         (aarch64_print_ldpstp_address): Remove.
11975         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11976         (aarch64_print_operand): Change printing of 'y'.
11977         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11978         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11979         'true' rather than '1'.
11980         * config/aarch64/constraints.md (Uml): Likewise.
11981         (Uml): Rename to Umn.
11982         (Umq): Remove.
11984 2018-07-19  Richard Biener  <rguenther@suse.de>
11986         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11987         a trailing array.
11988         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11989         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11990         (vn_reference_hasher): Likewise.
11991         (struct vn_tables_s): Remove obstack and alloc-pool members.
11992         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11993         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11994         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11995         (vn_reference_insert_pieces): Likewise.
11996         (alloc_vn_nary_op_noinit): Adjust.
11997         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11998         (vn_phi_eq): Adjust.
11999         (shared_lookup_phiargs): Remove.
12000         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12001         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12002         (visit_reference_op_call): Likewise.
12003         (copy_nary, copy_phi, copy_reference): Remove.
12004         (process_scc): Rewind the obstack when iterating.  Do not
12005         copy the elements to valid_info but just move them from one
12006         hashtable to the other.
12007         (allocate_vn_table): Adjust.
12008         (free_vn_table): Likewise.
12009         (init_scc_vn): Likewise.
12010         (free_scc_vn): Likewise.
12012 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
12014         PR target/86560
12015         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12016         indirect_return as function type attribute.
12017         (ix86_attribute_table): Change indirect_return to function
12018         type attribute.
12019         * doc/extend.texi: Update indirect_return attribute.
12021 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
12023         * wide-int.h (widest2_int): New.
12024         * gimple-fold.c (arith_overflowed_p): Use it.
12025         * tree.h (widest2_int_cst): New.
12026         * tree-vrp.c (wide_int_binop_overflow): Rename from
12027         vrp_int_const_binop.
12028         Rewrite to work on trees.
12029         (extract_range_from_multiplicative_op_1): Abstract code to...
12030         (wide_int_range_min_max): ...here.
12031         (wide_int_range_cross_product): ...and here.
12032         (extract_range_from_binary_expr_1): Abstract overflow code to...
12033         (wide_int_range_mult_wrapping): ...here.
12034         * tree-vrp.h (wide_int_range_cross_product): New.
12035         (wide_int_range_mult_wrapping): New.
12037 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
12038             Julia Koval  <julia.koval@intel.com>
12040         * config/i386/x86-tune-costs.h (skylake_memcpy,
12041         skylake_memset): Replace rep_prefix with unrolling for size 512.
12043 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
12045         PR middle-end/86544
12046         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12047         comparision with EQ_EXPR in last stmt.
12049 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12051         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12052         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12053         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12054         previously known as "PowerPC AltiVec Built-in Functions".  Move
12055         some material to new subsubsections "PowerPC AltiVec Built-in
12056         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12057         ISA 2.07".
12058         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12059         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12060         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12061         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12063 2018-07-18  Richard Biener  <rguenther@suse.de>
12065         PR tree-optimization/86557
12066         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12067         EXACT_DIV_EXPR.
12069 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
12071         * config/s390/s390.c (s390_function_profiler): Generate CFI.
12073 2018-07-17  Jeff Law  <law@redhat.com>
12075         * config/arm/arm.c (get_label_padding): Update for recent
12076         changes to label_to_alignment.
12078         PR tree-optimization/86010
12079         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12081         * config/mips/mips.c (vr4130_align_insns): Update for recent
12082         changes to label_to_alignment.
12084         * config/frv/frv.c (frv_label_align): Update for recent changes
12085         to label_to_alignment.
12087         * config/nios2/nios2.c (nios2_label_align): Update for recent
12088         changes which dropped ALIGN_LABELS_LOG.
12090 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
12092         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12093         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12095 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12097         * config/arc/arc.c (arc_label_align): Use align_labels instead of
12098         deprecated align_labels_log.
12100 2018-07-17  Richard Biener  <rguenther@suse.de>
12102         PR lto/86456
12103         * dwarf2out.c (init_sections_and_labels): Always generate
12104         a debug_line_str_section for early LTO debug.
12105         (dwarf2out_finish): Reset debug_line_str_hash output early.
12106         Bump counter for extra dwarf5 .debug_loc labels to not conflict
12107         with fat LTO part.
12108         (dwarf2out_early_finish): Output debug_line_str.
12110 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
12112         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12113         index register on z196 or later.
12115 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
12117         * config/s390/s390.c (s390_default_align): Set default function
12118         alignment to 16.
12119         (s390_override_options_after_change): Call s390_default align.
12120         (s390_option_override_internal): Call s390_default_align.
12121         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12123 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
12125         PR middle-end/86542
12126         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12127         to _looptemp_ clauses, other than the first two.
12129 2018-07-17  Martin Liska  <mliska@suse.cz>
12131         * opts.c: Do not enable OPT_falign_* for -Os.
12133 2018-07-17  Martin Liska  <mliska@suse.cz>
12135         * align.h (MAX_CODE_ALIGN): New.
12136         (MAX_CODE_ALIGN_VALUE): New.
12137         * common/config/i386/i386-common.c (ix86_handle_option):
12138         (MAX_CODE_ALIGN): Moved to align.h.
12139         * final.c (MAX_CODE_ALIGN): Likewise.
12140         * opts.c (parse_and_check_align_values):
12141         (MAX_CODE_ALIGN): Likewise.
12142         (MAX_CODE_ALIGN_VALUE): Likewise.
12144 2018-07-17  Martin Liska  <mliska@suse.cz>
12146         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12147         in order to fulfil coding style.
12148         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12149         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12150         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12151         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12152         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12153         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12154         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12155         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12156         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12158 2018-07-17  Martin Liska  <mliska@suse.cz>
12160         * align.h: New file.
12161         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12162         directly.
12163         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12164         align_flags of label_to_alignment.
12165         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12166         align_flags class.
12167         * config/m68k/m68k.c: Do not use removed align_labels_value and
12168         align_loops_value.
12169         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12170         (LOOP_ALIGN): Likewise.
12171         (LABEL_ALIGN): Likewise.
12172         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12173         Remove not used macro.
12174         (rs6000_loop_align): Change return type to align_flags.
12175         (rs6000_loop_align_max_skip): Remove.
12176         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12177         Change return type to align_flags.
12178         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12179         Remove not used macro.
12180         (rs6000_loop_align):  Change return type to align_flags.
12181         (rs6000_loop_align_max_skip): Remove.
12182         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12183         * config/rx/rx-protos.h (rx_align_for_label): Make it
12184         static function.
12185         * config/rx/rx.c (rx_align_for_label): Change return type
12186         to align_flags.
12187         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12188         macro definitions.
12189         into align_flags class.
12190         (LABEL_ALIGN): Likewise.
12191         (LOOP_ALIGN): Likewise.
12192         * config/s390/s390.c (s390_label_align): Use align_flags
12193         class member.
12194         (s390_asm_output_function_label): Likewise.
12195         * config/sh/sh.c (sh_override_options_after_change):
12196         Use align_flags class directly without macros.
12197         (find_barrier): Likewise.
12198         (barrier_align): Likewise.
12199         (sh_loop_align): Likewise.
12200         * config/spu/spu.c (spu_option_override):
12201         Use align_flags_tuple::get_value instead of removed macros.
12202         (spu_sched_init): Likewise.
12203         * config/spu/spu.h (GTY): Likewise.
12204         * config/visium/visium.c (visium_option_override):
12205         Set "8" as default secondary alignment.
12206         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12207         in order to guarantee secondary alignment of 8.
12208         * coretypes.h: Include align.h header file.
12209         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12210         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12211         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12212         * doc/tm.texi.in: Likewise.
12213         * final.c (struct label_alignment): Remove not used structure.
12214         (LABEL_ALIGN): Change type to align_flags.
12215         (LOOP_ALIGN): Likewise.
12216         (JUMP_ALIGN): Likewise.
12217         (default_loop_align_max_skip): Remove.
12218         (default_label_align_max_skip): Likewise.
12219         (default_jump_align_max_skip): Likewise.
12220         (default_label_align_after_barrier_max_skip):
12221         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12222         (LABEL_TO_MAX_SKIP): Remove.
12223         (label_to_alignment): Return align_flags type instead of integer.
12224         (label_to_max_skip): Remove.
12225         (align_fuzz): Use align_flags type.
12226         (compute_alignments): Use align_flags type and use align_flags::max
12227         to combine multiple alignments.
12228         (grow_label_align): Grow vec instead of C array.
12229         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12230         (shorten_branches):  Use align_flags type and use align_flags::max
12231         to combine multiple alignments.
12232         (final_scan_insn_1): Remove usage of secondary alignment that comes
12233         from label alignment, but instead use proper secondary alignment
12234         which is computed in grow_label_align.
12235         * flags.h (struct align_flags_tuple): Move to align.h.
12236         (struct align_flags): Likewise.
12237         (state_align_loops): Rename to align_loops.
12238         (state_align_jumps): Rename to align_jumps.
12239         (state_align_labels): Rename to align_labels.
12240         (state_align_functions): Rename to align_functions.
12241         (align_loops_log): Remove.
12242         (align_jumps_log): Remove.
12243         (align_labels_log): Remove.
12244         (align_functions_log): Remove.
12245         (align_loops_max_skip): Remove.
12246         (align_jumps_max_skip): Remove.
12247         (align_labels_max_skip): Remove.
12248         (align_functions_max_skip): Remove.
12249         (align_loops_value): Remove.
12250         (align_jumps_value): Remove.
12251         (align_labels_value): Remove.
12252         (align_functions_value): Remove.
12253         * output.h (label_to_alignment): Change return type to align_flags.
12254         (label_to_max_skip): Remove.
12255         * target.def: Remove loop_align_max_skip, label_align_max_skip,
12256         jump_align_max_skip macros.
12257         * targhooks.h (default_loop_align_max_skip): Remove.
12258         (default_label_align_max_skip): Likewise.
12259         (default_jump_align_max_skip): Likewise.
12260         (default_label_align_after_barrier_max_skip): Remove.
12261         * toplev.c (read_log_maxskip): Use ::normalize function.
12262         (parse_N_M): Remove not used argument and also call ::normalize.
12263         (parse_alignment_opts): Do not pass unused arguments.
12264         * varasm.c (assemble_start_function): Use directly align_functions
12265         instead of removed macros.
12266         * system.h: Do not poison removed macros.
12268 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
12270         PR middle-end/86539
12271         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12272         and cond temporaries don't have reference type if iterator has
12273         pointer type.  For init use &for_pre_body instead of pre_p if
12274         for_pre_body is non-empty.
12276 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12278         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12279         double-double modes to SFmode directly directly.
12280         (trunc<mode>sf2_fprs): Delete.
12282 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12284         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12285         for conversions between IFmode and the decimal floating point modes.
12286         (init_float128_ieee): Use the correct names for conversions between
12287         KFmode and the decimal floating point modes.
12289 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12291         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12292         for the conversions between TDmode and IFmode.
12293         (init_float128_ieee): Use more correct names for the conversions
12294         between TDmode and KFmode.
12296 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
12298         PR tree-optimization/86526
12299         * builtins.c (expand_builtin_memcmp): Formatting fixes.
12300         (inline_expand_builtin_string_cmp): Likewise.
12301         (inline_string_cmp): Likewise.  Use c_readstr instead of
12302         builtin_memcpy_read_str.  Add unit_mode temporary.
12304 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12306         PR middle-end/86528
12307         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12308         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12310 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12312         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12313         Alphabetize prototypes of built-in functions, separating out
12314         built-in functions that are listed in this section but should be
12315         described elsewhere.
12317 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
12319         PR target/86511
12320         * expmed.c (emit_store_flag): Do not emit setcc followed by a
12321         conditional move when trapping comparison was split to a
12322         non-trapping one (and vice versa).
12324 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12326         * config/s390/s390.c (s390_function_profiler): Generate nops
12327         instead of profiler call sequences.
12328         * config/s390/s390.opt: Add the new option.
12330 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12332         * config/s390/s390.c (s390_function_profiler): Generate
12333         __mcount_loc section.
12334         * config/s390/s390.opt: Add the new option.
12336 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12338         * common.opt: Add the new warning.
12339         * config/s390/s390.c (s390_function_profiler): Emit "brasl
12340         %r0,__fentry__" when -mfentry is specified.
12341         (s390_option_override_internal): Disallow -mfentry for 31-bit
12342         CPUs.
12343         * config/s390/s390.opt: Add the new option.
12345 2018-07-16  Richard Biener  <rguenther@suse.de>
12347         PR lto/86523
12348         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12349         for function-local FUNCTION_DECL and RESULT_DECL immediately.
12351 2018-07-16  Martin Liska  <mliska@suse.cz>
12353         PR ipa/86529
12354         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12355         to ::get_create.
12357 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12359         * config/arc/arcHS.md: Update ARCHS scheduling rules.
12361 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12363         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12364         for ARCHS4x.
12365         * config/arc/arc-cpus.def (hs4x): New cpu.
12366         (hs4xd): Likewise.
12367         * config/arc/arc-tables.opt: Regenerate.
12368         * config/arc/arc.c (arc_sched_issue_rate): New function.
12369         (TARGET_SCHED_ISSUE_RATE): Define.
12370         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12371         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12372         fpu_cvt.
12373         (attr tune): Add ARCHS4x tune values.
12374         (attr tune_dspmpy): Define.
12375         (*tst): Correct instruction type.
12376         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12377         * config/arc/arcHS4x.md: New file.
12378         * config/arc/fpu.md: Update instruction type attributes.
12379         * config/arc/t-multilib: Regenerate.
12381 2018-07-16  Tom de Vries  <tdevries@suse.de>
12383         PR debug/86455
12384         * var-tracking.c (vt_initialize): Fix pre_dec handling.
12386 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12388         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12389         early clobber.
12391 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12393         PR tree-optimization/86514
12394         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12395         conversion to a boolean type from a type with greater precision.
12397 2018-07-16  Tom de Vries  <tdevries@suse.de>
12399         * var-tracking.c (vt_initialize): Print adjusted insn slim if
12400         dump_flags request TDF_SLIM.
12402 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
12404         * fold-const.c (int_const_binop_1): Abstract...
12405         (wide_int_binop): ...wide int code here.
12406         (poly_int_binop): ...poly int code here.
12407         Abstract the rest of int_const_binop_1 into int_const_binop.
12408         * fold-const.h (wide_int_binop): New.
12409         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12410         Remove useless PLUS/MINUS_EXPR case.
12411         (zero_nonzero_bits_from_vr): Move wide int code...
12412         (zero_nonzero_bits_from_bounds): ...here.
12413         (extract_range_from_binary_expr_1): Move mask optimization code...
12414         (range_easy_mask_min_max): ...here.
12415         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12416         (range_easy_mask_min_max): New.
12418 2018-07-15  Jeff Law  <law@redhat.com>
12420         PR target/85993
12421         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12422         block.
12424 2018-07-14  Jim Wilson  <jimw@sifive.com>
12426         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12428 2018-07-14  Paul Koning  <ni1d@arrl.net>
12430         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12432 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
12434         * lto-streamer-out.c (copy_function_or_variable): Dump info about
12435         copying section.
12437 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
12438             Steve Munroe  <munroesj52@gmail.com>
12440         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12441         (_mm_andnot_si128): Likewise.
12442         (_mm_or_si128): Likewise.
12443         (_mm_xor_si128): Likewise.
12445 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
12447         PR middle-end/78809
12448         * builtins.c (expand_builtin_memcmp): Inline the calls first
12449         when result_eq is false.
12450         (expand_builtin_strcmp): Inline the calls first.
12451         (expand_builtin_strncmp): Likewise.
12452         (inline_string_cmp): New routine. Expand a string compare
12453         call by using a sequence of char comparison.
12454         (inline_expand_builtin_string_cmp): New routine. Inline expansion
12455         a call to str(n)cmp/memcmp.
12456         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12457         New option.
12458         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12460 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
12462         * config/arm/driver-arm.c: Include arm-native.h.
12463         (host_detect_local_cpu): Use auto-generated data tables.
12464         (vendors, arm_cpu_table): Delete.  Move part information to ...
12465         * config/arm/arm-cpus.in: ... here.
12466         * config/arm/parsecpu.awk (gen_native): New function.
12467         (vendor, part): New CPU fields.
12468         (END): Add support for building the native CPU detection tables.
12469         * config/arm/t-arm (arm-native.h): Add build rule.
12470         (driver-arm.o): Add dependency on arm-native.h.
12472 2018-07-13  Richard Biener  <rguenther@suse.de>
12474         PR middle-end/85974
12475         * match.pd (addr1 - addr2): Allow either of the operand to
12476         have a conversion.
12478 2018-07-13  Tom de Vries  <tdevries@suse.de>
12480         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12481         in remap_ssa_name.
12483 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
12485         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12486         arrays instead of numbered variables.
12488 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12490         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12491         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12493 2018-07-13  Richard Biener  <rguenther@suse.de>
12495         PR debug/86452
12496         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12497         instead of get_context_die.
12499 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
12500             Richard Biener  <rguenther@suse.de>
12502         PR middle-end/86489
12503         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12504         that the loop latch destination where phi is defined.
12506 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
12508         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12509         (riscv_expand_epilogue): Add assertion to check interrupt mode.
12510         (riscv_set_current_function): Extract getting interrupt type to new
12511         function.
12512         (riscv_get_interrupt_type): New function.
12513         (riscv_merge_decl_attributes): New function, checking interrupt type is
12514         same.
12515         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12517 2018-07-12  Paul Koning  <ni1d@arrl.net>
12519         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12520         directive.
12522 2018-07-12  Paul Koning  <ni1d@arrl.net>
12524         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12525         zero reference, add doloop_end instead.
12526         * doc/md.texi (decrement_and_branch_until_zero): Remove.
12527         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
12528         detail for doloop_end.
12530 2018-07-12  Martin Sebor  <msebor@redhat.com>
12532         PR c/86453
12533         * attribs.c (decl_attributes): Reject conflicting attributes before
12534         calling attribute handlers.
12536 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
12538         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12539          parameter.
12540         (gcc::dump_manager::get_dump_file_name): likewise.
12541         (dump_begin): Likewise.
12542         * dumpfile.h (dump_begin): Update prototype.
12543         (gcc::dump_manager::get_dump_file_name,
12544         gcc::dump_manager::get_dump_file_name): Update prototype.
12546 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12548         * internal-fn.h (vectorizable_internal_fn_p): New function.
12549         * tree-vect-slp.c (compatible_calls_p): Likewise.
12550         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
12551         to internal functions.
12552         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12554 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12556         * fold-const.h (inverse_conditions_p): Declare.
12557         * fold-const.c (inverse_conditions_p): New function.
12558         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
12559         that test the inverse condition of a conditional internal function.
12560         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12561         * internal-fn.c (internal_fn_mask_index): Handle conditional
12562         internal functions.
12563         (vectorized_internal_fn_supported_p): New function.
12564         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12565         (any_pred_load_store): Replace with...
12566         (need_to_predicate): ...this new variable.
12567         (redundant_ssa_names): New variable.
12568         (ifcvt_can_use_mask_load_store): Move initial checks to...
12569         (ifcvt_can_predicate): ...this new function.  Handle tree codes
12570         for which a conditional internal function exists.
12571         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12572         instead of ifcvt_can_use_mask_load_store.  Update after variable
12573         name change.
12574         (predicate_load_or_store): New function, split out from
12575         predicate_mem_writes.
12576         (check_redundant_cond_expr): New function.
12577         (value_available_p): Likewise.
12578         (predicate_rhs_code): Likewise.
12579         (predicate_mem_writes): Rename to...
12580         (predicate_statements): ...this.  Use predicate_load_or_store
12581         and predicate_rhs_code.
12582         (combine_blocks, tree_if_conversion): Update after above name changes.
12583         (ifcvt_local_dce): Handle redundant_ssa_names.
12584         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12585         general conditional functions.
12586         * tree-vect-stmts.c (vectorizable_call): Likewise.
12588 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12589             Alan Hayward  <alan.hayward@arm.com>
12590             David Sherwood  <david.sherwood@arm.com>
12592         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12593         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12594         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12595         plus and minus and convert them into IFN_COND_FMA-based sequences.
12596         (convert_mult_to_fma): Handle conditional plus and minus.
12598 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12600         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12601         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12602         (cond_fnms_optab): New optabs.
12603         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12604         internal functions.
12605         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12606         * internal-fn.h (get_conditional_internal_fn): Declare.
12607         (get_unconditional_internal_fn): Likewise.
12608         * internal-fn.c (cond_ternary_direct): New macro.
12609         (expand_cond_ternary_optab_fn): Likewise.
12610         (direct_cond_ternary_optab_supported_p): Likewise.
12611         (FOR_EACH_COND_FN_PAIR): Likewise.
12612         (get_conditional_internal_fn): New function.
12613         (get_unconditional_internal_fn): Likewise.
12614         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12615         (gimple_match_op::gimple_match_op): Add a new overload for 5
12616         operands.
12617         (gimple_match_op::set_op): Likewise.
12618         (gimple_resimplify5): Declare.
12619         * genmatch.c (decision_tree::gen): Generate simplifications for
12620         5 operands.
12621         * gimple-match-head.c (gimple_simplify): Define an overload for
12622         5 operands.  Handle calls with 5 arguments in the top-level overload.
12623         (convert_conditional_op): Handle conversions from unconditional
12624         internal functions to conditional ones.
12625         (gimple_resimplify5): New function.
12626         (build_call_internal): Pass a fifth operand.
12627         (maybe_push_res_to_seq): Likewise.
12628         (try_conditional_simplification): Try converting conditional
12629         internal functions to unconditional internal functions.
12630         Handle 3-operand unconditional forms.
12631         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12632         Define ternary equivalents of the current rules for binary conditional
12633         internal functions.
12634         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12635         ternary operations.
12636         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12637         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12638         (optab): Handle them.
12639         (SVE_COND_FP_TERNARY): New int iterator.
12640         (sve_fmla_op, sve_fmad_op): New int attributes.
12641         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12642         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12643         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12645 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12647         * target.def (preferred_else_value): New target hook.
12648         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12649         * doc/tm.texi: Regenerate.
12650         * targhooks.h (default_preferred_else_value): Declare.
12651         * targhooks.c (default_preferred_else_value): New function.
12652         * internal-fn.h (conditional_internal_fn_code): Declare.
12653         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12654         (get_conditional_internal_fn): Use it.
12655         (conditional_internal_fn_code): New function.
12656         * gimple-match.h (gimple_match_cond): New struct.
12657         (gimple_match_op): Add a cond member function.
12658         (gimple_match_op::gimple_match_op): Update all forms to take a
12659         gimple_match_cond.
12660         * genmatch.c (expr::gen_transform): Use the same condition as res_op
12661         for the suboperation, but don't specify a particular else_value.
12662         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12663         (visit_nary_op, visit_reference_op_load): Pass
12664         gimple_match_cond::UNCOND to the gimple_match_op constructor.
12665         * gimple-match-head.c: Include tree-eh.h
12666         (convert_conditional_op): New function.
12667         (maybe_resimplify_conditional_op): Likewise.
12668         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12669         (gimple_resimplify2): Likewise.
12670         (gimple_resimplify3): Likewise.
12671         (gimple_resimplify4): Likewise.
12672         (maybe_push_res_to_seq): Return null for conditional operations.
12673         (try_conditional_simplification): New function.
12674         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
12675         constructor.
12676         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12677         IFN_COND_* call.
12678         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12679         function.
12680         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12682 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
12684         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12685         DECL_FCONTEXT
12686         (hash_tree): Do not hash DECL_FCONTEXT
12687         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12688         Do not stream DECL_FCONTEXT.
12689         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12690         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12692 2018-07-12  Richard Biener  <rguenther@suse.de>
12694         PR debug/86462
12695         * dwarf2out.c (gen_block_die): Only output blocks when they have
12696         at least one !DECL_IGNORED_P variable.
12698 2018-07-12  Richard Biener  <rguenther@suse.de>
12700         PR target/84829
12701         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12702         Remove -mieee-fp handling.
12704 2018-07-12  Richard Biener  <rguenther@suse.de>
12706         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12707         left-over from last patch.
12709 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
12711         PR tree-optimization/86492
12712         * gimple-ssa-store-merging.c
12713         (imm_store_chain_info::coalesce_immediate_stores): Call
12714         check_no_overlap even for the merge_overlapping case.  Formatting fix.
12716 2018-07-12  Richard Biener  <rguenther@suse.de>
12718         PR middle-end/86479
12719         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12720         move possibly trapping operations into the conditional.
12722 2018-07-12  Richard Biener  <rguenther@suse.de>
12724         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12725         (vn_lookup_simplify_result): Remove recursion limit applied
12726         here.
12727         (vn_nary_build_or_lookup_1): Adjust.
12728         (try_to_simplify): Likewise.
12729         * gimple-match-head.c (gimple_resimplify1): Instead apply one
12730         here.
12731         (gimple_resimplify2): Likewise.
12732         (gimple_resimplify3): Likewise.
12733         (gimple_resimplify4): Likewise.
12735 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
12737         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12738         Use __mmask64 type instead of __mmask8 for __M argument.
12739         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12740         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12741         __U argument.
12742         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12743         __mmask16 for __M argument.
12744         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12745         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12746         to __mmask16 instead of __mmask8.
12747         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12748         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12749         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12750         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12751         instead of __mmask16 for __U argument.
12752         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12753         __mmask16 instead of __mmask8 for __U argument.
12754         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12755         __U argument.
12756         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12757         __mmask16.
12758         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12759         argument.
12760         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12761         __U argument.
12762         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12763         __mmask16.
12764         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12765         of __mmask16.
12766         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12767         __U argument.
12768         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12769         __U argument.
12770         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12771         __U argument.
12772         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12773         __U argument.
12774         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12775         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12776         return type as well as __M argument type and all casts from __mmask8
12777         to __mmask32.
12778         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12779         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12780         return type as well as __M argument type and all casts from __mmask8
12781         to __mmask16.
12782         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12783         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12784         return type as well as __M argument type and all casts from __mmask8
12785         to __mmask32.
12786         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12787         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12788         return type as well as __M argument type and all casts from __mmask8
12789         to __mmask16.
12790         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12791         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12792         __mmask16.
12794 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
12796         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12797         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12798         for __U argument.
12800 2018-07-11  Paul Koning  <ni1d@arrl.net>
12802         * doc/md.texi (define_subst): Document how multiple occurrences of
12803         the same argument in the replacement pattern are handled.
12805 2018-07-11  Paul Koning  <ni1d@arrl.net>
12807         * doc/extend.texi (Common Variable Attributes): Move "mode" into
12808         alphabetical order.
12809         (Common Type Attributes): Add "mode" attribute.
12811 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
12813         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12814         stream DECL_ORIGINAL_TYPE.
12815         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12816         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12817         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12818         Do not walk original type.
12819         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12820         external decls.
12821         (write_ts_decl_non_common_tree_pointers): Do not stream
12822         DECL_ORIGINAL_TYPE
12823         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12824         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12826 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
12828         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12829         thread twice from the same starting edge.
12831 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
12833         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12834         * gimple.c (gimple_call_nonnull_result_p): ...here...
12835         (gimple_call_nonnull_arg): ...and here.
12836         * gimple.h (gimple_call_nonnull_result_p): New.
12837         (gimple_call_nonnull_arg): New.
12839 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
12841         * config/arm/arm-cpus.in: Move information from fpu field of each
12842         cpu definition to the isa field.
12843         * config/arm/parsecpu.awk (fpu): Delete match rule.
12844         (gen_comm_data): Don't add bits from the CPU's FPU entry.
12846 2018-07-11  Richard Biener  <rguenther@suse.de>
12848         PR debug/86457
12849         * dwarf2out.c (init_sections_and_labels): Use
12850         output_asm_line_debug_info consistently.
12851         (dwarf2out_early_finish): Likewise.
12852         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12853         type units.
12855 2018-07-11  Richard Biener  <rguenther@suse.de>
12857         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12858         Rework father_bb setting in a way to avoid propagating constants
12859         multiple times on a loop body.
12861 2018-07-10  Mark Wielaard  <mark@klomp.org>
12863         PR debug/86459
12864         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12866 2018-07-10  Richard Biener  <rguenther@suse.de>
12868         * hash-map.h (hash_map::iterator::operator*): Return
12869         references to key and value.
12871 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
12873         PR c++/86443
12874         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12875         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12876         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12877         (gimplify_omp_for): For composite loops, move outer
12878         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12879         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
12880         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
12881         TREE_LIST for both the original class iterator and the "last" helper
12882         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
12883         loop, remember has_decl_expr from outer composite loops for the
12884         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12886 2018-07-09  Martin Sebor  <msebor@redhat.com>
12888         PR middle-end/77357
12889         PR middle-end/86428
12890         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12891         accessing implicitly initialized array elements.
12892         * expr.c (string_constant): Handle string initializers of
12893         character arrays within aggregates.
12894         * gimple-fold.c (fold_array_ctor_reference): Add argument.
12895         Store element offset.  As a special case, handle zero size.
12896         (fold_nonarray_ctor_reference): Same.
12897         (fold_ctor_reference): Add argument.  Store subobject offset.
12898         * gimple-fold.h (fold_ctor_reference): Add argument.
12900 2018-07-09  Paul Koning  <ni1d@arrl.net>
12902         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12903         (pdp11_insn_cost): New function.
12904         (pdp11_md_asm_adjust): New function.
12905         (TARGET_INVALID_WITHIN_DOLOOP): Define.
12906         (pdp11_rtx_costs): Update to match machine better.
12907         (output_addr_const_pdp11): Correct format mismatch warnings.
12908         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12909         * config/pdp11/pdp11.md: General change to add base_cost and/or
12910         length attributes for use by new pdp11_insn_cost function.
12911         (MIN_BRANCH): Correct definition.
12912         (MIN_SOB): Ditto.
12913         (doloop_end): Use standard pattern name for looping pattern.
12914         (doloop_end_nocc): New.
12915         (movsf): Add another constraint alternative.
12916         (zero_extendqihi2): Add constraint alternatives for not in place
12917         extend.
12918         (zero_extendhisi2): Remove.
12919         (shift patterns): Add CC handling variants.
12920         (bswaphi2): New.
12921         (bswapsi2): New.
12922         (rothi3): New.
12923         (define_peephole2): New peephole to recognize mov that sets CC for
12924         subsequent test.
12926 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12928         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12929         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12930         wi::add.
12932 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
12934         PR c/86420
12935         * real.c (real_nextafter): Return true if result is denormal.
12937 2018-07-09  Martin Liska  <mliska@suse.cz>
12939         * common.opt: Add back wrongly removed attribute.
12941 2018-07-09  Richard Biener  <rguenther@suse.de>
12943         PR debug/86413
12944         * dwarf2out.c (gen_block_die): For an early generated DIE
12945         always output high/low PC attributes.
12947 2018-07-09  Tom de Vries  <tdevries@suse.de>
12949         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12950         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12951         onto VAR_DECL with abstract origin.
12953 2018-07-07  Jim Wilson  <jimw@sifive.com>
12955         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12957 2018-07-07  Tom de Vries  <tdevries@suse.de>
12959         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12961 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
12963         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12964         overflow_type.
12965         (combine_bound): Use wide-int overflow calculation instead of
12966         rolling our own.
12967         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12968         overflow_type.
12969         * fold-const.c (int_const_binop_2): Same.
12970         (extract_muldiv_1): Same.
12971         (fold_div_compare): Same.
12972         (fold_abs_const): Same.
12973         * match.pd: Same.
12974         * poly-int.h (add): Same.
12975         (sub): Same.
12976         (neg): Same.
12977         (mul): Same.
12978         * predict.c (predict_iv_comparison): Same.
12979         * profile-count.c (slow_safe_scale_64bit): Same.
12980         * simplify-rtx.c (simplify_const_binary_operation): Same.
12981         * tree-chrec.c (tree_fold_binomial): Same.
12982         * tree-data-ref.c (split_constant_offset_1): Same.
12983         * tree-if-conv.c (idx_within_array_bound): Same.
12984         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12985         * tree-ssa-phiopt.c (minmax_replacement): Same.
12986         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12987         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12988         * vr-values.c (vr_values::adjust_range_with_scev): Same.
12989         * wide-int.cc (wi::add_large): Same.
12990         (wi::mul_internal): Same.
12991         (wi::sub_large): Same.
12992         (wi::divmod_internal): Same.
12993         * wide-int.h: Change overflow type to overflow_type for neg, add,
12994         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12995         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12996         mul_internal, divmod_internal.
12997         (overflow_type): New enum.
12998         (accumulate_overflow): New.
13000 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
13002         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13003         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13005 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
13007         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13008         argument is checked for zero before entering loop, avoid checking again.
13010 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
13012         * gimplify.h (generic_expr_could_trap_p): Set as global function.
13013         * gimplify.h (generic_expr_could_trap_p): Likwise.
13014         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13016 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
13018         PR tree-optimization/86401
13019         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13020         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13021         (fold_bit_and_mask): ... here.  New helper function for match.pd.
13022         * fold-const.h (fold_bit_and_mask): Declare.
13023         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13025 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
13027         PR target/86324
13028         * target.def (translate_mode_attribute): New hook.
13029         * targhooks.h (default_translate_mode_attribute): Declare.
13030         * targhooks.c (default_translate_mode_attribute): New function.
13031         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13032         * doc/tm.texi: Regenerate.
13033         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13034         (rs6000_translate_mode_attribute): New function.
13036 2018-07-06  Paul Koning  <ni1d@arrl.net>
13038         * doc/md.texi (define_split): Document DONE and FAIL.
13039         (define_peephole2): Ditto.
13041 2018-07-05  Jeff Law  <law@redhat.com>
13043         PR tree-optimization/86010
13044         * tree-ssa-dse.c (compute_trims): More aggressively trim at
13045         both the head and tail of mem* and str* calls.
13047 2018-07-05  Jim Wilson  <jimw@sifive.com>
13049         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13051 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
13053         * config/aarch64/aarch64-simd.md: correct flags text for
13054         MIN_EXPR replacement.
13056 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
13058         * configure: Regenerated.
13060 2018-07-05  Carl Love  <cel@us.ibm.com>
13062         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13063         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13064         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13065         VSX_BUILTIN_DOUBLEL_V4SF.
13067 2018-07-05  Martin Sebor  <msebor@redhat.com>
13069         PR c++/86400
13070         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13071         than its domain to compute its the upper bound of a char array.
13073 2018-07-05  Nathan Sidwell  <nathan@acm.org>
13075         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13076         * doc/cpp.texi: Update comment.
13077         * doc/tm.texi: Rebuilt.
13078         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13079         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13080         * doc/extend.texi (Backwards Compatibility): Clarify it is system
13081         headers affected by extern "C".
13082         * system.h: Poison NO_IMPLICIT_EXTERN_C.
13083         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13084         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13085         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13086         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13087         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13088         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13089         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13090         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13091         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13092         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13093         config/sparc/sp64-elf.h, config/spu/spu.h,
13094         config/stormy16/stormy16.h, config/v850/v850.h,
13095         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13096         define NO_IMPLICIT_EXTERN_C.
13097         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13099 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13101         PR target/84711
13102         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13103         instead of GET_MODE_SIZE when comparing Units.
13105 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13107         PR target/84711
13108         * rtlanal.c (set_noop_p): Constrain on mode change,
13109         include hard-reg-set.h
13111 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13113         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13115 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
13117         Revert
13118         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
13120         PR sanitizer/84250
13121         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13122         libasan.
13123         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13125 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
13127         PR sanitizer/84250
13128         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13129         libasan.
13130         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13132 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
13134         PR middle-end/86380
13135         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13137 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
13139         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13140         neg_*_op* variables.
13142 2018-07-04  Martin Liska  <mliska@suse.cz>
13144         * tree-switch-conversion.c: Define
13145         max_ratio_for_speed and max_ratio_for_size constants.
13147 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13148             Martin Liska  <mliska@suse.cz>
13150         PR middle-end/66240
13151         PR target/45996
13152         PR c/84100
13153         * common.opt: Rename align options with 'str_' prefix.
13154         * common/config/i386/i386-common.c (set_malign_value): New
13155         function.
13156         (ix86_handle_option): Use it to set -falign-* options/
13157         * config/aarch64/aarch64-protos.h (struct tune_params): Change
13158         type from int to string.
13159         * config/aarch64/aarch64.c: Update default values from int
13160         to string.
13161         * config/alpha/alpha.c (alpha_override_options_after_change):
13162         Likewise.
13163         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13164         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13165         max skip conditionally.
13166         * config/i386/freebsd.h (SUBALIGN_LOG): New.
13167         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13168         max skip conditionally.
13169         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13170         max skip conditionally.
13171         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13172         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13173         max skip conditionally.
13174         * config/i386/i386.c (struct ptt): Change type from int to
13175         string.
13176         (ix86_default_align): Set default values.
13177         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13178         max skip conditionally.
13179         * config/i386/iamcu.h (SUBALIGN_LOG): New.
13180         (ASM_OUTPUT_MAX_SKIP_ALIGN):
13181         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13182         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13183         max skip conditionally.
13184         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13185         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13186         * config/i386/x86-64.h (SUBALIGN_LOG): New.
13187         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13188         max skip conditionally.
13189         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13190         * config/ia64/ia64.c (ia64_option_override): Set default values
13191         for alignment options.
13192         * config/m68k/m68k.c: Handle new str_align_* options.
13193         * config/mips/mips.c (mips_set_compression_mode): Change
13194         type of constants.
13195         (mips_option_override): Set default values for options.
13196         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13197         Likewise.
13198         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13199         Likewise.
13200         * config/rx/rx.c (rx_option_override): Likewise.
13201         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13202         (LABEL_ALIGN): Use align_labels_log.
13203         (LOOP_ALIGN): Use align_loops_align.
13204         * config/s390/s390.c (s390_asm_output_function_label): Use new
13205         macros.
13206         * config/sh/sh.c (sh_override_options_after_change):
13207         Change type of constants.
13208         * config/spu/spu.c (spu_sched_init): Likewise.
13209         * config/sparc/sparc.c (sparc_option_override): Set default
13210         values for options.
13211         * config/visium/visium.c (visium_option_override): Likewise.
13212         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13213         emit p2align format with last argument if it's not needed.
13214         * doc/invoke.texi: Document extended format of -falign-*.
13215         * final.c: Use align_labels alignment.
13216         * flags.h (struct target_flag_state): Change type to use
13217         align_flags.
13218         (struct align_flags_tuple): New.
13219         (struct align_flags): Likewise.
13220         (align_loops_log): Redefine macro to use new types.
13221         (align_loops_max_skip): Redefine macro to use new types.
13222         (align_jumps_log): Redefine macro to use new types.
13223         (align_jumps_max_skip): Redefine macro to use new types.
13224         (align_labels_log): Redefine macro to use new types.
13225         (align_labels_max_skip): Redefine macro to use new types.
13226         (align_functions_log): Redefine macro to use new types.
13227         (align_loops): Redefine macro to use new types.
13228         (align_jumps): Redefine macro to use new types.
13229         (align_labels): Redefine macro to use new types.
13230         (align_functions): Redefine macro to use new types.
13231         (align_functions_max_skip): Redefine macro to use new types.
13232         (align_loops_value): New macro.
13233         (align_jumps_value): New macro.
13234         (align_labels_value): New macro.
13235         (align_functions_value): New macro.
13236         * function.c (invoke_set_current_function_hook): Propagate
13237         alignment values from flags to global variables default in
13238         topleev.h.
13239         * ipa-icf.c (sem_function::equals_wpa): Use
13240         cl_optimization_option_eq instead of memcmp.
13241         * lto-streamer.h (cl_optimization_stream_out): Support streaming
13242         of string types.
13243         (cl_optimization_stream_in): Likewise.
13244         * optc-save-gen.awk: Support strings in cl_optimization.
13245         * opth-gen.awk: Likewise.
13246         * opts.c (finish_options): Remove error checking of invalid
13247         value ranges.
13248         (MAX_CODE_ALIGN): Remove.
13249         (MAX_CODE_ALIGN_VALUE): Likewise.
13250         (parse_and_check_align_values): New function.
13251         (check_alignment_argument): Likewise.
13252         (common_handle_option): Use check_alignment_argument.
13253         * opts.h (parse_and_check_align_values): Declare.
13254         * toplev.c (init_alignments): Remove.
13255         (read_log_maxskip): New.
13256         (parse_N_M): Likewise.
13257         (parse_alignment_opts): Likewise.
13258         (backend_init_target): Remove usage of init_alignments.
13259         * toplev.h (parse_alignment_opts): Declare.
13260         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13261         argument.
13262         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13263         * tree.c (cl_option_hasher::equal): New.
13264         * varasm.c: Use new global macros.
13266 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13268         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13269         Use a simpler align directive also if MAXSKIP = ALIGN-1.
13270         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13271         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13272         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13273         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13274         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13275         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13276         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13277         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13278         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13279         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13280         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13282 2018-07-04  Martin Liska  <mliska@suse.cz>
13283             Jonathan Wakely  <jwakely@redhat.com>
13285         * coverage.c: Use correct type.
13286         * doc/invoke.texi: Language correction.
13288 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
13290         PR target/85620
13291         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13292         ENDBRANCH for non-tail call which may return via indirect branch.
13293         * doc/extend.texi: Document indirect_return attribute.
13295 2018-07-03  Martin Sebor  <msebor@redhat.com>
13297         PR tree-optimization/86274
13298         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13299         precondition.
13300         (format_floating): Correct handling of infinities and NaNs.
13302 2018-07-03  Martin Sebor  <msebor@redhat.com>
13304         * print-tree.c (print_real_cst): New function.
13305         (print_node_brief): Call it.
13306         (print_node): Ditto.
13308 2018-07-03  Jeff Law  <law@redhat.com>
13310         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13311         into a single pattern.
13313         * config/h8300/h8300.md (ors code_iterator): New.
13314         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13315         a single pattern and single splitter.
13316         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13317         (iorqi3_1, xorqi3_1): Likewise.
13318         (iorqi3, xorqi3 expanders): Similarly.
13320         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13321         (movmd_internal) into a single pattern using the P mode iterator.
13322         (movmd splitters): Similarly.
13323         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13324         (movsd splitters): Similarly.
13326         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13327         ADDB, ADDW and ADDL into a single ADD attribute which selects the
13328         right table based on the size of the operand.
13329         * config/h8300/h8300.md (length_table): Corresponding changes. All
13330         references to "addb", "addw" and "addl" changed to "add".
13331         (btst patterns): Merge two variants into a single pattern.
13332         (tstqi, tsthi): Likewise.
13333         (addhi3_incdec, addsi3_incdec): Likewise.
13334         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13335         (mulhi3, mulsi3): Likewise.
13336         (udivhi3, udivsi3): Likewise.
13337         (divhi3, divsi3): Likewise.
13338         (andorqi3, andorhi3, andorsi3): Likewise.
13340 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
13342         PR target/85694
13343         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13344         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13346 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13348         PR tree-optimization/85694
13349         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13350         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13351         UNSPEC_URHADD.
13352         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13353         (<u>avg<mode>3_ceil): New patterns.
13355 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
13357         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13358         scan-tree-dump directive.
13359         * gcc.dg/vect/slp-perm-2.c: Likewise.
13360         * gcc.dg/vect/slp-perm-3.c: Likewise.
13361         * gcc.dg/vect/slp-perm-5.c: Likewise.
13362         * gcc.dg/vect/slp-perm-6.c: Likewise.
13363         * gcc.dg/vect/slp-perm-7.c: Likewise.
13364         * gcc.dg/vect/slp-perm-8.c: Likewise.
13366 2018-07-03  Marek Polacek  <polacek@redhat.com>
13368         PR middle-end/86202
13369         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13371 2018-07-03  Richard Biener  <rguenther@suse.de>
13373         PR ipa/86389
13374         * tree-ssa-structalias.c (find_func_clobbers): Properly
13375         handle indirect calls.
13377 2018-07-03  Jeff Law  <law@redhat.com>
13379         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13380         (shifts): New code iterator.
13381         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13382         expander.  Fix HImode handling on H8/SX.
13383         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13384         (subqi3, subhi3, subsi3 expanders): Likewise.
13385         (andqi3, andhi3, andsi3 expanders): Likewise.
13386         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13387         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13388         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13389         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13390         (zero_extendqihi2, zero_extendqisi2): Likewise.
13391         (extendqihi2, extendqisi2): Likewise.
13392         (rotlqi3, rotlhi3, rotlsi3): Likewise.
13393         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13394         (rotlqi3_1, rotlhi3_1): Likewise.
13395         (logicalhi3_sn, logicalsi3_sn): Likewise.
13396         (logicalhi3, logicalsi3): Likewise.
13398 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13400         * tree-vect-patterns.c (vect_recog_rotate_pattern)
13401         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13402         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13403         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13404         type to append_pattern_def_seq instead of creating a stmt_vec_info
13405         directly.
13406         (build_mask_conversion): Likewise.  Remove vinfo argument.
13407         (vect_add_conversion_to_patterm): Likewise, renaming to...
13408         (vect_add_conversion_to_pattern): ...this.
13409         (vect_recog_mask_conversion_pattern): Update call to
13410         build_mask_conversion.  Pass the vector type to
13411         append_pattern_def_seq here too.
13412         (vect_recog_gather_scatter_pattern): Update call to
13413         vect_add_conversion_to_pattern.
13415 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13417         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13418         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13419         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13420         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13421         STMT_VINFO_PATTERN_DEF_SEQ to null here.
13422         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13423         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13424         append_pattern_def_seq instead of new_pattern_def_seq.
13425         (vect_recog_divmod_pattern): Do both of the above.
13426         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13427         is null.
13429 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13431         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13432         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13433         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13434         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13435         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13436         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13437         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13438         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13439         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13440         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13441         parameter with a single stmt_vec_info.
13442         (vect_recog_func_ptr): Likewise.
13443         (vect_recog_gather_scatter_pattern): Likewise, folding in...
13444         (vect_try_gather_scatter_pattern): ...this.
13445         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13446         the stmt_vec_info of the statement to be matched.  Don't clear
13447         STMT_VINFO_RELATED_STMT.
13448         (vect_pattern_recog): Update call accordingly.
13450 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13452         PR tree-optimization/85694
13453         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13454         (uavgM3_ceil): Document new optabs.
13455         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13456         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13457         functions.
13458         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13459         (savg_ceil_optab): New optabs.
13460         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13461         (vect_vect_recog_func_ptrs): Add it.
13462         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13463         constant directly from the associated lhs.
13465 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13467         * tree-vect-patterns.c (vect_split_statement): New function.
13468         (vect_convert_input): Use it to try to split an existing cast.
13470 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13472         * poly-int.h (print_hex): New function.
13473         * dumpfile.h (dump_dec, dump_hex): Declare.
13474         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13475         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13476         min_input_precision, operation_precision and operation_sign.
13477         * tree-vect-patterns.c (vect_get_range_info): New function.
13478         (vect_same_loop_or_bb_p, vect_single_imm_use)
13479         (vect_operation_fits_smaller_type): Delete.
13480         (vect_look_through_possible_promotion): Add an optional
13481         single_use_p parameter.
13482         (vect_recog_over_widening_pattern): Rewrite to use new
13483         stmt_vec_info infomration.  Handle one operation at a time.
13484         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13485         (vect_truncatable_operation_p, vect_set_operation_type)
13486         (vect_set_min_input_precision): New functions.
13487         (vect_determine_min_output_precision_1): Likewise.
13488         (vect_determine_min_output_precision): Likewise.
13489         (vect_determine_precisions_from_range): Likewise.
13490         (vect_determine_precisions_from_users): Likewise.
13491         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13492         (vect_vect_recog_func_ptrs): Put over_widening first.
13493         Add cast_forwprop.
13494         (vect_pattern_recog): Call vect_determine_precisions.
13496 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13498         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13499         statements that have been replaced by further pattern statements.
13500         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13502 2018-07-03  Richard Biener  <rguenther@suse.de>
13504         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13505         always set *dt.  Dump vectype in vectype overload.
13506         * dumpfile.h (dump_gimple_expr): New function.
13507         (dump_gimple_expr_loc): Likewise.
13508         * dumpfile.c (dump_gimple_expr): New function.
13509         (dump_gimple_expr_loc): Likewise.
13511 2018-07-02  Jeff Law  <law@redhat.com>
13513         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13514         the H8/300, H8/300H and H8/S variants into a single pattern.
13515         (movhi_h8300, movqi_h8300hs): Similarly.
13516         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13517         (QHI mode iterator): New.
13519         * config/h8300/h8300.md: Remove trailing whitespace.
13521 2018-07-02  Jim Wilson  <jimw@sifive.com>
13523         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13524         instead of emit_insn for interrupt returns.
13525         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13526         (riscv_sret, riscv_uret): Likewise.
13528 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
13530         * pretty-print.c (selftest::test_pp_format): Move save and restore
13531         of quotes to class auto_fix_quotes, and add an instance.
13532         * selftest.c: Include "intl.h".
13533         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13534         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13535         * selftest.h (selftest::auto_fix_quotes): New class.
13537 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
13539         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13540         (aarch64_sve_prepare_conditional_op): Remove.
13541         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13542         Allow aarch64_simd_reg_or_zero as select operand; remove
13543         the aarch64_sve_prepare_conditional_op call.
13544         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13545         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13546         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13547         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13548         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13549         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13550         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13551         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13552         and a splitters to match all of the *_any patterns.
13553         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13555         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13556         (SVE_COND_FP_BINARY_REV): Remove.
13557         (sve_int_op_rev, sve_fp_op_rev): New.
13558         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13559         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13560         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13561         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13562         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13563         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13564         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13565         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13566         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13568         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13569         Remove match_dup 1 from the inner unspec.
13570         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13572         * config/aarch64/aarch64.md (movprfx): New attr.
13573         (length): Default movprfx to 8.
13574         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13575         (*madd<SVE_I>, *msub<SVE_I): Likewise.
13576         (*<su>mul<SVE_I>3_highpart): Likewise.
13577         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13578         (*v<ASHIFT><SVE_I>3): Likewise.
13579         (*<su><MAXMIN><SVE_I>3): Likewise.
13580         (*<su><MAXMIN><SVE_F>3): Likewise.
13581         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13582         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13583         (*div<SVE_F>4): Likewise.
13585 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
13587         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13588         in dump string.
13590 2018-07-02  Richard Biener  <rguenther@suse.de>
13592         PR tree-optimization/86363
13593         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13594         memset argument refers to a non-variable address.
13596 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
13598         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13599         {PLUS,MINUS}_EXPR code to...
13600         (adjust_symbolic_bound): ...here,
13601         (combine_bound): ...here,
13602         (set_value_range_with_overflow): ...and here.
13604 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
13606         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13607         code...
13608         (extract_range_from_abs_expr): ...here.
13610 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
13612         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13613         -fno-omit-frame-pointer when not optimizing.
13615 2018-07-02  Martin Liska  <mliska@suse.cz>
13617         PR ipa/86279
13618         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13619         (propagate_nothrow): Likewise.
13621 2018-07-02  Martin Liska  <mliska@suse.cz>
13623         PR ipa/86323
13624         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13626 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
13628         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13629         function in r262149, changing "loc" param from source_location to
13630         const dump_location_t &.
13631         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13632         declaration, as above.
13634 2018-07-01  Paul Koning  <ni1d@arrl.net>
13636         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13637         -munit-asm, -mgnu-asm, -mdec-asm.
13638         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13639         (pdp11_output_labelref): New.
13640         (pdp11_output_def): New.
13641         (pdp11_output_addr_vec_elt): New.
13642         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
13643         %# and %@ format codes.
13644         (pdp11_option_override): New.
13645         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13646         (pdp11_output_ident): New.
13647         (pdp11_asm_named_section): New.
13648         (pdp11_asm_init_sections): New.
13649         (pdp11_file_start): New.
13650         (pdp11_file_end): New.
13651         (output_ascii): Use .ascii/.asciz for -mdec-asm.
13652         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
13653         %o, like %c but octal.
13654         (pdp11_option_override): New.
13655         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13656         -mdec-asm.
13657         (DATA_SECTION_ASM_OP): Ditto.
13658         (READONLY_DATA_SECTION_ASM_OP): New.
13659         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13660         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13661         (ASM_OUTPUT_LABELREF): Ditto.
13662         (ASM_OUTPUT_DEF): Ditto.
13663         (ASM_OUTPUT_EXTERNAL): New.
13664         (ASM_OUTPUT_SOURCE_FILENAME): New.
13665         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13666         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13667         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
13668         %# and %@ format codes.
13669         * config/pdp11/pdp11.opt (mgnu-asm): New.
13670         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13671         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13672         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13674 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
13676         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13677         dereferencing path[] beyond its length.
13678         (debug_path): New.
13679         (debug_all_paths): New.
13680         (rewire_first_differing_edge): New.
13681         (adjust_paths_after_duplication): New.
13682         (duplicate_thread_path): Call adjust_paths_after_duplication.
13683         Add new argument.
13684         (thread_through_all_blocks): Add new argument to
13685         duplicate_thread_path.
13687 2018-06-30  Jim Wilson  <jimw@sifive.com>
13689         * config/riscv/predicates.md (p2m1_shift_operand): New.
13690         (high_mask_shift_operand): New.
13691         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13692         pattern using p2m1_shift_operand.
13693         (lshsi3_zero_extend_3+2): New combiner pattern using
13694         high_mask_shift_operand.
13696 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13698         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13699         split out from...
13700         (vect_recog_rotate_pattern): ...here.
13701         (vect_convert_input): Try to insert casts of invariants in the
13702         preheader.
13703         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13704         preheader to be empty.
13706 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13708         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13709         vector type.  If given, install it in the new statement's
13710         STMT_VINFO_VECTYPE.
13711         (vect_element_precision): New function.
13712         (vect_unpromoted_value): New struct.
13713         (vect_unpromoted_value::vect_unpromoted_value): New function.
13714         (vect_unpromoted_value::set_op): Likewise.
13715         (vect_look_through_possible_promotion): Likewise.
13716         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13717         (vect_widened_op_tree, vect_convert_input): Likewise.
13718         (vect_convert_inputs, vect_convert_output): Likewise.
13719         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13720         to handle the optional cast of the multiplication result and
13721         vect_widened_op_tree to detect the widened multiplication itself.
13722         Do not require the input and output of promotion casts to have
13723         the same sign, but base the signedness of the operation on the
13724         input rather than the result.  If the pattern includes two
13725         promotions, check that those promotions have the same sign.
13726         Do not restrict the MULT_EXPR handling to a double-width result;
13727         handle quadruple-width results and wider.  Use vect_convert_inputs
13728         to convert the inputs to the common type.
13729         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
13730         to handle the optional cast of the ABS result.  Also allow a sign
13731         change or a sign extension between the ABS and MINUS.
13732         Use vect_widened_op_tree to detect the widened subtraction and use
13733         vect_convert_inputs to convert the inputs to the common type.
13734         (vect_handle_widen_op_by_const): Delete.
13735         (vect_recog_widen_op_pattern): New function.
13736         (vect_recog_widen_mult_pattern): Use it.
13737         (vect_recog_widen_shift_pattern): Likewise.
13738         (vect_recog_widen_sum_pattern): Use
13739         vect_look_through_possible_promotion to handle the promoted
13740         PLUS_EXPR operand.
13742 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13744         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13745         the containing gimple_seq *.
13746         * gimple-iterator.h (gsi_for_stmt): Declare it.
13747         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13748         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13749         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13750         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13751         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13752         checks.
13753         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13754         split out from...
13755         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
13756         statement being replaced is part of an existing pattern
13757         definition sequence, inserting the new pattern statements before
13758         the original one.
13759         (vect_pattern_recog_1): Don't return a bool.  If the statement
13760         is already part of a pattern, instead apply pattern matching
13761         to the pattern definition statements.  Don't clear the
13762         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13763         (vect_pattern_recog): Don't break after the first match;
13764         continue processing the pattern definition statements instead.
13765         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13767 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13769         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13770         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13771         (vect_recog_widen_sum_pattern): Use it.
13773 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13775         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13776         phi is not a pattern statement and has not been replaced by
13777         a pattern statement.
13778         * tree-vect-patterns.c (type_conversion_p): Don't check
13779         STMT_VINFO_IN_PATTERN_P.
13780         (vect_recog_vector_vector_shift_pattern): Likewise.
13781         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13782         the pattern statement rather than the original statement; check
13783         directly for a WIDEN_MULT_EXPR here.
13784         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13785         vect_is_simple_use to return the pattern statement rather
13786         than the original statement; use is_pattern_stmt_p to check
13787         for such a pattern statement.
13788         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13789         to return the pattern statement rather than the original statement;
13790         don't do the same transformation here.
13791         (vect_is_simple_use): If the defining statement has been replaced
13792         by a pattern statement, return the pattern statement instead.
13793         Remove the corresponding (local) transformation from the vectype
13794         overload.
13796 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13798         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13799         end and default to null.
13800         * tree-vect-loop.c (vect_create_epilog_for_reduction)
13801         (vectorizable_reduction): Update calls accordingly, dropping the
13802         gimple ** argument if the passed-back statement isn't needed.
13803         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13804         (vect_recog_rotate_pattern): Likewise.
13805         (vect_recog_mask_conversion_pattern): Likewise.
13806         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13807         (vect_mask_constant_operand_p): Likewise.
13808         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13809         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13810         (get_group_load_store_type, get_load_store_type): Likewise.
13811         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13812         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13813         (vectorizable_conversion, vectorizable_assignment): Likewise.
13814         (vectorizable_shift, vectorizable_operation): Likewise.
13815         (vectorizable_store, vect_is_simple_cond): Likewise.
13816         (vectorizable_condition, vectorizable_comparison): Likewise.
13817         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13818         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13819         and move it to the end.  Cope with null def_stmt_outs.
13821 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13823         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13825 2018-06-29  Jeff Law  <law@redhat.com>
13827         * config/v850/v850.c (v850_legitimate_address_p): Handle large
13828         displacements for TARGET_V850E2V3 and newer.
13829         (TARGET_LRA_P): Remove.  Defaults to LRA now.
13830         * config/v850/v850.md (sign23byte_load): Remove.
13831         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13832         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13834 2018-06-29  Martin Liska  <mliska@suse.cz>
13836         PR lto/85759
13837         * coverage.c (coverage_init): Mangle full path name.
13838         * doc/invoke.texi: Document the change.
13839         * gcov-io.c (mangle_path): New.
13840         * gcov-io.h (mangle_path): Likewise.
13841         * gcov.c (mangle_name): Use mangle_path for path mangling.
13843 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13845         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13846         if starting source register is not even.
13848 2018-06-29  Martin Liska  <mliska@suse.cz>
13850         PR tree-optimization/86263
13851         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13852         Make edge redirection.
13854 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
13856         * dumpfile.c (dump_loc): Add indentation based on scope depth.
13857         (dump_scope_depth): New variable.
13858         (get_dump_scope_depth): New function.
13859         (dump_begin_scope): New function.
13860         (dump_end_scope): New function.
13861         * dumpfile.h (get_dump_scope_depth): New declaration.
13862         (dump_begin_scope): New declaration.
13863         (dump_end_scope): New declaration.
13864         (class auto_dump_scope): New class.
13865         (AUTO_DUMP_SCOPE): New macro.
13866         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13867         AUTO_DUMP_SCOPE.
13869 2018-06-29  Richard Biener  <rguenther@suse.de>
13871         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13872         compute_all_dependences succeeds.
13873         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13874         exceed --param loop-max-datarefs-for-datadeps.
13876 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
13878         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13880 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
13882         PR target/86348
13883         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13884         alternative 0 in preferred_for_speed attribute.
13886 2018-06-28  Paul Koning  <ni1d@arrl.net>
13888         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13889         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13890         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13891         * config/pdp11/pdp11.md: Correct "length" attribute calculation
13892         for shift insn patterns.
13894 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
13896         * cgraph.c (cgraph_node::get_body): Replace assignments to
13897         "dump_file" with calls to set_dump_file.
13898         * dumpfile.c (alt_dump_file): Make static, and group with...
13899         (alt_flags): ...this definition.
13900         (dumps_are_enabled): New variable.
13901         (refresh_dumps_are_enabled): New function.
13902         (set_dump_file): New function.
13903         (set_alt_dump_file): New function.
13904         (gcc::dump_manager::dump_start): Replace assignments to
13905         "dump_file" and "alt_dump_file" with calls to set_dump_file and
13906         set_alt_dump_file.
13907         (gcc::dump_manager::dump_finish): Likewise.
13908         * dumpfile.h (alt_dump_file): Delete decl.
13909         (dumps_are_enabled): New variable decl.
13910         (set_dump_file): New function decl.
13911         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13912         global.
13913         * tree-nested.c (lower_nested_functions): Replace assignments to
13914         "dump_file" with calls to set_dump_file.
13916 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
13918         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13919         goto_locus of each outgoing edge of each basic block.
13921 2018-06-28  Richard Biener  <rguenther@suse.de>
13923         * dwarf2out.c (decl_scope_table): Remove.
13924         (push_decl_scope): Likewise.
13925         (pop_decl_scope): Likewise.
13926         (gen_type_die_for_member): Do not call push/pop_decl_scope.
13927         (gen_struct_or_union_type_die): Likewise.
13928         (gen_tagged_type_die): Likewise.
13929         (dwarf2out_init): Do not initialize decl_scope_table.
13930         (dwarf2out_c_finalize): Do not free it.
13932 2018-06-28  Richard Biener  <rguenther@suse.de>
13934         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13935         deciding whether to not re-use a DIE.
13937 2018-06-28  Richard Biener  <rguenther@suse.de>
13939         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13940         DW_AT_abstract_origin attribute.
13942 2018-06-28  Martin Liska  <mliska@suse.cz>
13944         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13945         Use newly introduced constants.
13946         * tree-switch-conversion.h (struct jump_table_cluster):
13947         Define max_ratio_for_size and max_ratio_for_speed.
13949 2018-06-28  Martin Liska  <mliska@suse.cz>
13951         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13952         Add new checking assert to catch invalid state.
13953         (jump_table_cluster::can_be_handled): Handle single case
13954         clusters.
13955         (jump_table_cluster::is_beneficial): Bail out for such case.
13956         (bit_test_cluster::find_bit_tests):
13957         Add new checking assert to catch invalid state.
13958         (bit_test_cluster::can_be_handled): Handle single case
13959         clusters.
13960         (bit_test_cluster::is_beneficial): Bail out for such case.
13961         (switch_decision_tree::analyze_switch_statement):
13962         Fix comment.
13964 2018-06-28  Martin Liska  <mliska@suse.cz>
13966         * common.opt: Introduce -completion option.
13967         * gcc.c (driver_handle_option): Handle it.
13968         (driver::main): Print completions if completion
13969         is set.
13970         * opt-suggestions.c (option_proposer::get_completions):
13971         New function.
13972         (option_proposer::suggest_completion): Likewise.
13973         (option_proposer::find_param_completions): Likewise.
13974         (verify_autocompletions): Likewise.
13975         (test_completion_valid_options): Likewise.
13976         (test_completion_valid_params): Likewise.
13977         (in_completion_p): Likewise.
13978         (empty_completion_p): Likewise.
13979         (test_completion_partial_match): Likewise.
13980         (test_completion_garbage): Likewise.
13981         (opt_proposer_c_tests): Likewise.
13982         * opt-suggestions.h: Declare new functions.
13983         * opts.c (common_handle_option): Handle OPT__completion_.
13984         * selftest-run-tests.c (selftest::run_tests): Add
13985         opt_proposer_c_tests.
13986         * selftest.c (assert_str_startswith): New.
13987         * selftest.h (assert_str_startswith): Likewise.
13988         (opt_proposer_c_tests): New.
13989         (ASSERT_STR_STARTSWITH): Likewise.
13991 2018-06-28  Martin Liska  <mliska@suse.cz>
13993         * Makefile.in: Add opt-suggestions.o.
13994         * gcc-main.c: Include opt-suggestions.h.
13995         * gcc.c (driver::driver): Likewise.
13996         (driver::~driver): Remove m_option_suggestions.
13997         (driver::build_option_suggestions): Moved to option_proposer.
13998         (driver::suggest_option): Likewise.
13999         (driver::handle_unrecognized_options): Use option_proposer.
14000         * gcc.h (class driver): Add new memver m_option_proposer.
14001         * opt-suggestions.c: New file.
14002         * opt-suggestions.h: New file.
14004 2018-06-28  Martin Liska  <mliska@suse.cz>
14006         * vec.h (class auto_string_vec): New (moved from auto_argvec).
14007         (auto_string_vec::~auto_string_vec): Likewise.
14009 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
14011         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14012         prevent_decl_creation_for_types fields up and add reset_location field.
14013         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14014         statement if id->reset_location is true.
14015         (copy_edges_for_bb): Do not set goto_locus on the new edges if
14016         id->reset_location is true.
14017         (copy_phis_for_bb): Force input_location on the arguments if
14018         id->reset_location is true.
14019         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14020         is set on the function to be inlined.
14022 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
14024         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14026 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
14028         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14029         registers for Pmode.
14030         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14031         hard registers for the clobbered pseudo.
14033 2018-06-27  Paul Koning  <ni1d@arrl.net>
14035         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14036         mutually exclusive options.
14037         * config/pdp11/constraints.md (h): New constraint.
14038         (O): Update definition to match shift code generation.
14039         (D): New constraint.
14040         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14041         (CCFP): Remove.
14042         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14043         function.
14044         (output_jump): Change arguments.
14045         (pdp11_fixed_cc_regs): New function.
14046         (pdp11_cc_mode): Ditto.
14047         (pdp11_expand_shift): Ditto.
14048         (pdp11_assemble_shift): Ditto.
14049         (pdp11_small_shift): Ditto.
14050         (pdp11_branch_cost): Remove.
14051         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14052         from output.
14053         (pdp11_register_move_cost): Update for CC registers.
14054         (pdp11_rtx_costs): Add case for LSHIFTRT.
14055         (pdp11_output_jump): Add CCNZ mode conditional branches.
14056         (notice_update_cc_on_set): Remove.
14057         (pdp11_cc_mode): New function.
14058         (simple_memory_operand): Correct pre/post decrement case.
14059         (no_side_effect_operand): New function.
14060         (pdp11_regno_reg_class): Add CC_REGS class.
14061         (pdp11_fixed_cc_regs): New function.
14062         (pdp11_small_shift): New function.
14063         (pdp11_expand_shift): New function to expand shift insns.
14064         (pdp11_assemble_shift): New function to output shifts.
14065         (pdp11_branch_cost): Remove.
14066         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14067         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14068         (WCHAR_TYPE): Ditto.
14069         (PTRDIFF_TYPE): Ditto.
14070         (ADJUST_INSN_LENGTH): New macro.
14071         (FIXED_REGISTERS): Add CC registers.
14072         (CALL_USED_REGISTERS): Ditto.
14073         (reg_class): Ditto.
14074         (REG_CLASS_NAMES): Ditto.
14075         (REG_CLASS_CONTENTS): Ditto.
14076         (SELECT_CC_MODE): Use new function.
14077         (TARGET_FLAGS_REGNUM): New macro.
14078         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14079         (cc0_reg_rtx): Remove.
14080         (CC_STATUS_MDEP): Remove.
14081         (CC_STATUS_MDEFP_INIT): Remove.
14082         (CC_IN_FPU): Remove.
14083         (NOTICE_UPDATE_CC): Remove.
14084         (REGISTER_NAMES): Add CC registers.
14085         (BRANCH_COST): Change to constant 1.
14086         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14087         handling.
14088         * config/pdp11/pdp11.opt (mbcopy): Remove.
14089         (mbcopy-builtin): Remove.
14090         (mbranch-cheap): Remove.
14091         (mbranch-expensive): Remove.
14092         * config/pdp11/predicates.md (expand_shift_operand): Update to
14093         match shift code generation.
14094         (ccnz_operator): New predicate.
14095         * doc/invoke.texi (PDP-11 Options): Remove deleted options
14096         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14097         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
14098         exclusive options.
14099         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
14100         description of O constraint.
14102 2018-06-27  Jeff Law  <law@redhat.com>
14103             Austin Law  <austinklaw@gmail.com>
14105         * config/v850/v850.md (addsi3_set_flags): New pattern.
14106         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14107         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14108         (zero_extendhisi2_v850_set_flags): Likewise.
14109         (zero_extendqisi2_v850_set_flags): Likewise.
14110         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14111         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14112         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14114         * config/v850/v850-protos.h (notice_update_cc): Remove.
14115         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14116         (v850_print_operand): Handle 'D' and "d".
14117         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14118         Add handling of arithmetic/logical operations compared against zero.
14119         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14120         Do not look at v850_compare_op, instead get mode from last argument.
14121         (v850_gen_compare): Remove
14122         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14123         after reload for prologue insns.
14124         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14125         patterns.
14126         (construct_save_jarl): Likewise.
14127         (TARGET_FLAGS_REGNUM): Define.
14128         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14129         (NOTICE_UPDATE_CC): Remove.
14130         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14131         than cc0.  Conditionalize on reload_completed.
14132         (cmpsi_insn, setfcc_insn): Likewise.
14133         (tst1 splitter): Turn into define_and_split which sets the flags
14134         after reload.
14135         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14136         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14137         (cstoresf4, cstoredf4): Clobber the flags.
14138         (cmpsi, cmpsf, cmpdf): Remove expanders.
14139         (setf_insn): Remove pattern.
14140         (addsi3): Turn into define_and_split which clobbers the flags after
14141         reload and a suitable pattern (addsi3_clobber_flags) for use after
14142         reload.
14143         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14144         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14145         (ashrsi3, ashrsi3_v850e2): Likewise.
14146         (bins): Clobber the flags.
14147         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14148         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14149         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14150         (call_value_internal_short, call_value_internal_long): Likewise.
14151         (callt_save_interrupt, callt_return_interrupt): Likewise.
14152         (save_interrupt, return_interrupt): Likewise.
14153         (callt_save_all_interrupt, save_all_interrupt): Likewise.
14154         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14155         (restore_all_interrupt, _restore_all_interrupt): Likewise.
14156         (All FP comparisons): Only allow after reload has completed.
14157         (trfsr): Likewise.
14158         (divh, divhu): Tweak output template.
14159         (branch_z_normal, branch_z_invert): Remove
14160         (branch_nz_normal, branch_nz_invert): Likewise.
14161         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14163         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14164         * config/v850/v850.c (notice_update_cc): Remove.
14165         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
14166         (CC_NO_CARRY): Likewise.
14167         (NOTICE_UPDATE_CC): Define to nothing.
14168         * config/v850/v850.md: Remove block comment on cc0 handling
14169         Remove "cc" attribute from all patterns.  Remove cc_status handling
14170         from all patterns.  Minor formatting fixes.
14172 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14174         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14175         (cortex-a76.cortex-a55): Likewise.
14176         * config/aarch64/aarch64-tune.md: Regenerate.
14177         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14178         cortex-a76.cortex-a55.
14180 2018-06-27  Jeff Law  <law@redhat.com>
14182         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14183         (MULTILIB_DIRNAMES): Similarly.
14185 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
14187         * gimple.h (gimple_return_retbnd): Delete.
14188         (gimple_return_set_retbnd): Likewise.
14189         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14190         gimple_return_set_retbnd.
14191         * gimple-pretty-print.c (dump_gimple_return): Remove call to
14192         gimple_return_retbnd and adjust.
14193         * tree-inline.h (struct copy_body_data): Remove retbnd field.
14194         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14195         Explicitly return NULL in a couple more cases.  Move assertion
14196         on debug statements and remove unreachable code.
14197         (reset_debug_binding): Do not test id->retbnd.
14198         (expand_call_inline): Do not set it.
14200 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
14202         * configure.ac: Add --disable-gcov option.
14203         * configure: Regenerate.
14204         * Makefile.in: Honour @enable_gcov@.
14205         * doc/install.texi: Document --disable-gcov.
14207 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14209         * config/arm/arm-cpus.in (cortex-a76): New entry.
14210         (cortex-a76.cortex-a55): Likewise.
14211         * config/arm/arm-tables.opt: Regenerate.
14212         * config/arm/arm-tune.md: Likewise.
14213         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14214         * doc/invoke.texi (ARM Options): Document cortex-a76 and
14215         cortex-a76.cortex-a55.
14217 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
14219         PR target/85769
14220         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14222 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
14224         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14225         comment.
14226         (EPILOGUE_USES): Likewise.
14228 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
14230         * tree-inline.c (remap_location): New function extracted from...
14231         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
14232         (copy_phis_for_bb): ...here.  Call remap_location.
14233         (copy_cfg_body): Adjust call to copy_edges_for_bb.
14235 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
14237         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14238         unaligned vsx for 16B memset.
14240 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
14242         PR target/86285
14243         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14244         ieee128_float_type_node to long_double_type_node unless
14245         TARGET_LONG_DOUBLE_128 is set.
14247 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
14249         * cfgloop.c (get_loop_location): Convert return type from
14250         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14251         by implicit construction from rtx_insn *, and using
14252         dump_user_location_t::from_function_decl for the fallback case.
14253         * cfgloop.h (get_loop_location): Convert return type from
14254         location_t to dump_user_location_t.
14255         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14256         dump_printf_loc to pass in a dump_location_t rather than a
14257         location_t, via the gimple stmt.
14258         * coverage.c (get_coverage_counts): Update calls to
14259         dump_printf_loc to pass in dump_location_t rather than a
14260         location_t.
14261         * doc/optinfo.texi (Dump types): Convert example of
14262         dump_printf_loc from taking "locus" to taking "insn".  Update
14263         description of the "_loc" calls to cover dump_location_t.
14264         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14265         "selftest.h".
14266         (dump_user_location_t::dump_user_location_t): New constructors,
14267         from gimple *stmt and rtx_insn *.
14268         (dump_user_location_t::from_function_decl): New function.
14269         (dump_loc): Make static.
14270         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14271         const dump_location_t &.
14272         (dump_generic_expr_loc): Delete.
14273         (dump_printf_loc): Convert param "loc" from location_t to
14274         const dump_location_t &.
14275         (selftest::test_impl_location): New function.
14276         (selftest::dumpfile_c_tests): New function.
14277         * dumpfile.h: Include "profile-count.h".
14278         (class dump_user_location_t): New class.
14279         (struct dump_impl_location_t): New struct.
14280         (class dump_location_t): New class.
14281         (dump_printf_loc): Convert 2nd param from source_location to
14282         const dump_location_t &.
14283         (dump_generic_expr_loc): Delete.
14284         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14285         const dump_location_t &.
14286         * gimple-fold.c (fold_gimple_assign): Update call to
14287         dump_printf_loc to pass in a dump_location_t rather than a
14288         location_t, via the gimple stmt.
14289         (gimple_fold_call): Likewise.
14290         * gimple-loop-interchange.cc
14291         (loop_cand::analyze_iloop_reduction_var): Update for change to
14292         check_reduction_path.
14293         (tree_loop_interchange::interchange): Update for change to
14294         find_loop_location.
14295         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14296         change in return-type of find_loop_location.
14297         (graphite_regenerate_ast_isl): Likewise.
14298         * graphite-optimize-isl.c (optimize_isl): Likewise.
14299         * graphite.c (graphite_transform_loops): Likewise.
14300         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14301         pass in a dump_location_t rather than a location_t, via the
14302         gimple stmt.
14303         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14304         * ipa.c (walk_polymorphic_call_targets): Likewise.
14305         * loop-unroll.c (report_unroll): Convert "locus" param from
14306         location_t to dump_location_t.
14307         (decide_unrolling): Update for change to get_loop_location's
14308         return type.
14309         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14310         location_t to dump_user_location_t.
14311         (grid_find_single_omp_among_assignments_1): Updates calls to
14312         dump_printf_loc to pass in a dump_location_t rather than a
14313         location_t, via the gimple stmt.
14314         (grid_parallel_clauses_gridifiable): Convert "tloc" from
14315         location_t to dump_location_t.  Updates calls to dump_printf_loc
14316         to pass in a dump_location_t rather than a location_t, via the
14317         gimple stmt.
14318         (grid_inner_loop_gridifiable_p): Likewise.
14319         (grid_dist_follows_simple_pattern): Likewise.
14320         (grid_gfor_follows_tiling_pattern): Likewise.
14321         (grid_target_follows_gridifiable_pattern): Likewise.
14322         (grid_attempt_target_gridification): Convert initialization
14323         of local "grid" from memset to zero-initialization; FIXME: does
14324         this require C++11?  Update call to dump_printf_loc to pass in a
14325         optinfo_location rather than a location_t, via the gimple stmt.
14326         * profile.c (read_profile_edge_counts): Updates call to
14327         dump_printf_loc to pass in a dump_location_t rather than a
14328         location_t
14329         (compute_branch_probabilities): Likewise.
14330         * selftest-run-tests.c (selftest::run_tests): Call
14331         dumpfile_c_tests.
14332         * selftest.h (dumpfile_c_tests): New decl.
14333         * tree-loop-distribution.c (pass_loop_distribution::execute):
14334         Update for change in return type of find_loop_location.
14335         * tree-parloops.c (parallelize_loops): Likewise.
14336         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14337         "locus" from location_t to dump_user_location_t.
14338         (canonicalize_loop_induction_variables): Likewise.
14339         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14340         for change in return type of find_loop_location.
14341         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14342         to dump_printf_loc to pass in a dump_location_t rather than a
14343         location_t, via the stmt.
14344         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14345         Likewise.
14346         * tree-vect-loop-manip.c (find_loop_location): Convert return
14347         type from source_location to dump_user_location_t.
14348         (vect_do_peeling): Update for above change.
14349         (vect_loop_versioning): Update for change in type of
14350         vect_location.
14351         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14352         from location_t to dump_user_location_t.
14353         (vect_estimate_min_profitable_iters): Update for change in type
14354         of vect_location.
14355         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14356         location_t to dump_location_t.
14357         (vect_slp_bb): Update for change in type of vect_location.
14358         * tree-vectorizer.c (vect_location): Convert from source_location
14359         to dump_user_location_t.
14360         (try_vectorize_loop_1): Update for change in vect_location's type.
14361         (vectorize_loops): Likewise.
14362         (increase_alignment): Likewise.
14363         * tree-vectorizer.h (vect_location): Convert from source_location
14364         to dump_user_location_t.
14365         (find_loop_location): Convert return type from source_location to
14366         dump_user_location_t.
14367         (check_reduction_path): Convert 1st param from location_t to
14368         dump_user_location_t.
14369         * value-prof.c (check_counter): Update call to dump_printf_loc to
14370         pass in a dump_user_location_t rather than a location_t; update
14371         call to error_at for change in type of "locus".
14372         (check_ic_target): Update call to dump_printf_loc to
14373         pass in a dump_user_location_t rather than a location_t, via the
14374         call_stmt.
14376 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
14378         * config/s390/s390.h (enum processor_flags): Do not use
14379         default tune parameter when -march was specified.
14381 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
14383         PR target/86314
14384         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14385         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14386         operands.
14388 2018-06-26  Richard Biener  <rguenther@suse.de>
14390         PR tree-optimization/86287
14391         PR bootstrap/86316
14392         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14393         (vect_analyze_loop): Initialize n_stmts.
14395 2018-06-26  Richard Biener  <rguenther@suse.de>
14397         PR middle-end/86271
14398         * fold-const.c (fold_convertible_p): Pointer extension
14399         isn't valid.
14401 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
14403         PR debug/86064
14404         * dwarf2out.c (loc_list_has_views): Adjust comments.
14405         (dw_loc_list): Split single cross-partition range with
14406         nonzero locview.
14408 2018-06-25  Jeff Law  <law@redhat.com>
14410         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14411         on -mbig-switch by default.
14413         * config/v850/predicates.md (const_float_1_operand): Fix match_code
14414         test.
14415         (const_float_0_operand): Remove unused predicate.
14416         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14417         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14418         (recipsf2): New expander.  Original pattern now called
14419         (recipsf2_insn).
14420         (recipdf2, recipdf2_insn): Similarly.
14421         (rsqrtsf2, rsqrtsf2_insn): Similarly
14422         (rsqrtdf2, rsqrtdf2_insn): Similarly
14424 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
14426         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14427         Simplify logic for FreeBSD (twice).
14429 2018-06-25  Martin Sebor  <msebor@redhat.com>
14431         PR tree-optimization/86204
14432         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14433         a strnlen result if it's less than the length of the string.
14435 2018-06-25  Martin Sebor  <msebor@redhat.com>
14437         PR tree-optimization/85700
14438         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14439         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14440         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14442 2018-06-25  Martin Sebor  <msebor@redhat.com>
14444         * doc/extend.texi (Zero-length arrays): Update and clarify.
14446 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
14448         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14449         added IEEE/IBM long double multilib support on PowerPC little
14450         endian Linux systems.
14451         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14452         (MULTILIB_DEFAULTS): Likewise.
14453         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14454         Likewise.
14455         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14456         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14457         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14459 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
14461         PR middle-end/86311
14462         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14463         (REORDER_45): Likewise.
14465 2018-06-25  Jeff Law  <law@redhat.com>
14467         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14468         dividend to 32 bits.  Adjust length.
14469         (udivmodhi4): Cleanup output template.  Fix length.
14471 2018-06-25  Carl Love  <cel@us.ibm.com>
14473         * config/rs6000/vsx.md: Change word selector to prefered location.
14475 2018-06-25  Richard Biener  <rguenther@suse.de>
14477         PR tree-optimization/86304
14478         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14479         epilogue-if-converted loops as well.
14481 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
14483         * lto-section-out.c (lto_begin_section): Do not print section
14484         name for noaddr and unnumbered dumps.
14486 2018-06-25  Richard Biener  <rguenther@suse.de>
14488         * tree-vectorizer.h (struct vec_info_shared): New structure
14489         with parts split out from struct vec_info and loop_nest from
14490         struct _loop_vec_info.
14491         (struct vec_info): Adjust accordingly.
14492         (struct _loop_vec_info): Likewise.
14493         (LOOP_VINFO_LOOP_NEST): Adjust.
14494         (LOOP_VINFO_DATAREFS): Likewise.
14495         (LOOP_VINFO_DDRS): Likewise.
14496         (struct _bb_vec_info): Likewise.
14497         (BB_VINFO_DATAREFS): Likewise.
14498         (BB_VINFO_DDRS): Likewise.
14499         (struct _stmt_vec_info): Add dr_aux member.
14500         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14501         (DR_MISALIGNMENT_UNINITIALIZED): New.
14502         (set_dr_misalignment): Adjust.
14503         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14504         (vect_analyze_loop): Adjust prototype.
14505         (vect_analyze_loop_form): Likewise.
14506         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14507         Compute dependences lazily.
14508         (vect_record_base_alignments): Use shared datarefs/ddrs.
14509         (vect_verify_datarefs_alignment): Likewise.
14510         (vect_analyze_data_refs_alignment): Likewise.
14511         (vect_analyze_data_ref_accesses): Likewise.
14512         (vect_analyze_data_refs): Likewise.
14513         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14514         constructor parameter for shared part.
14515         (vect_analyze_loop_form): Pass in shared part and adjust.
14516         (vect_analyze_loop_2): Pass in storage for the number of
14517         stmts.  Move loop nest finding to the caller.  Compute
14518         datarefs lazily.
14519         (vect_analyze_loop): Pass in shared part.
14520         (vect_transform_loop): Verify shared datarefs are unchanged.
14521         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14522         constructor parameter for shared part.
14523         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14524         (vect_slp_bb): Verify shared datarefs are unchanged before
14525         transform.
14526         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14527         change.
14528         (new_stmt_vec_info): Initialize DR_AUX misalignment to
14529         DR_MISALIGNMENT_UNINITIALIZED.
14530         * tree-vectorizer.c (vec_info::vec_info): Add constructor
14531         parameter for shared part.
14532         (vec_info::~vec_info): Adjust.
14533         (vec_info_shared::vec_info_shared): New.
14534         (vec_info_shared::~vec_info_shared): Likewise.
14535         (vec_info_shared::save_datarefs): Likewise.
14536         (vec_info_shared::check_datarefs): Likewise.
14537         (try_vectorize_loop_1): Construct shared part live for analyses
14538         of a single loop for multiple vector sizes.
14539         * tree-parloops.c (gather_scalar_reductions): Adjust.
14541 2018-06-25  Richard Biener  <rguenther@suse.de>
14543         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14544         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14545         (vect_analyze_data_refs): Remove similar code from here and
14546         simplify accordingly.
14548 2018-06-25  Richard Biener  <rguenther@suse.de>
14550         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14551         for reverse storage order accesses rather than asserting
14552         they cannot happen here.
14554 2018-06-25  Tom de Vries  <tdevries@suse.de>
14556         PR debug/86257
14557         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14558         Use data16 instead of .byte for insn prefix.
14560 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
14562         PR C++/86082
14563         * parser.c (make_char_string_pack): Pass this literal chars
14564         through cpp_interpret_string.
14565         (cp_parser_userdef_numeric_literal): Check the result of
14566         make_char_string_pack.
14568 2018-06-24  Maya Rashish  <coypu@sdf.org>
14570         * ginclude/stddef.h: Simplify conditions around avoiding
14571         re-definition of __size_t.
14573 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14575         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14576         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14578 2018-06-22  Maya Rashish  <coypu@sdf.org>
14580         * doc/invoke.texi (mno-fancy-math-387): Update for changes
14581         made to OpenBSD and NetBSD through the years.
14583 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14585         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14586         behavior of vec_pack (vector double, vector double) to match
14587         behavior of vec_float2 (vector double, vector double).
14589 2018-06-22  Olivier Hainque  <hainque@adacore.com>
14591         * gimplify.c (gimplify_function_tree): Prevent creation
14592         of a trampoline for the address of the current function
14593         passed to entry/exit instrumentation hooks.
14595 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
14597         PR target/86222
14598         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14599         correctly.
14601 2018-06-22  Martin Liska  <mliska@suse.cz>
14603         PR tree-optimization/86263
14604         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14605         Bail out if is_enabled is false.
14606         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14607         New declaration.
14608         (jump_table_cluster::is_enabled): New function.
14610 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14612         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14613         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14614         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14615         (lto_input_ts_binfo_tree_pointers): Likewise.
14616         * tree-streamer-out.c (streamer_write_tree_bitfields,
14617         write_ts_binfo_tree_pointers): Likewise.
14618         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14620 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14622         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14624 2018-06-22  Martin Liska  <mliska@suse.cz>
14626         * symbol-summary.h (get): Make it pure and inline move
14627         functionality from ::get function.
14628         (get): Remove and inline into ::get and ::get_create.
14629         (get_create): Move code from ::get function.
14631 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14633         PR target/85994
14634         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14635         -x assembler-with-cpp.
14637 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14639         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14640         _FILE_OFFSET_BITS=64 for C++.
14642 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
14644         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14645         conversion insn that shows up when pr85657-3.c is compiled using
14646         IEEE 128-bit long double.
14647         (neg<mode>2_internal): Use the correct mode to check whether the
14648         mode is IBM extended.
14649         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14650         multiply and divide external functions from being created more
14651         than once.
14653 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14655         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14656         functions.
14657         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
14658         the edge can be forwarded.
14659         (cfg_layout_merge_blocks): Likewise.
14661 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14663         * except.c (finish_eh_generation): Commit edge insertions only after
14664         the EH edges have been redirected from post-landing to landing pads.
14666 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14668         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14669         create_tmp_var_for to create the FRAME decl.
14670         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14672 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14674         * tree-inline.c (copy_edges_for_bb): Minor tweak.
14675         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14676         debug statement when resetting its value.
14677         (expand_call_inline): Copy the locus of the call onto the assignment
14678         of the return value, if any.  Use local variable in more cases.
14680 2018-06-21  Martin Liska  <mliska@suse.cz>
14682         * ipa-pure-const.c (propagate_nothrow): Use
14683         funct_state_summaries->get.
14684         (dump_malloc_lattice): Likewise.
14685         (propagate_malloc): Likewise.
14687 2018-06-21  Richard Biener  <rguenther@suse.de>
14689         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14690         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14691         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14692         comment.
14693         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14694         BLOCK_ABSTRACT_ORIGIN unconditionally.
14696 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
14698         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14699         deleting it.
14700         * ipa-reference.c (ipa_reference_c_finalize): Delete
14701         ipa_ref_opt_sum_summaries and set it to NULL.
14703 2018-06-21  Tom de Vries  <tdevries@suse.de>
14705         PR tree-optimization/85859
14706         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14707         test with comment from bb_no_side_effects_p.
14709 2018-06-21  Richard Biener  <rguenther@suse.de>
14711         PR tree-optimization/86232
14712         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14713         max for constant niter.
14715 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14717         * config/aarch64/aarch64-simd.md
14718         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14720 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14722         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14723         Make opernads of the unspec commutative.
14725 2018-06-21  Richard Biener  <rguenther@suse.de>
14727         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14728         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14729         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14730         (vect_analyze_data_ref_dependence): Re-order checks to deal with
14731         NULL DR_STEP.
14732         (vect_record_base_alignments): Do not record base alignment
14733         for gathers or scatters.
14734         (vect_compute_data_ref_alignment): Drop return value that is always
14735         true.  Bail out early for gathers or scatters.
14736         (vect_enhance_data_refs_alignment): Bail out early for gathers
14737         or scatters.
14738         (vect_find_same_alignment_drs): Likewise.
14739         (vect_analyze_data_refs_alignment): Remove dead code.
14740         (vect_slp_analyze_and_verify_node_alignment): Likewise.
14741         (vect_analyze_data_refs): For possible gathers or scatters do
14742         not create an alternate DR, just check their possible validity
14743         and mark them.  Adjust DECL_NONALIASED handling to not rely
14744         on DR_BASE_ADDRESS.
14745         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14746         update inits of gathers or scatters.
14747         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14748         Also copy gather/scatter flag to pattern vinfo.
14750 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14752         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14753         behavior of vec_packsu (vector unsigned long long, vector unsigned
14754         long long) to match behavior of vec_packs with same signature.
14756 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
14757             Thomas Schwinge <thomas@codesourcery.com>
14758             Cesar Philippidis  <cesar@codesourcery.com>
14760         * gimplify.c (gimplify_scan_omp_clauses): Add support for
14761         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14762         (gimplify_adjust_omp_clauses): Likewise.
14763         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14764         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14765         (gimplify_omp_target_update): Update handling of acc update and
14766         enter/exit data.
14767         * omp-low.c (install_var_field): Remove unused parameter
14768         base_pointers_restrict.
14769         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14770         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14771         FINALIZE}
14772         (omp_target_base_pointers_restrict_p): Delete.
14773         (scan_omp_target): Update call to scan_sharing_clauses.
14774         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14775         FINALIZE}.
14776         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14777         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14778         (convert_local_omp_clauses): Likewise.
14779         * tree-pretty-print.c (dump_omp_clause): Likewise.
14780         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
14781         FINALIZE}.
14782         (omp_clause_code_name): Likewise.
14784 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
14786         PR debug/86194
14787         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14788         be narrowed.
14790         PR tree-optimization/86231
14791         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
14792         anti-range don't overwrite *vr0min before using it to compute *vr0max.
14794 2018-06-20  Tom de Vries  <tdevries@suse.de>
14796         PR tree-optimization/86097
14797         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14798         iv type if signedness of iv type is not the same as that of *nit.
14800 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
14802         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
14803         EDGE_EH edges, verify they are all EDGE_EH.
14805 2018-06-20  Maya Rashish  <coypu@sdf.org>
14807         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14809 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14811         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14812         * config/aarch64/aarch64.c (xgene1_tunings): Add
14813         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14814         (aarch64_mode_valid_for_sched_fusion_p):
14815         Allow 16-byte modes.
14816         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14817         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14818         128-bit modes.
14819         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14820         New pattern.
14821         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14822         * config/aarch64/iterators.md (VQ2): New mode iterator.
14824 2018-06-20  Martin Liska  <mliska@suse.cz>
14826         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14827         Change default ratio from 10 to 8.
14829 2018-06-20  Martin Liska  <mliska@suse.cz>
14831         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14832         New.
14833         (bit_test_cluster::find_bit_tests): Likewise.
14834         (switch_decision_tree::analyze_switch_statement): Find clusters.
14835         * tree-switch-conversion.h (struct jump_table_cluster): Document
14836         hierarchy.
14838 2018-06-20  Martin Liska  <mliska@suse.cz>
14840         * tree-switch-conversion.c (switch_conversion::collect):
14841         Record m_uniq property.
14842         (switch_conversion::expand): Bail out for special conditions.
14843         (group_cluster::~group_cluster): New.
14844         (group_cluster::group_cluster): Likewise.
14845         (group_cluster::dump): Likewise.
14846         (jump_table_cluster::emit): New.
14847         (switch_decision_tree::fix_phi_operands_for_edges): New.
14848         (struct case_node): Remove struct.
14849         (jump_table_cluster::can_be_handled): New.
14850         (case_values_threshold): Moved to header.
14851         (reset_out_edges_aux): Likewise.
14852         (jump_table_cluster::is_beneficial): New.
14853         (bit_test_cluster::can_be_handled): Likewise.
14854         (add_case_node): Remove.
14855         (bit_test_cluster::is_beneficial): New.
14856         (case_bit_test::cmp): New.
14857         (bit_test_cluster::emit): New.
14858         (expand_switch_as_decision_tree_p): Remove.
14859         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14860         (fix_phi_operands_for_edge): Likewise.
14861         (switch_decision_tree::analyze_switch_statement): New.
14862         (compute_cases_per_edge): Move ...
14863         (switch_decision_tree::compute_cases_per_edge): ... here.
14864         (try_switch_expansion): Likewise.
14865         (switch_decision_tree::try_switch_expansion): Likewise.
14866         (record_phi_operand_mapping): Likewise.
14867         (switch_decision_tree::record_phi_operand_mapping): Likewise.
14868         (emit_case_decision_tree): Likewise.
14869         (switch_decision_tree::emit): Likewise.
14870         (balance_case_nodes): Likewise.
14871         (switch_decision_tree::balance_case_nodes): Likewise.
14872         (dump_case_nodes): Likewise.
14873         (switch_decision_tree::dump_case_nodes): Likewise.
14874         (emit_jump): Likewise.
14875         (switch_decision_tree::emit_jump): Likewise.
14876         (emit_cmp_and_jump_insns): Likewise.
14877         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14878         (emit_case_nodes): Likewise.
14879         (switch_decision_tree::emit_case_nodes): Likewise.
14880         (conditional_probability): Remove.
14881         * tree-switch-conversion.h (enum cluster_type): New.
14882         (PRINT_CASE): New.
14883         (struct cluster): Likewise.
14884         (cluster::cluster): Likewise.
14885         (struct simple_cluster): Likewise.
14886         (simple_cluster::simple_cluster): Likewise.
14887         (struct group_cluster): Likewise.
14888         (struct jump_table_cluster): Likewise.
14889         (struct bit_test_cluster): Likewise.
14890         (struct min_cluster_item): Likewise.
14891         (struct case_tree_node): Likewise.
14892         (case_tree_node::case_tree_node): Likewise.
14893         (jump_table_cluster::case_values_threshold): Likewise.
14894         (struct case_bit_test): Likewise.
14895         (struct switch_decision_tree): Likewise.
14896         (struct switch_conversion): Likewise.
14897         (switch_decision_tree::reset_out_edges_aux): Likewise.
14899 2018-06-20  Martin Liska  <mliska@suse.cz>
14901         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14902         (hoist_edge_and_branch_if_true): Likewise.
14903         (expand_switch_using_bit_tests_p): Likewise.
14904         (struct case_bit_test): Likewise.
14905         (case_bit_test_cmp): Likewise.
14906         (emit_case_bit_tests): Likewise.
14907         (switch_conversion::switch_conversion): New class.
14908         (struct switch_conv_info): Remove old struct.
14909         (collect_switch_conv_info): More to ...
14910         (switch_conversion::collect): ... this.
14911         (check_range): Likewise.
14912         (switch_conversion::check_range): Likewise.
14913         (check_all_empty_except_final): Likewise.
14914         (switch_conversion::check_all_empty_except_final): Likewise.
14915         (check_final_bb): Likewise.
14916         (switch_conversion::check_final_bb): Likewise.
14917         (create_temp_arrays): Likewise.
14918         (switch_conversion::create_temp_arrays): Likewise.
14919         (free_temp_arrays): Likewise.
14920         (gather_default_values): Likewise.
14921         (switch_conversion::gather_default_values): Likewise.
14922         (build_constructors): Likewise.
14923         (switch_conversion::build_constructors): Likewise.
14924         (constructor_contains_same_values_p): Likewise.
14925         (switch_conversion::contains_same_values_p): Likewise.
14926         (array_value_type): Likewise.
14927         (switch_conversion::array_value_type): Likewise.
14928         (build_one_array): Likewise.
14929         (switch_conversion::build_one_array): Likewise.
14930         (build_arrays): Likewise.
14931         (switch_conversion::build_arrays): Likewise.
14932         (gen_def_assigns): Likewise.
14933         (switch_conversion::gen_def_assigns): Likewise.
14934         (prune_bbs): Likewise.
14935         (switch_conversion::prune_bbs): Likewise.
14936         (fix_phi_nodes): Likewise.
14937         (switch_conversion::fix_phi_nodes): Likewise.
14938         (gen_inbound_check): Likewise.
14939         (switch_conversion::gen_inbound_check): Likewise.
14940         (process_switch): Use the newly created class.
14941         (switch_conversion::expand): New.
14942         (switch_conversion::~switch_conversion): New.
14943         * tree-switch-conversion.h: New file.
14945 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14947         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14948         tree-vect-patterns.c.
14949         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14950         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
14951         (vect_recog_sad_pattern): Likewise.
14952         (vect_recog_widen_sum_pattern): Likewise.
14953         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
14954         (vect_recog_widen_shift_pattern): Remove the type_in argument.
14955         (vect_recog_rotate_pattern): Likewise.
14956         (vect_recog_mult_pattern): Likewise.
14957         (vect_recog_vector_vector_shift_pattern): Likewise.
14958         (vect_recog_divmod_pattern): Likewise.
14959         (vect_recog_mixed_size_cond_pattern): Likewise.
14960         (vect_recog_bool_pattern): Likewise.
14961         (vect_recog_mask_conversion_pattern): Likewise.
14962         (vect_try_gather_scatter_pattern): Likewise.
14963         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
14964         (vect_recog_over_widening_pattern): Likewise.
14965         (vect_recog_gather_scatter_pattern): Likewise.
14966         (vect_recog_func_ptr): Move from tree-vectorizer.h
14967         (vect_vect_recog_func_ptrs): Move further down the file.
14968         (vect_recog_func): Likewise.  Remove the third argument.
14969         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14970         (vect_pattern_recog_1): Expect the pattern function to do any
14971         necessary target tests.  Also expect it to provide a vector type.
14972         Remove the type_in handling.
14974 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14976         * tree-vect-patterns.c (vect_pattern_detected): New function.
14977         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14978         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14979         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14980         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14981         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14982         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14983         (vect_recog_mask_conversion_pattern)
14984         (vect_try_gather_scatter_pattern): Likewise.
14986 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14988         * tree-vect-patterns.c (vect_get_internal_def): New function.
14989         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14990         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14991         (search_type_for_mask_1): Use it.
14993 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14995         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14996         redundant WIDEN_SUM_EXPR handling.
14997         (vect_recog_sad_pattern): Likewise.
14999 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15001         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15002         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15003         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15004         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15005         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15007 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15009         * tree-vect-stmts.c (vectorizable_call): Make sure that we
15010         use the stmt_vec_info of the original bb statement for the
15011         new zero assignment, even if the call is part of a pattern.
15013 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15015         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15016         that the sequence is attached to the original statement rather
15017         than the pattern statement.
15018         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15019         PATTERN_DEF_SEQ from the original statement rather than
15020         the main pattern statement.
15021         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15022         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15023         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15025 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15027         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15028         definition statements before the early exit for statements that aren't
15029         live or relevant.
15030         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15031         split out from...
15032         (vect_transform_loop): ...here.  Process pattern definition
15033         statements without first checking whether the main pattern
15034         statement is live or relevant.
15036 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
15038         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15039         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15041 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
15043         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15044         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15045         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15046         (expand_block_compare): Change select_block_compare_mode call.
15047         (expand_strncmp_align_check): Use new functions, fix comment.
15048         (emit_final_str_compare_gpr): New function.
15049         (expand_strn_compare): Refactor and clean up code.
15050         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15052 2018-06-19  Tony Reix  <tony.reix@atos.com>
15053             Damien Bergamini  <damien.bergamini@atos.com>
15054             David Edelsohn  <dje.gcc@gmail.com>
15056         * collect2.c (static_obj): New variable.
15057         (static_libs): New variable.
15058         (is_in_list): Uncomment declaration.
15059         (main): Track AIX libraries linked statically.
15060         (is_in_list): Uncomment definition.
15061         (scan_prog_file): Don't add AIX shared libraries initializer
15062         to constructor list if linking statically.
15064 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
15066         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15067         constant.
15068         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15070 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
15072         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15073         blocks.
15075 2018-06-19  Martin Liska  <mliska@suse.cz>
15077         * config/i386/i386.c (ix86_can_inline_p): Do not use
15078         ipa_fn_summaries::get_create.
15079         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15080         get.
15081         (devirtualization_time_bonus): Likewise.
15082         (ipcp_propagate_stage): Likewise.
15083         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15084         (edge_set_predicate): Likewise.
15085         (evaluate_conditions_for_known_args): Likewise.
15086         (evaluate_properties_for_edge): Likewise.
15087         (ipa_call_summary::reset): Tranform to ...
15088         (ipa_call_summary::~ipa_call_summary): ... this.
15089         (ipa_fn_summary::reset): Transform to ...
15090         (ipa_fn_summary::~ipa_fn_summary): ... this.
15091         (ipa_fn_summary_t::remove): Rename to ...
15092         (ipa_fn_summary_t::remove_callees): ... this.
15093         (ipa_fn_summary_t::duplicate): Use placement new
15094         instead of memory copy.
15095         (ipa_call_summary_t::duplicate): Likewise.
15096         (ipa_call_summary_t::remove): Remove.
15097         (dump_ipa_call_summary): Change get_create to get.
15098         (ipa_dump_fn_summary): Dump only when summary exists.
15099         (analyze_function_body): Use symbol_summary::get instead
15100         of get_create.
15101         (compute_fn_summary): Likewise.
15102         (estimate_edge_devirt_benefit): Likewise.
15103         (estimate_edge_size_and_time): Likewise.
15104         (inline_update_callee_summaries): Likewise.
15105         (remap_edge_change_prob): Likewise.
15106         (remap_edge_summaries): Likewise.
15107         (ipa_merge_fn_summary_after_inlining): Likewise.
15108         (write_ipa_call_summary): Likewise.
15109         (ipa_fn_summary_write): Likewise.
15110         (ipa_free_fn_summary): Likewise.
15111         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15112         (struct ipa_call_summary): Likewise.
15113         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15114         of get_create.
15115         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15116         (estimate_size_after_inlining): Likewise.
15117         (estimate_growth): Likewise.
15118         (growth_likely_positive): Likewise.
15119         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15120         (inline_call): Likewise.
15121         * ipa-inline.c (caller_growth_limits): Likewise.
15122         (can_inline_edge_p): Likewise.
15123         (can_inline_edge_by_limits_p): Likewise.
15124         (compute_uninlined_call_time): Likewise.
15125         (compute_inlined_call_time): Likewise.
15126         (want_inline_small_function_p): Likewise.
15127         (edge_badness): Likewise.
15128         (update_caller_keys): Likewise.
15129         (update_callee_keys): Likewise.
15130         (inline_small_functions): Likewise.
15131         (inline_to_all_callers_1): Likewise.
15132         (dump_overall_stats): Likewise.
15133         (early_inline_small_functions): Likewise.
15134         (early_inliner): Likewise.
15135         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15136         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15137         * ipa-pure-const.c (malloc_candidate_p): Likewise.
15138         * ipa-split.c (execute_split_functions): Likewise.
15139         * symbol-summary.h: Likewise.
15140         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15142 2018-06-19  Richard Biener  <rguenther@suse.de>
15144         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15145         (vectorize_loops): ... here.  Fix dbgcnt handling.
15146         (try_vectorize_loop): Wrap try_vectorize_loop_1.
15148 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
15150         PR target/86197
15151         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15152         ieee128 argument takes up only one (vector) register, not two (floating
15153         point) registers.
15155 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
15157         * gimplify.c (gimplify_init_constructor): Really never clear for an
15158         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15160 2018-06-19  Richard Biener  <rguenther@suse.de>
15162         PR tree-optimization/86179
15163         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15164         after failed recognition.
15166 2018-06-18  Martin Sebor  <msebor@redhat.com>
15168         PR middle-end/85602
15169         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15170         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15171         Handle integer subtraction.
15172         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15173         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15175 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15177         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15178         param from rtx to rtx_insn *.
15179         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15180         param.
15181         (frv_ifcvt_modify_insn): Likwise.
15182         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15183         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
15184         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15185         as_a <rtx_insn *> cast to local "unprotected_region" once
15186         it's been established that it's not NULL or pc_rtx.
15187         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15188         param "sethi" from rtx to rtx_insn *.
15189         (nds32_group_float_insns): Likewise for param "insn".
15190         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15191         param.
15192         (vax_output_int_subtract): Likewise.
15193         * config/vax/vax.c (vax_output_int_add): Likewise for param
15194         "insn".
15195         (vax_output_int_subtract): Likewise.
15196         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15197         (emit_pattern_after): Likewise for param "after".
15198         (emit_insn_after): Likewise.
15199         (emit_jump_insn_after): Likewise.
15200         (emit_call_insn_after): Likewise.
15201         (emit_debug_insn_after): Likewise.
15202         (emit_pattern_before): Likewise for param "before".
15203         (emit_insn_before): Likewise.
15204         (emit_jump_insn_before): Likewise.
15205         * final.c (get_insn_template): Likewise for param "insn", removing
15206         a cast.
15207         * output.h (get_insn_template): Likewise for 2nd param.
15208         * rtl.h (emit_insn_before): Likewise.
15209         (emit_jump_insn_before): Likewise.
15210         (emit_debug_insn_before_noloc): Likewise.
15211         (emit_insn_after): Likewise.
15212         (emit_jump_insn_after): Likewise.
15213         (emit_call_insn_after): Likewise.
15214         (emit_debug_insn_after): Likewise.
15215         (set_insn_deleted): Likewise for param.
15217 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
15219         PR target/85358
15220         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15221         floating point modes, so that IFmode is numerically greater than
15222         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15223         to declare the ordering.  This prevents IFmode from being
15224         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15225         machine.  Include rs6000-modes.h to share the fractional values
15226         between genmodes* and the rest of the compiler.
15227         (IFmode): Likewise.
15228         (KFmode): Likewise.
15229         (TFmode): Likewise.
15230         * config/rs6000/rs6000-modes.h: New file.
15231         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15232         meaning of rs6000_long_double_size so that 126..128 selects an
15233         appropriate 128-bit floating point type.
15234         (rs6000_option_override_internal): Likewise.
15235         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15236         (TARGET_LONG_DOUBLE_128): Change the meaning of
15237         rs6000_long_double_size so that 126..128 selects an appropriate
15238         128-bit floating point type.
15239         (LONG_DOUBLE_TYPE_SIZE): Update comment.
15240         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15241         source and destination to match the standard usage.
15242         (truncifkf2): Likewise.
15243         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15244         ISA 2.07 to use an explicit clobber, instead of passing in a
15245         temporary.
15246         (copysign<mode>3_soft): Likewise.
15248 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15250         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15251         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15252         (vect_slp_analyze_instance_dependence): Likewise.
15253         (vect_enhance_data_refs_alignment): Likewise.
15254         (vect_analyze_data_refs_alignment): Likewise.
15255         (vect_slp_analyze_and_verify_instance_alignment
15256         (vect_analyze_data_ref_accesses): Likewise.
15257         (vect_prune_runtime_alias_test_list): Likewise.
15258         (vect_analyze_data_refs): Likewise.
15259         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15260         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15261         (vect_analyze_scalar_cycles_1): Likewise.
15262         (vect_get_loop_niters): Likewise.
15263         (vect_analyze_loop_form_1): Likewise.
15264         (vect_update_vf_for_slp): Likewise.
15265         (vect_analyze_loop_operations): Likewise.
15266         (vect_analyze_loop): Likewise.
15267         (vectorizable_induction): Likewise.
15268         (vect_transform_loop): Likewise.
15269         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15270         * tree-vect-slp.c (vect_analyze_slp): Likewise.
15271         (vect_make_slp_decision): Likewise.
15272         (vect_detect_hybrid_slp): Likewise.
15273         (vect_slp_analyze_operations): Likewise.
15274         (vect_slp_bb): Likewise.
15275         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15276         (vectorizable_bswap): Likewise.
15277         (vectorizable_call): Likewise.
15278         (vectorizable_simd_clone_call): Likewise.
15279         (vectorizable_conversion): Likewise.
15280         (vectorizable_assignment): Likewise.
15281         (vectorizable_shift): Likewise.
15282         (vectorizable_operation): Likewise.
15283         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15285 2018-06-18  Martin Sebor  <msebor@redhat.com>
15287         PR tree-optimization/81384
15288         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15289         * builtins.c (expand_builtin_strnlen): New function.
15290         (expand_builtin): Call it.
15291         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15292         * builtins.def (BUILT_IN_STRNLEN): New.
15293         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15294         Warn for bounds in excess of maximum object size.
15295         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15296         single-value ranges.  Handle strnlen.
15297         (handle_builtin_strlen): Handle strnlen.
15298         (strlen_check_and_optimize_stmt): Same.
15299         * doc/extend.texi (Other Builtins): Document strnlen.
15301 2018-06-18  Maya Rashish  <coypu@sdf.org>
15303         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15304         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15305         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15307         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15308         here to ...
15309         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15311 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15313         * tree.c (escaped_string::escape): Replace cast to char * by
15314         const_cast<char *> (unescaped).
15316 2018-06-18  Nick Clifton  <nickc@redhat.com>
15318         PR 84195
15319         * tree.c (escaped_string): New class.  Converts an unescaped
15320         string into its escaped equivalent.
15321         (warn_deprecated_use): Use the new class to convert the
15322         deprecation message, if present.
15323         (test_escaped_strings): New self test.
15324         (test_c_tests): Add test_escaped_strings.
15325         * doc/extend.texi (deprecated): Add a note that the
15326         deprecation message is affected by the -fmessage-length
15327         option, and that control characters will be escaped.
15328         (#pragma GCC error): Document this pragma.
15329         (#pragma GCC warning): Likewise.
15330         * doc/invoke.texi (-fmessage-length): Document this option's
15331         effect on the #warning and #error preprocessor directives and
15332         the deprecated attribute.
15334 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15336         * tree.c (decl_value_expr_lookup): Revert latest change.
15337         (decl_value_expr_insert): Likewise.
15339 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
15341         * gimplify.c (nonlocal_vlas): Delete.
15342         (nonlocal_vla_vars): Likewise.
15343         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15344         referenced VLAs.
15345         (gimplify_body): Do not create and destroy nonlocal_vlas.
15346         * tree-nested.c: Include diagnostic.h.
15347         (use_pointer_in_frame): Tweak.
15348         (lookup_field_for_decl): Add assertion and declare the transformation.
15349         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15350         internal error when the reference is in a wrong context.  Do not
15351         create a debug decl by default.
15352         (note_nonlocal_block_vlas): Delete.
15353         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15354         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
15355         create a debug decl by default.
15356         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15357         call is in a wrong context.
15358         (fixup_vla_decls): New function.
15359         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
15360         debug variables were created.
15361         * tree.c (decl_value_expr_lookup): Add checking assertion.
15362         (decl_value_expr_insert): Likewise.
15364 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15366         PR middle-end/82479
15367         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15368         * tree-scalar-evolution.c (interpret_expr): Likewise.
15369         (expression_expensive_p): Likewise.
15370         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15371         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15372         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15373         (ssa_defined_by_minus_one_stmt_p): New.
15375 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15377         PR middle-end/64946
15378         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15379         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15380         * dojump.c (do_jump): Likewise.
15381         * expr.c (expand_expr_real_2): Check operand type's sign.
15382         * fold-const.c (const_unop): Handle ABSU_EXPR.
15383         (fold_abs_const): Likewise.
15384         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15385         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15386         (strip_sign_op_1): Likesise.
15387         * match.pd: Add new pattern to generate ABSU_EXPR.
15388         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15389         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15390         * tree-eh.c (operation_could_trap_helper_p): Likewise.
15391         * tree-inline.c (estimate_operator_cost): Likewise.
15392         * tree-pretty-print.c (dump_generic_node): Likewise.
15393         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15394         * tree.def (ABSU_EXPR): New.
15396 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
15398         PR middle-end/86095
15399         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15400         documented as preserved for backward compatibility only.
15401         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15403         PR rtl-optimization/86108
15404         * bb-reorder.c (create_forwarder_block): Renamed to ...
15405         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
15406         jump from new landing pad to the second part.
15407         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15408         Adjust callers.
15410 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
15412         PR middle-end/85878
15413         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15414         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15415         Only call store_expr for halves if the mode is the same.
15417         PR middle-end/86123
15418         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15419         Fix up comment formatting.
15421 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15423         * typed-splay-tree.h (typed_splay_tree::remove): New function.
15424         (typed_splay_tree::closure,
15425         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15426         (typed_splay_tree::typed_splay_tree,
15427         typed_splay_tree::operator =): Declared private.
15428         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15429         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15430         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15431         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15432         typed_splay_tree::splay_tree_splay,
15433         typed_splay_tree::splay_tree_foreach_helper,
15434         typed_splay_tree::splay_tree_insert,
15435         typed_splay_tree::splay_tree_remove,
15436         typed_splay_tree::splay_tree_lookup,
15437         typed_splay_tree::splay_tree_predecessor,
15438         typed_splay_tree::splay_tree_successor,
15439         typed_splay_tree::splay_tree_min,
15440         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15441         (typed_splay_tree::root, typed_splay_tree::comp,
15442         typed_splay_tree::delete_key,
15443         typed_splay_tree::delete_value): New data members.
15444         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15445         typed_splay_tree::remove.
15447 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
15449         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15450         -mginv and -mno-ginv to the assembler.
15451         * config/mips/mips.opt (-mcrc): New option.
15452         (-mginv): Likewise.
15453         * doc/invoke.text (-mcrc): Document.
15454         (-mginv): Likewise.
15456 2018-06-15  Nick Clifton  <nickc@redhat.com>
15458         PR 84195
15459         * tree.c (escaped_string): New class.  Converts an unescaped
15460         string into its escaped equivalent.
15461         (warn_deprecated_use): Use the new class to convert the
15462         deprecation message, if present.
15463         (test_escaped_strings): New self test.
15464         (test_c_tests): Add test_escaped_strings.
15465         * doc/extend.texi (deprecated): Add a note that the
15466         deprecation message is affected by the -fmessage-length
15467         option, and that control characters will be escaped.
15468         (#pragma GCC error): Document this pragma.
15469         (#pragma GCC warning): Likewise.
15470         * doc/invoke.texi (-fmessage-length): Document this option's
15471         effect on the #warning and #error preprocessor directives and
15472         the deprecated attribute.
15474 2018-06-15  Richard Biener  <rguenther@suse.de>
15476         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15477         here, also noting vector size used.
15478         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
15479         size used in MSG_OPTIMIZED_LOCATIONS dump.
15480         (pass_slp_vectorize::execute): Adjust.
15482 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
15484         PR target/85968
15485         * config/arc/arc.c (arc_return_address_register): Fix
15486         if-condition.
15488 2018-06-15  Richard Biener  <rguenther@suse.de>
15490         PR middle-end/86159
15491         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15492         leave useless conversion stripping to force_gimple_operand_gsi.
15493         (gimplify_build2): Likewise.
15494         (gimplify_build1): Likewise.
15496 2018-06-15  Richard Biener  <rguenther@suse.de>
15498         PR middle-end/86076
15499         * tree-cfg.c (move_stmt_op): unshare invariant addresses
15500         before adjusting their block.
15502 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15504         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15505         multilibs for *-*-rtems*.
15506         * config/riscv/t-rtems: New file.
15508 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
15510         PR middle-end/86122
15511         * match.pd ((A +- CST1) +- CST2): Punt if last resort
15512         unsigned_type_for returns NULL.
15514         PR target/85945
15515         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15516         subregs of multi-word pseudos unless the float mode has word size.
15518 2018-06-14  Richard Biener  <rguenther@suse.de>
15520         PR middle-end/86139
15521         * tree-vect-generic.c (build_word_mode_vector_type): Remove
15522         duplicate and harmful type_hash_canon.
15523         * tree.c (type_hash_canon): Assert we didn't find ourselves.
15525 2018-06-14  Richard Biener  <rguenther@suse.de>
15527         PR ipa/86124
15528         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15529         NULL cgraph_node.
15531 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15533         * config/rtems.h (STDINT_LONG32): Define.
15535 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
15536             Prachi Godbole  <prachi.godbole@imgtec.com>
15538         * config/mips/mips-cpus.def: Define P6600.
15539         * config/mips/mips-tables.opt: Regenerate.
15540         * config/mips/mips.c (mips_ucbranch_type): New enum.
15541         (mips_rtx_cost_data): Add support for P6600.
15542         (mips_issue_rate): Likewise.
15543         (mips_multipass_dfa_lookahead): Likewise.
15544         (mips_avoid_hazard): Likewise.
15545         (mips_reorg_process_insns): Likewise.
15546         (mips_classify_branch_p6600): New function.
15547         * config/mips/mips.h (TUNE_P6600): New define.
15548         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15549         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15550         * config/mips/mips.md: Include p6600.md.
15551         (processor): Add p6600.
15552         * config/mips/p6600.md: New file.
15553         * doc/invoke.texi: Add p6600 to supported architectures.
15555 2018-06-13  Martin Sebor  <msebor@redhat.com>
15557         PR tree-optimization/86114
15558         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15559         of integer types.
15560         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15562 2018-06-13  Richard Biener  <rguenther@suse.de>
15564         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15565         Properly set vector type of the intermediate stmt.
15566         * tree-vect-stmts.c (vectorizable_operation): The destination
15567         var always has vectype_out type.
15569 2018-06-13  Jeff Law  <law@redhat.com>
15571         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15572         integer 0 for argument to print_rtl_with_bb.
15573         (rl78_reorg): Likewise.
15575 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
15577         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15578         from rtx to rtx_insn *.
15579         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15580         "label".
15581         (add_sched_insns_for_speculation): Likewise for local "target",
15582         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15583         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15584         from rtx_insn ** to rtx_code_label **.
15585         (reorg_emit_nops): Likewise.
15586         (c6x_reorg): Likewise for local "call_labels".
15587         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15588         rtx to rtx_insn *.
15589         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15590         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15591         the loops over LABEL_REFS.
15592         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15593         braf_label.
15594         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15595         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15596         (split_branches): Strengthen local "olabel" from rtx to
15597         rtx_insn *, adding a safe_as_a cast.
15598         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15599         to "rtx_insn *".
15600         (add_insn_after): Likewise for first two params.
15601         (add_insn_before): Likewise.
15602         (remove_insn): Likewise for param.
15603         (emit_pattern_before_noloc): Likewise for second and third params.
15604         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15605         (emit_call_insn_before_noloc): Likewise.
15606         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15607         to "rtx_insn *".
15608         (emit_barrier_before): Likewise.
15609         (emit_label_before): Strengthen "label" param from "rtx" to
15610         "rtx_code_label *".  Strengthen "before" param from "rtx" to
15611         "rtx_insn *".
15612         (emit_insn_after_1): Strengthen "after" param from "rtx" to
15613         "rtx_insn *".
15614         (emit_pattern_after_noloc): Likewise.
15615         (emit_insn_after_noloc): Likewise.
15616         (emit_jump_insn_after_noloc): Likewise.
15617         (emit_call_insn_after_noloc): Likewise.
15618         (emit_debug_insn_after_noloc): Likewise.
15619         (emit_barrier_after): Likewise.
15620         (emit_label_after): Likewise for both params.
15621         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
15622         "loc" param from "int" to "location_t".
15623         (emit_insn_after_setloc): Likewise.
15624         (emit_jump_insn_after_setloc): Likewise.
15625         (emit_call_insn_after_setloc): Likewise.
15626         (emit_debug_insn_after_setloc): Likewise.
15627         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
15628         "loc" param from "int" to "location_t".
15629         (emit_pattern_before): Convert NULL_RTX to NULL.
15630         (emit_insn_before_setloc): Convert "loc" param from "int" to
15631         "location_t".
15632         (emit_jump_insn_before_setloc): Likewise.
15633         (emit_call_insn_before_setloc): Likewise.
15634         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15635         rtx_insn *.  Convert "loc" param from "int" to "location_t".
15636         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15637         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15638         Convert 3rd param from "int" to "location_t".
15639         (emit_barrier_before, emit_barrier_after, next_real_insn):
15640         Strengthen param from rtx to rtx_insn *.
15641         (emit_label_before): Strengthen 1st param from "rtx" to
15642         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
15643         "rtx_insn *".
15644         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15645         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15646         Strengthen 2nd param from "rtx" to "rtx_insn *".
15647         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15648         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15649         Likewise. Convert 3rd param from "int" to "location_t".
15650         (emit_label_after): Strengthen 1st param from "rtx" to
15651         "rtx_code_label *".
15652         (next_real_insn, remove_insn): Strengthen param from "rtx" to
15653         "rtx_insn *".
15654         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15655         from "rtx" to "rtx_insn *".
15657 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
15659         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15660         bodies streamed in with -Q.
15661         * dumpfile.c (dump_files): Add lto-stream-out dump file.
15662         * dumpfile.h (tree_dump_index): Add lto_stream_out.
15663         * gimple-streamer-out.c: Include gimple-pretty-print.h
15664         (output_bb): Dump stmts streamed.
15665         * lto-section-out.c: Include print-tree.h
15666         (lto_begin_section): Dump sections created.
15667         (lto_output_decl_index): Dump decl encoded.
15668         * lto-streamer-out.c: Include print-tree.h
15669         (create_output_block): Dump output block created.
15670         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15671         (output_function): Dump function output.
15672         (output_constructor): Dump constructor streamed.
15673         (write_global_stream): Output indexes encoded.
15674         (produce_asm_for_decls): Dump streams encoded.
15675         * lto-streamer.c (streamer_dump_file): New global var.
15676         * lto-streamer.h (streamer_dump_file): Declare.
15677         * passes.c (ipa_write_summaries): Initialize streamer dump.
15678         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15679         in.
15681 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
15683         PR target/86048
15684         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15685         offsets for register save directives.  Emit a second batch of save
15686         directives, if need be, when the function accesses prior frames.
15688 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15690         * config/arc/fpu.md (fmasf4): Force operand to register.
15691         (fnmasf4): Likewise.
15693 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15695         * config/arc/arc-protos.h (arc_pad_return): Remove.
15696         * config/arc/arc.c (machine_function): Remove force_short_suffix
15697         and size_reason.
15698         (arc_print_operand): Adjust printing of '&'.
15699         (arc_verify_short): Remove conditional printing of short suffix.
15700         (arc_final_prescan_insn): Remove reference to size_reason.
15701         (pad_return): New function.
15702         (arc_reorg): Call pad_return.
15703         (arc_pad_return): Remove.
15704         (arc_init_machine_status): Remove reference to force_short_suffix.
15705         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15706         (attr length): When attribute iscompact is true force to 2
15707         regardless; in the case of maybe check if we want to force the
15708         instruction to have 4 bytes length.
15709         (nopv): Change it to generate 4 byte long nop as well.
15710         (blockage): New pattern.
15711         (simple_return): Remove call to arc_pad_return.
15712         (p_return_i): Likewise.
15714 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15716         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15718 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15720         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15721         ARC cores.
15723 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15725         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15726         for ARC700 and ARCv2.
15728 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
15730         PR target/86076
15731         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15732         operands[2] instead of operands[1].
15735 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15737         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15738         case, check whether the outer register overlaps an unallocatable
15739         register, not just whether it fits the required class.
15741 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15743         * poly-int.h (can_div_trunc_p): Add new overload in which all values
15744         are poly_ints.
15745         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15746         (memrefs_conflict_p): Likewise.
15747         (init_alias_analysis): Likewise.
15748         * cfgexpand.c (expand_debug_expr): Likewise.
15749         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15750         * cse.c (fold_rtx): Likewise.
15751         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15752         * expr.c (emit_block_move_hints): Likewise.
15753         (clear_storage_hints, push_block, emit_push_insn): Likewise.
15754         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15755         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15756         (emit_group_store): Likewise.
15757         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
15758         to read the PRE/POST_MODIFY increment.
15759         * calls.c (store_one_arg): Use strip_offset.
15760         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15761         poly_int_rtx_p.
15762         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15763         by a VEC_SELECT.
15764         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15765         (simplify_binary_operation_1): Extend CONST_INT handling to
15766         poly_int_rtx_p.
15767         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15768         than a HOST_WIDE_INT.
15769         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15770         poly_int64.
15771         (adjust_mems, add_stores): Update accodingly.
15772         (vt_canonicalize_addr): Track polynomial offsets.
15773         (emit_note_insn_var_location): Likewise.
15774         (vt_add_function_parameter): Likewise.
15775         (vt_initialize): Likewise.
15777 2018-06-12  Jeff Law  <law@redhat.com>
15779         * config.gcc (alpha*-*-freebsd*): Remove.
15780         * config/alpha/freebsd.h: Remove.
15782 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
15784         PR other/69968
15785         * spellcheck-tree.c (levenshtein_distance): Rename to...
15786         (get_edit_distance): ...this, and update for underlying renaming.
15787         * spellcheck-tree.h (levenshtein_distance): Rename to...
15788         (get_edit_distance): ...this.
15789         * spellcheck.c (levenshtein_distance): Rename to...
15790         (get_edit_distance): ...this.  Convert from Levenshtein distance
15791         to Damerau-Levenshtein distance by supporting transpositions of
15792         adjacent characters.  Rename "v1" to "v_next" and "v0" to
15793         "v_one_ago".
15794         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15795         (selftest::test_edit_distance_unit_test_oneway): ...this, and
15796         update for underlying renaming.
15797         (selftest::levenshtein_distance_unit_test): Rename to...
15798         (selftest::test_get_edit_distance_unit): ...this, and update for
15799         underlying renaming.
15800         (selftest::test_find_closest_string): Add example from PR 69968
15801         where transposition helps
15802         (selftest::test_metric_conditions): Update for renaming.
15803         (selftest::test_metric_conditions): Likewise.
15804         (selftest::spellcheck_c_tests): Likewise.
15805         * spellcheck.h (levenshtein_distance): Rename both overloads to...
15806         (get_edit_distance): ...this.
15807         (best_match::consider): Update for renaming.
15809 2018-06-12  Martin Sebor  <msebor@redhat.com>
15811         PR tree-optimization/85259
15812         * builtins.c (compute_objsize): Handle constant offsets.
15813         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15814         true iff a warning has been issued.
15815         * gimple.h (gimple_nonartificial_location): New function.
15816         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15817         gimple_nonartificial_location and handle -Wno-system-headers.
15818         (handle_builtin_stxncpy): Same.
15820 2018-06-12  Martin Sebor  <msebor@redhat.com>
15822         PR c/85931
15823         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15825 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
15827         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15828         BUILTIN_VEC_XST entries for pointer to double and long long.
15830 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
15832         PR target/85990
15833         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15834         Update comments.
15835         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15836         Likewise.
15838 2018-06-12  Martin Liska  <mliska@suse.cz>
15840         * doc/options.texi: Document IntegerRange.
15842 2018-06-12  Martin Liska  <mliska@suse.cz>
15844         * config/i386/i386.opt: Make MPX-related options as Deprecated.
15845         * opt-functions.awk: Handle Deprecated flag.
15846         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15847         and report error.
15848         (read_cmdline_option): Report warning for a deprecated option.
15849         * opts.h (struct cl_option): Add new field cl_deprecated.
15850         (CL_ERR_DEPRECATED): New.
15852 2018-06-12  Martin Liska  <mliska@suse.cz>
15854         * doc/options.texi: Document Deprecated option flag.
15856 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15858         * config/arc/arc-arch.h (arc_extras): New enum.
15859         (arc_cpu_t):Add field extra.
15860         (arc_cpu_types): Consider the extras.
15861         * config/arc/arc-cpus.def: Add extras info.
15862         * config/arc/arc-opts.h (processor_type): Consider extra field.
15863         * config/arc/arc.c (arc_override_options): Handle extra field.
15865 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15867         * config/arc/arc-arch.h: Update ARC_OPTX macro.
15868         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15869         field.
15870         * config/arc/arc.c (arc_init): Update pic warning.
15871         (irq_range): Update irq range parsing warnings.
15872         (arc_override_options): Update various warning messages.
15873         (arc_handle_aux_attribute): Likewise.
15875 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
15877         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15879 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15881         * doc/sourcebuild.texi: Document usage of line number 0 in verify
15882         compiler messages directives.
15884 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
15886         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15887         * config/mips/mips-tables.opt: Regenerate.
15888         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15889         mips64r6.
15890         * doc/invoke.texi: Document -march=i6500.
15892 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
15894         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15895         (i6400_gpmul): Add cpu_unit.
15896         (i6400_gpdiv): Likewise.
15897         (i6400_msa_add_d): Update reservations.
15898         (i6400_msa_int_add) Likewise.
15899         (i6400_msa_short_logic3) Likewise.
15900         (i6400_msa_short_logic2) Likewise.
15901         (i6400_msa_short_logic) Likewise.
15902         (i6400_msa_move) Likewise.
15903         (i6400_msa_cmp) Likewise.
15904         (i6400_msa_short_float2) Likewise.
15905         (i6400_msa_div_d) Likewise.
15906         (i6400_msa_long_logic1) Likewise.
15907         (i6400_msa_long_logic2) Likewise.
15908         (i6400_msa_mult) Likewise.
15909         (i6400_msa_long_float2) Likewise.
15910         (i6400_msa_long_float4) Likewise.
15911         (i6400_msa_long_float5) Likewise.
15912         (i6400_msa_long_float8) Likewise.
15913         (i6400_fpu_fadd): Include frint type.
15914         (i6400_fpu_store): New define_insn_reservation.
15915         (i6400_fpu_load): Likewise.
15916         (i6400_fpu_move): Likewise.
15917         (i6400_fpu_fcmp): Likewise.
15918         (i6400_fpu_fmadd): Likewise.
15919         (i6400_int_mult): Include imul3nc type and update reservation.
15920         (i6400_int_div): Include idiv3 type and update reservation.
15921         (i6400_int_load): Update to check type not move_type.
15922         (i6400_int_store): Likewise.
15923         (i6400_int_prefetch): Set zero latency.
15925 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
15927         * gcc.c: Document new %@{...} sequence.
15928         (LINK_COMMAND_SPEC): Use it for the -L switches.
15929         (cpp_unique_options): Use it for the -I switches.
15930         (at_file_argbuf): New global variable.
15931         (in_at_file): Likewise.
15932         (alloc_args): Create at_file_argbuf.
15933         (clear_args): Truncate at_file_argbuf.
15934         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15935         (open_at_file): New function.
15936         (close_at_file): Likewise.
15937         (create_at_file): Delete.
15938         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15939         <'o'>: Likewise.
15940         <'@'>: New case.
15941         (validate_switches_from_spec): Deal with %@{...} sequence.
15942         (validate_switches): Likewise.
15943         (driver::finalize): Call clear_args.
15945 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
15947         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15949 2018-06-11  Martin Sebor  <msebor@redhat.com>
15951         * doc/invoke.texi (-Wall): List -Wc++17-compat.
15952         (Wno-class-memaccess): Add @opindex.
15953         (Wno-templates, Wno-multiple-inheritance): Same.
15954         (Wno-virtual-inheritance, Wno-namespaces): Same.
15955         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15956         (Wno-format-overflow, Wno-format-truncation): Same.
15957         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15958         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15959         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15960         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15961         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15962         (Wno-misspelled-isr): Same.
15964 2018-06-11  Martin Sebor  <msebor@redhat.com>
15966         * PR tree-optimization/86083
15967         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15969 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
15971         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15973 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
15975         PR target/85755
15976         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15977         on the correct operand.
15978         (*movdi_internal64): Ditto.
15980 2018-06-11  Martin Liska  <mliska@suse.cz>
15982         PR tree-optimization/86089
15983         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15985 2018-06-11  Julia Koval  <julia.koval@intel.com>
15987         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15988         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15989         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15991 2018-06-11  Olivier Hainque  <hainque@adacore.com>
15993         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15994         for Ada with strict dwarf2.
15996 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
15998         PR target/85755
15999         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16000         addresses.
16002 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
16004         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16006 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
16008         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16009         TARGET_ELF.
16011 2018-06-08  Martin Liska  <mliska@suse.cz>
16013         * tree-cfg.h (debug_function): Fix argument type to match
16014         implementation.
16016 2018-06-08  Martin Liska  <mliska@suse.cz>
16018         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16019         Remove usage of MPX-related (and removed) fields.
16020         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16022 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
16024         * cfg.c (debug): Use TDF_NONE rather than 0.
16025         * cfghooks.c (debug): Likewise.
16026         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16027         (struct dump_option_value_info): Convert to...
16028         (struct kv_pair): ...this template type.
16029         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16030         rather than 0.
16031         (optinfo_verbosity_options): Likewise.
16032         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16033         OPTGROUP_NONE.
16034         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16035         than int for "optgroup_flags" param.
16036         (dump_generic_expr_loc): Use dump_flags_t rather than int for
16037         "dump_kind" param.
16038         (dump_dec): Likewise.
16039         (dump_finish): Use TDF_NONE rather than 0.
16040         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16041         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
16042         than 0.  Update for change to option_ptr.
16043         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16044         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
16045         0.  Update for changes to optinfo_verbosity_options and
16046         optgroup_options.
16047         (opt_info_switch_p): Convert optgroup_flags from int to
16048         optgroup_flags_t.
16049         (dump_basic_block): Use dump_flags_t rather than int
16050         for "dump_kind" param.
16051         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16052         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16053         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16054         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16055         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16056         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16057         TDF_NONE): Convert from macros to...
16058         (enum dump_flag): ...this new enum.
16059         (dump_flags_t): Update to use enum.
16060         (operator|, operator&, operator~, operator|=, operator&=):
16061         Implement for dump_flags_t.
16062         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16063         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16064         Convert from macros to...
16065         (enum optgroup_flag): ...this new enum.
16066         (optgroup_flags_t): New typedef.
16067         (operator|, operator|=): Implement for optgroup_flags_t.
16068         (struct dump_file_info): Convert field "alt_flags" to
16069         dump_flags_t.  Convert field "optgroup_flags" to
16070         optgroup_flags_t.
16071         (dump_basic_block): Use dump_flags_t rather than int for param.
16072         (dump_generic_expr_loc): Likewise.
16073         (dump_dec): Likewise.
16074         (dump_register): Convert param "optgroup_flags" to
16075         optgroup_flags_t.
16076         (opt_info_enable_passes): Likewise.
16077         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16078         than 0.
16079         * gimple-pretty-print.c (debug): Likewise.
16080         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16081         (merged_store_group::apply_stores): Likewise.
16082         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16083         * gimple.c (verify_gimple_pp): Likewise.
16084         * graphite-poly.c (print_pbb_body): Likewise.
16085         * passes.c (pass_manager::register_one_dump_file): Convert
16086         local "optgroup_flags" to optgroup_flags_t.
16087         * print-tree.c (print_node): Use TDF_NONE rather than 0.
16088         (debug): Likewise.
16089         (debug_body): Likewise.
16090         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16091         to optgroup_flags_t.
16092         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16093         than 0.
16094         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16095         (convert_mult_to_fma): Likewise.
16096         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16097         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16098         * tree-vect-data-refs.c (dump_lower_bound): Convert param
16099         "dump_kind" to dump_flags_t.
16101 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
16103         * config/rs6000/rs6000.c (min, max): Delete.
16105 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
16107         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16108         -mabi=spe and -mabi=no-spe.
16110 2018-06-08  Martin Liska  <mliska@suse.cz>
16112         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16113         where we expect an existing summary.
16115 2018-06-08  Martin Liska  <mliska@suse.cz>
16117         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16118         * ipa-inline.h (estimate_edge_growth): Likewise.
16120 2018-06-08  Martin Liska  <mliska@suse.cz>
16122         * cgraph.c (function_version_hasher::hash): Use
16123         cgraph_node::get_uid ().
16124         (function_version_hasher::equal):
16125         * cgraph.h (cgraph_node::get_uid): New method.
16126         * ipa-inline.c (update_caller_keys): Use
16127         cgraph_node::get_uid ().
16128         (update_callee_keys): Likewise.
16129         * ipa-utils.c (searchc): Likewise.
16130         (ipa_reduced_postorder): Likewise.
16131         * lto-cgraph.c (input_node): Likewise.
16132         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16133         * symbol-summary.h (symtab_insertion): Likewise.
16134         (symtab_removal): Likewise.
16135         (symtab_duplication): Likewise.
16136         * tree-pretty-print.c (dump_function_header): Likewise.
16137         * tree-sra.c (convert_callers_for_node): Likewise.
16139 2018-06-08  Martin Liska  <mliska@suse.cz>
16141         * cgraph.c (symbol_table::create_edge): Always assign a new
16142         unique number.
16143         (symbol_table::free_edge): Do not recycle numbers.
16144         * cgraph.h (cgraph_edge::get): New method.
16145         * symbol-summary.h (symtab_removal): Use it.
16146         (symtab_duplication): Likewise.
16147         (call_summary::hashable_uid): Remove.
16149 2018-06-08  Martin Liska  <mliska@suse.cz>
16151         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16152         (initialize_growth_caches): Remove.
16153         (free_growth_caches): Likewise.
16154         (do_estimate_edge_time): Use edge_growth_cache.
16155         (do_estimate_edge_size): Likewise.
16156         (do_estimate_edge_hints): Likewise.
16157         * ipa-inline.c (reset_edge_caches): Likewise.
16158         (recursive_inlining): Likewise.
16159         (inline_small_functions): Likewise.
16160         * ipa-inline.h (initialize_growth_caches): Remove.
16161         (estimate_edge_size): Likewise.
16162         (estimate_edge_time): Likewise.
16163         (estimate_edge_hints): Likewise.
16164         (reset_edge_growth_cache): Likewise.
16165         * symbol-summary.h (call_summary::remove): New method.
16167 2018-06-08  Martin Liska  <mliska@suse.cz>
16169         * ipa-cp.c (class edge_clone_summary): New summary.
16170         (grow_edge_clone_vectors): Remove.
16171         (ipcp_edge_duplication_hook): Remove.
16172         (class edge_clone_summary_t): New call_summary class.
16173         (ipcp_edge_removal_hook): Remove.
16174         (edge_clone_summary_t::duplicate): New function.
16175         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16176         (create_specialized_node): Likewise.
16177         (ipcp_driver): Initialize edge_clone_summaries and do not
16178         register hooks.
16180 2018-06-08  Martin Liska  <mliska@suse.cz>
16182         * symbol-summary.h (get): New function.
16183         (call_summary::m_initialize_when_cloning): New class member.
16185 2018-06-08  Martin Liska  <mliska@suse.cz>
16187         * cgraph.c (cgraph_node::remove): Do not recycle uid.
16188         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16189         (symbol_table::allocate_cgraph_symbol): Do not set uid.
16190         * passes.c (uid_hash_t): Record removed_nodes by their uids.
16191         (remove_cgraph_node_from_order): Use the removed_nodes set.
16192         (do_per_function_toporder): Likwise.
16193         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16194         instead of summary_uid.
16195         (symtab_removal): Likewise.
16196         (symtab_duplication): Likewise.
16198 2018-06-08  Martin Liska  <mliska@suse.cz>
16200         * ipa-cp.c (ipcp_store_bits_results): Use
16201         ipcp_transformation_sum.
16202         (ipcp_store_vr_results): Likewise.
16203         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16204         to ...
16205         (ipcp_transformation_initialize): ... this.
16206         (ipa_set_node_agg_value_chain):
16207         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16208         (write_ipcp_transformation_info): Likewise.
16209         (read_ipcp_transformation_info): Likewise.
16210         (ipcp_update_bits): Likewise.
16211         (ipcp_update_vr): Likewise.
16212         (ipcp_transform_function): Likewise.
16213         * ipa-prop.h: Rename ipcp_transformation_summary to
16214         ipcp_transformation.
16215         (class ipcp_transformation_t): New function summary.
16216         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16217         (ipa_get_agg_replacements_for_node): Likewise.
16219 2018-06-08  Martin Liska  <mliska@suse.cz>
16221         * ipa-pure-const.c (struct funct_state_d): Do it class instead
16222         of struct.
16223         (class funct_state_summary_t): New function_summary class.
16224         (has_function_state): Remove.
16225         (get_function_state): Likewise.
16226         (set_function_state): Likewise.
16227         (add_new_function): Likewise.
16228         (funct_state_summary_t::insert): New function.
16229         (duplicate_node_data): Remove.
16230         (remove_node_data): Remove.
16231         (funct_state_summary_t::duplicate): New function.
16232         (register_hooks): Create new funct_state_summaries.
16233         (pure_const_generate_summary): Use it.
16234         (pure_const_write_summary): Likewise.
16235         (pure_const_read_summary): Likewise.
16236         (propagate_pure_const): Likewise.
16237         (propagate_nothrow): Likewise.
16238         (dump_malloc_lattice): Likewise.
16239         (propagate_malloc): Likewise.
16240         (execute): Do not register hooks, just remove summary
16241         instead.
16242         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16243         constructor.
16245 2018-06-08  Martin Liska  <mliska@suse.cz>
16247         * ipa-reference.c (remove_node_data): Remove.
16248         (duplicate_node_data): Likewise.
16249         (class ipa_ref_var_info_summary_t): New class.
16250         (class ipa_ref_opt_summary_t): Likewise.
16251         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16252         (get_reference_optimization_summary): Use
16253         ipa_ref_opt_sum_summaries.
16254         (set_reference_vars_info): Remove.
16255         (set_reference_optimization_summary): Likewise.
16256         (ipa_init): Create summaries.
16257         (init_function_info): Use function summary.
16258         (ipa_ref_opt_summary_t::duplicate): New function.
16259         (ipa_ref_opt_summary_t::remove): New function.
16260         (get_read_write_all_from_node): Fix GNU coding style.
16261         (propagate): Use function summary.
16262         (write_node_summary_p): Fix GNU coding style.
16263         (stream_out_bitmap): Likewise.
16264         (ipa_reference_read_optimization_summary): Use function summary.
16265         (ipa_reference_c_finalize): Do not release hooks.
16267 2018-06-08  Martin Liska  <mliska@suse.cz>
16269         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16270         (analyze_function_body): Extract multiple calls of get_create.
16271         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16272         * ipa-inline.c (recursive_inlining): Use ::get method.
16273         * ipa-inline.h (estimate_edge_growth): Likewise.
16275 2018-06-08  Martin Liska  <mliska@suse.cz>
16277         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16278         HSA_INVALID.
16279         (hsa_function_summary::hsa_function_summary): Use the new enum
16280         value.
16281         (hsa_gpu_implementation_p): Use hsa_summaries::get.
16282         * hsa-gen.c (hsa_get_host_function): Likewise.
16283         (get_brig_function_name): Likewise.
16284         * ipa-hsa.c (process_hsa_functions): Likewise.
16285         (ipa_hsa_write_summary): Likewise.
16286         * symbol-summary.h (symtab_duplication): Use ::get function/
16287         (get): New function.
16289 2018-06-08  Martin Liska  <mliska@suse.cz>
16291         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16292         of get.
16293         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16294         (hsa_register_kernel): Likewise.
16295         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16296         * hsa-gen.c (hsa_get_host_function): Likewise.
16297         (get_brig_function_name): Likewise.
16298         (generate_hsa): Likewise.
16299         (pass_gen_hsail::execute): Likewise.
16300         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16301         (devirtualization_time_bonus): Likewise.
16302         (ipcp_propagate_stage): Likewise.
16303         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16304         (edge_set_predicate): Likewise.
16305         (evaluate_conditions_for_known_args): Likewise.
16306         (evaluate_properties_for_edge): Likewise.
16307         (ipa_fn_summary::reset): Likewise.
16308         (ipa_fn_summary_t::duplicate): Likewise.
16309         (dump_ipa_call_summary): Likewise.
16310         (ipa_dump_fn_summary): Likewise.
16311         (analyze_function_body): Likewise.
16312         (compute_fn_summary): Likewise.
16313         (estimate_edge_devirt_benefit): Likewise.
16314         (estimate_edge_size_and_time): Likewise.
16315         (estimate_calls_size_and_time): Likewise.
16316         (estimate_node_size_and_time): Likewise.
16317         (inline_update_callee_summaries): Likewise.
16318         (remap_edge_change_prob): Likewise.
16319         (remap_edge_summaries): Likewise.
16320         (ipa_merge_fn_summary_after_inlining): Likewise.
16321         (ipa_update_overall_fn_summary): Likewise.
16322         (read_ipa_call_summary): Likewise.
16323         (inline_read_section): Likewise.
16324         (write_ipa_call_summary): Likewise.
16325         (ipa_fn_summary_write): Likewise.
16326         (ipa_free_fn_summary): Likewise.
16327         * ipa-hsa.c (process_hsa_functions): Likewise.
16328         (ipa_hsa_write_summary): Likewise.
16329         (ipa_hsa_read_section): Likewise.
16330         * ipa-icf.c (sem_function::merge): Likewise.
16331         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16332         (do_estimate_edge_time): Likewise.
16333         (estimate_size_after_inlining): Likewise.
16334         (estimate_growth): Likewise.
16335         (growth_likely_positive): Likewise.
16336         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16337         (inline_call): Likewise.
16338         * ipa-inline.c (caller_growth_limits): Likewise.
16339         (can_inline_edge_p): Likewise.
16340         (can_inline_edge_by_limits_p): Likewise.
16341         (compute_uninlined_call_time): Likewise.
16342         (compute_inlined_call_time): Likewise.
16343         (want_inline_small_function_p): Likewise.
16344         (edge_badness): Likewise.
16345         (update_caller_keys): Likewise.
16346         (update_callee_keys): Likewise.
16347         (recursive_inlining): Likewise.
16348         (inline_small_functions): Likewise.
16349         (inline_to_all_callers_1): Likewise.
16350         (dump_overall_stats): Likewise.
16351         (early_inline_small_functions): Likewise.
16352         (early_inliner): Likewise.
16353         * ipa-inline.h (estimate_edge_growth): Likewise.
16354         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16355         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16356         * ipa-prop.h (IPA_NODE_REF): Likewise.
16357         (IPA_EDGE_REF): Likewise.
16358         * ipa-pure-const.c (malloc_candidate_p): Likewise.
16359         (propagate_malloc): Likewise.
16360         * ipa-split.c (execute_split_functions): Likewise.
16361         * symbol-summary.h: Rename get to get_create.
16362         (get): Likewise.
16363         (get_create): Likewise.
16364         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16366 2018-06-08  Martin Liska  <mliska@suse.cz>
16368         * symbol-summary.h (release): Move definition out of class
16369         declaration.
16370         (symtab_removal): Likewise.
16371         (symtab_duplication): Likewise.
16373 2018-06-08  Martin Liska  <mliska@suse.cz>
16375         * symbol-summary.h (function_summary): Move constructor
16376         implementation out of class declaration.
16377         (release): Likewise.
16378         (symtab_insertion): Likewise.
16379         (symtab_removal): Likewise.
16380         (symtab_duplication): Likewise.
16381         (get): Likewise.
16383 2018-06-08  Martin Liska  <mliska@suse.cz>
16385         * Makefile.in: Remove support for MPX (macros, related functions,
16386         fields in cgraph_node, ...).
16387         * builtin-types.def (BT_BND): Likewise.
16388         (BT_FN_BND_CONST_PTR): Likewise.
16389         (BT_FN_CONST_PTR_BND): Likewise.
16390         (BT_FN_VOID_PTR_BND): Likewise.
16391         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16392         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16393         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16394         (expand_builtin_mempcpy_with_bounds): Likewise.
16395         (expand_builtin_memset_with_bounds): Likewise.
16396         (expand_builtin_memset_args): Likewise.
16397         (std_expand_builtin_va_start): Likewise.
16398         (expand_builtin): Likewise.
16399         (expand_builtin_with_bounds): Likewise.
16400         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16401         (DEF_LIB_BUILTIN_CHKP): Likewise.
16402         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16403         (DEF_CHKP_BUILTIN): Likewise.
16404         (BUILT_IN_MEMCPY): Likewise.
16405         (BUILT_IN_MEMMOVE): Likewise.
16406         (BUILT_IN_MEMPCPY): Likewise.
16407         (BUILT_IN_MEMSET): Likewise.
16408         (BUILT_IN_STPCPY): Likewise.
16409         (BUILT_IN_STRCAT): Likewise.
16410         (BUILT_IN_STRCHR): Likewise.
16411         (BUILT_IN_STRCPY): Likewise.
16412         (BUILT_IN_STRLEN): Likewise.
16413         (BUILT_IN_MEMCPY_CHK): Likewise.
16414         (BUILT_IN_MEMMOVE_CHK): Likewise.
16415         (BUILT_IN_MEMPCPY_CHK): Likewise.
16416         (BUILT_IN_MEMSET_CHK): Likewise.
16417         (BUILT_IN_STPCPY_CHK): Likewise.
16418         (BUILT_IN_STRCAT_CHK): Likewise.
16419         (BUILT_IN_STRCPY_CHK): Likewise.
16420         * calls.c (store_bounds): Likewise.
16421         (emit_call_1): Likewise.
16422         (special_function_p): Likewise.
16423         (maybe_warn_nonstring_arg): Likewise.
16424         (initialize_argument_information): Likewise.
16425         (finalize_must_preallocate): Likewise.
16426         (compute_argument_addresses): Likewise.
16427         (expand_call): Likewise.
16428         * cfgexpand.c (expand_call_stmt): Likewise.
16429         (expand_return): Likewise.
16430         (expand_gimple_stmt_1): Likewise.
16431         (pass_expand::execute): Likewise.
16432         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16433         (cgraph_node::remove): Likewise.
16434         (cgraph_node::dump): Likewise.
16435         (cgraph_node::verify_node): Likewise.
16436         * cgraph.h (chkp_function_instrumented_p): Likewise.
16437         (symtab_node::get_alias_target): Likewise.
16438         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16439         (cgraph_local_p): Likewise.
16440         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16441         (cgraph_edge::rebuild_references): Likewise.
16442         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16443         (walk_polymorphic_call_targets): Likewise.
16444         (cgraph_node::expand_thunk): Likewise.
16445         (symbol_table::output_weakrefs): Likewise.
16446         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16447         (ix86_handle_option): Likewise.
16448         * config/i386/constraints.md: Likewise.
16449         * config/i386/i386-builtin-types.def (BND): Likewise.
16450         (VOID): Likewise.
16451         (PVOID): Likewise.
16452         (ULONG): Likewise.
16453         * config/i386/i386-builtin.def (BDESC_END): Likewise.
16454         (BDESC_FIRST): Likewise.
16455         (BDESC): Likewise.
16456         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16457         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16458         * config/i386/i386.c (enum reg_class): Likewise.
16459         (ix86_target_string): Likewise.
16460         (ix86_option_override_internal): Likewise.
16461         (ix86_conditional_register_usage): Likewise.
16462         (ix86_valid_target_attribute_inner_p): Likewise.
16463         (ix86_set_indirect_branch_type): Likewise.
16464         (ix86_set_current_function): Likewise.
16465         (ix86_function_arg_regno_p): Likewise.
16466         (init_cumulative_args): Likewise.
16467         (ix86_function_arg_advance): Likewise.
16468         (ix86_function_arg): Likewise.
16469         (ix86_pass_by_reference): Likewise.
16470         (ix86_function_value_regno_p): Likewise.
16471         (ix86_function_value_1): Likewise.
16472         (ix86_function_value_bounds): Likewise.
16473         (ix86_return_in_memory): Likewise.
16474         (ix86_setup_incoming_vararg_bounds): Likewise.
16475         (ix86_va_start): Likewise.
16476         (indirect_thunk_need_prefix): Likewise.
16477         (print_reg): Likewise.
16478         (ix86_print_operand): Likewise.
16479         (ix86_expand_call): Likewise.
16480         (ix86_output_function_return): Likewise.
16481         (reg_encoded_number): Likewise.
16482         (BDESC_VERIFYS): Likewise.
16483         (ix86_init_mpx_builtins): Likewise.
16484         (ix86_init_builtins): Likewise.
16485         (ix86_emit_cmove): Likewise.
16486         (ix86_emit_move_max): Likewise.
16487         (ix86_expand_builtin): Likewise.
16488         (ix86_builtin_mpx_function): Likewise.
16489         (ix86_get_arg_address_for_bt): Likewise.
16490         (ix86_load_bounds): Likewise.
16491         (ix86_store_bounds): Likewise.
16492         (ix86_load_returned_bounds): Likewise.
16493         (ix86_store_returned_bounds): Likewise.
16494         (ix86_class_likely_spilled_p): Likewise.
16495         (ix86_hard_regno_mode_ok): Likewise.
16496         (x86_order_regs_for_local_alloc): Likewise.
16497         (ix86_mitigate_rop): Likewise.
16498         (ix86_bnd_prefixed_insn_p): Likewise.
16499         (ix86_mpx_bound_mode): Likewise.
16500         (ix86_make_bounds_constant): Likewise.
16501         (ix86_initialize_bounds): Likewise.
16502         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16503         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16504         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16505         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16506         (TARGET_CHKP_BOUND_MODE): Likewise.
16507         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16508         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16509         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16510         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16511         * config/i386/i386.h (TARGET_MPX): Likewise.
16512         (TARGET_MPX_P): Likewise.
16513         (VALID_BND_REG_MODE): Likewise.
16514         (FIRST_BND_REG): Likewise.
16515         (LAST_BND_REG): Likewise.
16516         (enum reg_class): Likewise.
16517         (BND_REG_P): Likewise.
16518         (BND_REGNO_P): Likewise.
16519         (BNDmode): Likewise.
16520         (ADJUST_INSN_LENGTH): Likewise.
16521         * config/i386/i386.md: Likewise.
16522         * config/i386/i386.opt: Likewise.
16523         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16524         (defined): Likewise.
16525         (LINK_MPX): Likewise.
16526         (MPX_SPEC): Likewise.
16527         (LIBMPX_SPEC): Likewise.
16528         (LIBMPXWRAPPERS_SPEC): Likewise.
16529         (CHKP_SPEC): Likewise.
16530         * config/i386/predicates.md: Likewise.
16531         * dbxout.c (dbxout_type): Likewise.
16532         * doc/extend.texi: Likewise.
16533         * doc/invoke.texi: Likewise.
16534         * doc/md.texi: Likewise.
16535         * doc/tm.texi: Likewise.
16536         * doc/tm.texi.in: Likewise.
16537         * dwarf2out.c (is_base_type): Likewise.
16538         (gen_formal_types_die): Likewise.
16539         (gen_subprogram_die): Likewise.
16540         (gen_type_die_with_usage): Likewise.
16541         (gen_decl_die): Likewise.
16542         (dwarf2out_late_global_decl): Likewise.
16543         * expr.c (expand_assignment): Likewise.
16544         (emit_storent_insn): Likewise.
16545         (store_expr_with_bounds): Likewise.
16546         (store_expr): Likewise.
16547         (expand_expr_real_1): Likewise.
16548         * expr.h (store_expr_with_bounds): Likewise.
16549         * function.c (use_register_for_decl): Likewise.
16550         (struct bounds_parm_data): Likewise.
16551         (assign_parms_augmented_arg_list): Likewise.
16552         (assign_parm_find_entry_rtl): Likewise.
16553         (assign_parm_is_stack_parm): Likewise.
16554         (assign_parm_load_bounds): Likewise.
16555         (assign_bounds): Likewise.
16556         (assign_parms): Likewise.
16557         (expand_function_start): Likewise.
16558         * gcc.c (CHKP_SPEC): Likewise.
16559         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16560         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16561         (wrestrict_dom_walker::check_call): Likewise.
16562         * gimple.c (gimple_build_call_from_tree): Likewise.
16563         * gimple.h (enum gf_mask): Likewise.
16564         (gimple_call_with_bounds_p): Likewise.
16565         (gimple_call_set_with_bounds): Likewise.
16566         * gimplify.c (gimplify_init_constructor): Likewise.
16567         * ipa-cp.c (initialize_node_lattices): Likewise.
16568         (propagate_constants_across_call): Likewise.
16569         (find_more_scalar_values_for_callers_subset): Likewise.
16570         * ipa-hsa.c (process_hsa_functions): Likewise.
16571         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16572         * ipa-icf.c (sem_function::merge): Likewise.
16573         * ipa-inline.c (early_inliner): Likewise.
16574         * ipa-pure-const.c (warn_function_noreturn): Likewise.
16575         (warn_function_cold): Likewise.
16576         (propagate_pure_const): Likewise.
16577         * ipa-ref.h (enum GTY): Likewise.
16578         * ipa-split.c (find_retbnd): Likewise.
16579         (consider_split): Likewise.
16580         (split_function): Likewise.
16581         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16582         * ipa.c (walk_polymorphic_call_targets): Likewise.
16583         (symbol_table::remove_unreachable_nodes): Likewise.
16584         (process_references): Likewise.
16585         (cgraph_build_static_cdtor_1): Likewise.
16586         * lto-cgraph.c (lto_output_node): Likewise.
16587         (output_refs): Likewise.
16588         (compute_ltrans_boundary): Likewise.
16589         (input_overwrite_node): Likewise.
16590         (input_node): Likewise.
16591         (input_cgraph_1): Likewise.
16592         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16593         * passes.c (pass_manager::execute_early_local_passes): Likewise.
16594         (class pass_chkp_instrumentation_passes): Likewise.
16595         (make_pass_chkp_instrumentation_passes): Likewise.
16596         * passes.def: Likewise.
16597         * rtl.h (struct GTY): Likewise.
16598         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16599         * stor-layout.c (layout_type): Likewise.
16600         * symtab.c: Likewise.
16601         * target.def: Likewise.
16602         * targhooks.c (default_chkp_bound_type): Likewise.
16603         (default_chkp_bound_mode): Likewise.
16604         (default_builtin_chkp_function): Likewise.
16605         (default_chkp_function_value_bounds): Likewise.
16606         (default_chkp_make_bounds_constant): Likewise.
16607         (default_chkp_initialize_bounds): Likewise.
16608         * targhooks.h (default_chkp_bound_type): Likewise.
16609         (default_chkp_bound_mode): Likewise.
16610         (default_builtin_chkp_function): Likewise.
16611         (default_chkp_function_value_bounds): Likewise.
16612         (default_chkp_make_bounds_constant): Likewise.
16613         (default_chkp_initialize_bounds): Likewise.
16614         * toplev.c (compile_file): Likewise.
16615         (process_options): Likewise.
16616         * tree-core.h (DEF_BUILTIN): Likewise.
16617         (DEF_BUILTIN_CHKP): Likewise.
16618         * tree-inline.c (declare_return_variable): Likewise.
16619         (remap_gimple_stmt): Likewise.
16620         (copy_bb): Likewise.
16621         (initialize_inlined_parameters): Likewise.
16622         (expand_call_inline): Likewise.
16623         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16624         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16625         (make_pass_ipa_chkp_produce_thunks): Likewise.
16626         (make_pass_chkp): Likewise.
16627         (make_pass_chkp_opt): Likewise.
16628         (make_pass_chkp_instrumentation_passes): Likewise.
16629         * tree-pretty-print.c (dump_generic_node): Likewise.
16630         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16631         * tree-ssa-dce.c (propagate_necessity): Likewise.
16632         (eliminate_unnecessary_stmts): Likewise.
16633         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16634         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16635         * tree-ssa-sccvn.h: Likewise.
16636         * tree-ssa-strlen.c (get_string_length): Likewise.
16637         (valid_builtin_call): Likewise.
16638         (adjust_last_stmt): Likewise.
16639         (handle_builtin_strchr): Likewise.
16640         (handle_builtin_strcpy): Likewise.
16641         (handle_builtin_stxncpy): Likewise.
16642         (handle_builtin_memcpy): Likewise.
16643         (handle_builtin_strcat): Likewise.
16644         (strlen_check_and_optimize_stmt): Likewise.
16645         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16646         * tree-streamer-in.c: Likewise.
16647         * tree-streamer.c (record_common_node): Likewise.
16648         * tree.c (tree_code_size): Likewise.
16649         (wide_int_to_tree_1): Likewise.
16650         (type_contains_placeholder_1): Likewise.
16651         (build_common_tree_nodes): Likewise.
16652         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16653         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16654         (POINTER_BOUNDS_P): Likewise.
16655         (BOUNDED_TYPE_P): Likewise.
16656         (BOUNDED_P): Likewise.
16657         (CALL_WITH_BOUNDS_P): Likewise.
16658         (pointer_bounds_type_node): Likewise.
16659         * value-prof.c (gimple_ic): Likewise.
16660         * var-tracking.c (vt_add_function_parameters): Likewise.
16661         * varasm.c (make_decl_rtl): Likewise.
16662         (assemble_start_function): Likewise.
16663         (output_constant): Likewise.
16664         (maybe_assemble_visibility): Likewise.
16665         * varpool.c (ctor_for_folding): Likewise.
16666         * chkp-builtins.def: Remove.
16667         * ipa-chkp.c: Remove.
16668         * ipa-chkp.h: Remove.
16669         * rtl-chkp.c: Remove.
16670         * rtl-chkp.h: Remove.
16671         * tree-chkp-opt.c: Remove.
16672         * tree-chkp.c: Remove.
16673         * tree-chkp.h: Remove.
16675 2018-06-07  Carl Love  <cel@us.ibm.com>
16677         * config/rs6000/vsx.md (vextract_fp_from_shorth,
16678         vextract_fp_from_shortl): Add BE support.
16680 2018-06-07  Paul Koning  <ni1d@arrl.net>
16682         * compare-elim.c (try_merge_compare): Don't merge compare if
16683         address contains a side effect.
16684         (try_eliminate_compare): Likewise.
16686 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
16688         * config.gcc: Support "tremont".
16689         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16690         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16691         PROCESSOR_TREMONT.
16692         * config/i386/i386.c (m_TREMONT): Define.
16693         (processor_target_table): Add "tremont".
16694         (PTA_TREMONT): Define.
16695         (ix86_lea_outperforms): Add TARGET_TREMONT.
16696         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16697         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16698         and M_INTEL_GOLDMONT_PLUS.
16699         (fold_builtin_cpu): Add "tremont".
16700         (ix86_add_stmt_cost): Add TARGET_TREMONT.
16701         (ix86_option_override_internal): Add "tremont".
16702         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16703         (processor_type): Add PROCESSOR_TREMONT.
16704         * config/i386/x86-tune.def: Add m_TREMONT.
16705         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16707 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16709         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16710         symbol defined for msp430i* devices to be lower case.
16712 2018-06-07  Richard Biener  <rguenther@suse.de>
16714         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16715         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
16716         Properly wrap signed arithmetic if overflow wraps.
16718 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
16720         PR tree-optimization/69615
16721         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16722         of a cast from a same precision integral SSA_NAME in a bb dominated
16723         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
16724         cast to utype if rhs2 has already a compatible type.
16726 2018-06-07  Richard Biener  <rguenther@suse.de>
16728         PR tree-optimization/85935
16729         * graphite-scop-detection.c (find_params_in_bb): Analyze
16730         condition operands with respect to the correct loop.  Assert
16731         the analysis doesn't fail.
16733 2018-06-04  Carl Love  <cel@us.ibm.com>
16735         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16736         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
16737         as it is slightly cheaper.
16738         (first_match_or_eos_index_<mode>):
16739         Calculate index using natural element order.
16740         (first_match_index_<mode>):
16741         Calculate index using natural element order.
16742         (first_match_or_eos_index_<mode>):
16743         Calculate index using natural order.
16744         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16745         for BE and LE modes.
16746         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16747         P9V_BUILTIN_VCLZLSBB_V16QI.
16748         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16749         specific.
16751 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16753         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16754         indentation and line wrap for many prototypes.  Add missing
16755         @smallexample directives around block of prototypes for vec_xl and
16756         vec_xst.
16758 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
16760         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16761         track if we pass or return IEEE 128-bit floating point.
16762         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16763         C++ mangling that is compatible with GCC 8.1.
16764         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16765         (init_cumulative_args): Note if we pass or return IEEE 128-bit
16766         floating point types.
16767         (rs6000_function_arg_advance_1): Likewise.
16768         (rs6000_mangle_type): Optionally generate mangled names that match
16769         what GCC 8.1 generated for IEEE 128-bit floating point types.
16770         (rs6000_globalize_decl_name): If we have an external function that
16771         passes or returns IEEE 128-bit types, generate a weak reference
16772         from the mangled name used in GCC 8.1 to the current mangled
16773         name.
16774         (rs6000_init_builtins): Make __ibm128 use the long double type if
16775         long double is IBM extended double.  Make __float128 use the long
16776         double type if long double is IEEE 128-bit.
16778         PR target/85657
16779         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16780         macro for __ibm128 built-in functions.
16781         (PACK_IF): Add __ibm128 pack/unpack functions.
16782         (UNPACK_IF): Likewise.
16783         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16784         enable long double built-in functions if long double is IEEE
16785         128-bit floating point.
16786         (rs6000_invalid_builtin): Update long double built-in function
16787         error message.
16788         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16789         functions, adjust the built-in function to use the long double
16790         built-in function if __ibm128 and long double are the same type.
16791         * doc/extend.texi (PowerPC builtins): Update documention for
16792         __builtin_{,un}pack_longdouble.  Add documentation for
16793         __builtin_{,un}pack_ibm128.
16795 2018-06-06  Jim Wilson  <jimw@sifive.com>
16797         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16798         (struct machine_function): New field interrupt_mode.
16799         (riscv_handle_type_attribute): New function.  Add forward declaration.
16800         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16801         (riscv_expand_epilogue): Check interrupt_mode field.
16802         (riscv_set_current_function): Check interrupt attribute args and
16803         set interrupt_mode field.
16804         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16805         (riscv_sret, riscv_uret): New.
16806         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16807         new arguments to interrupt attribute.
16809 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
16811         PR target/63177
16812         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16813         Don't handle -mcpu=power8 if -mpower9-vector is also used.
16815 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16817         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16818         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16819         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16820         several redundant entries.
16822 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
16824         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16825         type from "rtx" to "rtx_insn *".
16826         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16827         for local "call_insn", removing cast.
16828         (ix86_expand_call): Likewise, introducing a "call_insn" local.
16830 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16832         PR tree-optimization/86066
16833         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16834         for BIT_INSERT_EXPR stores.
16836 2018-06-06  Richard Biener  <rguenther@suse.de>
16838         PR tree-optimization/86062
16839         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16840         component refs ontop
16841         of to be offsetted base.
16843 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16845         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16846         to be static and remove check on interrupt attribute name.
16848 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16850         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16851         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16853 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
16855         PR target/79924
16856         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16857         second argument.
16858         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16859         Remove second argument, change how error is called.
16860         (aarch64_layout_arg): Remove second argument from
16861         aarch64_err_no_fpadvsimd call.
16862         (aarch64_init_cumulative_args): Ditto.
16863         (aarch64_gimplify_va_arg_expr): Ditto.
16864         * config/aarch64/aarch64.md (mov<mode>): Ditto.
16866 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
16868         * config/i386/i386.md (simple_return_indirect_internal): New expander.
16869         (*simple_return_indirect_internal<mode>): Rename from
16870         simple_return_indirect_internal.  Use W mode iterator.
16871         (rstorssp): New expander.
16872         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
16873         (clrssbsy): New expander.
16874         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
16876 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16878         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16879         __typeof__.
16880         (cmse_check_pointed_object): Likewise.
16882 2018-06-05  Martin Liska  <mliska@suse.cz>
16884         PR gcov-profile/47618
16885         * doc/invoke.texi: Document how -fprofile-dir format
16886         is extended.
16888 2018-06-05  Richard Biener  <rguenther@suse.de>
16890         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16891         removal pretend DOM info isn't available so we do not update
16892         it and only remove edges, not dominated blocks.  Actually free
16893         DOM info in case we removed something.  Remove unreachable blocks.
16894         (mfb_keep_latches): Work with either DOM info or marked backedges.
16895         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16896         first.  Mark backedges if DOM info isn't available.
16897         (Re-)compute DOM info after cleanup_control_flow_pre.
16899 2018-06-05  Richard Biener  <rguenther@suse.de>
16901         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16902         (locus_discrim_hasher::hash): Adjust.
16903         (locus_discrim_hasher::equal): Likewise.
16904         (next_discriminator_for_locus): Work on line directly.
16905         (same_line_p): Pass in expanded locus1 as well.
16906         (assign_discriminators): Avoid redundant location expansions.
16908 2018-06-05  Richard Biener  <rguenther@suse.de>
16910         PR tree-optimization/86046
16911         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16912         if required after clearing TREE_ADDRESSABLE.
16914 2018-06-05  Richard Biener  <rguenther@suse.de>
16916         PR tree-optimization/86047
16917         * tree-ssa-loop.c (for_each_index): Glob handling of all
16918         decls and constants and really handle all of them.
16920 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16922         PR target/81497
16923         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16924         qualifier_void_pointer and qualifier_const_void_pointer.
16925         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16926         (arm_init_builtins): Handle the above.
16927         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16928         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16929         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16930         void intrinsics.
16932 2018-06-05  Martin Liska  <mliska@suse.cz>
16934         * auto-profile.c (read_autofdo_file): Do not use
16935         gcov_ctr_summary struct.
16936         (afdo_callsite_hot_enough_for_early_inline): Likewise.
16937         * coverage.c (struct counts_entry): Likewise.
16938         (read_counts_file): Read just single summary entry.
16939         (get_coverage_counts): Use gcov_summary struct.
16940         * coverage.h (get_coverage_counts): Likewise.
16941         * gcov-dump.c (dump_working_sets): Likewise.
16942         (tag_summary): Dump just single summary.
16943         * gcov-io.c (gcov_write_summary): Write just histogram
16944         summary.
16945         (gcov_read_summary): Read just single summary.
16946         (compute_working_sets): Use gcov_summary struct.
16947         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16948         of GCOV_COUNTERS_SUMMABLE.
16949         (GCOV_COUNTERS_SUMMABLE): Remove.
16950         (GCOV_FIRST_VALUE_COUNTER): Replace with
16951         GCOV_COUNTER_V_INTERVAL.
16952         (struct gcov_ctr_summary): Remove.
16953         (struct gcov_summary): Directly use fields of former
16954         gcov_ctr_summary.
16955         (compute_working_sets): Use gcov_summary struct.
16956         * gcov.c (read_count_file): Do not use ctrs fields.
16957         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16958         struct.
16959         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16960         struct.
16961         * profile.c: Likewise.
16962         * profile.h: Likewise.
16964 2018-06-05  Martin Liska  <mliska@suse.cz>
16966         PR gcov-profile/84846
16967         * gcov.c (output_lines): Print working directory only
16968         in intermediate format.
16970 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
16972         * config/s390/s390-builtin-types.def: Add void function type.
16973         * config/s390/s390-builtins.def: Use the function type for the
16974         tbeginc builtin.
16976 2018-06-04  Jim Wilson  <jimw@sifive.com>
16978         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16979         to int.
16980         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16981         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
16982         handle EH_RETURN_DATA_REGNO registers properly.
16983         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16984         (riscv_expand_epilogue): Update comment.  Change argument name and
16985         type.  Update code to use new name and type.  Pass new args to
16986         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
16987         EXCEPTION_RETURN.
16988         * config/riscv/riscv.md (NORMAL_RETURN): New.
16989         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16990         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16991         (eh_return): Call gen_eh_return_internal and emit barrier.
16992         (eh_return_internal): Call riscv_expand_epilogue.
16994 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
16996         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16997         bit_insertion field and declare can_be_merged_into method.
16998         (merged_store_group::can_be_merged_into): New method.
16999         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17000         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
17001         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17003 2018-06-04  Richard Biener  <rguenther@suse.de>
17005         PR tree-optimization/85955
17006         * builtins.c (fold_builtin_sincos): Convert pointers to
17007         destination to appropriate type before dereferencing.
17009 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
17011         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17013 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
17015         * expr.c (expand_expr_real_1): Force the operand into memory if
17016         its TYPE_MODE is BLKmode and if there is no integer mode for
17017         the number of bits being extracted.
17019 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
17021         PR target/85832
17022         PR target/86036
17023         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17024         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17026 2018-06-04  Richard Biener  <rguenther@suse.de>
17028         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17029         (cleanup_tree_cfg_noloop): ... single caller.  Do
17030         start_recording_case_labels later.
17032 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
17034         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17035         to _IMMINTRIN_H_INCLUDED.
17036         * config/i386/pconfigintrin.h: Ditto.
17037         * config/i386/waitpkgintrin.h: Ditto.
17038         * config/i386/immintrin.h: Add includes for sgxintrin.h,
17039         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17040         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17041         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17042         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17043         waitpkgintrin.h and cldemoteintrin.h.
17045 2018-06-04  Richard Biener  <rguenther@suse.de>
17047         PR tree-optimization/86038
17048         * tracer.c (find_best_successor): Check probability for
17049         being initialized, bail out if not.
17051 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
17053         PR target/86003
17054         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17055         of bits to ignore when comparing architectures.
17057 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
17059         PR tree-optimization/69615
17060         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17061         maximum or minimum of the type, try to merge it also as if
17062         range1 is + [-, x - 1] or + [x + 1, -].
17064         PR c++/86025
17065         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17067 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
17069         PR tree-optimization/86034
17070         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17071         the unsigned bitfield type in a bit insertion sequence if it does not
17072         have a larger precision than the bitfield size.
17073         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17075 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
17077         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17079 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17081         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17082         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17083         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17084         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17086 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17088         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17089         Disable -fdelete-null-pointer-checks for ELF toolchain.
17091 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17092             Kito Cheng  <kito.cheng@gmail.com>
17094         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17095         (nds32le-*-*, nds32be-*-*): Integrate checking process.
17096         (nds32*-*-*): Add glibc and uclibc conditions.
17097         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17098         (TARGET_EXCEPT_UNWIND_INFO): Define.
17099         * config/nds32/elf.h: New file.
17100         * config/nds32/linux.h: New file.
17101         * config/nds32/nds32-elf.opt: New file.
17102         * config/nds32/nds32-linux.opt: New file.
17103         * config/nds32/nds32-fp-as-gp.c
17104         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17105         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17106         TARGET_LINUX_ABI.
17107         (nds32_asm_file_end): Ditto.
17108         (nds32_print_operand): Ditto.
17109         (nds32_insert_attributes): Ditto.
17110         (nds32_init_libfuncs): New function.
17111         (TARGET_HAVE_TLS): Define.
17112         (TARGET_INIT_LIBFUNCS): Define.
17113         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17114         spec content.
17115         (TARGET_ELF): Apply different mcmodel setting.
17116         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17117         been migrated into elf.h and linux.h files.
17118         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17119         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17120         (mcmodel): The content has been migrated into nds32-elf.opt and
17121         nds32-linux.opt files.
17122         * config/nds32/t-elf: New file.
17123         * config/nds32/t-linux: New file.
17125 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17126             Shiva Chen  <shiva0217@gmail.com>
17128         * config/nds32/constants.md (unspec_volatile_element): Add
17129         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17130         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17131         optimization.
17132         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17133         (make_pass_nds32_fp_as_gp): Declare.
17134         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17135         optmization pass.
17136         (nds32_asm_function_end_prologue): Remove unused asm output.
17137         (nds32_asm_function_begin_epilogue): Remove unused asm output.
17138         (nds32_asm_file_start): Output necessary fp_as_gp information.
17139         (nds32_option_override): Adjust register usage.
17140         (nds32_expand_prologue): Consider fp_as_gp situation.
17141         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17142         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17143         (epilogue): Ditto.
17144         (return): Ditto.
17145         (simple_return): Ditto.
17146         (omit_fp_begin): Output special directive for fp_as_gp.
17147         (omit_fp_end): Output special directive for fp_as_gp.
17148         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17149         mforbid-fp-as-gp): New options.
17151 2018-06-01  Mark Wielaard  <mark@klomp.org>
17153         * dwarf2out.c (dwarf2out_finish): Remove generation of
17154         DW_AT_loclists_base.
17156 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
17158         * gimple-ssa-store-merging.c: Include gimple-fold.h.
17159         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17160         (struct merged_store_group): Add bit_insertion field.
17161         (dump_char_array): Use standard hexadecimal format.
17162         (merged_store_group::merged_store_group): Set bit_insertion to false.
17163         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
17164         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
17165         also print the mask in the dump file.
17166         (pass_store_merging::gate): Minor tweak.
17167         (imm_store_chain_info::coalesce_immediate): Fix wrong association
17168         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
17169         stores with INTEGER_CST stores.
17170         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17171         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17172         and use it throughout.  Generate bit insertion sequences if need be.
17173         (pass_store_merging::process_store): Remove redundant condition.
17174         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17176 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
17178         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17179         the 128-bit floating point types.  Fix function comment.
17181 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17183         * config/aarch64/aarch64-simd.md
17184         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17185         mnemonics.
17186         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17187         mnemonics.
17189 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17191         PR tree-optimization/85989
17192         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17193         variable.
17194         (backprop::intersect_uses): Check it when deciding whether this
17195         is a backedge reference.
17196         (backprop::process_block): Add each phi to m_visited_phis
17197         after visiting it, then clear it at the end.
17199 2018-06-01  Richard Biener  <rguenther@suse.de>
17201         * tree-vectorizer.h (vect_dr_stmt): New function.
17202         (vect_get_load_cost): Adjust.
17203         (vect_get_store_cost): Likewise.
17204         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17205         Use vect_dr_stmt instead of DR_SMTT.
17206         (vect_record_base_alignments): Likewise.
17207         (vect_calculate_target_alignment): Likewise.
17208         (vect_compute_data_ref_alignment): Likewise and make static.
17209         (vect_update_misalignment_for_peel): Likewise.
17210         (vect_verify_datarefs_alignment): Likewise.
17211         (vector_alignment_reachable_p): Likewise.
17212         (vect_get_data_access_cost): Likewise.  Pass down
17213         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17214         (vect_get_peeling_costs_all_drs): Likewise.
17215         (vect_peeling_hash_get_lowest_cost): Likewise.
17216         (vect_enhance_data_refs_alignment): Likewise.
17217         (vect_find_same_alignment_drs): Likewise.
17218         (vect_analyze_data_refs_alignment): Likewise.
17219         (vect_analyze_group_access_1): Likewise.
17220         (vect_analyze_group_access): Likewise.
17221         (vect_analyze_data_ref_access): Likewise.
17222         (vect_analyze_data_ref_accesses): Likewise.
17223         (vect_vfa_segment_size): Likewise.
17224         (vect_small_gap_p): Likewise.
17225         (vectorizable_with_step_bound_p): Likewise.
17226         (vect_prune_runtime_alias_test_list): Likewise.
17227         (vect_analyze_data_refs): Likewise.
17228         (vect_supportable_dr_alignment): Likewise.
17229         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17230         (vect_gen_prolog_loop_niters): Likewise.
17231         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17232         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17233         modify DR_STMT.
17234         (vect_recog_mask_conversion_pattern): Likewise.
17235         (vect_try_gather_scatter_pattern): Likewise.
17236         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17237         to vect_get_store_cost.
17238         (vect_get_store_cost): Get stmt_info instead of DR.
17239         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17240         (vect_get_load_cost): Get stmt_info instead of DR.
17242 2018-06-01  Richard Biener  <rguenther@suse.de>
17244         PR middle-end/86017
17245         * gimple-fold.c (var_decl_component_p): Also allow offsetted
17246         vars wrapped in MEM_REFs.
17248 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17250         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17251         Fix subreg tests so that we only return a choice between
17252         GENERAL_REGS and FP_REGS if the original classes included both.
17254 2018-06-01  Richard Biener  <rguenther@suse.de>
17256         PR ipa/85960
17257         * tree-ssa-structalias.c (get_function_part_constraint):
17258         Handle NULL fi->decl.
17259         (find_func_aliases_for_call): Properly handle indirect
17260         fi from direct call.
17261         (find_func_clobbers): Likewise.
17262         (ipa_pta_execute): Likewise.
17263         (create_variable_info_for): For functions that are ifunc_resolver
17264         resolve to a varinfo that contains the result of the resolver call.
17265         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17266         aliases.
17268 2018-05-31  Michael Collison  <michael.collison@arm.com>
17270         * config/aarch64/aarch64.md:
17271         (*fix_to_zero_extenddfdi2): New pattern.
17272         * gcc.target/aarch64/fix_extend1.c: New testcase.
17274 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
17276         PR middle-end/78809
17277         PR middle-end/83026
17278         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17279         and BUILT_IN_STRNCMP_EQ.
17280         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17281         BUILT_IN_STRNCMP_EQ.
17282         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17283         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17284         (gimple_fold_builtin): Likewise.
17285         * tree-ssa-strlen.c (compute_string_length): New function.
17286         (determine_min_obsize): New function.
17287         (handle_builtin_string_cmp): New function to handle calls to
17288         string compare functions.
17289         (strlen_optimize_stmt): Add handling to builtin string compare
17290         calls.
17291         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17292         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17293         * tree.c (build_common_builtin_nodes): Add new defines of
17294         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17296 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
17298         PR target/85984
17299         * bb-reorder.c (pass_partition_blocks::gate): Return false for
17300         functions with naked attribute.
17302 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
17304         * config/i386/sse.md (avx_vec_concat<mode>):
17305         Substitute concat_tg_mode mode attribute with xtg_mode.
17306         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17307         (concat_tg_mode): Remove mode attribute.
17309 2018-05-31  Martin Sebor  <msebor@redhat.com>
17311         PR c/82063
17312         * calls.c (alloc_max_size): Correct a logic error/typo.
17313         Treat excessive arguments as infinite.  Warn for invalid arguments.
17314         * doc/invoke.texi (-Walloc-size-larger-than): Update.
17316 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
17318         PR target/85829
17319         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17320         and movx for Haswell.
17322 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
17323             Cesar Philippidis  <cesar@codesourcery.com>
17325         PR middle-end/85879
17326         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17327         when emitting error on private/firstprivate reductions.
17328         * omp-low.c (lower_omp_target): Avoid reference-type processing
17329         on pointers for firstprivate clause.
17331 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17333         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17334         (st1x2): Likewise.
17335         (st1x3): Likewise.
17336         * config/aarch64/aarch64-simd.md
17337         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17338         (aarch64_ld1_x3_<mode>): Likewise
17339         (aarch64_st1x2<VALLDIF:mode>): Likewise
17340         (aarch64_st1_x2_<mode>): Likewise
17341         (aarch64_st1x3<VALLDIF:mode>): Likewise
17342         (aarch64_st1_x3_<mode>): Likewise
17343         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17344         (vld1_s8_x3): Likewise.
17345         (vld1_u16_x3): Likewise.
17346         (vld1_s16_x3): Likewise.
17347         (vld1_u32_x3): Likewise.
17348         (vld1_s32_x3): Likewise.
17349         (vld1_u64_x3): Likewise.
17350         (vld1_s64_x3): Likewise.
17351         (vld1_f16_x3): Likewise.
17352         (vld1_f32_x3): Likewise.
17353         (vld1_f64_x3): Likewise.
17354         (vld1_p8_x3): Likewise.
17355         (vld1_p16_x3): Likewise.
17356         (vld1_p64_x3): Likewise.
17357         (vld1q_u8_x3): Likewise.
17358         (vld1q_s8_x3): Likewise.
17359         (vld1q_u16_x3): Likewise.
17360         (vld1q_s16_x3): Likewise.
17361         (vld1q_u32_x3): Likewise.
17362         (vld1q_s32_x3): Likewise.
17363         (vld1q_u64_x3): Likewise.
17364         (vld1q_s64_x3): Likewise.
17365         (vld1q_f16_x3): Likewise.
17366         (vld1q_f32_x3): Likewise.
17367         (vld1q_f64_x3): Likewise.
17368         (vld1q_p8_x3): Likewise.
17369         (vld1q_p16_x3): Likewise.
17370         (vld1q_p64_x3): Likewise.
17371         (vst1_s64_x2): Likewise.
17372         (vst1_u64_x2): Likewise.
17373         (vst1_f64_x2): Likewise.
17374         (vst1_s8_x2): Likewise.
17375         (vst1_p8_x2): Likewise.
17376         (vst1_s16_x2): Likewise.
17377         (vst1_p16_x2): Likewise.
17378         (vst1_s32_x2): Likewise.
17379         (vst1_u8_x2): Likewise.
17380         (vst1_u16_x2): Likewise.
17381         (vst1_u32_x2): Likewise.
17382         (vst1_f16_x2): Likewise.
17383         (vst1_f32_x2): Likewise.
17384         (vst1_p64_x2): Likewise.
17385         (vst1q_s8_x2): Likewise.
17386         (vst1q_p8_x2): Likewise.
17387         (vst1q_s16_x2): Likewise.
17388         (vst1q_p16_x2): Likewise.
17389         (vst1q_s32_x2): Likewise.
17390         (vst1q_s64_x2): Likewise.
17391         (vst1q_u8_x2): Likewise.
17392         (vst1q_u16_x2): Likewise.
17393         (vst1q_u32_x2): Likewise.
17394         (vst1q_u64_x2): Likewise.
17395         (vst1q_f16_x2): Likewise.
17396         (vst1q_f32_x2): Likewise.
17397         (vst1q_f64_x2): Likewise.
17398         (vst1q_p64_x2): Likewise.
17399         (vst1_s64_x3): Likewise.
17400         (vst1_u64_x3): Likewise.
17401         (vst1_f64_x3): Likewise.
17402         (vst1_s8_x3): Likewise.
17403         (vst1_p8_x3): Likewise.
17404         (vst1_s16_x3): Likewise.
17405         (vst1_p16_x3): Likewise.
17406         (vst1_s32_x3): Likewise.
17407         (vst1_u8_x3): Likewise.
17408         (vst1_u16_x3): Likewise.
17409         (vst1_u32_x3): Likewise.
17410         (vst1_f16_x3): Likewise.
17411         (vst1_f32_x3): Likewise.
17412         (vst1_p64_x3): Likewise.
17413         (vst1q_s8_x3): Likewise.
17414         (vst1q_p8_x3): Likewise.
17415         (vst1q_s16_x3): Likewise.
17416         (vst1q_p16_x3): Likewise.
17417         (vst1q_s32_x3): Likewise.
17418         (vst1q_s64_x3): Likewise.
17419         (vst1q_u8_x3): Likewise.
17420         (vst1q_u16_x3): Likewise.
17421         (vst1q_u32_x3): Likewise.
17422         (vst1q_u64_x3): Likewise.
17423         (vst1q_f16_x3): Likewise.
17424         (vst1q_f32_x3): Likewise.
17425         (vst1q_f64_x3): Likewise.
17426         (vst1q_p64_x3): Likewise.
17428 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17430         * config/msp430/msp430.c (msp430_output_labelref): Prepend
17431         user_label_prefix to name.
17433         * tree-core.h: Update comment about the format of NAME string
17434         passed to handler in attribute_spec.
17436         * config/msp430/msp430.md: Remove erroneous subreg expression from
17437         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17438         zero_extend{q,h}isi2.
17440 2018-05-30  Borislav Petkov  <bp@suse.de>
17442         * doc/extend.texi: Document some architecture specific
17443         constraints and sort entries.
17445 2018-05-30  Martin Sebor  <msebor@redhat.com>
17447         PR middle-end/85369
17448         * builtins.c (expand_builtin_stpcpy_1): New function.
17449         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17450         only if the former succeeds.
17452 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17454         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17455         in saphira.
17457 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17459         * doc/invoke.texi (-flinker-output): Document
17461 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17463         * passes.c (ipa_write_summaries): Only modify statements if body
17464         is in memory.
17465         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17466         incrementally linking.
17467         (ipa_passes): Likewise.
17468         * lto-cgraph.c (lto_output_node): When incrementally linking do not
17469         pass down resolution info.
17470         * common.opt (flag_incremental_link): Update info.
17471         * gcc.c (plugin specs): Turn flinker-output=* to
17472         -plugin-opt=-linker-output-known
17473         * toplev.c (compile_file): Also cut compilation when doing incremental
17474         link.
17475         * flag-types. (enum lto_partition_model): Add
17476         LTO_LINKER_OUTPUT_NOLTOREL.
17477         (invoke.texi): Add -flinker-output docs.
17478         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17479         link same way as WPA; do not stream in dead initializers.
17481         * dwarf2out.c (dwarf2out_die_ref_for_decl,
17482         darf2out_register_external_decl): Support incremental link.
17484 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17486         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17488 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17490         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17491         it down to simple_object_copy_lto_debug_sections.
17492         (run_gcc): Determine incremental LTO link time and configure
17493         lto1 into non-wpa mode, disable renaming of debug sections.
17495 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17497         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17498         descriptions of various incorrectly documented functions.
17500 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17502         Revert:
17503         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17504         address check not strict.
17506 2018-05-30  Richard Biener  <rguenther@suse.de>
17508         PR tree-optimization/85964
17509         * tracer.c (better_p): Drop initialized count check, we only
17510         call the function with initialized counts now.
17511         (find_best_successor): Do find a best edge if one
17512         has uninitialized count.
17513         (find_best_predecessor): Likewise.  Do BB frequency check only
17514         if count is initialized.
17516 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
17518         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17519         (aarch64_ldrstr_offset_compare): New.
17520         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17521         load/store orderings.
17522         (aarch64_gen_adjusted_ldpstp): Likewise.
17524 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
17526         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17527         Check for subset of GENERAL_REGS and FP_REGS.
17528         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17529         r=w alternative.
17531 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
17533         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17534         and wi::to_poly_offset.  Add the current offset and then check
17535         whether the sum fits, rather than using an unchecked addition of
17536         a checked term.  Check for a shwi rather than a uhwi.
17537         * expr.c (get_bit_range): Use tree_to_poly_uint64.
17538         (store_constructor): Use poly_int_tree_p.
17539         (expand_expr_real_1): Likewise.
17540         * function.c (assign_temp): Likewise.
17541         * fold-const.c (const_binop): Use poly_int_tree_p and
17542         wi::to_poly_offset.
17543         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
17544         division.
17545         * ipa-icf-gimple.c (func_checker::compare_operand): Use
17546         to_poly_offset for MEM offsets.
17547         * ipa-icf.c (sem_variable::equals): Likewise.
17548         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17549         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17550         wi::to_poly_offset for BIT_FIELD_REF offsets.
17551         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17552         wi::to_poly_offset.
17553         * var-tracking.c (emit_note_insn_var_location): Use
17554         tree_to_poly_uint64.
17556 2018-05-29  Jim Wilson  <jimw@sifive.com>
17558         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17560 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
17562         PR target/85950
17563         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17564         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17565         sequence.
17566         (sse4_1_round<mode>2): Use nonimmediate_operand
17567         for operand 1 predicate.
17569 2018-05-29  Martin Sebor  <msebor@redhat.com>
17570             Richard Biener  <rguenther@suse.de>
17572         PR testsuite/85888
17573         * calls.c (get_size_range): Call determine_value_range instead
17574         of get_value_range..
17575         * tree-vrp.h (determine_value_range): Declared new function.
17576         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17578 2018-05-29  Richard Biener  <rguenther@suse.de>
17580         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17581         sure to use non-pattern stmts for get_earlier_stmt arguments.
17582         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17583         called on pattern stmts.
17584         (get_later_stmt): Likewise.
17586 2018-05-29  Martin Liska  <mliska@suse.cz>
17588         PR gcov-profile/85759
17589         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17590         env variables.
17592 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
17594         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17595         VEC_UNPACK_*_EXPR.
17596         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17597         VEC_PACK_*_EXPR.
17599         PR target/85918
17600         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17601         VEC_PACK_FLOAT_EXPR): New tree codes.
17602         * tree-pretty-print.c (op_code_prio): Handle
17603         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17604         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17605         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17606         * tree-inline.c (estimate_operator_cost): Likewise.
17607         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17608         * fold-const.c (const_binop): Likewise.
17609         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17610         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17611         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17612         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17613         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17614         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17615         * expr.c (expand_expr_real_2): Likewise.
17616         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17617         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17618         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17619         optabs.
17620         * optabs.c (expand_widen_pattern_expr): For
17621         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17622         sign from result type rather than operand's type.
17623         (expand_binop_directly): For vec_packu_float_optab and
17624         vec_packs_float_optab allow result type to be different from operand's
17625         type.
17626         * optabs-tree.c (optab_for_tree_code): Handle
17627         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17628         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
17629         * tree-vect-generic.c (expand_vector_operations_1):  Handle
17630         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17631         VEC_PACK_FLOAT_EXPR.
17632         * tree-vect-stmts.c (supportable_widening_operation): Handle
17633         FIX_TRUNC_EXPR.
17634         (supportable_narrowing_operation): Handle FLOAT_EXPR.
17635         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17636         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17637         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
17638         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17639         mode attributes.
17640         (vec_pack<floatprefix>_float_<mode>): New expander.
17641         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17642         attributes.
17643         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17644         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17645         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17646         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17647         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17648         Document.
17649         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17650         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17651         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17652         VEC_PACK_FLOAT_EXPR): Document.
17654 2018-05-29  Richard Biener  <rguenther@suse.de>
17656         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17657         member.
17658         (stmt_vec_info_vec): Make pointer.
17659         (init_stmt_vec_info_vec): Remove.
17660         (free_stmt_vec_info_vec): Likewise.
17661         (set_stmt_vec_info_vec): New function.
17662         (free_stmt_vec_infos): Likewise.
17663         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17664         (set_vinfo_for_stmt): Likewise.
17665         (get_earlier_stmt): Likewise.
17666         (get_later_stmt): Likewise.
17667         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17668         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17669         (vec_info::~vec_info): Free stmt_vec_infos.
17670         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17671         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17672         (pass_slp_vectorize::execute): Likewise.
17673         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17674         (free_stmt_vec_info_vec): Likewise.
17675         (set_stmt_vec_info_vec): New function.
17676         (free_stmt_vec_infos): Likewise.
17677         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17678         the global stmt_vec_info_vec.
17679         * tree-parloops.c (gather_scalar_reductions): Use
17680         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17681         vector.
17683 2018-05-29  Richard Biener  <rguenther@suse.de>
17685         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17687 2018-05-29  Martin Liska  <mliska@suse.cz>
17688             David Malcolm  <dmalcolm@redhat.com>
17690         * vec.c (test_reverse): New.
17691         (vec_c_tests): Add new test.
17692         * vec.h (vl_ptr>::reverse): New function.
17694 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
17696         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17698         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17699         and later.
17701 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17703         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17705 2018-05-28  Richard Biener  <rguenther@suse.de>
17707         PR tree-optimization/85933
17708         * tree-vect-data-refs.c (vect_record_base_alignments): Only
17709         look at stmts marked as vectorizable.
17711 2018-05-28  Richard Biener  <rguenther@suse.de>
17713         PR tree-optimization/85934
17714         * tree-vect-generic.c (expand_vector_operations_1): Hoist
17715         vector boolean check before scalar optimization.
17717 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
17719         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17720         for armv5te.
17722 2018-05-28  Mark Wielaard  <mark@klomp.org>
17724         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17725         if it is an expression containing a minus sign.
17727 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
17729         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17731 2018-05-27  Paul Koning  <ni1d@arrl.net>
17733         * config/pdp11/pdp11.md (truncsihi2): Remove.
17735 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
17736             Chung-Ju Wu  <jasonwucj@gmail.com>
17738         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17739         implementation.
17740         (unaligned_store_dw): Ditto.
17741         * config/nds32/nds32-memory-manipulation.c
17742         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17743         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17744         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17745         (emit_setmem_word_loop): Rename to ...
17746         (emit_setmem_doubleword_loop): ... this.
17747         (nds32_gen_dup_4_byte_to_word_value): New function.
17748         (nds32_gen_dup_8_byte_to_double_word_value): New function.
17749         (nds32_expand_setmem_loop): Refine implementation.
17750         (nds32_expand_setmem_loop_v3m): Ditto.
17751         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17752         pattern.
17754 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17756         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17758 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17760         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17761         (nds32_init_machine_status): Initialize machine->attr_naked_p and
17762         machine->attr_no_prologue_p.
17763         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17764         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17765         (nds32_expand_epilogue): Consider attr_naked_p.
17766         (nds32_expand_epilogue_v3pop): Likewise.
17767         (nds32_can_use_return_insn): Likewise.
17768         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17769         attr_no_prologue_p fields.
17770         * config/nds32/nds32.opt (mret-in-naked-func): New option.
17772 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
17774         PR target/85918
17775         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17776         attributes.
17777         * config/i386/sse.md
17778         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17779         Rename to ...
17780         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17781         ... this.
17782         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17783         Rename to ...
17784         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17785         ... this.
17786         (*<floatsuffix>floatv2div2sf2): Rename to ...
17787         (*float<floatunssuffix>v2div2sf2): ... this.
17788         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17789         (float<floatunssuffix>v2div2sf2_mask): ... this.
17790         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17791         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17792         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17793         to ...
17794         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17795         ... this.
17796         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17797         Rename to ...
17798         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17799         ... this.
17800         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17801         Rename to ...
17802         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17803         ... this.
17804         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17805         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17806         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17807         gen_ufix_truncv8dfv8si2.
17808         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17809         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17810         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17811         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17812         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17813         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17814         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17815         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17817 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
17819         PR target/85900
17820         PR target/85345
17821         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17823 2018-05-25  Jim Wilson  <jimw@sifive.com>
17825         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17826         * config/riscv/riscv.c (struct machine_function): Add
17827         interrupt_handler_p and attribute_checked_p fields.
17828         (riscv_attribute_table): Add interrupt.
17829         (riscv_interrupt_type_p): New.
17830         (riscv_save_reg_p): Save extra regs for interrupt handler.
17831         (riscv_use_save_libcall): Return false  for interrupt handler.
17832         (riscv_first_stack_step): Add forward declaration.
17833         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
17834         for interrupt handler with large frame.  Use it for saved reg list.
17835         (riscv_expand_prologue): Move flag_stack_usage_info support to
17836         eliminate duplication.
17837         (riscv_expand_epilogue): Generate mret for interrupt handler.
17838         (riscv_epilogue_uses): New.
17839         (riscv_can_use_return_insn): Return false for interrupt handler.
17840         (riscv_function_ok_for_sibcall): Likewise.
17841         (riscv_set_current_function): Add interrupt handler support.
17842         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17843         * config/riscv/riscv.md (UNSPECV_MRET): New.
17844         (GP_REGNUM): New.
17845         (riscv_frflags, riscv_fsflags): Use tab after opcode.
17846         (riscv_mret): New.
17847         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17849 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
17851         PR tree-optimization/85712
17852         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17853         this candidate has already been replaced in-situ by a copy.
17855 2018-05-25  Jason Merrill  <jason@redhat.com>
17857         PR c++/80485 - inline function non-zero address.
17858         * symtab.c (nonzero_address): Check DECL_COMDAT.
17860 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
17862         PR target/83628
17863         * config/alpha/alpha.md (ashlsi3): New insn pattern.
17864         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
17865         extension of SImode operation.  Use const123_operand predicate.
17866         (*saddsi_1): Remove.
17867         (*saddl_se_1): Ditto.
17868         (*ssubsi_1): Ditto.
17869         (*ssubl_se_1): Ditto.
17870         * config/alpha/predicates.md (const123_operand): New predicate.
17871         * config/alpha/constraints.md (P): Use IN_RANGE.
17873 2018-05-25  Richard Biener  <rguenther@suse.de>
17875         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17876         defaulted to true.
17877         (ref_maybe_used_by_stmt_p): Likewise.
17878         (stmt_may_clobber_ref_p): Likewise.
17879         (stmt_may_clobber_ref_p_1): Likewise.
17880         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17881         and pass it along.
17882         (ref_maybe_used_by_stmt_p): Likewise.
17883         (stmt_may_clobber_ref_p): Likewise.
17884         (stmt_may_clobber_ref_p_1): Likewise.
17885         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17886         the alias oracle to disambiguate DRs with stmts DR analysis
17887         couldn't handle.
17888         (vect_analyze_data_refs): Do not give up on not analyzable
17889         DRs for BB vectorization.  Remove code truncating the dataref
17890         vector.
17892 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
17894         PR target/85832
17895         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17896         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
17897         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17899 2018-05-25  Richard Biener  <rguenther@suse.de>
17901         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17902         function, combining stmt data ref gathering and fatal analysis
17903         parts.
17904         (vect_analyze_data_refs): Remove now redudnant code and simplify.
17905         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17906         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17907         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17908         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17910 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17912         PR tree-optimization/85720
17913         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17914         SCC if all partitions are builtins.
17915         (version_loop_by_alias_check): New parameter.  Generate cancelable
17916         runtime alias check if all partitions are builtins.
17917         (distribute_loop): Update call to above function.
17919 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17921         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17922         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17923         (parm_default_def_partition_arg): Ditto.
17924         (set_parm_default_def_partition): Ditto.
17925         (get_parm_default_def_partitions): Ditto and make it static.
17926         (get_undefined_value_partitions): Ditto and make it static.
17927         (remove_ssa_form): Refactor call to init_var_map here.
17928         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17929         computation for loop region.
17930         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17931         (register_default_def): Delete.
17932         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17933         (parm_default_def_partition_arg): Ditto.
17934         (set_parm_default_def_partition): Ditto.
17935         (get_parm_default_def_partitions): Ditto and make it static.
17936         (get_undefined_value_partitions): Ditto and make it static.
17937         (coalesce_with_default, coalesce_with_default): Update comment.
17938         (create_coalesce_list_for_region): New func factored out from
17939         create_outofssa_var_map.
17940         (populate_coalesce_list_for_outofssa): New func factored out from
17941         create_outofssa_var_map and coalesce_ssa_name.
17942         (create_outofssa_var_map): Delete.
17943         (coalesce_ssa_name): Refactor to support live range computation.
17944         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17945         (get_parm_default_def_partitions): Delete.
17946         (get_undefined_value_partitions): Ditto.
17947         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17948         computation for loop region.
17949         (new_tree_live_info, loe_visit_block): Ditto.
17950         (live_worklist, set_var_live_on_entry): Ditto.
17951         (calculate_live_on_exit, verify_live_on_entry): Ditto.
17952         * tree-ssa-live.h (struct _var_map): New fields.
17953         (init_var_map): Change decl.
17954         (region_contains_p): New.
17956 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17958         * tree-ssa-live.h (live_merge_and_clear): Delete.
17960 2018-05-25  Richard Biener  <rguenther@suse.de>
17962         PR c++/85912
17963         * tree-dump.c (dequeue_and_dump): Remove access to removed
17964         operand 2 of a SWITCH_EXPR.
17966 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17968         * doc/sourcebuild.texi (vect_double_cond_arith): Include
17969         multiplication and division.
17970         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17971         (cond_udiv@var{m}, cond_umod@var{m}): Document.
17972         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17973         (cond_udiv_optab, cond_umod_optab): New optabs.
17974         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17975         (IFN_COND_RDIV): New internal functions.
17976         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17977         TRUNC_MOD_EXPR and RDIV_EXPR.
17978         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17979         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17980         New unspecs.
17981         (SVE_INT_BINARY): Include mult.
17982         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17983         (optab, sve_int_op): Handle mult.
17984         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17985         UNSPEC_COND_DIV.
17986         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17987         for SVE_INT_BINARY_SD.
17989 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17991         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17992         (optab, sve_int_op): Handle div and udiv.
17993         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17994         for SVE_INT_BINARY_SD.
17995         (*<optab><mode>3): New insn for the same.
17997 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17999         * tree-vect-patterns.c: Include predict.h.
18000         (vect_recog_divmod_pattern): Restrict check for division support
18001         to when optimizing for size.
18003 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18005         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18006         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18007         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18008         (gimple_match_op::set_op): Likewise.
18009         (gimple_resimplify4): Declare.
18010         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18011         (expr::gen_transform): Likewise.
18012         (decision_tree::gen): Generate a simplification routine for 4 operands.
18013         * gimple-match-head.c (gimple_simplify): Add an overload for
18014         4 operands.  In the top-level function, handle up to 4 call
18015         arguments and call gimple_resimplify4.
18016         (gimple_resimplify4): New function.
18017         (build_call_internal): Pass a fourth operand.
18018         (maybe_push_to_seq): Likewise.
18019         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18020         Fold VEC_COND_EXPRs of an operation and a default value into
18021         an IFN_COND_* function if possible.
18022         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18023         New unspecs.
18024         (SVE_COND_FP_BINARY): Include them.
18025         (optab, sve_fp_op): Handle them.
18026         (SVE_INT_BINARY_REV): New code iterator.
18027         (SVE_COND_FP_BINARY_REV): New int iterator.
18028         (commutative): New int attribute.
18029         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18030         Declare.
18031         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18032         function.
18033         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18034         (*cond_<optab><mode>): New patterns for reversed operands.
18036 2018-05-25  Richard Biener  <rguenther@suse.de>
18038         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18039         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18040         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18041         (STMT_VINFO_GROUPED_ACCESS): Adjust.
18042         * tree-vect-data-refs.c (everywhere): Adjust users.
18043         * tree-vect-loop.c (everywhere): Likewise.
18044         * tree-vect-slp.c (everywhere): Likewise.
18045         * tree-vect-stmts.c (everywhere): Likewise.
18046         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18048 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18050         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18051         Rename to...
18052         (gcc_cv_as_section_exclude): ... this.
18053         Try Solaris as #exclude syntax.
18054         * configure: Regenerate.
18055         * config.in: Regenerate.
18056         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18057         SECTION_EXCLUDE.
18058         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18059         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18061         * varasm.c (default_elf_asm_named_section): Don't check if
18062         HAVE_GAS_SECTION_EXCLUDE is defined.
18064 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18066         * doc/md.texi: Update the documentation of the cond_* optabs
18067         to mention the new final operand.  Fix GET_MODE_NUNITS call.
18068         Describe the scalar case too.
18069         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18070         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18071         instead of 2.
18072         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18073         (get_conditional_internal_fn): Update comment.
18074         * tree-vect-loop.c (vectorizable_reduction): Pass the original
18075         accumulator value as a final argument to conditional functions.
18076         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18077         a define_expand and add an "else" operand.  Assert for now that
18078         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
18079         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18080         (*cond_<optab><mode>): New patterns.
18081         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18082         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18083         (UNSPEC_COND_EOR): Delete.
18084         (optab): Remove associated mappings.
18085         (SVE_INT_BINARY): New code iterator.
18086         (sve_int_op): Remove int attribute and add "minus" to the code
18087         attribute.
18088         (SVE_COND_INT_OP): Delete.
18089         (SVE_COND_FP_OP): Rename to...
18090         (SVE_COND_FP_BINARY): ...this.
18092 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18094         * optabs.c (can_reuse_operands_p): New function.
18095         (maybe_legitimize_operands): Try to reuse the results for
18096         earlier operands.
18098 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
18100         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18101         Add {q} suffix to insn mnemonic.
18103 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18105         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18106         (msp430_warn_func_return): New.
18108 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
18110         * fold-const.c (tree_nonzero_bits): New function.
18111         * fold-const.h (tree_nonzero_bits): Likewise.
18112         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18113         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18115 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
18117         PR target/85900
18118         PR target/85345
18119         * varasm.c (assemble_alias): Check ifunc_resolver only on
18120         FUNCTION_DECL.
18122 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
18124         PR target/85903
18125         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18126         when memory input operand is handled.
18128 2018-05-24  Luis Machado  <luis.machado@linaro.org>
18130         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18131         global.
18132         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18134 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18136         * match.pd: Delay FMA folds until after vectorization.
18138 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18140         PR target/83009
18141         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18142         address check not strict.
18144 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18146         * gimple-match.h (gimple_match_op): New class.
18147         (mprts_hook): Replace parameters with a gimple_match_op *.
18148         (maybe_build_generic_op): Likewise.
18149         (gimple_simplified_result_is_gimple_val): Replace parameters with
18150         a const gimple_match_op *.
18151         (gimple_simplify): Replace code_helper * and tree * parameters with
18152         a gimple_match_op * parameter.
18153         (gimple_resimplify1): Replace code_helper *, tree and tree *
18154         parameters with a gimple_match_op * parameter.
18155         (gimple_resimplify2): Likewise.
18156         (gimple_resimplify3): Likewise.
18157         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18158         parameters with a gimple_match_op * parameter.
18159         * gimple-match-head.c (gimple_simplify): Change prototypes of
18160         auto-generated functions to take a gimple_match_op * instead of
18161         separate code_helper * and tree * parameters.  Make the same
18162         change in the top-level overload and update calls to the
18163         gimple_resimplify routines.  Update calls to the auto-generated
18164         functions and to maybe_push_res_to_seq in the publicly-facing
18165         operation-specific gimple_simplify overloads.
18166         (gimple_match_op::MAX_NUM_OPS): Define.
18167         (gimple_resimplify1): Replace rcode and ops with a single res_op
18168         parameter.  Update call to gimple_simplify.
18169         (gimple_resimplify2): Likewise.
18170         (gimple_resimplify3): Likewise.
18171         (mprts_hook): Replace parameters with a gimple_match_op *.
18172         (maybe_build_generic_op): Likewise.
18173         (build_call_internal): Replace type, nargs and ops with
18174         a gimple_match_op *.
18175         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18176         with a single gimple_match_op *.  Update calls to mprts_hook,
18177         build_call_internal and gimple_simplified_result_is_gimple_val.
18178         Factor out code that is common to the tree_code and combined_fn cases.
18179         * genmatch.c (expr::gen_transform): Replace tem_code and
18180         tem_ops with a gimple_match_op called tem_op.  Update calls
18181         to the gimple_resimplify functions and maybe_push_res_to_seq.
18182         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18183         res_ops.  Update call to the gimple_resimplify functions.
18184         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18185         (decision_tree::gen): Make the functions take a gimple_match_op *
18186         called res_op instead of separate res_code and res_ops parameters.
18187         Update call accordingly.
18188         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18189         and ops with a single res_op parameter.  Update calls to
18190         maybe_build_generic_op and maybe_push_res_to_seq.
18191         (fold_stmt_1): Update calls to gimple_simplify and
18192         replace_stmt_with_simplification.
18193         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18194         and gimple_simplified_result_is_gimple_val.
18195         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18196         gimple_simplify.
18197         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18198         with a gimple_match_op *.
18199         (vn_nary_build_or_lookup): Likewise.  Update call to
18200         vn_nary_build_or_lookup_1.
18201         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18202         gimple_match_op *.  Update calls to the gimple_resimplify routines
18203         and to gimple_simplified_result_is_gimple_val.
18204         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18205         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18206         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18207         (visit_nary_op): Likewise.
18208         (visit_reference_op_load): Likewise.
18210 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18212         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18213         modifier for printing the step amount.
18215 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18217         PR target/78849
18218         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18219         types.
18221 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
18223         * doc/sourcebuild.texi (Endianness): New subsubsection.
18225 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18227         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18228         <prefetch_dynamic_strides>: New const bool field.
18229         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18230         prefetch_dynamic_strides.
18231         (exynosm1_prefetch_tune): Likewise.
18232         (thunderxt88_prefetch_tune): Likewise.
18233         (thunderx_prefetch_tune): Likewise.
18234         (thunderx2t99_prefetch_tune): Likewise.
18235         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18236         false.
18237         (aarch64_override_options_internal): Update to set
18238         PARAM_PREFETCH_DYNAMIC_STRIDES.
18239         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18240         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18241         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18242         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18243         prefetch-dynamic-strides setting.
18245 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18247         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18248         <minimum_stride>: New const int field.
18249         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18250         minimum_stride field defaulting to -1.
18251         (exynosm1_prefetch_tune): Likewise.
18252         (thunderxt88_prefetch_tune): Likewise.
18253         (thunderx_prefetch_tune): Likewise.
18254         (thunderx2t99_prefetch_tune): Likewise.
18255         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18256         <default_opt_level>: Set to 3.
18257         (aarch64_override_options_internal): Update to set
18258         PARAM_PREFETCH_MINIMUM_STRIDE.
18259         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18260         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18261         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18262         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18263         stride is constant and is below the minimum stride threshold.
18265 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18267         * config/arm/arm-cpus.in (mode26): Delete.
18268         (armv4): Delete mode26 reference.
18269         * config/arm/arm.c (arm_configure_build_target): Delete use of
18270         isa_bit_mode26.
18272 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18274         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18275         New insn pattern.
18276         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18277         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
18278         for non-SSE modes.
18279         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
18280         (floatunsdidf2): Ditto.
18282 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18284         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18285         (fixuns_trunc<mode>si2_avx512f): Ditto.
18286         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18287         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18288         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18290 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18292         PR rtl-optimization/79985
18293         * df-scan.c (df_insn_refs_collect): Remove special case for
18294         global registers and asm statements.
18296 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18298         * extend.texi (Global Register Variables): Rewrite the bullet list.
18299         Note that the register is available for allocation. Note that access
18300         via inline asm must use constraints. Add note about async-signal
18301         handlers. Remove paragraph about automagic register selection.
18303 2018-05-23  Richard Biener  <rguenther@suse.de>
18305         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18306         of fixed offset from memset VN.
18308 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
18310         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18311         first_interp field.
18312         (alloc_cand_and_find_basis): Initialize first_interp field.
18313         (slsr_process_mul): Modify first_interp field.
18314         (slsr_process_add): Likewise.
18315         (slsr_process_cast): Modify first_interp field for each new
18316         interpretation.
18317         (slsr_process_copy): Likewise.
18318         (dump_candidate): Dump first_interp field.
18319         (replace_mult_candidate): Process all interpretations, not just
18320         subsequent ones.
18321         (replace_rhs_if_not_dup): Likewise.
18322         (replace_one_candidate): Likewise.
18324 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
18326         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18327         Add new boolean.
18328         (aarch64_needs_frame_chain): New function.
18329         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18331 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
18333         PR target/84882
18334         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18335         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18336         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18337         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18338         as true for strict-align.
18339         (aarch64_can_inline_p): Perform checks even when callee has no
18340         attributes to check for strict alignment.
18341         * doc/extend.texi (AArch64 Function Attributes): Document
18342         no-strict-align.
18343         * doc/invoke.texi: (AArch64 Options): Likewise.
18345 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
18347         PR tree-optimization/85853
18348         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18349         the handling of the root of the node to...
18350         (vect_slp_analyze_node_operations_1): ...this new function,
18351         and run the whole thing with the child nodes' def types
18352         set according to their SLP node's def type.
18354 2018-05-23  Richard Biener  <rguenther@suse.de>
18356         PR middle-end/85874
18357         * tree-data-ref.c (create_runtime_alias_checks): Defer
18358         and ignore overflow warnings.
18360 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
18362         PR tree-optimization/85822
18363         * tree-vrp.c (is_masked_range_test): Fix handling of negative
18364         constants.
18366 2018-05-23  Richard Biener  <rguenther@suse.de>
18368         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18369         memset constants via native_interpret_expr.
18371 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
18373         PR target/85345
18374         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18375         attribute.
18376         (cgraph_node::create_alias): Likewise.
18377         (cgraph_node::get_availability): Check ifunc_resolver instead
18378         of looking up ifunc attribute.
18379         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18380         * varasm.c (do_assemble_alias): Likewise.
18381         (assemble_alias): Likewise.
18382         (default_binds_local_p_3): Likewise.
18383         * cgraph.h (cgraph_node): Add ifunc_resolver.
18384         (cgraph_node::only_called_directly_or_aliased_p): Return false
18385         for IFUNC resolver.
18386         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18387         attribute.
18388         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18389         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18390         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18391         instead of looking up ifunc attribute.
18393 2018-05-22  Luis Machado  <luis.machado@linaro.org>
18395         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18397 2018-05-22  Martin Sebor  <msebor@redhat.com>
18399         PR middle-end/85359
18400         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18401         only when expasion succeeds.
18402         (expand_builtin_strcmp): Same.
18403         (expand_builtin_strncmp): Same.
18405 2018-05-22  Martin Sebor  <msebor@redhat.com>
18407         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18409 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18410             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18412         * config/aarch64/aarch64-ldpstp.md: Replace uses of
18413         aarch64_mem_pair_operand with memory_operand and delete operand swapping
18414         code.
18415         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18416         Add check for legitimate_address.
18417         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18418         (aarch64_swap_ldrstr_operands): New.
18419         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18420         Define prototype.
18422 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18423             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18425         * config/aarch64/aarch64.md: New patterns to generate stp
18426         and ldp.
18427         (store_pair_sw, store_pair_dw): New patterns to generate stp for
18428         single words and double words.
18429         (load_pair_sw, load_pair_dw): Likewise.
18430         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18431         Delete.
18432         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18433         Delete.
18434         * config/aarch64/aarch64-ldpstp.md: Modify peephole
18435         for different mode ldpstp and add peephole for merged zero stores.
18436         Likewise for loads.
18437         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18438         Add size check.
18439         (aarch64_gen_store_pair): Rename calls to match new patterns.
18440         (aarch64_gen_load_pair): Rename calls to match new patterns.
18441         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18442         (load_pair<DREG:mode><DREG2:mode>): ... This.
18443         (store_pair<mode>): Rename to...
18444         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18445         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18446         New mode iterators.
18447         (V_INT_EQUIV): Handle SImode.
18448         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18449         New predicate.
18451 2018-05-22  Martin Sebor  <msebor@redhat.com>
18453         PR c/85623
18454         * calls.c (maybe_warn_nonstring_arg): Use string length to set
18455         or ajust the presumed bound on an operation to avoid unnecessary
18456         warnings.
18458 2018-05-22  Martin Sebor  <msebor@redhat.com>
18460         PR tree-optimization/85826
18461         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18462         assuming that a DECL necesarily has a constant size.
18464 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
18466         PR middle-end/85862
18467         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18469 2018-05-22  Richard Biener  <rguenther@suse.de>
18471         PR tree-optimization/85834
18472         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18473         non-constant and non-zero memset arguments.
18475 2018-05-22  Martin Liska  <mliska@suse.cz>
18477         PR ipa/85607
18478         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18480 2018-05-22  Richard Biener  <rguenther@suse.de>
18482         PR tree-optimization/85863
18483         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18484         comparisons when vectype is specified.
18485         (vectorizable_condition): Do not specify vectype for
18486         vect_is_simple_cond when SLP vectorizing.
18488 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
18490         PR target/85657
18491         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18492         define __ibm128 as long double.
18493         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18494         as a distinct type when IEEE 128-bit support is enabled.
18495         (init_float128_ieee): Fix up conversions between IFmode and IEEE
18496         128-bit types to use the correct functions.
18497         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18498         convert between 128-bit floating point types that have different
18499         modes but the same representation, instead of using gen_lowpart to
18500         makean alias.
18501         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18502         KFmode.
18503         (IFKF_reg): New attributes to give the register constraints for
18504         IFmode and KFmode.
18505         (extend<mode>tf2_internal): New insns to mark an explicit
18506         conversion between 128-bit floating point types that have a
18507         different mode but share the same representation.
18509 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
18511         PR tree-optimization/85814
18512         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18513         a null return from get_strinfo when unsharing the next
18514         strinfo in the chain.
18516 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
18518         PR gcc/84923
18519         * varasm.c (weak_finish): Clean up weak_decls.
18521 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18523         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18524         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18525         UNSPEC_UADALP values.
18526         * config/aarch64/iterators.md (ABAL): New int iterator.
18527         (ABDL2): Likewise.
18528         (ADALP): Likewise.
18529         (sur): Add mappings for the above.
18530         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18531         New define_insn.
18532         (aarch64_<sur>abal<mode>_4): Likewise.
18533         (aarch64_<sur>adalp<mode>_3): Likewise.
18534         (<sur>sadv16qi): New define_expand.
18536 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
18538         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18539         (*movdf_internal): Ditto.
18540         (*rcpsf2_sse): Ditto.
18541         (*rsqrtsf2_sse): Ditto.
18542         (*sqrt<mode>2_sse): Ditto.
18544 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
18546         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18547         eor3q<mode>4.
18548         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18549         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18550         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18551         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18552         vbcaxq_s64): New.
18553         * config/aarch64/arm_neon.h: Likewise.
18554         * config/aarch64/iterators.md (VQ_I): New.
18556 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
18558         * config.gcc: Add arc/t-multilib-linux to tmake_file for
18559         arc*-*-linux*.
18560         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18561         MULTILIB_DIRNAMES
18563 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
18565         * config/nds32/constraints.md (S): New constraint.
18566         * config/nds32/nds32.md (call_internal): Use constraint S.
18567         (call_value_internal): Likewise.
18568         (sibcall_internal): Likewise.
18569         (sibcall_value_internal): Likewise.
18571 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
18572             Chung-Ju Wu  <jasonwucj@gmail.com>
18574         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18575         into consideration.
18577 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
18578             Chung-Ju Wu  <jasonwucj@gmail.com>
18580         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18581         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18582         (nds32_rtx_costs_impl): Simplify.
18583         (nds32_address_cost_impl): Simplify.
18584         (nds32_init_rtx_costs): New function.
18585         (nds32_rtx_costs_speed_prefer): Likewise.
18586         (nds32_rtx_costs_size_prefer): Likewise.
18587         (nds32_address_cost_speed_prefer): Likewise.
18588         (nds32_address_cost_speed_fwprop): Likewise.
18589         (nds32_address_cost_size_prefer): Likewise.
18590         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18591         * config/nds32/nds32.c (nds32_option_override): Use
18592         nds32_init_rtx_costs function.
18594 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
18596         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18597         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18598         (TARGET_PIPELINE_N8): Likewise.
18599         (TARGET_PIPELINE_N10): Likewise.
18600         (TARGET_PIPELINE_N13): Likewise.
18601         (TARGET_PIPELINE_GRAYWOLF): Likewise.
18603 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
18605         * config/nds32/nds32-fpu.md: Update copyright year.
18607 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18609         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18611 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18613         * config/nds32/nds32.c
18614         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18615         * config/nds32/nds32.opt (minline-asm-r15): New option.
18617 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18619         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18620         MASK_HW_ABS.
18621         * config/nds32/nds32.md (abssi2): New pattern.
18623 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
18625         * config/i386/i386.md (rex64namesuffix): New mode attribute.
18626         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18627         Merge insn pattern from sse_cvtsi2ss<round_name> and
18628         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18629         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18630         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18631         using SWI48 mode iterator.
18632         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18633         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18634         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18635         pattern from sse_cvttss2si<round_saeonly_name>
18636         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18637         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18638         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18639         using SWI48 mode iterator.
18640         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18641         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18642         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18643         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18644         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18645         using SWI48 mode iterator.
18646         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18647         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18648         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18649         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18650         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18651         SWI48 mode iterator.
18652         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18653         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18654         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18655         pattern from sse_cvttsd2si<round_saeonly_name>
18656         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18658 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18660         * config/nds32/nds32-md-auxiliary.c
18661         (nds32_valid_smw_lwm_base_p): Refine.
18662         (nds32_output_smw_single_word): Refine.
18663         (nds32_output_smw_double_word): New.
18664         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18666 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18668         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18669         (nds32_output_stack_pop): Refine.
18670         (nds32_expand_unaligned_load): Refine.
18671         (nds32_expand_unaligned_store): Refine.
18673 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18674             Chung-Ju Wu  <jasonwucj@gmail.com>
18676         * config/nds32/constants.md: Add TP_REGNUM constant.
18677         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18678         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18679         UNSPEC_ADD32.
18680         * config/nds32/nds32-doubleword.md: Consider flag_pic.
18681         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18682         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18683         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18684         and PIC code generation.
18685         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18686         code generation.
18687         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18688         optimization.
18689         * config/nds32/nds32.md: Support TLS and PIC.
18690         * config/nds32/nds32.c: Support TLS and PIC.
18691         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18692         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18693         predicate.
18695 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18697         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18698         mode with E_ prefix.
18700 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18701             Chung-Ju Wu  <jasonwucj@gmail.com>
18703         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18704         * config/nds32/nds32-md-auxiliary.c
18705         (symbolic_reference_mentioned_p): New.
18706         (nds32_legitimize_ict_address): New.
18707         (nds32_expand_ict_move): New.
18708         (nds32_indirect_call_referenced_p): New.
18709         (nds32_symbol_binds_local_p): Delete.
18710         (nds32_long_call_p): Modify.
18711         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18712         * config/nds32/nds32-protos.h
18713         (symbolic_reference_mentioned_p): Declare.
18714         (nds32_legitimize_ict_address): Declare.
18715         (nds32_expand_ict_move): Declare.
18716         (nds32_indirect_call_referenced_p): Declare.
18717         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18718         (nds32_relax_group): Use nds32_ict_const_p as condition.
18719         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18720         (nds32_asm_file_start): Output ict_model directive in asm code.
18721         (nds32_legitimate_address_p): Consider indirect call.
18722         (nds32_print_operand): Consider indirect call.
18723         (nds32_print_operand_address): Consider indirect call.
18724         (nds32_insert_attributes): Handle "indirect_call" attribute.
18725         (TARGET_LEGITIMATE_ADDRESS_P): Define.
18726         (TARGET_LEGITIMATE_CONSTANT_P): Define.
18727         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18728         (TARGET_DELEGITIMIZE_ADDRESS): Define.
18729         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18730         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18731         (TARGET_ICT_MODEL_SMALL): Define.
18732         (TARGET_ICT_MODEL_LARGE): Define.
18733         * config/nds32/nds32.md (movsi): Consider ict model.
18734         (call, call_value): Consider ict model.
18735         (sibcall, sibcall_value): Consider ict model.
18736         * config/nds32/nds32.opt (mict-model): New option.
18737         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18738         model.
18740 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
18741             Monk Chiang  <sh.chiang04@gmail.com>
18742             Jim Wilson <jimw@sifive.com>
18744         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18745         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
18746         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18747         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18748         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
18749         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18750         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18751         compute save_libcall_adjustment properly.
18752         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18753         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18754         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18755         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18756         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18757         (ABI_SPEC): Handle mabi=ilp32e.
18758         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18759         (RVE): Add RVE mask.
18760         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18761         <-march>: Add rv32e as an example.
18763 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
18765         PR c++/82899
18766         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18767         (intra_create_variable_infos): Handle C++ constructors.
18769 2018-05-18  Martin Liska  <mliska@suse.cz>
18771         * passes.def: Remove a redundant pass.
18773 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
18775         PR bootstrap/85838
18776         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18778 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18780         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18781         (ARMv4): Update.
18782         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18783         (ARMv6m): Update.
18784         (armv2, armv2a, armv3, armv3m): Delete architectures.
18785         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18786         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18787         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18788         Delete cpus.
18789         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18790         (*mulsidi3adddi): Likewise.
18791         (mulsidi3): Likewise.
18792         (*mulsidi3_nov6): Likewise.
18793         (umulsidi3): Likewise.
18794         (umulsidi3_nov6): Likewise.
18795         (umaddsidi4): Likewise.
18796         (*umulsidi3adddi): Likewise.
18797         (smulsi3_highpart): Likewise.
18798         (*smulsi3_highpart_nov6): Likewise.
18799         (umulsi3_highpart): Likewise.
18800         (*umulsi3_highpart_nov6): Likewise.
18801         * config/arm/arm.h (arm_arch3m): Delete.
18802         * config/arm/arm.c (arm_arch3m): Delete.
18803         (arm_option_override_internal): Update armv3-related comment.
18804         (arm_configure_build_target): Delete use of isa_bit_mode32.
18805         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18806         (arm_rtx_costs_internal): Delete check of arm_arch3m.
18807         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18808         (mulsa3): Likewise.
18809         (mulusa3): Likewise.
18810         * config/arm/arm-protos.h (arm_arch3m): Delete.
18811         * config/arm/arm-tables.opt: Regenerate.
18812         * config/arm/arm-tune.md: Likewise.
18813         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18814         deleted architectures.
18816 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18818         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18819         (armv5t, armv5te): New features.
18820         (ARMv5, ARMv5e): Delete fgroups.
18821         (ARMv5t, ARMv5te): Adjust for above changes.
18822         (ARMv6m): Likewise.
18823         (armv5, armv5e): Delete arches.
18824         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18825         arm_arch5.
18826         (*call_reg_arm): Likewise.
18827         (*call_value_reg_armv5): Likewise.
18828         (*call_value_reg_arm): Likewise.
18829         (*call_symbol): Likewise.
18830         (*call_value_symbol): Likewise.
18831         (*sibcall_insn): Likewise.
18832         (*sibcall_value_insn): Likewise.
18833         (clzsi2): Likewise.
18834         (prefetch): Likewise.
18835         (define_split and define_peephole2 dependent on arm_arch5):
18836         Likewise.
18837         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18838         arm_arch5e.
18839         (TARGET_ARM_QBIT): Likewise.
18840         (TARGET_DSP_MULTIPLY): Likewise.
18841         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18842         (arm_arch5, arm_arch5e): Delete.
18843         (arm_arch5t, arm_arch5te): Declare.
18844         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18845         (arm_arch5t): Declare.
18846         (arm_option_reconfigure_globals): Update for the above.
18847         (arm_options_perform_arch_sanity_checks): Update comment, replace
18848         use of arm_arch5 with arm_arch5t.
18849         (use_return_insn): Likewise.
18850         (arm_emit_call_insn): Likewise.
18851         (output_return_instruction): Likewise.
18852         (arm_final_prescan_insn): Likewise.
18853         (arm_coproc_builtin_available): Likewise.
18854         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18855         arm_arch5e with arm_arch5t and arm_arch5te.
18856         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18857         (arm_arch5t, arm_arch5te): Declare.
18858         * config/arm/arm-tables.opt: Regenerate.
18859         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18860         * config/arm/t-multilib: Likewise.
18861         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18862         instead of arm_arch5.
18863         (*call_reg_thumb1): Likewise.
18864         (*call_value_reg_thumb1_v5): Likewise.
18865         (*call_value_reg_thumb1): Likewise.
18866         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18867         unreachable path.
18868         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18870 2018-05-18  Martin Liska  <mliska@suse.cz>
18872         PR gcov-profile/84846
18873         * doc/gcov.texi: Document -t option of gcov tool.
18875 2018-05-18  Martin Liska  <mliska@suse.cz>
18877         PR gcov-profile/84846
18878         * gcov.c (print_usage): Add new -t option.
18879         (process_args): Handle the option.
18880         (generate_results): Use stdout as output when requested by
18881         the option.
18883 2018-05-18  Martin Liska  <mliska@suse.cz>
18885         PR gcov-profile/84846
18886         * coverage.c (coverage_init): Write PWD to .gcno file.
18887         * doc/gcov.texi: Document how working directory is printed.
18888         * gcov-dump.c (dump_gcov_file): Print PWD.
18889         * gcov.c (output_intermediate_file): Likewise.
18890         (read_graph_file): Read PWD string.
18891         (output_lines): Print PWD.
18893 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18895         PR middle-end/85817
18896         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18897         for retval and return false if all args to phi are zero.
18899 2018-05-18  Richard Biener  <rguenther@suse.de>
18901         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18902         method.
18903         (evrp_dom_walker::before_dom_children): Call it.
18905 2018-05-18  Richard Biener  <rguenther@suse.de>
18907         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18908         results when processing array refs with variable index.
18910 2018-05-18  Toon Moene  <toon@moene.org>
18912         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18913         directly after that of -floop-interchange. Indicate that both
18914         options are enabled by default when specifying -O3.
18916 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18918         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18919         iterator.  Delete separate integer-mode vec_set<mode> expander.
18920         (aarch64_simd_vec_setv2di): Delete.
18921         (vec_setv2di): Delete.
18922         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18923         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
18924         the "w, r" alternative.
18926 2018-05-18  Martin Liska  <mliska@suse.cz>
18928         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18929         * tree-pass.h (make_pass_lower_switch_O0): New function.
18930         * tree-switch-conversion.c (node_has_low_bound): Remove.
18931         (node_has_high_bound): Likewise.
18932         (node_is_bounded): Likewise.
18933         (class pass_lower_switch): Make it a template type and create
18934         two instances.
18935         (pass_lower_switch::execute): Add template argument.
18936         (make_pass_lower_switch): New function.
18937         (make_pass_lower_switch_O0): New function.
18938         (do_jump_if_equal): Remove.
18939         (emit_case_nodes): Simplify to just handle all 3 cases and leave
18940         all the hard work to tree optimization passes.
18942 2018-05-18  Martin Liska  <mliska@suse.cz>
18944         * dbgcnt.c (limit_low): Renamed from limit.
18945         (limit_high): New variable.
18946         (dbg_cnt_is_enabled): Check for upper limit.
18947         (dbg_cnt): Adjust dumping.
18948         (dbg_cnt_set_limit_by_index): Add new argument for high
18949         value.
18950         (dbg_cnt_set_limit_by_name): Likewise.
18951         (dbg_cnt_process_single_pair): Parse new format.
18952         (dbg_cnt_process_opt): Use strtok.
18953         (dbg_cnt_list_all_counters): Remove 'value' and add
18954         'limit_high'.
18955         * doc/invoke.texi: Document changes.
18957 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
18959         * doc/sourcebuild.texi (scalar_all_fma): Document.
18960         * tree.def (FMA_EXPR): Delete.
18961         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18962         * internal-fn.c (ternary_direct): New macro.
18963         (expand_ternary_optab_fn): Likewise.
18964         (direct_ternary_optab_supported_p): Likewise.
18965         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18966         * builtins.c (fold_builtin_fma): Delete.
18967         (fold_builtin_3): Don't call it.
18968         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18969         * expr.c (expand_expr_real_2): Likewise.
18970         * fold-const.c (operand_equal_p): Likewise.
18971         (fold_ternary_loc): Likewise.
18972         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18973         * gimple.c (DEFTREECODE): Likewise.
18974         * gimplify.c (gimplify_expr): Likewise.
18975         * optabs-tree.c (optab_for_tree_code): Likewise.
18976         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18977         * tree-eh.c (operation_could_trap_p): Likewise.
18978         (stmt_could_throw_1_p): Likewise.
18979         * tree-inline.c (estimate_operator_cost): Likewise.
18980         * tree-pretty-print.c (dump_generic_node): Likewise.
18981         (op_code_prio): Likewise.
18982         * tree-ssa-loop-im.c (stmt_cost): Likewise.
18983         * tree-ssa-operands.c (get_expr_operands): Likewise.
18984         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18985         * fold-const-call.h (fold_fma): Delete.
18986         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18987         CFN_FNMA and CFN_FNMS.
18988         (fold_fma): Delete.
18989         * genmatch.c (combined_fn): New enum.
18990         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18991         (commutative_op): New function.
18992         (commutate): Use it.  Handle more than 2 operands.
18993         (dt_operand::gen_gimple_expr): Use commutative_op.
18994         (parser::parse_expr): Allow :c to be used with non-binary
18995         operators if the commutative operand is known.
18996         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18997         CFN_FMS, CFN_FNMA and CFN_FNMS.
18998         (backprop::process_assign_use): Remove FMA_EXPR handling.
18999         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19000         (gen_hsa_fma): New function.
19001         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19002         IFN_FNMA and IFN_FNMS.
19003         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19004         * gimple-fold.h (follow_all_ssa_edges): Declare.
19005         * gimple-fold.c (follow_all_ssa_edges): New function.
19006         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19007         gimple_build interface and use follow_all_ssa_edges to fold the result.
19008         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19009         instead of checking for optabs directly.
19010         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19011         rather than FMA_EXPRs.
19012         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19013         call to IFN_FMA instead of an FMA_EXPR.
19015 2018-05-17  Jim Wilson  <jimw@sifive.com>
19017         * expr.c (do_tablejump): When converting index to Pmode, if we have a
19018         sign extended promoted subreg, and the range does not have the sign bit
19019         set, then do a sign extend.
19021         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19022         test, check for sign extended subreg and/or constant operands, and
19023         do a sign extend in that case.
19025 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
19027         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19028         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19029         Add untyped.
19030         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19031         Change logics_shift_reg to logics_shift_imm.
19032         (thunderx2t99_fp_loadpair_basic): Delete.
19033         (thunderx2t99_fp_storepair_basic): Delete.
19034         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19035         (thunderx2t99_asimd_polynomial): Delete.
19036         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19037         and neon_fp_mul_d_scalar_q.
19038         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19039         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19040         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19041         (thunderx2t99_asimd_lut): Add missing tbl types.
19042         (thunderx2t99_asimd_ext): Delete.
19043         (thunderx2t99_asimd_load1_1_mult): Delete.
19044         (thunderx2t99_asimd_load1_2_mult): Delete.
19045         (thunderx2t99_asimd_load1_ldp): New.
19046         (thunderx2t99_asimd_load1): New.
19047         (thunderx2t99_asimd_load2): Add missing *load2* types.
19048         (thunderx2t99_asimd_load3): New.
19049         (thunderx2t99_asimd_load4): New.
19050         (thunderx2t99_asimd_store1_1_mult): Delete.
19051         (thunderx2t99_asimd_store1_2_mult): Delete.
19052         (thunderx2t99_asimd_store2_mult): Delete.
19053         (thunderx2t99_asimd_store2_onelane): Delete.
19054         (thunderx2t99_asimd_store_stp): New.
19055         (thunderx2t99_asimd_store1): New.
19056         (thunderx2t99_asimd_store2): New.
19057         (thunderx2t99_asimd_store3): New.
19058         (thunderx2t99_asimd_store4): New.
19060 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
19062         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19063         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
19065 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
19066             Segher Boessenkool  <segher@kernel.crashing.org>
19068         PR target/85698
19069         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19070         operand.
19072 2018-05-17  Richard Biener  <rguenther@suse.de>
19074         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19075         for pruning loop and prune defs feeding only already visited PHIs.
19077 2018-05-17  Richard Biener  <rguenther@suse.de>
19079         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19081 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
19082             Richard Biener  <rguenther@suse.de>
19084         PR tree-optimization/85793
19085         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19086         for VMAT_ELEMENTWISE.
19088 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
19090         * internal-fn.h (lookup_internal_fn): Declare
19091         * internal-fn.c (lookup_internal_fn): New function.
19092         * gimple.c (gimple_build_call_from_tree): Handle calls to
19093         internal functions.
19094         * gimple-pretty-print.c (dump_gimple_call): Print "." before
19095         internal function names.
19096         * tree-pretty-print.c (dump_generic_node): Likewise.
19097         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19099 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
19101         * gimple-fold.h (gimple_build): Make the function forms take
19102         combined_fn rather than built_in_function.
19103         (gimple_simplify): Likewise.
19104         * gimple-match-head.c (gimple_simplify): Likewise.
19105         * gimple-fold.c (gimple_build): Likewise.
19106         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19107         rather than gimple_build_call_internal.
19108         (get_initial_defs_for_reduction): Likewise.
19109         (vect_create_epilog_for_reduction): Likewise.
19110         (vectorizable_live_operation): Likewise.
19112 2018-05-17  Martin Liska  <mliska@suse.cz>
19114         * gimple-ssa-sprintf.c (format_directive): Do not use
19115         space in between 'G_' and '('.
19117 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
19119         PR target/85323
19120         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19121         even if the mask is not all ones.
19123         PR target/85323
19124         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19125         vector.
19126         (ix86_gimple_fold_builtin): Likewise.
19128         PR target/85323
19129         * config/i386/i386.c: Include tree-vector-builder.h.
19130         (ix86_vector_shift_count): New function.
19131         (ix86_fold_builtin): Fold shift builtins by scalar count.
19132         (ix86_gimple_fold_builtin): Likewise.
19134         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19135         _mm512_setzero): New intrinsics.
19137 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
19138             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19140         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19141         code generation for cases where splatting a value is not useful.
19142         * simplify-rtx.c (simplify_ternary_operation): Simplify
19143         vec_merge across a vec_duplicate and a paradoxical subreg forming
19144         a vector mode to a vec_concat.
19146 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
19148         * config.gcc: Support "goldmont-plus".
19149         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19150         "goldmont-plus".
19151         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19152         PROCESSOR_GOLDMONT_PLUS.
19153         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19154         (processor_target_table): Add "goldmont-plus".
19155         (PTA_GOLDMONT_PLUS): Define.
19156         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19157         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19158         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19159         (fold_builtin_cpu): Add "goldmont-plus".
19160         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19161         (ix86_option_override_internal): Add "goldmont-plus".
19162         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19163         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19164         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19165         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19167 2018-05-17  Richard Biener  <rguenther@suse.de>
19169         PR tree-optimization/85757
19170         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19171         remove defs that only feed that PHI from further processing.
19173 2018-05-16  Jim Wilson  <jimw@sifive.com>
19175         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19176         asterisk to name.
19177         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19179 2018-05-16  Mark Wielaard  <mark@klomp.org>
19181         * dwarf2out.c (count_index_strings): New function.
19182         (output_indirect_strings): Call count_index_strings and generate
19183         header for dwarf_version >= 5.
19185 2018-05-16  Mark Wielaard  <mark@klomp.org>
19187         * dwarf2out.c (dwarf_FORM): New function.
19188         (set_indirect_string): Use dwarf_FORM.
19189         (reset_indirect_string): Likewise.
19190         (size_of_die): Likewise.
19191         (value_format): Likewise.
19192         (output_die): Likewise.
19193         (add_skeleton_AT_string): Likewise.
19194         (output_macinfo_op): Likewise.
19195         (index_string): Likewise.
19196         (output_index_string_offset): Likewise.
19197         (output_index_string): Likewise.
19198         (count_index_strings): Likewise.
19200 2018-05-16  Carl Love  <cel@us.ibm.com>
19202         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19203         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19205 2018-05-16  Martin Jambor  <mjambor@suse.cz>
19207         * ipa-prop.c (ipa_free_all_edge_args): Remove.
19208         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19210 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
19212         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19213         (fnma<mode>4): Likewise.
19214         (fms<mode>4): Likewise.
19215         (fnms<mode>4): Likewise.
19216         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19217         (aarch64_fnma<mode>4): Likewise.
19218         (aarch64_fms<mode>4): Likewise.
19219         (aarch64_fnms<mode>4): Likewise.
19220         (aarch64_fnmadd<mode>4): Likewise.
19222 2018-05-16  Jason Merrill  <jason@redhat.com>
19224         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
19226 2018-05-16  Richard Biener  <rguenther@suse.de>
19228         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19229         (dump_stmt_cost): Declare.
19230         (add_stmt_cost): Dump cost we add.
19231         (add_stmt_costs): New function.
19232         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19233         No longer exported.
19234         (vect_analyze_stmt): Adjust prototype.
19235         (vectorizable_condition): Likewise.
19236         (vectorizable_live_operation): Likewise.
19237         (vectorizable_reduction): Likewise.
19238         (vectorizable_induction): Likewise.
19239         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19240         cost vector to pass to vectorizable_ and record afterwards.
19241         (vect_model_reduction_cost): Take cost vector argument and adjust.
19242         (vect_model_induction_cost): Likewise.
19243         (vectorizable_reduction): Likewise.
19244         (vectorizable_induction): Likewise.
19245         (vectorizable_live_operation): Likewise.
19246         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19247         SLP_TREE_NUMBER_OF_VEC_STMTS.
19248         (vect_analyze_slp_cost_1): Remove.
19249         (vect_analyze_slp_cost): Likewise.
19250         (vect_slp_analyze_node_operations): Take visited args and
19251         a target cost vector.  Avoid processing already visited stmt sets.
19252         (vect_slp_analyze_operations): Use a local cost vector to gather
19253         costs and register those of non-discarded instances.
19254         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19255         (vect_schedule_slp_instance): Remove copying of
19256         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
19257         zero.
19258         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19259         adding cost.  Record cost entry location.
19260         (vect_prologue_cost_for_slp_op): Function to compute cost of
19261         a constant or invariant generated for SLP vect in the prologue,
19262         split out from vect_analyze_slp_cost_1.
19263         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
19264         (vect_model_promotion_demotion_cost): Likewise.
19265         (vect_model_store_cost): Likewise, make static.
19266         (vect_model_load_cost): Likewise.
19267         (vectorizable_bswap): Add cost vector arg and adjust.
19268         (vectorizable_call): Likewise.
19269         (vectorizable_simd_clone_call): Likewise.
19270         (vectorizable_conversion): Likewise.
19271         (vectorizable_assignment): Likewise.
19272         (vectorizable_shift): Likewise.
19273         (vectorizable_operation): Likewise.
19274         (vectorizable_store): Likewise.
19275         (vectorizable_load): Likewise.
19276         (vectorizable_condition): Likewise.
19277         (vectorizable_comparison): Likewise.
19278         (can_vectorize_live_stmts): Likewise.
19279         (vect_analyze_stmt): Likewise.
19280         (vect_transform_stmt): Adjust calls to vectorizable_*.
19281         * tree-vectorizer.c: Include gimple-pretty-print.h.
19282         (dump_stmt_cost): New function.
19284 2018-05-16  Richard Biener  <rguenther@suse.de>
19286         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19287         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19288         * tree-ssa-dse.c: Include tree-ssa-loop.h.
19289         (check_name): New callback.
19290         (dse_classify_store): Track cycles via a visited bitmap of PHI
19291         defs and simplify handling of in-loop and across loop dead stores
19292         and properly fail for loop-variant refs.  Handle byte-tracking with
19293         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19294         limiting the walk.
19296 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
19298         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19299         (vect_get_mask_type_for_stmt): Likewise.
19300         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19301         split out from...
19302         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
19303         to determine the statement's vector type and the vector type that
19304         should be used for calculating nunits.  Deal with cases in which
19305         the type has to be deferred.
19306         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19307         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19308         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19309         (vect_determine_vf_for_stmt): New functions, split out from...
19310         (vect_determine_vectorization_factor): ...here.
19311         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19312         (vect_get_mask_type_for_stmt): New functions, split out from
19313         vect_determine_vectorization_factor.
19315 2018-05-16  Richard Biener  <rguenther@suse.de>
19317         * tree-cfg.c (verify_gimple_assign_ternary): Properly
19318         verify the [VEC_]COND_EXPR embedded comparison.
19320 2018-05-15  Martin Sebor  <msebor@redhat.com>
19322         PR tree-optimization/85753
19323         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19324         RECORD_TYPE in addition to ARRAY_TYPE.
19326 2018-05-15  Martin Sebor  <msebor@redhat.com>
19328         PR middle-end/85643
19329         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19331 2018-05-15  Richard Biener  <rguenther@suse.de>
19333         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19334         add by_clobber_p one.  Change algorithm to collect all defs
19335         representing uses we need to walk and try reducing them to
19336         a single one before failing.
19337         (dse_dom_walker::dse_optimize_stmt): Adjust.
19339 2018-05-13  Mark Wielaard  <mark@klomp.org>
19341         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19342         (size_of_loc_descr): Likewise.
19343         (output_loc_operands): Likewise.
19344         (output_loc_operands_raw): Likewise.
19345         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19346         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19347         (hash_loc_operands): Likewise.
19348         (compare_loc_operands): Likewise.
19350 2018-05-14  Mark Wielaard  <mark@klomp.org>
19352         * dwarf2out.c (count_index_addrs): New function.
19353         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19355 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19357         PR tree-optimization/83648
19358         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19359         return value as malloc candidate.
19361 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19363         PR ipa/85734
19364         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19365         param as true in call to suggest_attribute.
19367 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
19369         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19370         -mreadonly-in-sdata.
19372 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19374         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19375         New pattern.
19376         (aarch64_crypto_aesd_fused): Likewise.
19378 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
19380         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19381         (movsi_aarch64): Likewise.
19382         (load_pairsi): Likewise.
19383         (load_pairdi): Likewise.
19384         (store_pairsi): Likewise.
19385         (store_pairdi): Likewise.
19386         (load_pairsf): Likewise.
19387         (load_pairdf): Likewise.
19388         (store_pairsf): Likewise.
19389         (store_pairdf): Likewise.
19390         (zero_extend): Likewise.
19391         (trunc): Swap alternatives.
19392         (fcvt_target): Add '?' to prefer w over r.
19394 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
19396         PR target/85756
19397         * config/i386/i386.md: Disallow non-commutative arithmetics in
19398         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19399         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
19400         in the peephole2 before it.
19402 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
19404         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19405         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19406         (ix86_handle_option): Handle -mcldemote.
19407         * config.gcc: New header.
19408         * config/i386/cldemoteintrin.h: New file.
19409         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19410         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19411         -mcldemote.
19412         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19413         OPTION_MASK_ISA_CLDEMOTE.
19414         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19415         (ix86_valid_target_attribute_inner_p): Ditto.
19416         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19417         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19418         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19419         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19420         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19421         (cldemote): New.
19422         * config/i386/i386.opt: Add -mcldemote.
19423         * config/i386/x86intrin.h: New header.
19424         * doc/invoke.texi: Add -mcldemote.
19426 2018-05-14  Richard Biener  <rguenther@suse.de>
19428         * doc/match-and-simplify.texi: Adjust :s documentation.
19430 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
19432         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19433         intended memcpy size.
19434         (REORDER_45): Likewise.
19436 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
19438         * sort.cc: New file.
19439         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19440         * vec.c (qsort_chk): Use gcc_qsort.
19441         * Makefile.in (OBJS-libcommon): Add sort.o.
19442         (build/sort.o): New target.  Use it...
19443         (BUILD_RTL): ... here, and...
19444         (build/gencfn-macros): ... here, and...
19445         (build/genmatch): ... here.
19447 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19448             Chung-Ju Wu  <jasonwucj@gmail.com>
19450         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19451         * config/nds32/nds32-graywolf.md: New file.
19452         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19453         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19454         pipeline.
19455         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19456         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19457         * config/nds32/nds32.md (pipeline_model): Add graywolf.
19458         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19459         * config/nds32/pipelines.md: Include n15 settings.
19461 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19462             Chung-Ju Wu  <jasonwucj@gmail.com>
19464         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19465         * config/nds32/nds32-n13.md: New file.
19466         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19467         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19468         pipeline.
19469         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19470         * config/nds32/nds32.md (pipeline_model): Add n13.
19471         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19472         * config/nds32/pipelines.md: Include n13 settings.
19474 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19475             Chung-Ju Wu  <jasonwucj@gmail.com>
19477         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19478         * config/nds32/nds32-n10.md: New file.
19479         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19480         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19481         pipeline.
19482         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19483         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19484         * config/nds32/nds32.md (pipeline_model): Add n10.
19485         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19486         * config/nds32/pipelines.md: Include n10 settings.
19488 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
19489             Kito Cheng  <kito.cheng@gmail.com>
19490             Chung-Ju Wu  <jasonwucj@gmail.com>
19492         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19493         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19494         Add enum values for DSP extension instructions.
19495         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19496         New constraints.
19497         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19498         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19499         New code iterators.
19500         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19501         * config/nds32/nds32-dspext.md: New file for DSP implementation.
19502         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19503         * config/nds32/nds32-intrinsic.md: Likewise.
19504         * config/nds32/nds32_intrinsic.h: Likewise.
19505         * config/nds32/nds32-md-auxiliary.c: Likewise.
19506         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19507         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19508         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19509         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19510         * config/nds32/nds32-protos.h: New declarations for DSP extension.
19511         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19512         TYPE_DMAC in switch statement.
19513         * config/nds32/nds32.c: New checking and implementation for DSP
19514         extension instructions.
19515         * config/nds32/nds32.h: Likewise.
19516         * config/nds32/nds32.md: Likewise.
19517         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19518         * config/nds32/predicates.md: Implement new predicates for DSP
19519         extension.
19521 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
19523         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19524         Reformat alternatives and attributes so it is easier to identify
19525         which constraints/attributes go with which instruction.
19526         (mov<mode>_hardfloat32, FMOVE64): Likewise.
19527         (mov<mode>_softfloat32, FMOVE64): Likewise.
19528         (mov<mode>_hardfloat64, FMOVE64): Likewise.
19529         (mov<mode>_softfloat64, FMOVE64): Likewise.
19531 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19533         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19534         subsection.
19535         (Basic PowerPC Built-in Functions): The new name of the
19536         subsection previously known as "PowerPC Built-in Functions".
19537         (Basic PowerPC Built-in Functions Available on all Configurations):
19538         New subsubsection.
19539         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19540         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19541         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19542         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19544 2018-05-11  Martin Jambor  <mjambor@suse.cz>
19546         PR ipa/85655
19547         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19548         single const.
19550 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
19552         PR target/85733
19553         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19555 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
19557         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19558         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19559         (ix86_handle_option): Handle -mwaitpkg.
19560         * config.gcc: New header.
19561         * config/i386/cpuid.h (bit_WAITPKG): New bit.
19562         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19563         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19564         function type.
19565         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19566         OPTION_MASK_ISA_WAITPKG.
19567         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19568         (ix86_option_override_internal): Add PTA_WAITPKG.
19569         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19570         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19571         IX86_BUILTIN_TPAUSE.
19572         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19573         __builtin_ia32_umwait and __builtin_ia32_tpause.
19574         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19575         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19576         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19577         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19578         UNSPECV_TPAUSE): New.
19579         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19580         * config/i386/i386.opt: Add -mwaitpkg.
19581         * config/i386/waitpkgintrin.h: New file.
19582         * config/i386/x86intrin.h: New header.
19583         * doc/invoke.texi: Add -mwaitpkg.
19585 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
19587         PR target/85606
19588         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19589         equivalent.
19590         (cortex-m0): Use armv6s-m isa.
19591         (cortex-m0plus): Likewise.
19592         (cortex-m1): Likewise.
19593         (cortex-m0.small-multiply): Likewise.
19594         (cortex-m0plus.small-multiply): Likewise.
19595         (cortex-m1.small-multiply): Likewise.
19597 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
19598             Jakub Jelinek  <jakub@redhat.com>
19600         PR tree-optimization/85692
19601         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19602         source permute as well.
19604 2018-05-11  Martin Liska  <mliska@suse.cz>
19606         PR sanitizer/85556
19607         * doc/extend.texi: Document LLVM style format for no_sanitize
19608         attribute.
19610 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19612         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19613         mode_supports_vsx_dform_quad to mode_supports_dq_form.
19614         (mode_supports_vsx_dform_quad): Likewise.
19615         (mode_supports_vmx_dform): Move these functions to be next to the
19616         other mode_supports functions.
19617         (mode_supports_dq_form): Likewise.
19618         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19619         mode_supports_dq_form.
19620         (reg_offset_addressing_ok_p): Likewise.
19621         (offsettable_ok_by_alignment): Likewise.
19622         (rs6000_legitimate_offset_address_p): Likewise.
19623         (legitimate_lo_sum_address_p): Likewise.
19624         (rs6000_legitimize_address): Likewise.
19625         (rs6000_legitimize_reload_address): Likewise.
19626         (rs6000_secondary_reload_inner): Likewise.
19627         (rs6000_preferred_reload_class): Likewise.
19628         (rs6000_output_move_128bit): Likewise.
19630 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19632         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19633         Generate SImode target register for null target.
19634         <case IX86_BUILTIN_XGETBV>: Ditto.
19635         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19636         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19638 2018-05-10  Carl Love  <cel@us.ibm.com>
19640         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19641         dcbtt and dcbtstt if operands[2] is 0.
19643 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19645         PR target/85693
19646         * config/i386/sse.md (usadv64qi): New expander.
19648 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
19650         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19651         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19652         -maltivec=be support.
19653         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19654         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19655         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19656         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19657         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19658         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19659         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19660         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19661         altivec_vsumsws): Adjust.
19662         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19663         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19664         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19665         support.
19666         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19667         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19668         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19669         (altivec_lve<VI_char>x): Delete expand.
19670         (*altivec_lve<VI_char>x_internal): Rename to...
19671         (altivec_lve<VI_char>x): ... this.
19672         (altivec_lvxl_<mode>): Delete expand.
19673         (*altivec_lvxl_<mode>_internal): Rename to ...
19674         (altivec_lvxl_<mode>): ... this.
19675         (altivec_stvxl_<mode>): Delete expand.
19676         (*altivec_stvxl_<mode>_internal): Rename to ...
19677         (altivec_stvxl_<mode>): ... this.
19678         (altivec_stve<VI_char>x): Delete expand.
19679         (*altivec_stve<VI_char>x_internal): Rename to ...
19680         (altivec_stve<VI_char>x): ... this.
19681         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19682         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19683         reduc_plus_scal_<mode>): Adjust.
19684         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19685         comment.
19686         (rs6000_cpu_cpp_builtins): Adjust.
19687         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19688         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19689         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19690         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19691         -maltivec=be support.
19692         (rs6000_split_vec_extract_var): Adjust.
19693         (rs6000_split_v4si_init): Adjust.
19694         (swap_selector_for_mode): Delete.
19695         (altivec_expand_lvx_be, altivec_expand_stvx_be,
19696         altivec_expand_stvex_be): Delete.
19697         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19698         -maltivec=be support.
19699         (rs6000_gimple_fold_builtin): Ditto.
19700         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19701         Adjust.
19702         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19703         (TARGET_DIRECT_MOVE_64BIT): Adjust.
19704         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19705         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19706         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19707         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19708         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19709         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19710         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19711         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19712         anonymous split): Adjust.
19713         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19714         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19716 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
19718         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19719         when --with-gxx-include-dir is also specified.
19720         * configure: Regenerate.
19722 2018-05-09  Jim Wilson  <jimw@sifive.com>
19724         PR target/84797
19725         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19726         * config/riscv/t-withmultilib: New.
19727         * config/riscv/withmultilib.h: New.
19728         * doc/install.texi: Document RISC-V --with-multilib-list support.
19730 2018-05-09  Richard Biener  <rguenther@suse.de>
19732         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19733         vector.
19734         (vect_bb_vectorization_profitable_p): Adjust.  Compute
19735         actual scalar cost using the cost vector and the add_stmt_cost
19736         machinery.
19738 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19740         PR rtl-optimization/85645
19741         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19742         in the REG_CFA_REGISTER note for LR, don't leave it empty.
19744 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19746         PR rtl-optimization/85645
19747         * shrink-wrap.c (spread_components): Return a boolean saying if
19748         anything was changed.
19749         (try_shrink_wrapping_separate): Iterate spread_components until
19750         nothing changes anymore.
19752 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19754         PR rtl-optimization/85645
19755         * regrename.c (build_def_use): Also kill the chains that include the
19756         destination of a REG_CFA_REGISTER note.
19758 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19760         PR rtl-optimization/85645
19761         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19762         insn that has a REG_CFA_REGISTER note.
19764 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
19766         * cfgexpand.c (expand_clobber): New function.
19767         (expand_gimple_stmt_1): Use it.
19768         * tree-vect-stmts.c (vect_clobber_variable): New function,
19769         split out from...
19770         (vectorizable_simd_clone_call): ...here.
19771         (vectorizable_store): Emit a clobber either side of an
19772         IFN_STORE_LANES sequence.
19773         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19775 2018-05-09  Tom de Vries  <tom@codesourcery.com>
19777         PR target/85626
19778         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19779         (define_insn "trap_if_false"): Add exit after trap.
19781 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
19783         PR rtl-optimization/85638
19784         * bb-reorder.c: Include common/common-target.h.
19785         (create_forwarder_block): New function extracted from...
19786         (fix_up_crossing_landing_pad): ...here.  Rename into...
19787         (dw2_fix_up_crossing_landing_pad): ...this.
19788         (sjlj_fix_up_crossing_landing_pad): New function.
19789         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19790         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19791         from both partitions and exit the loop after one iteration.
19793 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19795         Revert:
19796         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19797         subsection.
19798         (Basic PowerPC Built-in Functions): The new name of the
19799         subsection previously known as "PowerPC Built-in Functions".
19800         (Basic PowerPC Built-in Functions Available on all Configurations):
19801         New subsubsection.
19802         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19803         subsubsection.
19804         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19805         subsubsection.
19806         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19807         subsubsection.
19808         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19809         subsubsection.
19811 2018-05-08  Jim Wilson  <jimw@sifive.com>
19813         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19814         (LD_EMUL_SUFFIX): New.
19815         (LINK_SPEC): Use it.
19817 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19819         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19820         subsection.
19821         (Basic PowerPC Built-in Functions): The new name of the
19822         subsection previously known as "PowerPC Built-in Functions".
19823         (Basic PowerPC Built-in Functions Available on all Configurations):
19824         New subsubsection.
19825         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19826         subsubsection.
19827         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19828         subsubsection.
19829         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19830         subsubsection.
19831         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19832         subsubsection.
19834 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
19836         PR target/85683
19837         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19838         after cmpelim optimization.
19840 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
19842         * config.gcc: Support "goldmont".
19843         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19844         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19845         PROCESSOR_GOLDMONT.
19846         * config/i386/i386.c (m_GOLDMONT): Define.
19847         (processor_target_table): Add "goldmont".
19848         (PTA_GOLDMONT): Define.
19849         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19850         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19851         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19852         (fold_builtin_cpu): Add "goldmont".
19853         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19854         (ix86_option_override_internal): Add "goldmont".
19855         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19856         (processor_type): Add PROCESSOR_GOLDMONT.
19857         * config/i386/i386.md: Add CPU "glm".
19858         * config/i386/glm.md: New file.
19859         * config/i386/x86-tune.def: Add m_GOLDMONT.
19860         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19862 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
19864         PR target/85572
19865         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19866         E_V4DImode.
19867         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19868         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
19869         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
19871         PR target/85317
19872         * config/i386/i386.c (ix86_fold_builtin): Handle
19873         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19875         PR target/85480
19876         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19877         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19879 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
19881         PR target/85658
19882         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19883         (check_arch): Likewise.
19884         (check_fpu): Return the result rather than printing it.
19885         (end arch): Fix operator precedence.
19886         (end cpu): Likewise.
19887         (END): Print the result from check_fpu.
19889 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
19890             Alan Hayward  <alan.hayward@arm.com>
19891             David Sherwood  <david.sherwood@arm.com>
19893         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19894         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19895         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19896         (*fcmuo<mode>_and): New patterns.
19898 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
19900         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19901         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19902         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19903         (cmp_op, sve_imm_con): New code attributes.
19904         (SVE_COND_INT_CMP, imm_con): Delete.
19905         (cmp_op): Remove above unspecs from int attribute.
19906         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19907         to...
19908         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
19909         comparison-specific unspecs.
19910         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19911         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19912         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19913         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19914         (*vec_fcm<cmp_op><mode>): Rename to...
19915         (*fcm<cmp_op><mode>): ...this and adjust likewise.
19916         (*vec_fcmuo<mode>): Rename to...
19917         (*fcmuo<mode>): ...this and adjust likewise.
19918         (*pred_fcm<cmp_op><mode>): New pattern.
19919         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19920         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19921         functions.
19922         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19923         and UNORDERED.
19924         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19925         (aarch64_emit_sve_predicated_cond): New function.
19926         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19927         (aarch64_emit_unspec_cond_or): Replace with...
19928         (aarch64_emit_sve_or_conds): ...this new function.  Use
19929         aarch64_emit_sve_ptrue_op for the individual comparisons and
19930         aarch64_emit_binop to OR them together.
19931         (aarch64_emit_inverted_unspec_cond): Replace with...
19932         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
19933         aarch64_emit_sve_ptrue_op for the comparison and
19934         aarch64_emit_unop to invert the result.
19935         (aarch64_expand_sve_vec_cmp_float): Update after the above
19936         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
19938 2018-05-07  Nathan Sidwell  <nathan@acm.org>
19940         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19941         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19942         (Backwards Compatibility): Likewise.
19944 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19946         PR bootstrap/85681
19947         Revert:
19948         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19950         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19951         <prefetch_dynamic_strides>: New const bool field.
19952         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19953         prefetch_dynamic_strides.
19954         (exynosm1_prefetch_tune): Likewise.
19955         (thunderxt88_prefetch_tune): Likewise.
19956         (thunderx_prefetch_tune): Likewise.
19957         (thunderx2t99_prefetch_tune): Likewise.
19958         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19959         to false.
19960         (aarch64_override_options_internal): Update to set
19961         PARAM_PREFETCH_DYNAMIC_STRIDES.
19962         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19963         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19964         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19965         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19966         prefetch-dynamic-strides setting.
19968         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19970         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19971         <minimum_stride>: New const int field.
19972         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19973         minimum_stride field.
19974         (exynosm1_prefetch_tune): Likewise.
19975         (thunderxt88_prefetch_tune): Likewise.
19976         (thunderx_prefetch_tune): Likewise.
19977         (thunderx2t99_prefetch_tune): Likewise.
19978         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19979         (aarch64_override_options_internal): Update to set
19980         PARAM_PREFETCH_MINIMUM_STRIDE.
19981         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19982         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19983         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19984         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19985         stride is constant and is below the minimum stride threshold.
19987 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19989         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19990         to 512.
19992 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19994         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19995         <prefetch_dynamic_strides>: New const bool field.
19996         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19997         prefetch_dynamic_strides.
19998         (exynosm1_prefetch_tune): Likewise.
19999         (thunderxt88_prefetch_tune): Likewise.
20000         (thunderx_prefetch_tune): Likewise.
20001         (thunderx2t99_prefetch_tune): Likewise.
20002         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20003         to false.
20004         (aarch64_override_options_internal): Update to set
20005         PARAM_PREFETCH_DYNAMIC_STRIDES.
20006         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20007         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20008         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20009         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20010         prefetch-dynamic-strides setting.
20012 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20014         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20015         <minimum_stride>: New const int field.
20016         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20017         minimum_stride field.
20018         (exynosm1_prefetch_tune): Likewise.
20019         (thunderxt88_prefetch_tune): Likewise.
20020         (thunderx_prefetch_tune): Likewise.
20021         (thunderx2t99_prefetch_tune): Likewise.
20022         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20023         (aarch64_override_options_internal): Update to set
20024         PARAM_PREFETCH_MINIMUM_STRIDE.
20025         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20026         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20027         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20028         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20029         stride is constant and is below the minimum stride threshold.
20031 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
20033         PR c++/85659
20034         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20035         the type is addressable.  Don't force op into register if it has
20036         BLKmode.
20038 2018-05-05  Roland McGrath  <mcgrathr@google.com>
20040         PR other/77609
20041         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20042         any section for which we don't know a specific type it should have,
20043         regardless of name.  Previously this was done only for the exact
20044         names ".init_array", ".fini_array", and ".preinit_array".
20045         (default_elf_asm_named_section): Add comment about
20046         relationship with default_section_type_flags and SECTION_NOTYPE.
20047         (get_section): Don't consider it a type conflict if one side has
20048         SECTION_NOTYPE and the other doesn't, as long as neither has the
20049         SECTION_BSS et al used in the default_section_type_flags logic.
20051 2018-05-05  Tom de Vries  <tom@codesourcery.com>
20053         PR target/85653
20054         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20055         (workaround_barsyncs): New function.
20056         (nvptx_reorg): Use workaround_barsyncs.
20057         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20058         (define_expand "nvptx_membar_cta"): New define_expand.
20059         (define_insn "*nvptx_membar_cta"): New insn.
20061 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
20063         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20064         To improve optimization opportunities.
20065         * builtin-types.def: The new needed builtin types for the above.
20067 2018-05-04  Richard Biener  <rguenther@suse.de>
20069         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20070         * gimple-ssa-store-merging.c
20071         (imm_store_chain_info::output_merged_store): Remove redundant create,
20072         release split_store vector contents on failure.
20073         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20074         scalar stmt vector on cache hit.
20076 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
20078         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20079         Xilinx FP support.
20080         * config.gcc (powerpc-xilinx-eabi*): Remove.
20081         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20082         support.
20083         (fusion_addis_mem_combo_load): Ditto.
20084         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20085         FP support.
20086         (rs6000_cpu_cpp_builtins): Ditto.
20087         * config/rs6000/rs6000-linux.c
20088         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20089         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20090         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20091         support.
20092         (rs6000_setup_reg_addr_masks): Ditto.
20093         (rs6000_init_hard_regno_mode_ok): Ditto.
20094         (rs6000_option_override_internal): Ditto.
20095         (legitimate_lo_sum_address_p): Ditto.
20096         (rs6000_legitimize_address): Ditto.
20097         (rs6000_legitimize_reload_address): Ditto.
20098         (rs6000_legitimate_address_p): Ditto.
20099         (abi_v4_pass_in_fpr): Ditto.
20100         (setup_incoming_varargs): Ditto.
20101         (rs6000_gimplify_va_arg): Ditto.
20102         (rs6000_split_multireg_move): Ditto.
20103         (rs6000_savres_strategy): Ditto.
20104         (rs6000_emit_prologue_components): Ditto.
20105         (rs6000_emit_epilogue_components): Ditto.
20106         (rs6000_emit_prologue): Ditto.
20107         (rs6000_emit_epilogue): Ditto.
20108         (rs6000_elf_file_end): Ditto.
20109         (rs6000_function_value): Ditto.
20110         (rs6000_libcall_value): Ditto.
20111         * config/rs6000/rs6000.h: Ditto.
20112         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20113         (TARGET_MINMAX): ... this.  New.
20114         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20115         * config/rs6000/rs6000.md: Remove Xilinx FP support.
20116         (*movsi_internal1_single): Delete.
20117         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20118         mfpu=, mxilinx-fpu): Delete.
20119         * config/rs6000/singlefp.h: Delete.
20120         * config/rs6000/sysv4.h: Remove Xilinx FP support.
20121         * config/rs6000/t-rs6000: Ditto.
20122         * config/rs6000/t-xilinx: Delete.
20123         * config/rs6000/titan.md: Adjust for fp_type removal.
20124         * config/rs6000/vsx.md: Remove Xilinx FP support.
20125         (VStype_simple): Delete.
20126         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20127         * config/rs6000/xfpu.h: Delete.
20128         * config/rs6000/xfpu.md: Delete.
20129         * config/rs6000/xilinx.h: Delete.
20130         * config/rs6000/xilinx.opt: Delete.
20131         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20132         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20134 2018-05-04  Tom de Vries  <tom@codesourcery.com>
20136         PR libgomp/85639
20137         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20138         if ignore == 0.
20140 2018-05-04  Richard Biener  <rguenther@suse.de>
20142         PR middle-end/85627
20143         * tree-complex.c (update_complex_assignment): We are always in SSA form.
20144         (expand_complex_div_wide): Likewise.
20145         (expand_complex_operations_1): Likewise.
20146         (expand_complex_libcall): Preserve EH info of the original stmt.
20147         (tree_lower_complex): Handle removed blocks.
20148         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20149         on complex multiplication and division libcall builtins.
20151 2018-05-04  Richard Biener  <rguenther@suse.de>
20153         PR middle-end/85574
20154         * fold-const.c (negate_expr_p): Restrict negation of operand
20155         zero of a division to when we know that can happen without
20156         overflow.
20157         (fold_negate_expr_1): Likewise.
20159 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
20161         PR libstdc++/85466
20162         * real.h (real_nextafter): Declare.
20163         * real.c (real_nextafter): New function.
20164         * fold-const-call.c (fold_const_nextafter): New function.
20165         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20166         CASE_CFN_NEXTTOWARD.
20167         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20168         even when arg1_mode is different from arg0_mode.
20170 2018-05-03  Nathan Sidwell  <nathan@acm.org>
20172         * doc/extend.texi (Deprecated Features): Remove
20173         -ffriend-injection.
20174         (Backwards Compatibility): Likewise.
20175         * doc/invoke.texi (C++ Language Options): Likewise.
20176         (C++ Dialect Options): Likewise.
20178 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
20180         PR target/85530
20181         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20182         _mm512_mask_mullox_epi64): New intrinsics.
20184 2018-05-03  Tom de Vries  <tom@codesourcery.com>
20186         PR testsuite/85106
20187         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20188         dump files): Add offload-tree.
20190 2018-05-03  Richard Biener  <rguenther@suse.de>
20192         PR tree-optimization/85615
20193         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20194         to loops not nested in BBs loop father to avoid creating multi-entry
20195         loops.
20197 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20199         PR tree-optimization/70291
20200         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20201         arguments.  Change return type to tree.  Emit libcall as a new
20202         statement rather than replacing existing one when inplace_p is true.
20203         (expand_complex_multiplication_components): New function.
20204         (expand_complex_multiplication): Expand floating-point complex
20205         multiplication using the above.
20206         (expand_complex_division): Rename inner_type parameter to type.
20207         Update expand_complex_libcall call-site.
20208         (expand_complex_operations_1): Update expand_complex_multiplication
20209         and expand_complex_division call-sites.
20211 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20213         PR target/85582
20214         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20215         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20216         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20217         the highest significant bit of the shift count mask is clear.  In
20218         check whether and[sq]i3 is needed verify that all significant bits
20219         of the shift count other than the highest are set.
20221 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20223         PR libgomp/82428
20224         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20225         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20226         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20227         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20228         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20229         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20230         __builtin_goacc_parlevel_size.
20232 2018-05-02  Richard Biener  <rguenther@suse.de>
20234         PR tree-optimization/85597
20235         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20236         do not use split vect_get_vec_defs call but call vect_get_slp_defs
20237         directly.
20239 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20241         PR testsuite/85106
20242         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20243         dump files): Add ltrans-tree.
20245 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20247         PR testsuite/85106
20248         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20249         dump files): Add wpa-ipa.
20251 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
20253         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
20254         powerpc*-*-linux*paired* target.
20255         * config/rs6000/750cl.h: Delete.
20256         * config/rs6000/paired.h: Delete.
20257         * config/rs6000/paired.md: Delete.
20258         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20259         float support.
20260         * config/rs6000/rs6000-builtin.def: Remove paired float support.
20261         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20262         comment.  Remove paired float support.
20263         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20264         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20265         VECTOR_PAIRED.
20266         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20267         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20268         declarations.
20269         * config/rs6000/rs6000.c: Remove paired float support.
20270         (paired_expand_vector_init, paired_expand_vector_move,
20271         paired_emit_vector_compare, paired_emit_vector_cond_expr,
20272         (paired_expand_lv_builtin, paired_expand_stv_builtin,
20273         paired_expand_builtin, paired_expand_predicate_builtin,
20274         paired_init_builtins): Delete.
20275         * config/rs6000/rs6000.h: Remove paired float support.
20276         * config/rs6000/rs6000.md: Remove paired float support.
20277         (move_from_CR_ov_bit): Delete.
20278         * config/rs6000/rs6000.opt (mpaired): Delete.
20279         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20280         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20282 2018-05-02  Richard Biener  <rguenther@suse.de>
20284         PR middle-end/85567
20285         * gimplify.c (gimplify_save_expr): When in SSA form allow
20286         SAVE_EXPRs to compute to SSA vars.
20288 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20290         PR target/85582
20291         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20292         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20293         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20294         clobber operands[2], instead use a new pseudo.  Formatting fixes.
20296 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
20298         PR tree-optimization/85586
20299         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20300         exit early for statements in the same group if the accesses are
20301         not strided.
20303 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20305         PR lto/85451
20306         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20307         error message.
20309 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
20311         PR tree-optimization/85143
20312         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20314 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20316         PR lto/85451
20317         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20318         not found" error message.
20320 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20322         PR other/83786
20323         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20324         * vec.c (test_ordered_remove_if): New function.
20325         (vec_c_tests): Call test_ordered_remove_if.
20326         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20327         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20328         * tree-vect-patterns.c (vect_pattern_recog_1): Use
20329         VEC_ORDERED_REMOVE_IF.
20331 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20333         PR tree-optimization/82665
20334         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20335         pointer subtraction where arguments come from a memchr call.
20337 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
20339         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20340         --push-state --as-needed and --pop-state instead of --as-needed and
20341         --no-as-needed if ld supports it.
20342         * configure: Regenerated.
20344         PR web/85578
20345         * doc/install.texi2html: Replace _002d with - and _002a with * in
20346         generated html files using sed.
20348 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20350         PR c++/85523
20351         * gcc-rich-location.c (blank_line_before_p): New function.
20352         (use_new_line): New function.
20353         (gcc_rich_location::add_fixit_insert_formatted): New function.
20354         * gcc-rich-location.h
20355         (gcc_rich_location::add_fixit_insert_formatted): New function.
20357 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20359         * selftest.c (assert_streq): Rename "expected" and "actual" to
20360         "val1" and "val2".  Extend NULL-handling to cover both inputs
20361         symmetrically, while still requiring both to be non-NULL for a pass.
20362         * selftest.h (assert_streq): Rename "expected" and "actual" to
20363         "val1" and "val2".
20364         (ASSERT_EQ): Likewise.
20365         (ASSERT_EQ_AT): Likewise.
20366         (ASSERT_KNOWN_EQ): Likewise.
20367         (ASSERT_KNOWN_EQ_AT): Likewise.
20368         (ASSERT_NE): Likewise.
20369         (ASSERT_MAYBE_NE): Likewise.
20370         (ASSERT_MAYBE_NE_AT): Likewise.
20371         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
20372         the assertion to pass.
20373         (ASSERT_STREQ_AT): Likewise.
20375 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20377         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20378         interaction with -pie.
20380 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20382         * selftest.h: Fix alphabetization of per-source-file selftest
20383         declarations.
20385 2018-04-30  Jason Merrill  <jason@redhat.com>
20387         PR c++/61982 - dead stores to destroyed objects.
20388         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20389         of clobber.
20391 2018-04-30  Jason Merrill  <jason@redhat.com>
20393         * tree.c (build_clobber): New.
20394         * tree.h: Declare it.
20395         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20397 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20399         * diagnostic-show-locus.c (layout::layout): Update for
20400         location_get_source_line returning a char_span.
20401         (struct char_span): Move to input.h.
20402         (struct correction): Update for fields in char_span becoming
20403         private.
20404         (struct source_line): Update for location_get_source_line
20405         returning a char_span.
20406         (layout::print_line): Likewise.
20407         * edit-context.c (edited_file::print_content): Likewise.
20408         (edited_file::print_diff_hunk): Likewise.
20409         (edited_file::print_run_of_changed_lines): Likewise.
20410         (edited_file::get_num_lines): Likewise.
20411         (edited_line::edited_line): Likewise.
20412         * final.c (asm_show_source): Likewise.
20413         * input.c (location_get_source_line): Convert return type
20414         from const char * to char_span, losing the final "line_len"
20415         param.
20416         (dump_location_info): Update for the above.
20417         (get_substring_ranges_for_loc): Likewise.  Use a char_span
20418         when handling the literal within the line.
20419         (test_reading_source_line): Update for location_get_source_line
20420         returning a char_span.
20421         * input.h (class char_span): Move here from
20422         diagnostic-show-locus.c, converting from a struct to a class.
20423         Make data members private.
20424         (char_span::operator bool): New.
20425         (char_span::length): New.
20426         (char_span::get_buffer): New.
20427         (char_span::operator[]): New.
20428         (char_span::subspan): Make const.
20429         (char_span::xstrdup): New.
20430         (location_get_source_line): Convert return type from const char *
20431         to char_span, losing the final "line_size" param.
20433 2018-04-30  Jan Hubicka  <jh@suse.cz>
20435         * lto-wrapper.c (ltrans_priorities): New static var.
20436         (cmp_priority): New.
20437         (run_gcc): Read priorities and if doing parallel build order
20438         the Makefile by them.
20440 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20442         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20444 2018-04-30  Richard Biener  <rguenther@suse.de>
20446         * tree-cfg.c (verify_address): Remove base argument, add
20447         flag whether to check TREE_ADDRESSABLE and do that.
20448         (verify_expr): Remove.
20449         (verify_types_in_gimple_reference): Add pieces from verify_expr.
20450         (verify_gimple_assign_single): Likewise.
20451         (verify_gimple_switch): Likewise.
20452         (verify_expr_location_1): Dereference tp once.  Add (disabled)
20453         piece from verify_expr.
20454         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20456 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20458         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20460 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20462         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20463         (small_data_pattern): Likewise.
20464         (arc_rewrite_small_data): Likewise.
20465         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20466         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20467         (get_symbol_alignment): New function.
20468         (legitimate_small_data_address_p): Likewise.
20469         (legitimate_scaled_address): Update, call
20470         legitimate_small_data_address_p.
20471         (output_sdata): New static variable.
20472         (arc_print_operand): Update how we handle small data operands.
20473         (arc_print_operand_address): Likewise.
20474         (arc_legitimate_address_p): Update, use
20475         legitimate_small_data_address_p.
20476         (arc_rewrite_small_data_p): Remove.
20477         (arc_rewrite_small_data_1): Likewise.
20478         (arc_rewrite_small_data): Likewise.
20479         (small_data_pattern): Likewise.
20480         (compact_sda_memory_operand): Update to use
20481         legitimate_small_data_address_p and get_symbol_alignment.
20482         (prepare_move_operands): Don't rewite sdata pattern.
20483         (prepare_extend_operands): Remove.
20484         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20485         pattern.
20486         (zero_extendqisi2): Likewise.
20487         (zero_extendhisi2): Likewise.
20488         (extendqihi2): Likewise.
20489         (extendqisi2): Likewise.
20490         (extendhisi2): Likewise.
20491         (addsi3): Likewise.
20492         (subsi3): Likewise.
20493         (andsi3): Likewise.
20494         * config/arc/constraints.md (Usd): Change it to memory constraint.
20496 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20498         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20499         as source of std instructions.
20500         * config/arc/arc.md (movsi_insn): Update pattern predicate to
20501         allow 6-bit constants as source for store instructions.
20502         (movdi_insn): Update instruction pattern to allow 6-bit constants
20503         as source for store instructions.
20505 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20507         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20509 2018-04-30  Nathan Sidwell  <nathan@acm.org>
20510             Sandra Loosemore <sandra@codesourcery.com>
20512         * dumpfile.c (dump_open): Allow '-' for stdout.
20513         * doc/invoke.texi (Developer Options): Document dump filename
20514         determination early.  Document stdin/stdout selection.
20516 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
20518         Microblaze Target: PIC data text relative
20520         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20521         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20522         Add declaration.
20523         * config/microblaze/microblaze.h (microblaze_constant_address_p):
20524         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20525         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20526         New addressing mode for data-text relative position indepenedent code.
20527         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20528         'ADDRESS_SYMBOLIC_TXT_REL'.
20529         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20530         (microblaze_legitimate_pic_operand): Exclude function calls from
20531         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20532         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20533         addresses cases.
20534         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20535         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20536         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20537         for 'address + offset'.
20538         (microblaze_expand_prologue): Add new function prologue call for
20539         'r20' assignation.
20540         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20541         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20542         table in case of TARGET_PIC_DATA_TEXT_REL.
20543         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20544         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20545         Add new macros 'UNSPEC_TEXT',
20546         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20547         + exclude function calls from 'UNSPEC_PLT' in case of data text
20548         relative mode.
20549         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20550         new target hook for generating address diff vector tables in case of
20551         flag_pic.
20552         * doc/tm.texi : Regenerate.
20553         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20554         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20555         of addr diff vector generation.
20556         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20557         target hook definition.
20558         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20559         Add default function for generate_pic_addr_diff_vec -> flag_pic.
20560         * doc/invoke.texi (Add new pic option): Add new microblaze pic
20561         option for data text relative.
20563 2018-04-30  Richard Biener  <rguenther@suse.de>
20565         * tree-chrec.h (evolution_function_is_constant_p): Remove
20566         redundant check.
20567         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20569 2018-04-30  Richard Biener  <rguenther@suse.de>
20571         PR bootstrap/85571
20572         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20574 2018-04-30  Richard Biener  <rguenther@suse.de>
20576         PR tree-optimization/28364
20577         PR tree-optimization/85275
20578         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20579         copying first exit test.
20581 2018-04-28  Mark Wielaard  <mark@klomp.org>
20583         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20584         dwarf_version >= 5.
20585         (dwarf_AT): Handle DW_AT_addr_base.
20586         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20588 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
20590         PR target/84431
20591         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20592         (*ashl<dwi>3_doubleword_mask_1): Ditto.
20593         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20594         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20596 2018-04-28  Richard Biener  <rguenther@suse.de>
20598         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20599         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20600         to reflect use.  Only add interesting stmts.
20602 2018-04-27  Martin Jambor  <mjambor@suse.cz>
20604         PR ipa/85549
20605         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20606         the jump function allows for passing through aggregate values.
20608 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
20610         * input.h (in_system_header_at): Convert from macro to inline
20611         function.
20612         (from_macro_expansion_at): Likewise.
20613         (from_macro_definition_at): Likewise.
20615 2018-04-27  Jeff Law  <law@redhat.com>
20617         * config.gcc: Mark tile* targets as deprecated/obsolete.
20619 2018-04-27  Richard Biener  <rguenther@suse.de>
20621         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20622         fix for ILP32.
20624 2018-04-27  Richard Biener  <rguenther@suse.de>
20626         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20628 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
20630         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20631         with Yd constraint. Set "preferred_for_speed" attribute from
20632         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20633         with Yd constraint.
20634         (*movdi_internal): Ditto.
20635         (movti_interunit splitters): Remove
20636         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20637         (movdi_interunit splitters): Ditto.
20638         * config/i386/constraints.md (Ye): Remove.
20639         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20641 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20643         PR target/85512
20644         * config/aarch64/constraints.md (Usg): Limit to 31.
20645         (Usj): Limit to 63.
20647 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
20649         PR tree-optimization/85529
20650         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20651         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20652         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20653         zero extension or masking of the MSB bit.
20654         (optimize_range_tests): Add FIRST_BB argument, pass it through
20655         to optimize_range_tests_var_bound.
20656         (maybe_optimize_range_tests, reassociate_bb): Adjust
20657         optimize_range_tests callers.
20659 2018-04-26  Richard Biener  <rguenther@suse.de>
20660             Jakub Jelinek  <jakub@redhat.com>
20662         * cgraph.h (symbol_table): Just declare debug method here.
20663         * symtab.c (symbol_table::debug): Define.
20665 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
20667         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20669 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
20671         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20672         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20673         (*movdi_internal): Substitute Yi and Yj constraint with x
20674         and Ym and Yn constraint with y constraint.  Update "isa"
20675         attribute and set "preferred_for_speed" attribute from
20676         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20677         (*movsi_internal): Ditto.
20678         (*movdf_internal): Ditto.
20679         (*movsf_internal): Ditto.
20680         (*zero_extendsidi2): Ditto.
20681         * config/i386/sse.md (vec_set<mode>_0): Ditto.
20682         (sse2_loadld): Ditto.
20683         (*vec_extract<ssevecmodelower>_0): Ditto.
20684         (*vec_extractv4si_0_zext_sse4): Ditto.
20685         (vec_concatv2di): Ditto.
20686         (*vec_dup<mode>): Ditto.
20687         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20688         * config/i386/constraints.md (Yi): Remove.
20689         (Yj): Remove.
20690         (Ym): Remove.
20691         (Yn): Remove.
20693 2018-04-26  Nathan Sidwell  <nathan@acm.org>
20695         * dumpfile.c (dump_open): New.
20696         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20697         (dump_finish): Detect stdio/stderr by value not name.
20699 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
20701         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20703 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20705         PR target/84952
20706         * config/nvptx/nvptx.c (verify_neutering_jumps)
20707         (verify_neutering_labels): New function
20708         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20710 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20712         PR target/84025
20713         * config/nvptx/nvptx.c (needs_neutering_p): New function.
20714         (nvptx_single): Use needs_neutering_p to skip over insns that do not
20715         need neutering.
20717 2018-04-26  Richard Biener <rguenther@suse.de>
20718             Tom de Vries  <tom@codesourcery.com>
20720         PR lto/85422
20721         * lto-streamer-out.c (output_function): Fixup loops if required to match
20722         discovery done in the reader.
20724 2018-04-26  Richard Biener  <rguenther@suse.de>
20726         PR tree-optimization/85116
20727         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20728         have a loop exit from the single latch predecessor.  Remove
20729         case of header with just condition.
20730         (ch_base::copy_headers): Exclude infinite loops from any
20731         processing.
20732         (pass_ch::execute): Record exits.
20734 2018-04-26  Richard Biener  <rguenther@suse.de>
20736         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20737         prologue cost vector and pass it to vect_get_load_cost.
20738         (vect_get_peeling_costs_all_drs): Likewise.
20739         (vect_peeling_hash_get_lowest_cost): Likewise.
20740         (vect_enhance_data_refs_alignment): Likewise.
20742 2018-04-26  Richard Biener  <rguenther@suse.de>
20744         PR middle-end/85450
20745         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20746         checking of integer<->pointer conversions.
20747         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20748         sign-/zero-extending pointer types.
20749         (expand_omp_for_static_chunk): Likewise.
20751 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
20752             Jean Lee  <xiaoyur347@gmail.com>
20754         * config/mips/mips.c (mips_asan_shadow_offset): New function.
20755         (TARGET_ASAN_SHADOW_OFFSET): Define.
20756         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20757         true for -fsanitize=address.
20759 2018-04-25  Mark Wielaard  <mark@klomp.org>
20761         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20762         shorter ones.
20764 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
20766         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20767         than "alu", remove explicit "memory" and "imm_disp" attributes.
20768         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20770         PR middle-end/85414
20771         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20772         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20773         gen_lowpart_no_emit.
20775 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
20777         PR target/85473
20778         * config/i386/i386.c (ix86_expand_builtin): Change memory
20779         operand to XI, extend p0 to Pmode.
20780         * config/i386/i386.md: Change unspec volatile and operand
20781         1 mode to XI, change operand 0 mode to P.
20783 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20785         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20786         GET_MODE_MASK before any checking.
20787         (nds32_can_use_bset_p): Likewise.
20788         (nds32_can_use_btgl_p): Likewise.
20790 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20792         * config/nds32/nds32-doubleword.md: New define_split pattern for
20793         illegal register number.
20795 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20797         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20799 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20801         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20803 2018-04-25  Richard Biener  <rguenther@suse.de>
20805         * lto-streamer.h (LTO_major_version): Bump to 8.
20807 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
20809         * BASE-VER: Set to 9.0.0.
20811 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
20813         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20814         in __abskf2 and __powikf2.
20816 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20818         PR target/85512
20819         * config/aarch64/constraints.md (Usg, Usj): New constraints.
20820         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20821         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20822         Use the above on operand 2.  Reindent.
20823         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20825 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
20827         PR target/85485
20828         * common/config/i386/i386-common.c (ix86_handle_option): Don't
20829         handle OPT_mcet.
20830         * config/i386/i386.opt (mcet): Removed.
20831         * doc/install.texi: Remove -mcet documentation.
20832         * doc/invoke.texi: Likewise.
20834 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
20836         PR target/85485
20837         * doc/install.texi: Remove -mcet from bootstrap-cet.
20839 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20841         PR target/85511
20842         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20843         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20844         if TARGET_64BIT.
20846         PR target/85503
20847         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20848         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20849         containing a CONST_VECTOR.
20851 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
20853         * doc/install.texi: Update newlib dependency for nvptx.
20855 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20857         PR target/85508
20858         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20859         instead of INTVAL when shifting x left.
20861 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
20863         PR tree-optimization/85478
20864         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20865         vect_grouped_store_supported for single element vectors.
20867 2018-04-24  Richard Biener  <rguenther@suse.de>
20869         PR target/85491
20870         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20871         load cost increase to the case of non-constant step.
20873 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20875         PR target/84828
20876         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20877         destination if any_malformed_asm.
20879 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
20881         PR middle-end/85496
20882         * expr.c (store_field): In the bitfield case, if the value comes from
20883         a function call and is returned in registers by means of a PARALLEL,
20884         do not change the mode of the temporary unless BLKmode and VOIDmode.
20886 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
20888         PR rtl-optimization/85423
20889         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20890         dependencies to debug insns when the previous insn is non-debug.
20892 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20894         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20895         enums into a single definition.
20896         (fls): Fix predicates and printing.
20897         (seti): Likewise.
20899 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20901         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20902         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20903         and short u6 immediate.
20904         (check_if_valid_sleep_operand): Remove.
20905         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20907 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20909         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20910         flag_always_save_lp condition.
20911         * config/nds32/nds32.opt (malways-save-lp): New option.
20913 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20915         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20916         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20917         * config/nds32/nds32.h
20918         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20919         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20921 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20923         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20924         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20926 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20927             Chung-Ju Wu  <jasonwucj@gmail.com>
20929         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20930         Declare.
20931         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20932         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20934 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20936         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20938 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20940         * config/nds32/nds32-protos.h (nds32_data_alignment,
20941         nds32_local_alignment): Declare.
20942         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20943         nds32_local_alignment): New functions.
20944         (TARGET_CONSTANT_ALIGNMENT): Define.
20945         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20947 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20949         * config/nds32/nds32.c
20950         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20951         (TARGET_MODES_TIEABLE_P): Likewise.
20953 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20955         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20956         level Ofast and Og.
20958 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
20959             Chung-Ju Wu  <jasonwucj@gmail.com>
20961         * config/nds32/constants.md (unspec_volatile_element): Add enum values
20962         for unaligned access.
20963         * config/nds32/nds32-intrinsic.c: Implementation of expanding
20964         unaligned access.
20965         * config/nds32/nds32-intrinsic.md: Likewise.
20966         * config/nds32/nds32_intrinsic.h: Likewise.
20967         * config/nds32/nds32.h (nds32_builtins): Likewise.
20968         * config/nds32/nds32.opt (munaligned-access): New option.
20969         * config/nds32/nds32.c (nds32_asm_file_start): Display
20970         flag_unaligned_access status.
20972 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20974         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20975         -mno-relax is present.
20976         * config/riscv/linux.h (LINK_SPEC): Ditto.
20978 2018-04-20  Martin Sebor  <msebor@redhat.com>
20980         PR c/85365
20981         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20982         for null pointers.
20983         (gimple_fold_builtin_stxcpy_chk): Same.
20984         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20986 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
20988         PR target/85456
20989         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20990         __powikf2 when long double is IEEE 128-bit.
20992 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20994         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20995         step to make sure stack always aligned.
20997 2018-04-20  Carl Love  <cel@us.ibm.com>
20999         PR target/83402
21000         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21001         size check for arg0.
21003 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
21004             Tom de Vries  <tom@codesourcery.com>
21006         PR target/85445
21007         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21008         Emit insns for calls too.
21009         (nvptx_find_par): Always look for worker-level predecessor insn.
21010         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
21011         calls.
21012         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21013         (nvptx_process_pars): Propagate frames for calls.
21015 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
21017         PR target/85469
21018         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21019         Removed.
21020         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21021         (ix86_handle_option): Don't handle OPT_mibt.
21022         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21023         __SHSTK__.
21024         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21025         has_ibt and ibt.
21026         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21027         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21028         (ix86_target_macros): Define __CET__ with flag_cf_protection
21029         for -fcf-protection.
21030         * config/i386/i386.c (isa2_opts): Remove -mibt.
21031         * config/i386/i386.h (TARGET_IBT): Removed.
21032         (TARGET_IBT_P): Likewise.
21033         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21034         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21035         * config/i386/i386.opt (mcet): Update help message.
21036         (mshstk): Likewise.
21037         (mibt): Removed.
21038         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
21039         -mcet as an alias for -mshstk.
21041 2018-04-20  Richard Biener <rguenther@suse.de>
21043         PR middle-end/85475
21044         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21045         complexity by forcing a single use of the multiply operand.
21047 2018-04-20  Martin Jambor  <mjambor@suse.cz>
21049         ipa/85449
21050         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21051         recursion dependency to only apply to non-clones.
21053 2018-04-20  Martin Jambor  <mjambor@suse.cz>
21055         ipa/85447
21056         * ipa-cp.c (create_specialized_node): Check that clones of
21057         self-recursive edges exist during IPA-CP.
21059 2018-04-19  Toon Moene  <toon@moene.org>
21061         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21062         by -O3.
21064 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
21066         PR tree-optimization/85467
21067         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21068         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
21069         VECTOR_CST element to type.
21071 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21073         PR target/85397
21074         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21075         * config/i386/i386.md (builtin_setjmp_setup): Removed.
21076         (builtin_longjmp): Likewise.
21077         (save_stack_nonlocal): New pattern.
21078         (restore_stack_nonlocal): Likewise.
21080 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21082         PR target/85404
21083         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21084         Replace ASM_OUTPUT_LABEL with fprintf.
21086 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21088         PR target/85417
21089         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21090         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21091         * config/i386/i386-c.c (ix86_target_macros_internal): Also
21092         define __IBT__ and __SHSTK__ for -fcf-protection.
21093         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21094         TARGET_IBT.
21095         (ix86_trampoline_init): Likewise.
21096         (x86_output_mi_thunk): Likewise.
21097         (ix86_notrack_prefixed_insn_p): Likewise.
21098         (ix86_option_override_internal): Don't disallow -fcf-protection.
21099         * config/i386/i386.md (rdssp<mode>): Also enable for
21100         -fcf-protection.
21101         (incssp<mode>): Likewise.
21102         (nop_endbr): Likewise.
21103         * config/i386/i386.opt (mcet): Change help message to built-in
21104         functions only.
21105         (mibt): Likewise.
21106         (mshstk): Likewise.
21107         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21108         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
21109         enable CET built-in functions.
21111 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
21113         * common/config/i386/i386-common.c
21114         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21115         OPTION_MASK_ISA_MOVDIRI_UNSET,
21116         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21117         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21118         * config.gcc (movdirintrin.h): New header.
21119         * config/i386/cpuid.h (bit_MOVDIRI,
21120         bit_MOVDIR64B): New bits.
21121         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21122         and -mmvodir64b.
21123         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21124         (VOID, PVOID, PCVOID)): New function types.
21125         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21126         __builtin_ia32_directstoreu_u64,
21127         __builtin_ia32_movdir64b): New builtins.
21128         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21129         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21130         and -mmovdiri.
21131         (ix86_valid_target_attribute_inner_p): Ditto.
21132         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21133         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21134         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21135         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21136         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21137         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21138         (movdiri<mode>, movdir64b_<mode>): New.
21139         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21140         * config/i386/immintrin.h: Include movdirintrin.h.
21141         * config/i386/movdirintrin.h: New file.
21142         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21144 2018-04-19  Richard Biener  <rguenther@suse.de>
21146         PR middle-end/85455
21147         * cfg.c (clear_bb_flags): When loop state says we have
21148         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21150 2018-04-19  Richard Biener  <rguenther@suse.de>
21152         PR tree-optimization/84737
21153         * tree-vect-data-refs.c (vect_copy_ref_info): New function
21154         copying restrict info.
21155         (vect_setup_realignment): Use it.
21156         * tree-vectorizer.h (vect_copy_ref_info): Declare.
21157         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21158         the first DR to all generated stores.
21159         (vectorizable_load): Likewise for loads.
21161 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
21163         PR tree-optimization/85446
21164         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21165         the integral and pointer types to have the same precision.
21167         * doc/install.texi: Document --disable-cet being the default and
21168         --enable-cet=auto.
21170 2018-04-18  Martin Liska  <mliska@suse.cz>
21172         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21173         style.
21175 2018-04-18  Martin Liska  <mliska@suse.cz>
21177         Revert
21178         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21180         PR ipa/83983
21181         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21182         arguments if they are comparable.
21184 2018-04-18  Martin Liska  <mliska@suse.cz>
21186         Revert
21187         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
21189         PR lto/84805
21190         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21191         incomplete types.
21193 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
21195         PR target/85388
21196         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21197         ENDBR after calling __morestack.
21199 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
21201         PR jit/85384
21202         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21203         by using gcc_base_ver to generate a gcc_driver_version, and use
21204         it when generating GCC_DRIVER_NAME.
21205         * configure: Regenerate.
21207 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
21209         PR target/81084
21210         * config.gcc: Obsolete powerpc*-*-*spe*.
21212 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21214         PR debug/84637
21215         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21216         (stabstr_D): Change type of unum from unsigned int to
21217         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
21218         type.
21220 2018-04-17  Jim Wilson  <jimw@sifive.com>
21222         PR 84856
21223         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21224         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21225         Set arg_pointer_offset after using pretend_args_size.
21227 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21229         PR rtl-optimization/85431
21230         * dse.c (record_store): Ignore zero width stores.
21232         PR sanitizer/85230
21233         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
21234         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21235         __builtin_stack_restore rather than after it.
21236         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21237         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21238         argument instead of virtual_dynamic_stack_rtx.
21240 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21242         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21243         New prototype.
21244         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21245         Add note to error message to explain internal mapping of overloaded
21246         built-in function name to non-overloaded built-in function name.
21247         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21248         function.
21250 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
21252         PR target/85424
21253         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21254         where the inputs overlap with the output.
21256 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21258         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21259         (=v, v) alternative and explicit "memory" attribute.
21260         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
21261         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21262         attributes.
21263         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21264         "sselog1" type instead of "sselog".
21265         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21266         "sselog".  Remove explicit "memory" attribute.
21267         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21268         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21269         attributes.
21270         (vec_extract_hi_v32hi): Merge all alternatives into one, use
21271         "sselog1" type instead of "sselog".  Remove explicit "memory"
21272         attribute.
21273         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21274         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21275         attribute.
21276         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21277         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21278         attributes.
21279         (vec_extract_hi_v64qi): Merge all alternatives into one, use
21280         "sselog1" type instead of "sselog".  Remove explicit "memory"
21281         attribute.
21282         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21283         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21284         attribute.
21286         PR target/85430
21287         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21289         PR middle-end/85414
21290         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21291         on a SUBREG.
21293 2018-04-17  Martin Jambor  <mjambor@suse.cz>
21295         PR ipa/85421
21296         * ipa-cp.c (create_specialized_node): Call
21297         expand_all_artificial_thunks if necessary.
21299 2018-04-17  Martin Liska  <mliska@suse.cz>
21301         PR lto/85405
21302         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21303         in message, remote space in between '_G' and '('.
21305 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21307         PR target/85281
21308         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21309         avx512f_vmcmp<mode>3<round_saeonly_name>,
21310         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21311         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21312         avx512f_rndscale<mode><round_saeonly_name>,
21313         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21314         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21315         Use %<iptr>2 instead of %2 for -masm=intel.
21316         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21317         avx512f_vcvttss2usi<round_saeonly_name>,
21318         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21319         -masm=intel.
21320         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21321         avx512f_vcvttsd2usi<round_saeonly_name>,
21322         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21323         Use %q1 instead of %1 for -masm=intel.
21324         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21325         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21326         of %3 for -masm=intel.
21327         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21328         -masm=intel.
21329         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21330         -masm=intel.
21331         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21332         -masm=intel.
21333         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21334         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21335         %g1.
21336         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21337         -masm=intel.
21338         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21339         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21340         %g1 and one with %0 and %1.
21341         (avx512er_vmrcp28<mode><round_saeonly_name>,
21342         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21343         %1 for -masm=intel.
21344         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21345         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21346         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21347         of %0 and %{%4%} for -masm=intel.
21348         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21349         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21350         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21351         order of %0 and %{%5%}%{z%} for -masm=intel.
21353 2018-04-17  Jan Hubicka  <jh@suse.cz>
21355         PR lto/85405
21356         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21358 2018-04-17  Martin Liska  <mliska@suse.cz>
21360         PR ipa/85329
21361         * multiple_target.c (create_dispatcher_calls): Set apostrophes
21362         for target_clone error message.  Make default implementation
21363         clone to be a local declaration.
21364         (separate_attrs): Add new argument and check for an empty
21365         string.
21366         (expand_target_clones): Handle it.
21367         (ipa_target_clone): Make redirection just for target_clones
21368         functions.
21370 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
21371             Tom de Vries  <tom@codesourcery.com>
21373         PR middle-end/84955
21374         * omp-expand.c (expand_oacc_for): Add dummy false branch for
21375         tiled basic blocks without omp continue statements.
21377 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
21379         PR target/83660
21380         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21381         vec_extract expression as having side effects to make sure it gets
21382         a cleanup point.
21384 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
21386         PR target/85403
21387         * config/i386/i386.c (get_builtin_code_for_version): Check
21388         error_mark_node.
21390 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
21392         PR target/84331
21393         * config.gcc: Support "skylake".
21394         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21395         PROCESSOR_SKYLAKE.
21396         * config/i386/i386.c (m_SKYLAKE): Define.
21397         (processor_target_table): Add "skylake".
21398         (ix86_option_override_internal): Add "skylake".
21399         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21400         PROCESSOR_CANNONLAKE.
21401         (get_builtin_code_for_version): Fix priority for
21402         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21403         PROCESSOR_SKYLAKE-AVX512.
21404         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21405         (processor_type): Add PROCESSOR_SKYLAKE.
21407 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
21408             Jason Merrill  <jason@redhat.com>
21410         PR c++/85112
21411         * convert.c (convert_to_integer_1): Use direct recursion for
21412         enumeral types and types with a precision less than the number
21413         of bits in their mode.
21415 2018-04-16  Julia Koval  <julia.koval@intel.com>
21417         PR target/84413
21418         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21419         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21421 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
21423         PR target/85293
21424         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21425         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21426         and -mno-direct-move.
21428 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
21430         PR target/83402
21431         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21432         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21433         Ensure negative shifts result in {0}.
21435 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
21437         PR rtl-optimization/79916
21438         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21439         regs (if any) to define how to gnerate SD moves when LRA is in
21440         progress.
21442 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
21444         PR rtl-optimization/85393
21445         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21446         * except.c (expand_dw2_landing_pad_for_region): Make static.
21447         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21448         a label and unconditional jump to old_bb, rather than
21449         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21450         basic block.
21452         PR rtl-optimization/85376
21453         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21454         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21455         instead of a specific value.
21457 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21458             Bin Cheng  <bin.cheng@arm.com>
21460         PR tree-optimization/82965
21461         PR tree-optimization/83991
21462         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21463         by_profile_only parameter.
21464         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21465         information if the loop was predicted to iterate too many times.
21466         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21468 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21470         PR lto/71991
21471         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21472         always inline.
21474 2018-04-13  Martin Liska  <mliska@suse.cz>
21475             Jakub Jelinek  <jakub@redhat.com>
21477         PR middle-end/81657
21478         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21479         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21480         * builtins.c (expand_builtin_memory_copy_args): Use
21481         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21482         handle dest_addr == pc_rtx.
21484 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
21486         PR target/85291
21487         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21488         asked to not generate direct moves.
21489         (fix_trunc<mode>si2_stfiwx): Similar.
21490         (fix_trunc<mode>si2_internal): Similar.
21492 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21494         PR debug/83157
21495         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21496         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21497         lookup if dest in some wider mode is known to be const0_rtx and
21498         if so, record permanent equivalence for it to be ZERO_EXTEND of
21499         the narrower mode destination.
21501 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
21503         * lto-streamer-out.c (output_function): Revert 259346.
21504         * omp-expand.c (expand_oacc_for): Likewise.
21506 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
21508         PR rtl-optimization/85354
21509         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21510         * sel-sched.c (sel_global_init): ... here.
21512 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
21514         PR target/85238
21515         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21516         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21517         mode for PE-COFF targets.
21518         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21519         (i386_pe_asm_lto_end): Likewise.
21520         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21521         (TARGET_ASM_LTO_END): Likewise.
21522         * config/i386/winnt.c (saved_debug_info_level): New static variable.
21523         (i386_pe_asm_lto_start): New function.
21524         (i386_pe_asm_lto_end): Likewise.
21526 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
21527             Richard Biener  <rguenther@suse.de>
21529         PR middle-end/84955
21530         * lto-streamer-out.c (output_function): Fix CFG loop state before
21531         streaming out.
21532         * omp-expand.c (expand_oacc_for): Handle calls to internal
21533         functions like regular functions.
21535 2018-04-12  Richard Biener  <rguenther@suse.de>
21537         PR lto/85371
21538         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21539         for the early LTO debug to properly generate references to it
21540         during DIE emission.  Do not re-use that for the skeleton for
21541         split-dwarf.
21542         (dwarf2out_early_finish): Likewise.
21544 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21546         PR target/85328
21547         * config/i386/sse.md
21548         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21549         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21550         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21551         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21552         and output is a reg, avoid creating invalid lowpart subreg, but
21553         instead split into a 512-bit move.  Don't split if not AVX512VL,
21554         input is xmm16+ reg and output is a mem.
21555         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21556         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21557         xmm16+ reg and output is a mem.
21559 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21561         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21562         also for flag_dwarf2_cfi_asm.
21564 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21566         PR rtl-optimization/85342
21567         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21568         a bool scalar var inside of the loop instead.  Don't try to update
21569         recog_data.operand after failed apply_change_group.
21571 2018-04-12  Tom de Vries  <tom@codesourcery.com>
21573         PR target/85296
21574         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21575         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
21576         array with flexible array member as array without given dimension.
21577         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21578         argument for undefined param to true.
21580 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
21582         PR target/85321
21583         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21584         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21585         from PowerPC section.
21586         * config/rs6000/sysv4.opt (mcall-): Improve help text.
21587         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21588         help text that is too long.
21589         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21590         help text that is too long.
21591         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21592         help text that is too long.
21594 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
21596         * config/alpha/alpha.md (stack_probe_internal): Rename
21597         from "probe_stack".  Update all callers.
21599 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21601         PR rtl-optimization/84566
21602         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21603         sched_macro_fuse_insns.
21605 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21607         PR target/84301
21608         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21609         (compute_block_dependences): ... from here.
21611 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21613         PR tree-optimization/85331
21614         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21615         from int to HOST_WIDE_INT.
21617 2018-04-11  Martin Jambor  <mjambor@suse.cz>
21619         PR ipa/84149
21620         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21621         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21622         not the same as the source val.
21623         (cgraph_edge_brings_value_p): New parameter.
21624         (gather_edges_for_value): Pass destination value to
21625         cgraph_edge_brings_value_p.
21626         (perhaps_add_new_callers): Likewise.
21627         (get_info_about_necessary_edges): Likewise and exclude values brought
21628         only by self-recursive edges.
21629         (create_specialized_node): Redirect only clones of self-calling edges.
21630         (+self_recursive_pass_through_p): New function.
21631         (find_more_scalar_values_for_callers_subset): Use it.
21632         (find_aggregate_values_for_callers_subset): Likewise.
21633         (known_aggs_to_agg_replacement_list): Removed.
21634         (decide_whether_version_node): Re-calculate known constants for all
21635         remaining context clones.
21637 2018-04-11  Richard Biener  <rguenther@suse.de>
21639         PR lto/85339
21640         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21641         from early DWARF output.
21642         (dwarf2out_early_finish): Output line info unconditionally into
21643         early DWARF and add reference to it.
21645 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21647         PR target/85281
21648         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21649         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21650         other than V2DFmode using iptr mode attribute.
21651         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21653 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21655         PR rtl-optimization/84659
21656         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21658 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21660         PR debug/85302
21661         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21662         SIZEP is NULL.
21663         (output_loc_list): Pass address of a dummy size variable even in the
21664         locview handling loop.
21665         (index_location_lists): Add comment on why skip_loc_list_entry can't
21666         call size_of_locs.
21668 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21670         PR target/85261
21671         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21672         into register.
21674 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
21676         PR target/85321
21677         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21678         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21679         and -mstring-compare-inline-limit.
21681 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21683         PR target/85287
21684         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21685         for stack clash protection in a register whenever we need it to be in
21686         a register.
21688 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21690         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21691         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21693 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21695         PR target/85321
21696         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21697         the help text.
21698         (mlong-double-): Ditto.
21699         * config/rs6000/sysv4.opt (msdata=): Ditto.
21700         (mtls-size=): Ditto.
21702 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21704         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21705         erroneous entries for
21706         "vector int vec_ldl (int, long int *)", and
21707         "vector unsigned int vec_ldl (int, unsigned long int *)".
21708         Add comments and entries for
21709         "vector bool char vec_ldl (int, bool char *)",
21710         "vector bool short vec_ldl (int, bool short *)",
21711         "vector bool int vec_ldl (int, bool int *)",
21712         "vector bool long long vec_ldl (int, bool long long *)",
21713         "vector pixel vec_ldl (int, pixel *)",
21714         "vector long long vec_ldl (int, long long *)",
21715         "vector unsigned long long vec_ldl (int, unsigned long long *)".
21716         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21717         type tree bool_long_long_type_node and correct definition of
21718         bool_V2DI_type_node to make reference to this new type tree.
21719         (rs6000_mangle_type): Replace erroneous reference to
21720         bool_long_type_node with bool_long_long_type_node.
21721         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21722         comments to emphasize sign distinctions for char and int types and
21723         replace RS6000_BTI_bool_long constant with
21724         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
21725         use of RS6000_BTI_pixel.
21726         (bool_long_type_node): Remove this macro definition.
21727         (bool_long_long_type_node): New macro definition
21729 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21731         PR rtl-optimization/85300
21732         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21733         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21734         simplify_unary_operation fails.
21736 2018-04-10  Martin Liska  <mliska@suse.cz>
21738         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21739         cgraph_edge and ipa_ref.
21741 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21743         PR target/85177
21744         PR target/85255
21745         * config/i386/sse.md
21746         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21747         computation of the VEC_MERGE selector from mask.
21748         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21749         Fix decoding of the VEC_MERGE selector into mask.
21751 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21753         PR tree-optimization/85286
21754         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21756 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21758         * final.c (final_1): Set insn_last_address as well as
21759         insn_current_address.
21761 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21763         PR target/85173
21764         * explow.c (emit_stack_probe): Call validize_mem on memory location
21765         before passing it to gen_probe_stack.  Create address operand and
21766         legitimize it for the probe_stack_address case.
21768 2018-04-09  Jan Hubicka  <jh@suse.cz>
21770         PR lto/85078
21771         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21772         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21773         * tree.c (free_lang_data_in_type): Fix handling of binfos;
21774         walk basetypes.
21775         (free_lang_data): Rebuild type inheritance graph.
21777 2018-04-09  Martin Sebor  <msebor@redhat.com>
21779         * invoke.texi (-finline-small-functions): Mention other optimization
21780         options.
21781         (-findirect-inlining, -fpartial-inlining): Same.
21782         (-finline-functions-called-once): Same.
21783         (-freorder-blocks-and-partition): Same.
21785 2018-04-09  Jan Hubicka  <jh@suse.cz>
21787         PR rtl/84058
21788         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21789         jumps; choose last target that matches the criteria (i.e.
21790         no partition changes for non-crossing jumps).
21791         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21792         support for redirecting crossing jumps to non-crossing.
21794 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
21796         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21797         also for naked functions.
21799 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
21801         * config/arc/arc.md (add_shift): New pattern.
21802         (add_shift2): Likewise.
21803         (sub_shift): Likewise.
21804         (sub_shift_cmp0_noout): Likewise.
21805         (compare_si_ashiftsi): Likewise.
21806         (xbfu_cmp0_noout): New combine pattern.
21807         (xbfu_cmp0"): Likewise.
21808         (movsi_set_cc_insn): Place the predicable variant first.
21809         (commutative_binary_cmp0_noout): Remove clobber.
21810         (commutative_binary_cmp0): New pattern.
21811         (noncommutative_binary_cmp0): Likewise.
21812         (noncommutative_binary_cmp0_noout): Likewise.
21813         (noncommutative_binary_comparison_result_used): Removed.
21814         (rsub_cmp0): New pattern.
21815         (rsub_cmp0_noout): Likewise.
21816         (extzvsi): Changed, keep only meaningful variants.
21817         (SQH, SEZ): New iterators.
21818         (SQH_postfix): New mode attribute.
21819         (SEZ_prefix): New code attribute.
21820         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21821         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21822         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21823         of numerical value.
21824         (noncommutative_operator): Check the availability of barrel
21825         shifter option.
21827 2018-04-09  Richard Biener  <rguenther@suse.de>
21829         PR tree-optimization/85284
21830         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21831         Only use the niter constraining form of simple_iv when the exit
21832         is always executed.
21834 2018-04-09  Tom de Vries  <tom@codesourcery.com>
21836         PR target/84041
21837         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21838         (define_expand "*memory_barrier"): New define_expand.
21839         (define_insn "memory_barrier"): New insn.
21841 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21843         PR rtl-optimization/80463
21844         PR rtl-optimization/83972
21845         PR rtl-optimization/83480
21847         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21848         correct producer for the insn.
21849         (tidy_control_flow): Fixup seqnos in case of debug insns.
21851 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21853         PR rtl-optimization/83913
21855         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21856         different sched-times when merging exprs.
21858 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21860         PR rtl-optimization/83962
21862         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21863         tidy_fallthru_edge and tidy_control_flow.
21865 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21867         PR rtl-optimization/83530
21869         * sel-sched.c (force_next_insn): New global variable.
21870         (remove_insn_for_debug): When force_next_insn is true, also leave only
21871         next insn in the ready list.
21872         (sel_sched_region): When the region wasn't scheduled, make another pass
21873         over it with force_next_insn set to 1.
21875 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
21877         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21878         into tm_file.
21879         * config/nds32/constants.md (unspec_volatile_element): Add enum values
21880         for interrupt control.
21881         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21882         functions for interrupt control.
21883         * config/nds32/nds32-intrinsic.md: Likewise.
21884         * config/nds32/nds32_intrinsic.h: Likewise.
21885         * config/nds32/nds32.h (nds32_builtins): Likewise.
21887 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
21889         * config/nds32/nds32.c (nds32_init_machine_status,
21890         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21891         strict_aligned_p field.
21892         (nds32_expand_to_rtl_hook): New function.
21893         (TARGET_EXPAND_TO_RTL_HOOK): Define.
21894         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21896 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21897             Chung-Ju Wu  <jasonwucj@gmail.com>
21899         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21900         * config/nds32/nds32-n7.md: New file.
21901         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21902         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21903         pipeline.
21904         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21905         * config/nds32/nds32.md (pipeline_model): Add n7.
21906         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21907         * config/nds32/pipelines.md: Include n7 settings.
21909 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21910             Chung-Ju Wu  <jasonwucj@gmail.com>
21912         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21913         * config/nds32/nds32-e8.md: New file.
21914         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21915         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21916         pipeline.
21917         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21918         * config/nds32/nds32.md (pipeline_model): Add e8.
21919         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21920         * config/nds32/pipelines.md: Include e8 settings.
21922 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21923             Chung-Ju Wu  <jasonwucj@gmail.com>
21925         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21926         * config/nds32/nds32-n8.md: New file.
21927         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21928         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21929         pipeline.
21930         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21931         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21932         * config/nds32/nds32.md (pipeline_model): Add n8.
21933         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21934         * config/nds32/pipelines.md: Include n8 settings.
21936 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21937             Chung-Ju Wu  <jasonwucj@gmail.com>
21939         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21940         * config/nds32/nds32-n9-2r1w.md: New file.
21941         * config/nds32/nds32-n9-3r2w.md: New file.
21942         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21943         nds32_register_ports): New or modify for cpu n9.
21944         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21945         pipeline.
21946         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21947         * config/nds32/nds32-utils.c: New file.
21948         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21949         TARGET_MUL_SLOW): Define.
21950         * config/nds32/nds32.md (pipeline_model): New attribute.
21951         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21952         New options that support cpu n9.
21953         * config/nds32/pipelines.md: Include n9 settings.
21954         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21956 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
21958         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21959         information if necessary.
21960         (output_cond_branch_compare_zero): Likewise.
21961         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21962         (nds32_target_alignment): Refine for alignment.
21963         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21964         (FUNCTION_BOUNDARY): Modify.
21965         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21966         align case.
21967         * config/nds32/nds32.opt (malways-align, malign-functions): New.
21969 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
21971         * config/nds32/constants.md (unspec_volatile_element): Add values for
21972         TLB operation and data prefetch.
21973         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21974         functions for TLB operation and data prefetch.
21975         * config/nds32/nds32-intrinsic.md: Likewise.
21976         * config/nds32/nds32_intrinsic.h: Likewise.
21977         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21978         (nds32_print_operand): Likewise.
21979         * config/nds32/nds32.h (nds32_builtins): Likewise.
21981 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
21982         Andrew Pinski <pinsika@gcc.gnu.org>
21984         PR middle-end/82976
21985         * match.pd: Use constant_boolean_node of correct type instead of
21986         boolean_true_node or boolean_false_node for simplifying
21987         pointer comparisons to zero.
21989 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
21991         PR tree-optimization/80021
21992         * tree.c (verify_type_variant): Make error call in verify_variant_match
21993         translatable and remove final full stop.
21995 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21997         * config/nds32/constants.md (unspec_volatile_element): Add
21998         UNSPEC_VOLATILE_EH_RETURN.
21999         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22000         nds32_output_stack_pop): Support dwarf exception handling process.
22001         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22002         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22003         exception handling process.
22004         (nds32_compute_stack_frame): Likewise.
22005         (nds32_return_addr_rtx): Likewise.
22006         (nds32_initial_elimination_offset): Likewise.
22007         (nds32_expand_prologue): Likewise.
22008         (nds32_expand_epilogue): Likewise.
22009         (nds32_dynamic_chain_address): New function.
22010         * config/nds32/nds32.h (machine_function): Add fields for dwarf
22011         exception handling.
22012         (DYNAMIC_CHAIN_ADDRESS): Define.
22013         (EH_RETURN_DATA_REGNO): Define.
22014         (EH_RETURN_STACKADJ_RTX): Define.
22015         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22016         patterns for dwarf exception handling.
22018 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22020         * config/nds32/nds32.h: Clean up obsolete macros.
22022 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22024         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22025         Add enum values for particular instructions.
22026         * config/nds32/nds32-intrinsic.c: Implementation of expanding
22027         particular intrinsic functions.
22028         * config/nds32/nds32-intrinsic.md: Likewise.
22029         * config/nds32/nds32_intrinsic.h: Likewise.
22030         * config/nds32/nds32.h (nds32_builtins): Likewise.
22031         * config/nds32/nds32.md (type): Add pbsad and pbsada.
22032         (btst, ave): New patterns for particular instructions.
22034 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22036         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22037         Add enum values for atomic load/store and memory sync.
22038         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22039         and memory sync.
22040         * config/nds32/nds32-intrinsic.md: Likewise.
22041         * config/nds32/nds32_intrinsic.h: Likewise.
22042         * config/nds32/nds32.h (nds32_builtins): Likewise.
22044 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
22046         PR tree-optimization/85257
22047         * fold-const.c (native_encode_vector): If not all elts could fit
22048         and off is -1, return 0 rather than offset.
22049         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22050         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22051         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
22052         adjust buffer in native_interpret_expr call.
22054 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22056         * config/nds32/constants.md (unspec_volatile_element): Add cache
22057         control enum values.
22058         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22059         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22060         * config/nds32/nds32.c (nds32_cctl_names): New.
22061         (nds32_print_operand): Handle cache control register names.
22062         * config/nds32/nds32.h (nds32_builtins): New enum values.
22063         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22064         macros.
22065         * config/nds32/nds32.md (type): Add mmu.
22066         * config/nds32/pipelines.md (simple_insn): Add mmu.
22068 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22070         * config/nds32/nds32.md (type): Remove call.
22071         * config/nds32/pipelines.md (simple_insn): Likewise.
22073 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22075         * config/nds32/constants.md (unspec_volatile_element): Add
22076         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22077         UNSPEC_VOLATILE_FMFCFG.
22078         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22079         description for fmfcfg and fmfcsr.
22080         (bdesc_1arg): Add fmtcsr.
22081         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22082         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22083         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22084         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22085         unspec_fmfcfg): New patterns.
22086         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22087         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22088         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22089         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22090         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22091         __nds32__fmfcfg): Define.
22093 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22095         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22096         intrinsic register names.
22097         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22098         intrinsic register enum values and macros.
22100 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22102         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22103         for load/store addressing form.
22104         (nds32_print_operand_address): Likewise.
22106 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
22108         PR target/85196
22109         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22110         based on LABEL_REF.  Remove useless assertion.
22111         (pic_address_needs_scratch): Fix formatting.
22112         (sparc_legitimize_pic_address): Minor tweaks.
22113         (sparc_delegitimize_address): Adjust assertion accordingly.
22114         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22115         into symbolic_operand.
22116         (movsi_high_pic_label_ref): Likewise.
22117         (movsi_lo_sum_pic_label_ref): Likewise.
22118         (movdi_pic_label_ref): Likewise.
22119         (movdi_high_pic_label_ref): Likewise.
22120         (movdi_lo_sum_pic_label_ref): Likewise.
22122 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
22124         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22125         custom LIB_SPEC setup.
22127 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
22128             Kito Cheng  <kito.cheng@gmail.com>
22130         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22131         * config/riscv/freebsd.h: New.
22133 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22135         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22136         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22137         file.
22139 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22140             Kito Cheng  <kito.cheng@gmail.com>
22142         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22143         nds32_output_call, nds32_symbol_binds_local_p): New functions.
22144         * config/nds32/nds32-protos.h (nds32_output_call,
22145         nds32_output_return): Declare.
22146         * config/nds32/nds32.md: Refine all the call and return patterns.
22148 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22150         PR debug/85252
22151         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22152         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22154         PR rtl-optimization/84872
22155         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22156         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22157         EDGE_CROSSING edge.
22159 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
22161         * expr.c (copy_blkmode_to_reg): Revert 254862.
22162         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22164 2018-04-06  Richard Biener  <rguenther@suse.de>
22166         PR middle-end/85244
22167         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22168         after seeing a component reference with an adjacent field.  Treat
22169         refs to arrays at struct end of external decls similar to
22170         refs to unconstrained commons.
22172 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22174         PR sanitizer/85213
22175         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22176         look through SAVE_EXPRs with non-side-effects argument.  Adjust
22177         recursive calls.
22178         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22179         save_p here.
22181 2018-04-06  Richard Biener  <rguenther@suse.de>
22183         PR middle-end/85180
22184         * alias.c (find_base_term): New wrapper around find_base_term
22185         unwinding CSELIB_VAL_PTR changes.
22186         (find_base_term): Do not restore CSELIB_VAL_PTR during the
22187         recursion.
22189 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22191         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22192         instructions.
22193         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22194         constant definitions.
22195         ("nop"): lr 0,0 -> nopr r0
22196         ("nop_lr0", "nop_lr1"): New insn definitions.
22198 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22200         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22201         NDS32_V3PUSH_AVAILABLE_P macro.
22203 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
22204             Chung-Ju Wu  <jasonwucj@gmail.com>
22206         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22207         (nds32*-*-*): Add float and fpu_config into supported_defaults.
22208         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22209         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22210         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22211         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22212         * config/nds32/constraints.md: New constraints and checking for hard
22213         float configuration.
22214         * config/nds32/iterators.md: New mode iterator and attribute for hard
22215         float configuration.
22216         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22217         patterns.
22218         * config/nds32/nds32-fpu.md: New file.
22219         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22220         deal with hard float code generation.
22221         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22222         ARCH_V3S.
22223         (abi_type, float_reg_number): New enum type.
22224         * config/nds32/nds32-predicates.c: New predicates for hard float.
22225         * config/nds32/nds32-protos.h: Declare functions for hard float.
22226         * config/nds32/nds32.c: Implementation for hard float configuration.
22227         * config/nds32/nds32.h: Definitions for hard float configuration.
22228         * config/nds32/nds32.md: Include hard float machine description and
22229         modify patterns for hard float configuration.
22230         * config/nds32/nds32.opt: New options for hard float configuration.
22231         * config/nds32/predicates.md: New predicates for hard float
22232         configuration.
22234 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22236         * common/config/nds32/nds32-common.c
22237         (nds32_option_optimization_table): Enable -mreleax-hint by default.
22239 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
22241         PR middle-end/85195
22242         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22243         CONSTRUCTOR_ELT (ctor, ...)->value.
22245 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
22247         PR target/85193
22248         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22250 2018-04-05  Tom de Vries  <tom@codesourcery.com>
22252         PR target/85204
22253         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22254         cond jump.
22256 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22257             Kito Cheng  <kito.cheng@gmail.com>
22259         * config/nds32/constraints.md (U33): Fine-tune checking condition.
22260         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22261         * config/nds32/nds32.h (nds32_16bit_address_type): Add
22262         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22264 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22265             Kito Cheng  <kito.cheng@gmail.com>
22267         * config/nds32/constraints.md (Ufe): New memory constraint.
22268         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22269         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22270         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22271         operands.
22272         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22273         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22275 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22277         * config/nds32/nds32.md: Use optimize_size in the condition for
22278         alu-shift instructions.
22280 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22282         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22284 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22286         * config/nds32/nds32.md (negsi2): Refine pattern.
22288 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22289             Chung-Ju Wu  <jasonwucj@gmail.com>
22291         * config/nds32/iterators.md (shift_rotate): New code iterator.
22292         (shift): New code attribute.
22293         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22294         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22295         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22296         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22297         bit-wise operations.
22298         (andsi3, *andsi3): Ditto.
22299         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22300         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22301         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22302         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22303         nds32_ior_operand, nds32_xor_operand): New predicates.
22305 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22307         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22308         (addsi3, subsi3): ... this.
22310 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22312         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22314 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22316         * config/nds32/nds32.md: Adjust indention.
22318 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22320         * config/nds32/nds32.md (feature): New attribute.
22322 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22324         * config/nds32/nds32.md (subtype): New attribute.
22326 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22328         PR target/85203
22329         * config/arm/arm-builtins.c (arm_expand_builtin): Change
22330         expansion to perform a bitwise AND of the argument followed by a
22331         boolean negation of the result.
22333 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
22335         PR rtl-optimization/84878
22336         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22337         the basic block.  Assert the use reference is not artificial and that
22338         it has an associated insn.
22340 2018-04-04  Michael Matz  <matz@suse.de>
22342         * builtins.c (compute_objsize): Pass correct operand
22343         to array_at_struct_end_p.
22345 2018-04-04  Richard Biener  <rguenther@suse.de>
22347         PR lto/85176
22348         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22349         from contexts for DINFO_LEVEL_TERSE and below.
22351 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22353         * config/nds32/nds32-doubleword.md (move_<mode>): Require
22354         resiter_operand condition.
22355         * config/nds32/nds32.md (*move<mode>): Ditto.
22357 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22358             Monk Chiang  <sh.chiang04@gmail.com>
22360         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22362 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22364         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22366 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22367             Kito Cheng  <kito.cheng@gmail.com>
22369         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22370         nds32_cond_code_str, output_cond_branch,
22371         output_cond_branch_compare_zero, nds32_expand_cbranch,
22372         nds32_expand_cstore, nds32_expand_movcc,
22373         nds32_output_cbranchsi4_equality_zero,
22374         nds32_output_cbranchsi4_equality_reg,
22375         nds32_output_cbranchsi4_equality_reg_or_const_int,
22376         nds32_output_cbranchsi4_greater_less_zero: New functions.
22377         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22378         nds32_expand_cstore, nds32_expand_movcc,
22379         nds32_output_cbranchsi4_equality_zero,
22380         nds32_output_cbranchsi4_equality_reg,
22381         nds32_output_cbranchsi4_equality_reg_or_const_int,
22382         nds32_output_cbranchsi4_greater_less_zero): Declare.
22383         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22384         nds32_rimm11s_operand): New predicates.
22385         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22386         * config/nds32/nds32.md: Rewrite all the branch and conditional move
22387         patterns.
22389 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22391         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22392         * config/nds32/nds32.md: Ditto.
22393         * config/nds32/pipelines.md: Ditto.
22395 2018-04-04  Richard Biener  <rguenther@suse.de>
22397         PR tree-optimization/85168
22398         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22399         propagating abnormals.
22401 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22403         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22405 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22406             Kito Cheng  <kito.cheng@gmail.com>
22408         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22409         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22410         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22411         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22412         * config/nds32/nds32.md (sibcall_internal): New.
22413         (sibcall_register): Remove.
22414         (sibcall_immediate): Remove.
22415         (sibcall_value_internal): New.
22416         (sibcall_value_register): Remove.
22417         (sibcall_value_immediate): Remove.
22418         * config/nds32/predicates.md (nds32_general_register_operand): New.
22419         (nds32_call_address_operand): New.
22421 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22423         PR rtl-optimization/85167
22424         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22425         bb_defs if *split_p, instead preinitialize it to NULL.
22427         PR tree-optimization/85156
22428         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22429         evaluating the argument multiple times.
22431 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
22433         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22434         than vector.
22435         (_mm_cvtpd_ps): Likewise.
22436         (_mm_cvttpd_epi32): Likewise.
22437         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22438         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22439         vector, pixel, and bool following altivec.h include.
22441 2018-04-03  Martin Sebor  <msebor@redhat.com>
22443         * doc/extend.texi (Common Function Attributes): Clarify.
22444         (const attribute): Likewise.
22445         (pure attribute): Likewise.
22447 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22449         PR target/85169
22450         * config/i386/i386.c (ix86_expand_vector_set): Use
22451         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
22453 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
22455         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22456         instructions when changing rounding bits to preserve precision bits
22457         in the x87 control word.
22459 2018-04-03  Martin Liska  <mliska@suse.cz>
22461         PR tree-optimization/82491
22462         * rtl.h (strip_offset_and_add): Replace += suboffset with
22463         poly_uint64 () + suboffset.
22465 2018-03-29  Martin Liska  <mliska@suse.cz>
22466             Martin Jambor  <mjambor@suse.cz>
22468         PR ipa/84947
22469         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22470         param_type is not an integral or pointer type.
22472 2018-04-03  Richard Biener  <rguenther@suse.de>
22474         * sese.h (recompute_all_dominators): Remove.
22476 2018-04-02  Martin Sebor  <msebor@redhat.com>
22478         * doc/invoke.texi (-Wrestrict): Fix typos.
22480 2018-04-02  Jim Wilson  <jimw@sifive.com>
22482         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22483         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22484         (<optab>di3, <optab>si3_extend): Likewise.
22485         (<optab>si3_mask, <optab>si3_mask_1): New.
22486         (<optab>di3_mask, <optab>di3_mask_1): New.
22487         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22488         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22489         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22491 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
22493         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22494         example.
22496 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
22498         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22499         (nds32_canonicalize_comparison): New function.
22501 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22502             Kito Cheng  <kito.cheng@gmail.com>
22503             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22505         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22506         * config/nds32/constants.md (unspec_volatile_element): Add
22507         UNSPEC_VOLATILE_RELAX_GROUP.
22508         * config/nds32/nds32-relax-opt.c: New file.
22509         * config/nds32/nds32-predicates.c
22510         (nds32_symbol_load_store_p): New function.
22511         * config/nds32/nds32-protos.h
22512         (nds32_symbol_load_store_p): Declare function.
22513         (make_pass_nds32_relax_opt): Declare new rtl pass function.
22514         * config/nds32/nds32.c
22515         (nds32_register_pass): New function to register pass.
22516         (nds32_register_passes): New function to register passes.
22517         * config/nds32/nds32.md (relax_group): New pattern.
22518         * config/nds32/nds32.opt (mrelax-hint): New option.
22519         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22521 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
22523         * config/nds32/t-nds32: Modify files dependency.
22525 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22527         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22528         (PROFILE_HOOK): Define its implementation.
22530 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22532         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22533         type and 32-bit size.
22535 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
22537         PR middle-end/85090
22538         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22539         (V_128_256): New mode iterator.
22540         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22541         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22542         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22543         of V.
22544         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22545         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22547 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
22549         PR target/83315
22550         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22551         NaN inputs correctly.
22553 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
22555         PR target/80546
22556         * config/rs6000/vsx.md (??r): New mode attribute.
22557         (*vsx_mov<mode>_64bit): Use it.
22558         (*vsx_mov<mode>_32bit): Likewise.
22560 2018-03-30  Martin Sebor  <msebor@redhat.com>
22562         PR tree-optimization/84818
22563         * builtins.c (check_access): Use warning_n.
22565 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22567         PR target/83822
22568         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22569         condition.
22570         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22571         condition.
22573 2018-03-30  Julia Koval  <julia.koval@intel.com>
22575         PR target/84413
22576         * x86-tune.def (movx, partial_reg_dependency): Enable for
22577         m_SKYLAKE_AVX512.
22579 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
22581         PR inline-asm/84985
22582         * lra-constraints.c (process_alt_operands): Move setting
22583         this_alternative_matches below.
22585 2018-03-29  Martin Liska  <mliska@suse.cz>
22587         PR lto/84995.
22588         * doc/invoke.texi: Document how LTO works with debug info.
22589         Describe auto-load support of binutils.  Mention 'x86-64'
22590         as valid option value of -march option.
22592 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
22594         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22596         PR c/85094
22597         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22598         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22599         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22600         checking.
22602 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
22604         PR target/84912
22605         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22606         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22607         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22608         for RS6000_BTM_POWERPC64.
22609         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22610         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22611         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22612         definition.
22613         (DIVDE): Use it.
22614         (DIVDEU): Likewise.
22616 2018-03-28  Carl Love  <cel@us.ibm.com>
22618         Revert
22619         2017-09-27  Carl Love  <cel@us.ibm.com>
22621         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22622         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22623         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22624         fctiw instruction.
22626 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22628         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22629         instead of __vector bool.
22630         (_mm_max_pu8): Likewise.
22631         (_mm_min_pi16): Likewise.
22633 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
22635         PR target/84912
22636         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22637         (DIVWEUO): Likewise.
22638         (DIVDEO): Likewise.
22639         (DIVDEUO): Likewise.
22640         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22641         DIVWEUO and DIVDEUO.
22642         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22643         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22644         (div_extend): Likewise.
22645         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22646         builtin function.
22647         (__builtin_divweuo): Likewise.
22648         (__builtin_divdeo): Likewise.
22649         (__builtin_divdeuo): Likewise.
22651 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22653         PR target/85095
22654         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22655         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22657         PR tree-optimization/82004
22658         * gimple-match-head.c (optimize_pow_to_exp): New function.
22659         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22660         Don't fold to exp if optimize_pow_to_exp is false.
22662 2018-03-28  Martin Liska  <mliska@suse.cz>
22664         PR other/84819
22665         * calls.c (initialize_argument_information): Fix trailing space.
22666         * common.opt: Fix typo and provide better explanation for
22667         -fsanitize-coverage option.
22668         * config/i386/i386.opt: Fix typo.
22670 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22671             Martin Liska  <mliska@suse.cz>
22673         PR sanitizer/85081
22674         * gimplify.c (asan_poison_variable): Don't do the check for
22675         gimplify_omp_ctxp here.
22676         (gimplify_decl_expr): Do it here.
22677         (gimplify_target_expr): Likewise.
22679 2018-03-28  Martin Liska  <mliska@suse.cz>
22681         PR target/84988
22682         * config/i386/i386.c (ix86_function_arg_advance): Do not call
22683         chkp_type_bounds_count if MPX is not enabled.
22685 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
22687         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22689 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
22691         PR target/84914
22692         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22693         function to create the function decl for complex long double
22694         multiply and divide for -mabi=ieeelongdouble.
22695         (init_float128_ieee): Call it.
22697 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
22699         PR target/85044
22700         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22701         -fcf-protection=branch -mibt.
22702         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22704 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22706         PR target/81863
22707         * config/arm/arm.c (arm_valid_symbolic_address): Handle
22708         arm_word_relocations.
22710 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
22712         PR target/85056
22713         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22714         extern array declarations.
22716 2018-03-27  Richard Biener  <rguenther@suse.de>
22718         PR middle-end/84067
22719         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22720         explicit single_use checks.
22722 2018-03-27  Richard Biener  <rguenther@suse.de>
22724         PR tree-optimization/85082
22725         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22726         Valueize the VUSE.
22728 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22730         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22731         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22732         Turn on fasynchronous-unwind-tables and funwind-tables.
22734 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
22736         PR target/85073
22737         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22738         (*bmi_blsr_<mode>_ccz): Ditto.
22740 2018-03-26  Tom de Vries  <tom@codesourcery.com>
22742         PR tree-optimization/85063
22743         * omp-general.c (offloading_function_p): New function.  Factor out
22744         of ...
22745         * omp-offload.c (pass_omp_target_link::gate): ... here.
22746         * omp-general.h (offloading_function_p): Declare.
22747         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22748         with attribute omp declare target for offloading functions.
22750 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
22752         PR tree-optimization/84005
22753         * tree-data-ref.h (get_base_for_alignment): Declare.
22754         * tree-data-ref.c (get_base_for_alignment_1): New function.
22755         (get_base_for_alignment): Likewise.
22756         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22757         get_base_for_alignment to find a suitable base object, instead
22758         of always using drb->base_address.
22760 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22762         PR inline-asm/85022
22763         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22764         known size by default.
22766 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
22768         PR inline-asm/85030
22769         * lra-constraints.c (process_alt_operands): Don't match BLKmode
22770         and non BLKmode operands.
22772 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22774         PR target/85026
22775         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22776         Clean up attributes.
22778 2018-03-23  Richard Biener  <rguenther@suse.de>
22780         PR debug/85020
22781         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22782         we are going to emit early debug for LTO.
22784 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22786         PR inline-asm/85034
22787         * function.c (match_asm_constraints_1): Don't optimize if input
22788         doesn't satisfy general_operand predicate for output's mode.
22790         PR inline-asm/85022
22791         * alias.c (write_dependence_p): Don't require for x_canonicalized
22792         non-VOIDmode if x has VOIDmode.
22794         PR sanitizer/85029
22795         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22796         just don't try to optimize it rather than assert it never happens.
22798 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22800         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22801         macro expansions for definition of ST_INTERNAL_<mode> and
22802         LD_INTERNAL_<mode> builtins.
22803         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22804         Remove prototype.
22805         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22806         function.
22807         (altivec_expand_st_builtin): Likewise.
22808         (altivec_expand_builtin): Remove calls to deleted functions.
22809         (rs6000_address_for_altivec): Delete this function.
22810         * config/rs6000/vector.md: Remove expands for
22811         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22813 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
22815         PR target/84826
22816         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22817         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22818         re-computing once computed.
22819         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22820         (arm_init_machine_status): Initialize
22821         machine->static_chain_stack_bytes.
22823 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22825         PR target/84760
22826         * doc/extend.texi: Add four new prototypes for vec_ld.
22827         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22828         definitions for more logical presentation.
22829         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22830         entries for V1TI variants of __builtin_altivec_ld builtin.
22831         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22832         handling of V1TI variant of LVX icode pattern.
22833         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22834         (rs6000_gimple_fold_builtin): Likewise.
22835         (altivec_init_builtins): Add code to define
22836         __builtin_altivec_lvx_v1ti function.
22838 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
22840         PR inline-asm/84941
22841         * function.c (match_asm_constraints_1): Don't do the optimization
22842         if input isn't a REG, SUBREG, MEM or constant.
22844 2018-03-22  Tom de Vries  <tom@codesourcery.com>
22846         PR tree-optimization/84956
22847         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22848         bb_has_abnormal_pred.
22850 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
22852         PR sanitizer/85018
22853         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22854         DECL_INITIAL (decl) to decl at the end.
22855         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22856         adjust the comment.
22858 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
22860         * doc/extend.texi (__builtin_tgmath): Document when complex
22861         integer types are treated as _Complex _Float64.
22863 2018-03-21  Tom de Vries  <tom@codesourcery.com>
22865         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22867 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22869         PR tree-optimization/84960
22870         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22871         if it is ENTRY block, move them into single succ of ENTRY in that case.
22873 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
22875         PR tree-optimization/84811
22876         * poly-int.h (poly_span_traits): Remove the T3 parameter and
22877         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22878         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22879         (known_subrange_p): Update accordingly.  Cast each value involved
22880         in the size comparison, rather than casting the result of the
22881         subtraction.
22883 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22885         PR tree-optimization/84982
22886         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22887         by flipping the least significant bit rather than all bits from
22888         bitpos to bitpos + bitsize - 1.
22890 2018-03-21  Nathan Sidwell  <nathan@acm.org>
22892         * doc/extend.texi (Deprecated Features): Remove mention of
22893         long-deleted deprecations.
22895 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22897         PR jit/84288
22898         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22899         * configure: Regenerate.
22901 2018-03-21  Tom de Vries  <tom@codesourcery.com>
22903         PR tree-optimization/83126
22904         * tree-parloops.c (num_phis): New function.
22905         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22907 2018-03-21  Nathan Sidwell  <nathan@acm.org>
22909         * doc/extend.texi (Deprecated Features): Update deprecated flags,
22910         mention anon-struct/union members and trailing attributes.
22912 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
22914         PR tree-optimization/84969
22915         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22916         builtin memset partitions if they set different rhs values.
22918 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22920         PR rtl-optimization/84989
22921         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22922         VEC_DUPLICATE with scalar result mode.
22924 2018-03-21  Martin Liska  <mliska@suse.cz>
22926         PR ipa/84963
22927         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22928         not intended return statement.
22930 2018-03-21  Martin Liska  <mliska@suse.cz>
22932         PR target/84988
22933         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22934         (chkp_find_bound_slots_1): Limit number of iterations.
22936 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
22938         PR target/84838
22939         * Minor grammar fixes for x86 options.
22941 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22943         PR debug/84875
22944         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22945         holding REG_CFA_RESTORE notes, instead turn them into a USE.
22947 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
22949         PR target/83789
22950         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22951         (altivec_lvx_<mode>_1op): Likewise.
22952         (altivec_stvx_<mode>_2op): Likewise.
22953         (altivec_stvx_<mode>_1op): Likewise.
22954         (altivec_lvx_<VM2:mode>): New define_expand.
22955         (altivec_stvx_<VM2:mode>): Likewise.
22956         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22957         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22958         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22959         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22960         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22961         (rs6000_gen_lvx): Likewise.
22962         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22963         (altivec_expand_stv_builtin): Likewise.
22964         (altivec_expand_builtin): Likewise.
22965         * config/rs6000/vector.md: Likewise.
22967 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22969         PR target/82518
22970         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22971         BYTES_BIG_ENDIAN.
22973 2018-03-20  Richard Biener  <rguenther@suse.de>
22975         PR target/84986
22976         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22977         sign-conversions as zero, fall back to standard scalar_stmt
22978         cost for the rest.
22980 2018-03-20  Martin Liska  <mliska@suse.cz>
22982         PR ipa/84825
22983         * predict.c (rebuild_frequencies): Handle case when we have
22984         PROFILE_ABSENT, but flag_guess_branch_prob is false.
22986 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22988         PR target/84990
22989         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22990         flag_section_anchors.
22991         * varasm.c (use_blocks_for_decl_p): Remove hack for
22992         dw2_force_const_mem.
22994         PR target/84845
22995         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22996         to ...
22997         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
22998         be created, use lowpart_subreg of operands[0] rather than operands[0]
22999         itself.
23000         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23001         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23002         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23003         and n constraint instead of aarch64_shift_imm_di and Usd.
23004         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23005         (*aarch64_<optab>_reg_minus<mode>3): ... this.
23007 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
23009         PR target/82989
23010         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23011         to favor GPR over NEON registers.
23012         (<shift>di3_neon): Likewise.
23014 2018-03-20  Tom de Vries  <tom@codesourcery.com>
23016         PR target/84952
23017         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23018         (nvptx_process_pars): Emit bar.sync asap and alap.
23020 2018-03-20  Tom de Vries  <tom@codesourcery.com>
23022         PR target/84954
23023         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23024         seen_label if seen_label is already set.
23026 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
23028         PR target/84945
23029         * config/i386/i386.c (fold_builtin_cpu): For features above 31
23030         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23031         Use 1U instead of 1.  Formatting fixes.
23033         PR c/84953
23034         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23035         instead of TREE_TYPE (s1) for the return value.
23037 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
23039         PR tree-optimization/84946
23040         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23041         bitsize + bitsize in poly_uint64 rather than poly_int64.
23043         PR sanitizer/78651
23044         * dwarf2asm.c: Include fold-const.c.
23045         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23046         of decl rather than decl itself.
23048         PR rtl-optimization/84643
23049         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23051 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
23053         PR sanitizer/78651
23054         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23055         calling assemble_variable.
23057 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
23059         PR target/81647
23060         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23061         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23063 2018-03-19  Jim Wilson  <jimw@sifive.com>
23065         PR bootstrap/84856
23066         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23067         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23068         (riscv_first_stack_step): Likewise.
23069         (riscv_option_override): Use STACK_BOUNDARY instead of
23070         MIN_STACK_BOUNDARY.
23071         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23072         MIN_STACK_BOUNDARY.
23073         (BIGGEST_ALIGNMENT): Set to 128.
23074         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23075         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23076         STACK_BOUNDARY.
23078 2018-03-19  Richard Biener  <rguenther@suse.de>
23080         PR tree-optimization/84933
23081         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23082         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23084 2018-03-19  Richard Biener  <rguenther@suse.de>
23086         PR tree-optimization/84859
23087         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23088         (cond_if_else_store_replacement): Perform sinking operation on
23089         single-store BBs regardless of MAX_STORES_TO_SINK setting.
23090         Generalize what a BB with a single eligible store is.
23092 2018-03-19  Richard Biener  <rguenther@suse.de>
23094         PR tree-optimization/84929
23095         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23096         chrec_is_positive against non-chrec arg.
23098 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
23100         PR target/84711
23101         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23103 2018-03-18  Martin Liska  <mliska@suse.cz>
23105         PR rtl-optimization/84635
23106         * regrename.c (build_def_use): Use matches_mode only when
23107         matches >= 0.
23109 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
23111         PR tree-optimization/84913
23112         * tree-vect-loop.c (vectorizable_reduction): Don't try to
23113         vectorize chains of COND_EXPRs.
23115 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23117         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23119 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23121         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23123 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23125         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23127 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
23128             Kito Cheng  <kito.cheng@gmail.com>
23130         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23131         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23132         (nds32_adjust_reg_alloc_order): New function.
23133         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23135 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
23137         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23138         nds32_print_operand, nds32_print_operand_address): Use
23139         HOST_WIDE_INT_PRINT_DEC instead.
23141 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
23143         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23145 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
23147         PR target/84902
23148         * config/i386/i386.c (initial_ix86_tune_features,
23149         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23150         unsigned long long.
23151         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23152         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23153         rather than 1u << ix86_tune.  Formatting fix.
23154         (ix86_option_override_internal): Change ix86_arch_mask from
23155         unsigned int to unsigned HOST_WIDE_INT, initialize to
23156         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23157         (ix86_function_specific_restore): Likewise.
23159 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23161         PR target/84899
23162         * postreload.c (reload_combine_recognize_pattern): Perform
23163         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23164         truncate_int_for_mode the result for the destination's mode.
23166         PR c/84909
23167         * hsa-gen.c (mem_type_for_type): Fix comment typo.
23168         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23169         Likewise.
23170         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23171         Likewise.
23173 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
23175         PR target/84876
23176         * lra-assigns.c (lra_split_hard_reg_for): Don't use
23177         regno_allocno_class_array and sorted_pseudos.
23178         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23179         insns where regno is used.
23181 2018-03-16  Martin Liska  <mliska@suse.cz>
23183         PR ipa/84833
23184         * multiple_target.c (create_dispatcher_calls): Redirect
23185         reference in the symbol table.
23187 2018-03-16  Martin Liska  <mliska@suse.cz>
23189         PR ipa/84722
23190         * multiple_target.c (create_dispatcher_calls): Redirect also
23191         an alias.
23193 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23195         PR c++/79937
23196         PR c++/82410
23197         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23198         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23199         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23201 2018-03-16  Julia Koval  <julia.koval@intel.com>
23203         * doc/invoke.texi (Skylake Server): Add CLWB.
23204         Cannonlake): Remove CLWB.
23206 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23208         PR tree-optimization/84841
23209         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23210         1 << 3.
23211         (FLOAT_ONE_CONST_TYPE): Define.
23212         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23213         (sort_by_operand_rank): Put entries with higher constant_type last
23214         rather than first to match comments.
23216 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
23218         * config/nios2/nios2.md (movsi_internal): Fix thinko in
23219         split predicate.
23221 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23223         PR c++/79085
23224         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23225         check and use address of target always.
23227 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
23229         PR target/84574
23230         * config/i386/i386.c (indirect_thunk_needed): Update comments.
23231         (indirect_thunk_bnd_needed): Likewise.
23232         (indirect_thunks_used): Likewise.
23233         (indirect_thunks_bnd_used): Likewise.
23234         (indirect_return_needed): New.
23235         (indirect_return_bnd_needed): Likewise.
23236         (output_indirect_thunk_function): Add a bool argument for
23237         function return.
23238         (output_indirect_thunk_function): Don't generate alias for
23239         function return thunk.
23240         (ix86_code_end): Call output_indirect_thunk_function to generate
23241         function return thunks.
23242         (ix86_output_function_return): Set indirect_return_bnd_needed
23243         and indirect_return_needed instead of indirect_thunk_bnd_needed
23244         and indirect_thunk_needed.
23246 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
23248         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23249         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23250         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23252 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
23253             Paul Hua <paul.hua.gm@gmail.com>
23255         PR c/84852
23256         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23258 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
23260         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23261         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23262         resp. SFmode cases.
23264 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
23266         PR target/84711
23267         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23268         instead of GET_MODE_SIZE when comparing Units.
23270 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
23272         PR target/68256
23273         * varasm.c (hash_section): Return an unchangeble hash value
23274         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23275         Return !aarch64_can_use_per_function_literal_pools_p ().
23277 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23279         PR target/84860
23280         * optabs.c (emit_conditional_move): Pass address of cmode's copy
23281         rather than address of cmode as last argument to prepare_cmp_insn.
23283 2018-03-15  Julia Koval  <julia.koval@intel.com>
23285         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23286         F_AVX512VNNI, F_AVX512BITALG): New.
23288 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
23290         PR target/83451
23291         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
23292         insn for floating-point loads and stores.
23294 2018-03-14  Carl Love  <cel@us.ibm.com>
23296         * config/rs6000/rs6000-c.c: Add macro definitions for
23297         ALTIVEC_BUILTIN_VEC_PERMXOR.
23298         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23299         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23300         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23301         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23302         UNSPEC_VPERMXOR.
23303         * config/doc/extend.texi: Add prototypes for vec_permxor.
23305 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
23307         PR c/84852
23308         * diagnostic-show-locus.c (class layout_point): Convert m_line
23309         from int to linenum_type.
23310         (line_span::comparator): Use linenum "compare" function when
23311         comparing line numbers.
23312         (test_line_span): New function.
23313         (layout_range::contains_point): Convert param "row" from int to
23314         linenum_type.
23315         (layout_range::intersects_line_p): Likewise.
23316         (layout::will_show_line_p): Likewise.
23317         (layout::print_source_line): Likewise.
23318         (layout::should_print_annotation_line_p): Likewise.
23319         (layout::print_annotation_line): Likewise.
23320         (layout::print_leading_fixits): Likewise.
23321         (layout::annotation_line_showed_range_p): Likewise.
23322         (struct line_corrections): Likewise for field m_row.
23323         (line_corrections::line_corrections): Likewise for param "row".
23324         (layout::print_trailing_fixits): Likewise.
23325         (layout::get_state_at_point): Likewise.
23326         (layout::get_x_bound_for_row): Likewise.
23327         (layout::print_line): Likewise.
23328         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23329         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23330         * input.c (selftest::test_linenum_comparisons): New function.
23331         (selftest::input_c_tests): Call it.
23332         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23333         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23334         * selftest.h (ASSERT_GT): New macro.
23335         (ASSERT_GT_AT): New macro.
23336         (ASSERT_LT): New macro.
23337         (ASSERT_LT_AT): New macro.
23339 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
23341         PR rtl-optimization/84780
23342         * combine.c (distribute_links): Don't make a link based on pc_rtx.
23344 2018-03-14  Martin Liska  <mliska@suse.cz>
23346         * tree.c (record_node_allocation_statistics): Use
23347         get_stats_node_kind.
23348         (get_stats_node_kind): New function extracted from
23349         record_node_allocation_statistics.
23350         (free_node): Use get_stats_node_kind.
23352 2018-03-14  Richard Biener  <rguenther@suse.de>
23354         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23355         that the value-set of ANTIC_IN doesn't grow.
23357         Revert
23358         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23359         member.
23360         (BB_VISITED_WITH_VISITED_SUCCS): New define.
23361         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23363 2018-03-14  Julia Koval  <julia.koval@intel.com>
23365         * config.gcc (icelake-client, icelake-server): New.
23366         (icelake): Remove.
23367         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23368         (initial_ix86_arch_features): Ditto.
23369         (PTA_SKYLAKE): Add SGX.
23370         (PTA_ICELAKE): Remove.
23371         (PTA_ICELAKE_CLIENT): New.
23372         (PTA_ICELAKE_SERVER): New.
23373         (ix86_option_override_internal): Split up icelake on icelake client and
23374         icelake server.
23375         (get_builtin_code_for_version): Ditto.
23376         (fold_builtin_cpu): Ditto.
23377         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23378         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23379         * config/i386/i386.h (processor_type): Ditto.
23380         * doc/invoke.texi: Ditto.
23382 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
23384         PR sanitizer/83392
23385         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23386         INTEGER_CST offset, add it together with bitpos / 8 and
23387         sign extend based on POINTER_SIZE.
23389         PR target/84844
23390         Revert
23391         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
23393         PR target/78090
23394         * config/i386/constraints.md (Yc): New register constraint.
23395         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23396         Use Yc constraint for alternative 2 of operand 0.  Remove
23397         preferred_for_speed attribute.
23399 2018-03-14  Richard Biener  <rguenther@suse.de>
23401         PR tree-optimization/84830
23402         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23403         with the old one to avoid oscillations.
23405 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
23407         PR target/83712
23408         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23409         pseudos.
23410         (assign_by_spills): Return a flag of reload assignment failure.
23411         Do not process the reload assignment failures.  Do not spill other
23412         reload pseudos if they has the same reg class.  Update n if
23413         necessary.
23414         (lra_assign): Add a return arg.  Set up from the result of
23415         assign_by_spills call.
23416         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23417         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23418         usage_insns if it is not NULL.
23419         (spill_hard_reg_in_range): New function.
23420         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23421         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23422         function prototypes.
23423         (lra_assign): Change prototype.
23424         * lra.c (lra): Add code to deal with fails by splitting hard reg
23425         live ranges.
23427 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
23429         * config/riscv/riscv.opt (mrelax): New option.
23430         * config/riscv/riscv.c (riscv_file_start): Emit ".option
23431         "norelax" when riscv_mrelax is disabled.
23432         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23434 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23436         PR target/84743
23437         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23438         reassociation for int modes.
23440 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23442         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23443         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23444         for big-endian.
23445         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23446         * config/aarch64/aarch64-sve.md
23447         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23448         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23449         (*extend<mode><Vwide>2): Rename to...
23450         (aarch64_sve_extend<mode><Vwide>2): ...this.
23451         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23452         renaming the old pattern to...
23453         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
23454         unsigned packs.
23455         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23456         define_expand, renaming the old pattern to...
23457         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23458         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23459         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23460         account when deciding which SVE instruction the optab should use.
23461         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23463 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23465         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23466         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23467         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23468         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23469         (tlsdesc_small_<mode>): Turn a define_expand and use
23470         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
23471         (tlsdesc_small_advsimd_<mode>): ...this.
23472         (tlsdesc_small_sve_<mode>): New pattern.
23474 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23476         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23477         (UNSPEC_UMUL_HIGHPART): New constants.
23478         (MUL_HIGHPART): New int iteraor.
23479         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23480         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23481         define_expand.
23482         (*<su>mul<mode>3_highpart): New define_insn.
23484 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23486         PR lto/84805
23487         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23488         incomplete types.
23490 2018-03-13  Martin Liska  <mliska@suse.cz>
23492         PR ipa/84658.
23493         * (sem_item_optimizer::sem_item_optimizer): Initialize new
23494         vector.
23495         (sem_item_optimizer::~sem_item_optimizer): Release it.
23496         (sem_item_optimizer::merge_classes): Register variable aliases.
23497         (sem_item_optimizer::fixup_pt_set): New function.
23498         (sem_item_optimizer::fixup_points_to_sets): Likewise.
23499         * ipa-icf.h: Declare new variables and functions.
23501 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
23503         PR middle-end/84834
23504         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23505         integer_pow2p@2 and test integer_pow2p in condition.
23506         (A < 0 ? C : 0): Similarly for @1.
23508         PR middle-end/84831
23509         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23510         characters starting at p contain '\0' character, don't look beyond
23511         that.
23513         PR target/84827
23514         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23515         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23517         PR target/84828
23518         * reg-stack.c (change_stack): Change update_end var from int to
23519         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23520         also call set_block_for_insn on the newly added insns and rescan.
23522         PR target/84786
23523         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23524         on the last operand.
23526         PR c++/84704
23527         * tree.c (stabilize_reference_1): Return save_expr (e) for
23528         STATEMENT_LIST even if it doesn't have side-effects.
23530 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
23532         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23534 2018-03-12  Renlin Li  <renlin.li@arm.com>
23536         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23537         aarch64_output_scalar_simd_mov_immediate.
23539 2018-03-12  Martin Sebor  <msebor@redhat.com>
23541         PR tree-optimization/83456
23542         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23543         for perfectly overlapping calls to memcpy.
23544         (gimple_fold_builtin_memory_chk): Same.
23545         (gimple_fold_builtin_strcpy): Handle no-warning.
23546         (gimple_fold_builtin_stxcpy_chk): Same.
23547         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23549 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
23551         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23552         parameter.  Use it for SFmode.
23553         (rs6000_function_arg_advance_1): Adjust.
23554         (rs6000_function_arg): Adjust.
23555         (rs6000_gimplify_va_arg): Pass false for that new parameter.
23557 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
23559         PR rtl-optimization/84169
23560         PR rtl-optimization/84780
23561         * combine.c (can_combine_p): Check for a 2-insn combination whether
23562         the destination register is used between the two insns, too.
23564 2018-03-12  Richard Biener  <rguenther@suse.de>
23566         PR tree-optimization/84803
23567         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23568         for refs DR analysis didn't process.
23570 2018-03-12  Richard Biener  <rguenther@suse.de>
23572         PR tree-optimization/84777
23573         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23574         force-vectorize loops ignore whether we are optimizing for size.
23576 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
23578         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23579         (TARGET_MD_ASM_ADJUST): Define.
23581 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
23582             Kito Cheng  <kito.cheng@gmail.com>
23583             Chung-Ju Wu  <jasonwucj@gmail.com>
23585         * config/nds32/nds32.c (nds32_compute_stack_frame,
23586         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23587         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23588         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23589         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23590         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23591         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23592         * config/nds32/nds32.md (prologue, epilogue): Use macro
23593         NDS32_V3PUSH_AVAILABLE_P to do checking.
23595 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
23597         PR debug/58150
23598         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23599         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23600         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
23601         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
23602         addition of most attributes on !orig_type_die or the attribute not
23603         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23605 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23606             Chung-Ju Wu  <jasonwucj@gmail.com>
23608         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23609         __NDS32_VH__ macro.
23610         * config/nds32/nds32.opt (mvh): New option.
23612 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23613             Chung-Ju Wu  <jasonwucj@gmail.com>
23615         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23616         function.
23617         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23618         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23619         definition.
23621 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23622             Chung-Ju Wu  <jasonwucj@gmail.com>
23624         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23625         function.
23626         * config/nds32/nds32-multiple.md (strlensi): New pattern.
23627         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23629 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
23630             Kito Cheng  <kito.cheng@gmail.com>
23631             Chung-Ju Wu  <jasonwucj@gmail.com>
23633         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23634         UNSPEC_FFMISM and UNSPEC_FLMISM.
23635         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23636         for ffb, ffmism and flmism.
23637         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23638         (unspec_ffmism): Ditto.
23639         (unspec_flmism): Ditto.
23640         (nds32_expand_builtin_impl): Check if string extension is available.
23641         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23642         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23644 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
23646         Reverting patch:
23647         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23649         PR target/83712
23650         * lra-assigns.c (assign_by_spills): Return a flag of reload
23651         assignment failure.  Do not process the reload assignment
23652         failures.  Do not spill other reload pseudos if they has the same
23653         reg class.
23654         (lra_assign): Add a return arg.  Set up from the result of
23655         assign_by_spills call.
23656         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23657         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23658         usage_insns if it is not NULL.
23659         (spill_hard_reg_in_range): New function.
23660         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23661         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23662         function prototypes.
23663         (lra_assign): Change prototype.
23664         * lra.c (lra): Add code to deal with fails by splitting hard reg
23665         live ranges.
23667 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
23669         PR target/84807
23670         * config/i386/i386.opt: Replace Enforcment with Enforcement.
23672 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
23674         PR debug/84620
23675         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23676         (dw_val_node): Add val_symbolic_view.
23677         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23678         (symview_upper_bound): New.
23679         (new_line_info_table): Initialize symviews_since_reset.
23680         (dwarf2out_source_line): Count symviews_since_reset and set
23681         symview_upper_bound.
23682         (dw_val_equal_p): Handle symview.
23683         (add_AT_symview): New.
23684         (print_dw_val): Handle symview.
23685         (attr_checksum, attr_checksum_ordered): Likewise.
23686         (same_dw_val_p, size_of_die): Likewise.
23687         (value_format, output_die): Likewise.
23688         (add_high_low_attributes): Use add_AT_symview for entry_view.
23689         (dwarf2out_finish): Reset symview_upper_bound, clear
23690         zero_view_p.
23692 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
23694         PR target/83969
23695         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23696         Add strict argument and use it.
23697         (rs6000_split_multireg_move): Update for new strict argument.
23698         (mem_operand_gpr): Disallow all non-offsettable addresses.
23699         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23701 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
23703         PR target/84772
23704         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23705         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23706         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23708         PR c++/84767
23709         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23710         decl, use remap_type if we want to use the type.
23712 2018-03-09  Martin Sebor  <msebor@redhat.com>
23714         PR tree-optimization/84526
23715         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23716         Remove dead code.
23717         (builtin_access::generic_overlap): Be prepared to handle non-array
23718         base objects.
23720 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
23722         PR rtl-optimization/84682
23723         * lra-constraints.c (process_address_1): Check is_address flag
23724         for address constraints.
23725         (process_alt_operands): Likewise.
23726         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23727         preprocess_constraints.
23728         * recog.h (preprocess_constraints): Add oploc parameter.
23729         Adjust callers.
23730         * recog.c (preprocess_constraints): Test address_operand for
23731         CT_ADDRESS constraints.
23733 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23735         PR target/83712
23736         * lra-assigns.c (assign_by_spills): Return a flag of reload
23737         assignment failure.  Do not process the reload assignment
23738         failures.  Do not spill other reload pseudos if they has the same
23739         reg class.
23740         (lra_assign): Add a return arg.  Set up from the result of
23741         assign_by_spills call.
23742         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23743         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23744         usage_insns if it is not NULL.
23745         (spill_hard_reg_in_range): New function.
23746         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23747         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23748         function prototypes.
23749         (lra_assign): Change prototype.
23750         * lra.c (lra): Add code to deal with fails by splitting hard reg
23751         live ranges.
23753 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23755         PR target/83193
23756         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23757         Accept complain bool parameter.  Only emit errors if it is true.
23758         (arm_parse_cpu_option_name): Likewise.
23759         (arm_target_thumb_only): Adjust callers of the above.
23760         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23761         prototype to take a default true bool parameter.
23762         (arm_parse_arch_option_name): Likewise.
23764 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
23765             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
23767         PR jit/64089
23768         PR jit/84288
23769         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23770         * configure: Regenerate.
23771         * configure.ac ("linker --version-script option"): New.
23772         ("linker soname option"): New.
23774 2018-03-09  Richard Biener  <rguenther@suse.de>
23776         PR tree-optimization/84775
23777         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23778         immediate uses of predicate stmts and mark them modified.
23780         Revert
23781         PR tree-optimization/84178
23782         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23783         to caller.
23784         (version_loop_for_if_conversion): Delay update_ssa call.
23785         (tree_if_conversion): Delay update_ssa until after predicate
23786         insertion.
23788 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
23790         PR target/84763
23791         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23792         when the function accesses prior frames.
23794 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
23796         PR debug/84456
23797         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23798         gen_llsym, otherwise call maybe_gen_llsym.
23800         PR inline-asm/84742
23801         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23802         has ',' character inside of it.
23804 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23806         PR target/84748
23807         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23808         as clobbering CC_REGNUM.
23810 2018-03-08  Richard Biener  <rguenther@suse.de>
23812         PR middle-end/84552
23813         * tree-scalar-evolution.c: Include tree-into-ssa.h.
23814         (follow_copies_to_constant): Do not follow SSA names registered
23815         for update.
23817 2018-03-08  Richard Biener  <rguenther@suse.de>
23819         PR tree-optimization/84178
23820         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23821         to caller.
23822         (version_loop_for_if_conversion): Delay update_ssa call.
23823         (tree_if_conversion): Delay update_ssa until after predicate
23824         insertion.
23826 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
23828         PR tree-optimization/84178
23829         * tree-if-conv.c (release_bb_predicate): Remove the
23830         the assertion that the stmts have NULL use_ops.
23831         Discard the statements, asserting that they haven't
23832         yet been added to a BB.
23834 2018-03-08  Richard Biener  <rguenther@suse.de>
23836         PR tree-optimization/84746
23837         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23838         (phi_translate): Pass in destination ANTIC_OUT set.
23839         (phi_translate_1): Likewise.  For a simplified result lookup
23840         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23841         (phi_translate_set): Adjust.
23842         (do_pre_regular_insertion): Likewise.
23843         (do_pre_partial_partial_insertion): Likewise.
23845 2018-03-08  Martin Liska  <mliska@suse.cz>
23847         PR gcov-profile/84735
23848         * doc/gcov.texi: Document usage of profile files.
23849         * gcov-io.h: Document changes in the format.
23851 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
23853         PR debug/84404
23854         PR debug/84408
23855         * dwarf2out.c (struct dw_line_info_table): Update comments for
23856         view == -1.
23857         (FORCE_RESET_NEXT_VIEW): New.
23858         (FORCE_RESETTING_VIEW_P): New.
23859         (RESETTING_VIEW_P): Check for -1 too.
23860         (ZERO_VIEW_P): Likewise.
23861         (new_line_info_table): Force-reset next view.
23862         (dwarf2out_begin_function): Likewise.
23863         (dwarf2out_source_line): Simplify zero_view_p initialization.
23864         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23865         view directly.  Omit view when omitting .loc at line 0.
23867 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
23869         PR tree-optimization/84740
23870         * tree-switch-conversion.c (process_switch): Call build_constructors
23871         only if info.phi_count is non-zero.
23873         PR tree-optimization/84739
23874         * tree-tailcall.c (find_tail_calls): Check call arguments against
23875         DECL_ARGUMENTS (current_function_decl) rather than
23876         DECL_ARGUMENTS (func) when checking for tail recursion.
23878 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
23880         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23881         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23882         Volker Reichelt's entry and add entries for people that perform
23883         GCC fuzzy testing and report numerous bugs.
23885 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
23887         PR target/82411
23888         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23889         readonly data in sdata, if that is disabled.
23890         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23891         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23892         -mreadonly-in-sdata option.
23894 2018-03-07  Martin Sebor  <msebor@redhat.com>
23896         PR tree-optimization/84468
23897         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23898         basic block when looking for nul assignment.
23900 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
23902         PR target/84277
23903         * except.h (output_function_exception_table): Adjust prototype.
23904         * except.c (output_function_exception_table): Remove FNNAME parameter
23905         and add SECTION parameter.  Ouput one part of the table at a time.
23906         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23907         the first part of the exception table and emit unwind directives.
23908         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23909         (i386_pe_seh_cold_init): Likewise.
23910         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23911         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23912         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23913         (ix86_output_call_insn): Emit a nop in one more case for SEH.
23914         * config/i386/winnt.c: Include except.h.
23915         (struct seh_frame_state): Add reg_offset, after_prologue and
23916         in_cold_section fields.
23917         (i386_pe_seh_end_prologue): Set seh->after_prologue.
23918         (i386_pe_seh_cold_init): New function.
23919         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23920         to seh->in_cold_section.
23921         (seh_emit_push): Record the offset of the push.
23922         (seh_emit_save): Record the offet of the save.
23923         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23924         Test seh->after_prologue to disregard the epilogue.
23925         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23926         (i386_pe_end_cold_function): New function.
23928 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
23930         PR fortran/84565
23931         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23932         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23934         PR c++/84704
23935         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23936         on tmp_var.
23937         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23938         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23940         PR middle-end/84723
23941         * multiple_target.c: Include tree-inline.h and intl.h.
23942         (expand_target_clones): Diagnose and fail if node->definition and
23943         !tree_versionable_function_p (node->decl).
23945 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
23947         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23948         sprint_ul.
23949         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23950         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23951         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23953 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23955         PR target/84710
23956         * combine.c (try_combine): Use reg_or_subregno instead of handling
23957         just paradoxical SUBREGs and REGs.
23959 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
23961         * config/arc/arc.c (arc_finalize_pic): Remove function.
23962         (arc_must_save_register): We use single base PIC register, remove
23963         checks to save/restore the PIC register.
23964         (arc_expand_prologue): Likewise.
23965         * config/arc/arc-protos.h (arc_set_default_type_attributes):
23966         Remove.
23967         (arc_verify_short): Likewise.
23968         (arc_attr_type): Likewise.
23969         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23970         (walk_stores): Likewise.
23971         (arc_address_cost): Make it static.
23972         (arc_verify_short): Likewise.
23973         (branch_dest): Likewise.
23974         (arc_attr_type): Likewise.
23975         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23976         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23977         (arc_final_prescan_insn): Remove inserting the nops due to
23978         hardware hazards.  It is done in reorg step.
23979         (insn_length_variant_t): Remove.
23980         (insn_length_parameters_t): Likewise.
23981         (arc_insn_length_parameters): Likewise.
23982         (arc_get_insn_variants): Likewise.
23983         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23985 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23987         PR inline-asm/84683
23988         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23989         assertion failure.
23991         PR tree-optimization/84687
23992         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23993         on new_node->decl.
23994         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23996 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23998         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23999         Rename to ppc_speculation_barrier.
24000         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24001         __builtin_ppc_speculation_barrier.
24003 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
24005         PR target/84700
24006         * combine.c (combine_simplify_rtx): Don't try to simplify if
24007         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24008         are equal to x.
24010 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
24012         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24013         to 32 bytes when compiling for POWER9.
24015 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
24017         PR target/84564
24018         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24019         regparm >= 3 with no arg reg available also for calls with
24020         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
24022         PR target/84524
24023         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24024         orig,vex.
24025         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
24027 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
24029         PR target/84264
24030         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24032 2018-03-05  Richard Biener  <rguenther@suse.de>
24034         PR tree-optimization/84486
24035         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24036         When inserting a __builtin_assume_aligned call set the LHS
24037         SSA name alignment info accordingly.
24039 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
24041         PR tree-optimization/84114
24042         * config/aarch64/aarch64.c (aarch64_reassociation_width)
24043         Avoid reassociation of FLOAT_MODE addition.
24045 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
24047         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24048         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24049         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24050         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24051         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24052         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24053         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24054         and -mwbnoinvd.
24055         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24056         __builtin_ia32_wbinvd): New builtins.
24057         (SPECIAL_ARGS2): New.
24058         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24059         (SPECIAL_ARGS2): New.
24060         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24061         (ix86_valid_target_attribute_inner_p): Ditto.
24062         (ix86_init_mmx_sse_builtins): Add special_args2.
24063         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24064         TARGET_WBNOINVD_P): New.
24065         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24066         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24067         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24068         * config/i386/immintrin.h (_wbinvd): New intrinsic.
24069         * config/i386/pconfigintrin.h: New file.
24070         * config/i386/wbnoinvdintrin.h: Ditto.
24071         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24072         wbnoinvdintrin.h.
24073         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24075 2018-03-05  Richard Biener  <rguenther@suse.de>
24077         PR tree-optimization/84670
24078         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24079         member.
24080         (BB_VISITED_WITH_VISITED_SUCCS): New define.
24081         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24082         (compute_antic_aux): Only assert the number of values in ANTIC_IN
24083         doesn't grow if all successors (recursively) were visited at least
24084         once.
24086 2018-03-05  Richard Biener  <rguenther@suse.de>
24088         PR tree-optimization/84650
24089         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24090         if executed in the loop pipeline.
24092 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
24094         * doc/configfiles.texi (Configuration Files): Move info about
24095         conditionalizing $target-protos.h to...
24096         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
24097         differs from $target-protos.h.
24099 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
24100             Chung-Ju Wu  <jasonwucj@gmail.com>
24102         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24103         * config/nds32/nds32-multiple.md (setmemsi): Define.
24104         * config/nds32/nds32-memory-manipulation.c
24105         (nds32_gen_dup_4_byte_to_word_value): New.
24106         (emit_setmem_word_loop): New.
24107         (emit_setmem_byte_loop): New.
24108         (nds32_expand_setmem_loop): New.
24109         (nds32_expand_setmem_loop_v3m): New.
24110         (nds32_expand_setmem_unroll): New.
24111         (nds32_expand_setmem): New.
24113 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24114             Chung-Ju Wu  <jasonwucj@gmail.com>
24116         * config/nds32/nds32-memory-manipulation.c
24117         (nds32_emit_load_store): New.
24118         (nds32_emit_post_inc_load_store): New.
24119         (nds32_emit_mem_move): New.
24120         (nds32_emit_mem_move_block): New.
24121         (nds32_expand_movmemsi_loop_unknown_size): New.
24122         (nds32_expand_movmemsi_loop_known_size): New.
24123         (nds32_expand_movmemsi_loop): New.
24124         (nds32_expand_movmemsi_unroll): New.
24125         (nds32_expand_movmemqi): Rename ...
24126         (nds32_expand_movmemsi): ... to this.
24127         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24128         (movmemsi): ... to this.
24129         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24130         (nds32_expand_movmemsi): ... to this.
24132 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24133             Monk Chiang  <sh.chiang04@gmail.com>
24134             Chung-Ju Wu  <jasonwucj@gmail.com>
24136         * config/nds32/nds32-protos.h
24137         (nds32_expand_load_multiple): New arguments.
24138         (nds32_expand_store_multiple): Ditto.
24139         (nds32_valid_multiple_load_store): Rename ...
24140         (nds32_valid_multiple_load_store_p): ... to this.
24141         * config/nds32/nds32-memory-manipulation.c
24142         (nds32_expand_load_multiple): Refine implementation.
24143         (nds32_expand_store_multiple): Ditto.
24144         * config/nds32/nds32-multiple.md
24145         (load_multiple): Update nds32_expand_load_multiple interface.
24146         (store_multiple): Update nds32_expand_store_multiple interface.
24147         * config/nds32/nds32-predicates.c
24148         (nds32_valid_multiple_load_store): Rename ...
24149         (nds32_valid_multiple_load_store_p): ... to this and refine
24150         implementation.
24151         * config/nds32/predicates.md
24152         (nds32_load_multiple_and_update_address_operation): New predicate.
24153         (nds32_store_multiple_and_update_address_operation): New predicate.
24155 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24156             Chung-Ju Wu  <jasonwucj@gmail.com>
24158         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24159         (combo): New attribute.
24160         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24162 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
24164         * config/nds32/nds32.opt: Change -mcmodel= default value.
24166 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
24167             Monk Chiang  <sh.chiang04@gmail.com>
24168             Chung-Ju Wu  <jasonwucj@gmail.com>
24170         * config/nds32/constants.md (unspec_element): New enum.
24171         * config/nds32/constraints.md (Umw): New constraint.
24172         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24173         * config/nds32/nds32-intrinsic.md: Likewise.
24174         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24175         (nds32_valid_smw_lwm_base_p): New.
24176         (nds32_output_smw_single_word): New.
24177         (nds32_output_lmw_single_word): New.
24178         (nds32_expand_unaligned_load): New.
24179         (nds32_expand_unaligned_store): New.
24180         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24181         (nds32_output_smw_single_word): Declare.
24182         (nds32_output_lmw_single_word): Declare.
24183         (nds32_expand_unaligned_load): Declare.
24184         (nds32_expand_unaligned_store): Declare.
24185         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24186         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24187         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24188         NDS32_BUILTIN_UASTORE_DW.
24189         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24190         predicate.
24192 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
24193             Kito Cheng  <kito.cheng@gmail.com>
24194             Chung-Ju Wu  <jasonwucj@gmail.com>
24196         * config/nds32/nds32-intrinsic.c
24197         (nds32_expand_builtin_null_ftype_reg): Delete.
24198         (nds32_expand_builtin_reg_ftype_imm): Ditto.
24199         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24200         (nds32_read_argument): New.
24201         (nds32_legitimize_target): Ditto.
24202         (nds32_legitimize_argument): Ditto.
24203         (nds32_check_constant_argument): Ditto.
24204         (nds32_expand_unop_builtin): Ditto.
24205         (nds32_expand_unopimm_builtin): Ditto.
24206         (nds32_expand_binop_builtin): Ditto.
24207         (nds32_builtin_decl_impl): Ditto.
24208         (builtin_description): Ditto.
24209         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24210         (nds32_init_builtins_impl): Ditto.
24211         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24212         (nds32_builtin_decl): New.
24213         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24214         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24216 2018-03-02  Jeff Law  <law@redhat.com>
24218         * reorg.c (stop_search_p): Handle DEBUG_INSN.
24219         (redundant_insn, fill_simple_delay_slots): Likewise.
24220         (fill_slots_from_thread): Likewise.
24221         * resource.c (mark_referenced_resources): Likewise.
24222         (mark_set_resources, find_dead_or_set_registers): Likewise.
24224 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24226         * substring-locations.h (format_warning_va): Formatting fix for
24227         ATTRIBUTE_GCC_DIAG.
24228         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24229         argument.
24230         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24231         * substring-locations.c: Include intl.h.
24232         (format_warning_va): Turned into small wrapper around
24233         format_warning_n_va, renamed to ...
24234         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24235         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24236         use ngettext.
24237         (format_warning_at_substring_n): New function.
24238         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24239         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
24240         format_warning_at_substring with just a shorter name instead of
24241         const function pointer.
24242         (fmtwarn_n): New function.
24243         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24244         appropriate, get rid of all the fmtstr temporaries, move conditionals
24245         with G_() wrapped string literals directly into fmtwarn arguments,
24246         cast dir.len to (int), formatting fixes.
24248 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
24250         * doc/invoke.texi: Remove "Cilk Plus" references.
24252 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24253             Richard Biener  <rguenther@suse.de>
24255         PR ipa/84628
24256         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24257         for error or warning attributes if CALL_FROM_THUNK_P is set.
24258         Formatting fixes.
24260 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24262         PR target/56540
24263         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24264         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24266         PR target/56540
24267         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24268         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24270         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24271         instead of -1U in last predictors element's probability member.
24273 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
24275         PR ipa/83983
24276         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24277         arguments if they are comparable.
24279 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24281         PR tree-optimization/84634
24282         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24283         masks and masked_loop_p with a single loop_masks, making sure it's
24284         null for bb vectorization.
24286 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24288         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24289         (vect_analyze_data_ref_access): Use loop->safe_len rather than
24290         loop->force_vectorize to check whether there is no alias.
24292 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24294         PR target/84614
24295         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24296         prototypes.
24297         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24298         comments.
24299         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24300         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24301         instead of a loop around prev_real_insn.
24302         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24303         prev_real_insn.
24305         PR inline-asm/84625
24306         * config/i386/i386.c (ix86_print_operand): Use conditional
24307         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24308         zero vector.
24310 2018-03-02  Richard Biener  <rguenther@suse.de>
24312         PR tree-optimization/84427
24313         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24314         (bitmap_set_subtract_values): Rewrite to handle multiple
24315         exprs per value.
24316         (clean): Likewise.
24317         (prune_clobbered_mems): Likewise.
24318         (phi_translate): Take edge instead of pred/phiblock.
24319         (phi_translate_1): Likewise.
24320         (phi_translate_set): Likewise.  Insert all translated
24321         exprs for a value into the set, keeping possibly multiple
24322         expressions per value.
24323         (compute_antic_aux): Adjust for phi_translate changes.
24324         When intersecting union the expressions and prune those
24325         not in the final value set, keeping possibly multiple
24326         expressions per value.  Do not use value-insertion
24327         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24328         all expressions.  Add verification that the value-sets
24329         only shrink during iteration.
24330         (compute_partial_antic_aux): Adjust for the phi_translate changes.
24331         (do_pre_regular_insertion): Likewise.
24332         (do_pre_partial_partial_insertion): Likewise.
24334 2018-03-02  Richard Biener  <rguenther@suse.de>
24336         PR target/82005
24337         * config/darwin.c (saved_debug_info_level): New static global.
24338         (darwin_asm_lto_start): Disable debug info generation for LTO out.
24339         (darwin_asm_lto_end): Restore debug info generation settings.
24341 2018-03-01  Martin Liska  <mliska@suse.cz>
24343         PR sanitizer/82484
24344         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24345         volatile arguments.
24347 2018-03-01  Richard Biener  <rguenther@suse.de>
24349         PR debug/84645
24350         * dwarf2out.c (gen_variable_die): Properly handle late VLA
24351         type annotation with LTO when debug was disabled at compile-time.
24353 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
24355         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24356         XINT with INTVAL.
24357         (mips_final_postscan_insn): Likewise.
24359 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
24361         PR rtl-optimization/84528
24362         * alias.c (init_alias_target): Add commentary.
24363         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24364         a unique base value if the frame pointer is not eliminated
24365         to the stack pointer.
24367 2018-03-01  Tom de Vries  <tom@codesourcery.com>
24369         PR rtl-optimization/83327
24370         * lra-int.h (hard_regs_spilled_into): Declare.
24371         * lra.c (hard_regs_spilled_into): Define.
24372         (init_reg_info): Init hard_regs_spilled_into.
24373         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24374         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24375         (process_bb_lives): Handle hard_regs_spilled_into.
24376         (lra_create_live_ranges_1): Before doing liveness propagation, clear
24377         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24379 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
24381         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24382         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24383         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24384         * config/rs6000/aix72.h: New file.
24386 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
24388         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24389         instead of warning_at with conditional singular and plural messages
24390         where possible.
24392         PR target/52991
24393         * stor-layout.c (update_alignment_for_field): For
24394         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24395         && !DECL_PACKED (field), do the alignment update, just use
24396         only desired_align instead of MAX (type_align, desired_align)
24397         as the alignment.
24398         (place_field): Don't do known_align < desired_align handling
24399         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24400         is non-NULL, instead do it after rli->prev_field handling and
24401         only if not within a bitfield word.  For DECL_PACKED (field)
24402         use type_align of BITS_PER_UNIT.
24404 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
24406         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24407         superfluous parentheses and trailing spaces.
24409 2018-02-28  Richard Biener  <rguenther@suse.de>
24411         PR tree-optimization/84584
24412         * graphite-scop-detection.c (scop_detection::add_scop): Discard
24413         SCoPs with fake exit edge.
24415 2018-02-28  Martin Liska  <mliska@suse.cz>
24417         PR testsuite/84597
24418         * timevar.c (timer::print): Fix format to properly print 100%
24419         values.
24421 2018-02-28  Richard Biener  <rguenther@suse.de>
24423         PR middle-end/84607
24424         * genmatch.c (capture_info::walk_match): Do not mark
24425         captured expressions without operands as expr_p given
24426         they act more like predicates and should be subject to
24427         "lost tail" side-effect preserving.
24429 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
24431         PR rtl-optimization/81611
24432         * auto-inc-dec.c (attempt_change): Move dead note from
24433         mem_insn if it's the next use of regno
24434         (find_address): Take address use of reg holding
24435         non-incremented value.  Add parm to limit search to the named
24436         reg only.
24437         (merge_in_block): Attempt to use a mem insn that is the next
24438         use of the original regno.
24440 2018-02-27  Martin Sebor  <msebor@redhat.com>
24442         PR c++/83871
24443         * doc/invoke.texi (-Wmissing-attributes): New option.
24444         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24446 2018-02-27  Martin Sebor  <msebor@redhat.com>
24448         PR translation/84207
24449         * diagnostic-core.h (warning_n, error_n, inform_n): Change
24450         n argument to unsigned HOST_WIDE_INT.
24451         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24452         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
24453         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24454         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24456 2018-02-27  Richard Biener  <rguenther@suse.de>
24458         PR tree-optimization/84512
24459         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24460         Do not use the estimate returned from record_stmt_cost for
24461         the scalar iteration cost but sum properly using add_stmt_cost.
24463 2018-02-27  Richard Biener  <rguenther@suse.de>
24465         PR tree-optimization/84466
24466         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24467         Adjust last change to less strictly validate use operands.
24469 2018-02-27  Martin Liska  <mliska@suse.cz>
24471         PR gcov-profile/84548
24472         * gcov.c (process_file): Allow partial overlap and consider it
24473         also as group functions.
24474         (output_lines): Properly calculate range of lines for a group.
24476 2018-02-27  Martin Liska  <mliska@suse.cz>
24478         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24479         'ggc' suffixes.  Change first column width.
24480         (timer::print): Fix formatting of the column.
24482 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
24484         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24485         preserve inline entry blocks for the sake of debug inline
24486         entry point markers alone.
24487         (remove_unused_locals): Suggest in comments a better place to
24488         force the preservation of inline entry blocks that are
24489         otherwise unused, but do not preserve them.
24491 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24493         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24495 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24497         PR target/84039
24498         * config/i386/constraints.md (Bs): Replace
24499         ix86_indirect_branch_register with
24500         TARGET_INDIRECT_BRANCH_REGISTER.
24501         (Bw): Likewise.
24502         * config/i386/i386.md (indirect_jump): Likewise.
24503         (tablejump): Likewise.
24504         (*sibcall_memory): Likewise.
24505         (*sibcall_value_memory): Likewise.
24506         Peepholes of indirect call and jump via memory: Likewise.
24507         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24508         (*sibcall_value_GOT_32): Likewise.
24509         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24510         (GOT_memory_operand): Likewise.
24511         (call_insn_operand): Likewise.
24512         (sibcall_insn_operand): Likewise.
24513         (GOT32_symbol_operand): Likewise.
24514         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24516 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
24518         PR rtl-optimization/83496
24519         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24520         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
24521         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24522         redundant insn, if any.
24523         (relax_delay_slots): Likewise.
24524         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24526 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
24528         PR tree-optimization/83965
24529         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24530         that grouped statements are part of a reduction chain.  Return
24531         true if the statement is not marked as a reduction itself but
24532         is part of a group.
24533         (vect_recog_dot_prod_pattern): Don't check whether the statement
24534         is part of a group here.
24535         (vect_recog_sad_pattern): Likewise.
24536         (vect_recog_widen_sum_pattern): Likewise.
24538 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
24540         PR debug/84545
24541         * final.c (rest_of_clean_state): Also look for calls inside sequences.
24543 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24545         PR target/84530
24546         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24547         the bool argument.
24548         (ix86_output_indirect_function_return): New prototype.
24549         (ix86_split_simple_return_pop_internal): Likewise.
24550         * config/i386/i386.c (indirect_return_via_cx): New.
24551         (indirect_return_via_cx_bnd): Likewise.
24552         (indirect_thunk_name): Handle return va CX_REG.
24553         (output_indirect_thunk_function): Create alias for
24554         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24555         (ix86_output_indirect_jmp): Remove the bool argument.
24556         (ix86_output_indirect_function_return): New function.
24557         (ix86_split_simple_return_pop_internal): Likewise.
24558         * config/i386/i386.md (*indirect_jump): Don't pass false
24559         to ix86_output_indirect_jmp.
24560         (*tablejump_1): Likewise.
24561         (simple_return_pop_internal): Change it to define_insn_and_split.
24562         Call ix86_split_simple_return_pop_internal to split it for
24563         -mfunction-return=.
24564         (simple_return_indirect_internal): Call
24565         ix86_output_indirect_function_return instead of
24566         ix86_output_indirect_jmp.
24568 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
24570         PR bootstrap/84405
24571         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24572         memset and value initialization afterwards.
24574 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
24576         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24578 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24580         PR target/84521
24581         * common/config/aarch64/aarch64-common.c
24582         (aarch_option_optimization_table[]): Switch
24583         off fomit-frame-pointer
24585 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
24586             Chung-Ju Wu  <jasonwucj@gmail.com>
24588         * config/nds32/nds32-multiple.md (load_multiple): Disallow
24589         volatile memory.
24590         (store_multiple): Ditto.
24592 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
24594         * config.gcc: Add --with-cpu support for nds32 target.
24595         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24596         * config/nds32/nds32.opt: Add -mcpu= option.
24598 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
24600         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24601         isel=yes): Warn for these deprecated options.
24603 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
24605         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24606         ISA_2_5_MASKS_EMBEDDED.
24608 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
24610         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24611         p->max as pointers rather than using iterative_hash_expr.
24613 2018-02-23  Carl Love  <cel@us.ibm.com>
24615         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24616         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24617         BU_P8V_OVERLOAD_2.
24618         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24619         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24620         P8V_BUILTIN_VEC_VUNSIGNED2.
24622 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
24624         PR target/81572
24625         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24626         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24627         LRA_UNKNOWN_ALT.
24628         * lra-constraints.c (curr_insn_transform): Set up
24629         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
24630         LRA_UNKNOWN_ALT.
24631         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24632         * lra-eliminations.c (spill_pseudos): Ditto.
24633         (process_insn_for_elimination): Ditto.
24634         * lra-lives.c (reg_early_clobber_p): Use the new macros.
24635         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24636         LRA_NON_CLOBBERED_ALT.
24638 2018-02-22  Martin Sebor  <msebor@redhat.com>
24640         PR tree-optimization/84480
24641         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24642         to maybe_diag_stxncpy_trunc.  Call it.
24643         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24644         from gimple_fold_builtin_strcpy.  Print inlining stack.
24645         (handle_builtin_stxncpy): Print inlining stack.
24646         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24648 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
24650         PR target/84176
24651         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24652         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24653         and -fcheck-pointer-bounds are used together.
24654         (indirect_thunk_prefix): New enum.
24655         (indirect_thunk_need_prefix): New function.
24656         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
24657         "_nt" instead of "_bnd" for NOTRACK prefix.
24658         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24659         (output_indirect_thunk_function): Likewise.
24660         (): Likewise.
24661         (ix86_code_end): Update output_indirect_thunk_function calls.
24662         (ix86_output_indirect_branch_via_reg): Replace
24663         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24664         (ix86_output_indirect_branch_via_push): Likewise.
24665         (ix86_output_function_return): Likewise.
24666         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24667         incompatible with -fcf-protection=branch and
24668         -fcheck-pointer-bounds.
24670 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24672         PR target/83335
24673         * config/aarch64/aarch64.c (aarch64_print_address_internal):
24674         Change gcc_assert call to output_operand_lossage.
24676 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24678         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24680 2018-02-22  DJ Delorie  <dj@redhat.com>
24681             Sebastian Perta  <sebastian.perta@renesas.com>
24682             Oleg Endo  <olegendo@gcc.gnu.org>
24684         * config/rx/rx.c (rx_rtx_costs): New function.
24685         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24687 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24689         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24691 2018-02-22  Martin Liska  <mliska@suse.cz>
24693         PR driver/83193
24694         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24695         Add "native" as a possible value.
24697 2018-02-22  Martin Liska  <mliska@suse.cz>
24699         PR driver/83193
24700         * config/i386/i386.c (ix86_option_override_internal):
24701         Add "native" as a possible value for -march and -mtune.
24703 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
24705         PR target/84502
24706         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24707         to all type variants.
24709         PR tree-optimization/84503
24710         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24711         width as info->bitpos + info->bitsize - start.
24712         (merged_store_group::merge_overlapping): Simplify width computation.
24713         (check_no_overlap): New function.
24714         (imm_store_chain_info::try_coalesce_bswap): Compute expected
24715         start + width and last_order of the group, fail if check_no_overlap
24716         fails.
24717         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24718         to group if check_no_overlap fails.
24720 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24722         * config/rs6000/altivec.md: Delete contraint arguments to
24723         define_expand, define_split, and define_peephole2, and in
24724         define_insn_and_split if always unused.
24725         * config/rs6000/darwin.md: Ditto.
24726         * config/rs6000/dfp.md: Ditto.
24727         * config/rs6000/rs6000.md: Ditto.
24728         * config/rs6000/sync.md: Ditto.
24729         * config/rs6000/vector.md: Ditto.
24730         * config/rs6000/vsx.md: Ditto.
24732 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24734         * config/rs6000/altivec.md: Write output control strings as braced
24735         blocks instead of double-quoted strings.
24736         * config/rs6000/darwin.md: Ditto.
24737         * config/rs6000/rs6000.md: Ditto.
24738         * config/rs6000/vector.md: Ditto.
24739         * config/rs6000/vsx.md: Ditto.
24741 2018-02-21  Jason Merrill  <jason@redhat.com>
24743         PR c++/84314 - ICE with templates and fastcall attribute.
24744         * attribs.c (build_type_attribute_qual_variant): Remove assert.
24746 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24748         * ipa-cp.c (determine_versionability): Fix comment typos.
24750 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24752         PR c/84229
24753         * ipa-cp.c (determine_versionability): Do not version functions caling
24754         va_arg_pack.
24756 2018-02-21  Martin Liska  <mliska@suse.cz>
24758         PR driver/83193
24759         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24760         Add "native" as a possible value.
24761         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
24762         the macro when native cpu detection is available.
24764 2018-02-21  Martin Liska  <mliska@suse.cz>
24766         PR driver/83193
24767         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24768         Add "native" as a possible value.
24769         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24770         when native cpu detection is available.
24772 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
24773             Martin Sebor  <msebor@redhat.com>
24775         PR tree-optimization/84478
24776         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24777         false.
24778         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24779         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24780         support which is conservatively correct, for 2 only stay conservative
24781         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
24782         argument to the 2 argument get_range_strlen, adjust 6 arg
24783         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24784         false.
24785         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24786         (gimple_fold_builtin_strlen): Pass true as last argument to
24787         get_range_strlen.
24789 2018-02-20  Martin Sebor  <msebor@redhat.com>
24791         PR middle-end/84095
24792         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24793         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
24794         (builtin_memref::builtin_memref): Factor out parts into
24795         set_base_and_offset and call it.
24797 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
24799         PR middle-end/84406
24800         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24801         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24802         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
24803         search at the associated MODE_INT.
24805 2018-02-20  Jeff Law  <law@redhat.com>
24807         PR middle-end/82123
24808         PR tree-optimization/81592
24809         PR middle-end/79257
24810         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24811         for range data rather than using global data.
24812         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24813         range data rather than using global data.
24814         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24815         pass it to children as needed.
24816         (struct directive::fmtresult): Similarly.
24817         (struct directive::set_width): Similarly.
24818         (struct directive::set_precision): Similarly.
24819         (format_integer, format_directive, parse_directive): Similarly.
24820         (format_none): Accept unnamed vr_values parameter.
24821         (format_percent, format_floating, format_character): Similarly.
24822         (format_string, format_plain): Similarly.
24823         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24824         the EVRP range analyzer for range data rather than using global data.
24825         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24826         gimple-ssa-evrp-analyze.h
24827         (class sprintf_dom_walker): Add after_dom_children member function.
24828         Add evrp_range_analyzer member.
24829         (sprintf_dom_walker::before_dom_children): Call into the EVRP
24830         range analyzer as needed.
24831         (sprintf_dom_walker::after_dom_children): New member function.
24832         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24833         if not optimizing.
24834         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24835         (evrp_range_analyzer::pop_to_marker): Likewise.
24837 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
24839         PR tree-optimization/84419
24840         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24841         with the required type if its current type is compatible but
24842         different.
24844 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
24846         PR middle-end/82004
24847         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24848         after vectorization.
24850 2018-02-20  Martin Liska  <mliska@suse.cz>
24852         PR driver/83193
24853         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24854         possible values if we don't have a hint.
24856 2018-02-20  Martin Liska  <mliska@suse.cz>
24858         PR c/84310
24859         PR target/79747
24860         * final.c (shorten_branches): Build align_tab array with one
24861         more element.
24862         * opts.c (finish_options): Add alignment option limit check.
24863         (MAX_CODE_ALIGN): Likewise.
24864         (MAX_CODE_ALIGN_VALUE): Likewise.
24865         * doc/invoke.texi: Document maximum allowed option value for
24866         all -falign-* options.
24868 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
24870         PR target/84146
24871         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24872         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24873         * var-tracking.c (emit_note_insn_var_location): Remove all references
24874         to NOTE_INSN_CALL_ARG_LOCATION.
24875         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24876         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24877         Use copy_rtx_if_shared.
24878         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24879         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24880         (dwarf2out_var_location): Remove handling of
24881         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24882         on call_insn.
24883         * final.c (final_scan_insn): Remove all references to
24884         NOTE_INSN_CALL_ARG_LOCATION.
24885         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
24886         before dumping final insns.
24887         * except.c (emit_note_eh_region_end): Remove all references to
24888         NOTE_INSN_CALL_ARG_LOCATION.
24889         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24890         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24891         * config/arc/arc.c (hwloop_optimize): Likewise.
24892         * config/arm/arm.c (create_fix_barrier): Likewise.
24893         * config/s390/s390.c (s390_chunkify_start): Likewise.
24894         * config/sh/sh.c (find_barrier): Likewise.
24895         * config/i386/i386.c (rest_of_insert_endbranch,
24896         ix86_seh_fixup_eh_fallthru): Likewise.
24897         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24898         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24899         * config/frv/frv.c (frv_function_prologue): Likewise.
24900         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
24901         reg note.
24902         (note_outside_basic_block_p): Remove all references to
24903         NOTE_INSN_CALL_ARG_LOCATION.
24904         * gengtype.c (adjust_field_rtx_def): Likewise.
24905         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24906         Likewise.
24907         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24908         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24910         PR c++/84444
24911         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24912         is ADDR_EXPR.
24914         PR tree-optimization/84452
24915         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24916         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24917         is NULL.
24919 2018-02-19  Martin Liska  <mliska@suse.cz>
24921         PR sanitizer/82183
24922         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24924 2018-02-19  Martin Liska  <mliska@suse.cz>
24925             Richard Sandiford  <richard.sandiford@linaro.org>
24927         PR tree-optimization/82491
24928         * gimple-fold.c (get_base_constructor): Make earlier bail out
24929         to prevent ubsan.
24931 2018-02-19  Carl Love  <cel@us.ibm.com>
24933         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24934         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24935         BU_P8V_OVERLOAD_1.
24936         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24937         P8V_BUILTIN_VEC_NEG.
24939 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
24941         * config/rl78/rl78.md (movdf): New define expand.
24943 2018-02-19  Martin Liska  <mliska@suse.cz>
24945         PR other/80589
24946         * doc/invoke.texi: Fix typo.
24947         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24949 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
24951         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24952         handle rs6000_single_float and rs6000_double_float specially for
24953         e500 family CPUs.
24955 2018-02-16  Jeff Law  <law@redhat.com>
24957         * config/rx/rx.c (add_pop_cfi_notes): New function.;
24958         (pop_regs): Use it.
24960 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
24962         PR ipa/84425
24963         * ipa-inline.c (inline_small_functions): Fix a typo.
24965 2018-02-16  Nathan Sidwell  <nathan@acm.org>
24967         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24969 2018-02-16  Carl Love  <cel@us.ibm.com>
24971         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24972         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24973         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24974         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24975         expansion to P8V_BUILTIN_VEC_FLOAT2.
24977 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
24979         PR rtl-optimization/70023
24980         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24981         src_regno into account.
24983 2018-02-16  Carl Love  <cel@us.ibm.com>
24985         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24986         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24987         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24988         * config/rs6000/rs6000.c: Remove case statements for
24989         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24990         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24991         and P9V_BUILTIN_VEC_VINSERT4B.
24992         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24993         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24994         * config/rs6000/vsx.md:
24995         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24996         vec_insert4b.
24998 2018-02-16  Carl Love  <cel@us.ibm.com>
25000         * config/rs6000/altivec.h: Add builtin names vec_extract4b
25001         vec_insert4b.
25002         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25003         definitions.
25004         * config/rs6000/rs6000-c.c: Add the definitions for
25005         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25006         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25007         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25008         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
25009         definition for insert4b and define insn *insert3b_internal.
25010         * doc/extend.texi: Add documentation for vec_extract4b.
25012 2018-02-16  Nathan Sidwell  <nathan@acm.org>
25014         * doc/extend.texi (Backwards Compatibility): Mention friend
25015         injection.  Note for-scope is deprecated.
25016         * doc/invoke.texi (-ffriend-injection): Deprecate.
25018 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
25020         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25021         that moved to I2, also allow destinations that are a paradoxical
25022         subreg (instead of a normal reg).
25024 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
25026         PR target/83831
25027         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25028         to QImode.
25030 2018-02-16  Richard Biener  <rguenther@suse.de>
25032         PR tree-optimization/84037
25033         PR tree-optimization/84016
25034         PR target/82862
25035         * config/i386/i386.c (ix86_builtin_vectorization_cost):
25036         Adjust vec_construct for the fact we need additional higher latency
25037         128bit inserts for AVX256 and AVX512 vector builds.
25038         (ix86_add_stmt_cost): Scale vector construction cost for
25039         elementwise loads.
25041 2018-02-16  Richard Biener  <rguenther@suse.de>
25043         PR tree-optimization/84417
25044         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25045         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25046         (non_rewritable_lvalue_p): Likewise, use poly-ints.
25048 2018-02-16  Martin Liska  <mliska@suse.cz>
25050         PR sanitizer/84307
25051         * internal-fn.def (ASAN_CHECK): Set proper flags.
25052         (ASAN_MARK): Likewise.
25054 2018-02-16  Julia Koval  <julia.koval@intel.com>
25056         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25057         from PTA_CANNONLAKE.
25059 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
25061         PR target/84272
25062         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25063         Use ++iter rather than iter++ for std::list iterators.
25064         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
25065         defer deleting them until all nodes in the forest are processed.  Do
25066         free even leaf nodes.  Change to_process into auto_vec.
25068         PR bootstrap/84405
25069         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25070         * vec.h (vec_default_construct): Use memset instead of placement new
25071         if BROKEN_VALUE_INITIALIZATION is defined.
25072         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25073         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25074         is defined.
25076         PR rtl-optimization/83723
25077         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25078         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
25079         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
25080         recursive calls.
25081         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25082         callers.
25083         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25085 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
25087         PR rtl-optimization/81443
25088         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25089         from inner REGs to paradoxical SUBREGs.
25091 2018-02-16  Richard Biener  <rguenther@suse.de>
25093         PR tree-optimization/84399
25094         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25095         For operands we can analyze at their definition make sure we can
25096         analyze them at each use as well.
25098 2018-02-16  Richard Biener  <rguenther@suse.de>
25100         PR tree-optimization/84190
25101         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25102         volatile accesses if the decl isn't volatile.
25104 2018-02-15  Jason Merrill  <jason@redhat.com>
25106         PR c++/84314 - ICE with templates and fastcall attribute.
25107         * attribs.c (build_type_attribute_qual_variant): Don't clobber
25108         TYPE_CANONICAL on an existing type.
25110 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
25112         PR tree-optimization/84383
25113         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25114         dstoff nor call operand_equal_p if dstbase is NULL.
25116         PR tree-optimization/84334
25117         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25118         also a CONSTANT_CLASS_P, punt.
25120 2018-02-14  Jim Wilson  <jimw@sifive.com>
25122         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25123         first SMALL_OPERAND check.  New local min_second_step.  Move assert
25124         to where locals are set.  Add TARGET_RVC support.
25125         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25127 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
25129         * doc/invoke.texi: Correct -Wformat-overflow code sample.
25131 2018-02-14  Martin Sebor  <msebor@redhat.com>
25133         PR tree-optimization/83698
25134         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25135         arrays constrain the offset range to their bounds.
25136         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25137         (builtin_access::overlap): Avoid setting the size of overlap if it's
25138         already been set.
25139         (maybe_diag_overlap): Also consider arrays when deciding what values
25140         of offsets to include in diagnostics.
25142 2018-02-14  Martin Sebor  <msebor@redhat.com>
25144         PR c/84108
25145         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25146         that correspond to the kind of a declaration.
25148 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
25150         PR target/83984
25151         * config/pa/pa.md: Load address of PIC label using the linkage table
25152         if the label is nonlocal.
25154 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25156         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25157         warning message if user requests -maltivec=be.
25158         * doc/invoke.texi: Document deprecation of -maltivec=be.
25160 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
25162         PR target/84220
25163         * config/rs6000/rs6000-c.c: Update definitions for
25164         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25165         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25167 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25169         PR target/84239
25170         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25171         add _get_ssp intrinsics. Remove argument from
25172         __builtin_ia32_rdssp[d|q].
25173         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25174         * config/i386/i386-builtin.def: Remove argument from
25175         __builtin_ia32_rdssp[d|q].
25176         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25177         ix86_expand_special_args_builtin for _rdssp[d|q].
25178         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25179         Clear register before usage.
25180         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25181         Add documentation for new _get_ssp and _inc_ssp intrinsics.
25183 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
25185         PR tree-optimization/84357
25186         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25187         operand 1 of an ARRAY_REF too.
25189 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
25191         PR target/83831
25192         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25193         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25194         declarations.
25195         (set_of_reg): New struct.
25196         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25197         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25198         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25199         functions.
25200         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25201         Split into bitclr, bitset, bitinvert patterns if appropriate.
25202         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25203         use rx_fuse_in_memory_bitop.
25204         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25205         to named insn, correct maximum insn length.
25207 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
25209         PR target/79242
25210         * machmode.def: Define a complex mode for PARTIAL_INT.
25211         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25212         MODE_PARTIAL_INT.
25213         * doc/rtl.texi: Document CSPImode.
25214         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25215         handling.
25216         (msp430_hard_regno_nregs_with_padding): Likewise.
25218 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
25220         PR target/84279
25221         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25223 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
25225         PR rtl-optimization/84169
25226         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
25227         we generated a parallel as new i3 and we split that to new i2 and i3
25228         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
25229         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
25230         those to i2, not i1.  Partially rewrite this scan code.
25232 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25234         PR c/82210
25235         * stor-layout.c (place_field): For variable length fields, adjust
25236         offset_align afterwards not just based on the field's alignment,
25237         but also on the size.
25239         PR middle-end/84309
25240         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25241         of exps and logs in the use_exp2 case.
25243 2018-02-13  Jeff Law  <law@redhat.com>
25245         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25246         entry for "vector".
25248         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25249         ARGS as unused.
25251 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
25253         PR debug/84342
25254         PR debug/84319
25255         * common.opt (gas-loc-support, gas-locview-support): New.
25256         (ginline-points, ginternal-reset-location-views): New.
25257         * doc/invoke.texi: Document them.  Use @itemx where intended.
25258         (gvariable-location-views): Adjust.
25259         * target.def (reset_location_view): New.
25260         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25261         (TARGET_RESET_LOCATION_VIEW): New.
25262         * doc/tm.texi: Rebuilt.
25263         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25264         (dwarf2out_default_as_locview_support): New.
25265         (output_asm_line_debug_info): Use option variables.
25266         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25267         (output_loc_list): Likewise.
25268         (add_high_low_attributes): Check option variables.
25269         Don't output entry view attribute in strict mode.
25270         (gen_inlined_subroutine_die): Check option variables.
25271         (dwarf2out_inline_entry): Likewise.
25272         (init_sections_and_labels): Likewise.
25273         (dwarf2out_early_finish): Likewise.
25274         (maybe_reset_location_view): New, from...
25275         (dwarf2out_var_location): ... here.  Call it.
25276         * debug.h (dwarf2out_default_as_loc_support): Declare.
25277         (dwarf2out_default_as_locview_support): Declare.
25278         * hooks.c (hook_int_rtx_insn_0): New.
25279         * hooks.h (hook_int_rtx_insn_0): Declare.
25280         * toplev.c (process_options): Take -gas-loc-support and
25281         -gas-locview-support from dwarf2out.  Enable
25282         -gvariable-location-views by default only with locview
25283         assembler support.  Enable -ginternal-reset-location-views by
25284         default only if the target defines the corresponding hook.
25285         Enable -ginline-points by default if location views are
25286         enabled; force it disabled if statement frontiers are
25287         disabled.
25288         * tree-inline.c (expand_call_inline): Check option variables.
25289         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25291 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
25293         PR tree-optimization/84321
25294         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25295         handling.  Also check whether the anti-range contains any values
25296         that satisfy the mask; switch to a VR_RANGE if not.
25298 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
25300         PR sanitizer/84340
25301         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25303 2018-02-13  Martin Jambor  <mjambor@suse.cz>
25305         PR c++/83990
25306         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25307         of call statements, also set location of a load to a temporary.
25309 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
25311         * config/rl78/rl78.c (add_vector_labels): New function.
25312         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25313         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25314         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25315         which checks that no arguments are passed.
25316         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25317         * doc/extend.texi: Documentation for the new attribute.
25319 2018-02-13  Andreas Schwab  <schwab@suse.de>
25321         * config/riscv/linux.h (CPP_SPEC): Define.
25323 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25325         PR target/84335
25326         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25327         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25328         OPTION_MASK_ISA_AES as first argument to def_builtin_const
25329         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25330         instead of OPTION_MASK_ISA_PCLMUL as first argument to
25331         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25332         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25333         temporarily for AES and PCLMUL builtins.
25335         PR tree-optimization/84339
25336         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25337         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25338         Formatting fixes.
25340         PR middle-end/84309
25341         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25342         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25343         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25344         inline function.
25345         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25346         inline function.
25347         * omp-simd-clone.h: New file.
25348         * omp-simd-clone.c: Include omp-simd-clone.h.
25349         (expand_simd_clones): No longer static.
25350         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25351         cgraph.h and omp-simd-clone.h.
25352         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25353         (vect_recog_widen_shift_pattern): Formatting fix.
25354         (vect_pattern_recog_1): Don't check optab for calls.
25356         PR target/84336
25357         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25358         operands[2] into a REG before using gen_lowpart on it.
25360 2018-02-12  Jeff Law  <law@redhat.com>
25362         PR target/83760
25363         * config/sh/sh.c (find_barrier): Consider a sibling call
25364         a barrier as well.
25366         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25367         successfully back substituting a reg.
25369 2018-02-12  Richard Biener  <rguenther@suse.de>
25371         PR tree-optimization/84037
25372         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25373         parameter, move visited init to caller.
25374         (vect_slp_analyze_operations): Separate cost from validity
25375         check, initialize visited once for all instances.
25376         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25377         for all instances.
25378         * tree-vect-stmts.c (vect_model_simple_cost): Make early
25379         out an assert.
25380         (vect_model_promotion_demotion_cost): Likewise.
25381         (vectorizable_bswap): Guard cost modeling with !slp_node
25382         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25383         SLP stmts.
25384         (vectorizable_call): Likewise.
25385         (vectorizable_conversion): Likewise.
25386         (vectorizable_assignment): Likewise.
25387         (vectorizable_shift): Likewise.
25388         (vectorizable_operation): Likewise.
25389         (vectorizable_store): Likewise.
25390         (vectorizable_load): Likewise.
25391         (vectorizable_condition): Likewise.
25392         (vectorizable_comparison): Likewise.
25394 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
25396         PR sanitizer/84307
25397         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25398         (ASAN_MARK): Fix fnspec to account for return value, change pointer
25399         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25401 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
25403         PR middle-end/83665
25404         * params.def (inline-min-speedup): Increase from 8 to 15.
25405         (max-inline-insns-auto): Decrease from 40 to 30.
25406         * ipa-split.c (consider_split): Add some buffer for function to
25407         be considered inlining candidate.
25408         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25409         default values.
25411 2018-02-12  Richard Biener  <rguenther@suse.de>
25413         PR tree-optimization/84037
25414         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25415         matched stmts if we cannot swap the non-matched ones.
25417 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25419         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25420         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25421         _mm_maskz_scalef_round_ss): New intrinsics.
25422         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25423         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25424         __builtin_ia32_scalefss_round): Remove.
25425         (__builtin_ia32_scalefsd_mask_round,
25426         __builtin_ia32_scalefss_mask_round): New intrinsics.
25427         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25428         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25429         ((match_operand:VF_128 2 "<round_nimm_predicate>"
25430         "<round_constraint>")): Changed to ...
25431         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25432         "<round_scalar_constraint>")): ... this.
25433         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25434         %0, %1, %2<round_op3>}"): Changed to ...
25435         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25436         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25437         %2<round_scalar_mask_op3>}"): ... this.
25438         * config/i386/subst.md (round_scalar_nimm_predicate): New.
25440 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25442         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25443         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25444         (_mm_maskz_sqrt_round_ss): New intrinsics.
25445         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25446         (__builtin_ia32_sqrtsd_mask_round)
25447         (__builtin_ia32_sqrtss_mask_round): New builtins.
25448         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25449         (__builtin_ia32_sqrtss_round): Remove.
25450         (__builtin_ia32_sqrtsd_mask_round)
25451         (__builtin_ia32_sqrtss_mask_round): New builtins.
25452         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25453         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25454         ((match_operand:VF_128 1 "vector_operand"
25455         "xBm,<round_constraint>")): Changed to ...
25456         ((match_operand:VF_128 1 "vector_operand"
25457         "xBm,<round_scalar_constraint>")): ... this.
25458         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25459         %0, %2, %<iptr>1<round_op3>}): Changed to ...
25460         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25461         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25462         %<iptr>1<round_scalar_mask_op3>}): ... this.
25463         ((set_attr "prefix" "<round_prefix>")): Changed to ...
25464         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25466 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
25468         PR target/84266
25469         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25470         Cast vec_cmpeq result to correct type.
25471         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25472         Cast vec_cmpgt result to correct type.
25474 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
25476         * final.c (final_scan_insn_1): Renamed from...
25477         (final_scan_insn): ... this.  New wrapper, to recover
25478         seen from the outermost call in recursive ones.
25479         * config/sparc/sparc.c (output_return): Drop seen from call.
25480         (output_sibcall): Likewise.
25481         * config/visium/visium.c (output_branch): Likewise.
25483 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
25485         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25486         function label.
25488 2018-02-10  Alan Modra  <amodra@gmail.com>
25490         PR target/84300
25491         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25492         Specify LR as an input.
25494 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
25496         PR sanitizer/83987
25497         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25498         remove_member_access_dummy_vars): New functions.
25499         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25500         lower_omp_1, execute_lower_omp): Use them.
25502         PR rtl-optimization/84308
25503         * shrink-wrap.c (spread_components): Release todo vector.
25505 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
25507         PR rtl-optimization/57193
25508         * ira-color.c (struct allocno_color_data): Add member
25509         conflict_allocno_hard_prefs.
25510         (update_conflict_allocno_hard_prefs): New.
25511         (bucket_allocno_compare_func): Add a preference based on
25512         conflict_allocno_hard_prefs.
25513         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25514         (color_allocnos): Remove a dead code.  Initiate
25515         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
25517 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
25519         PR target/84226
25520         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25521         constraint from =wa to wa.  Avoid a subreg on the output operand,
25522         instead use a pseudo and subreg it in a move.
25523         (p9_xxbrd_<mode>): Changed to ...
25524         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25525         (p9_xxbrd_v2df): New expander.
25526         (p9_xxbrw_<mode>): Changed to ...
25527         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25528         (p9_xxbrw_v4sf): New expander.
25530 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
25532         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25534 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
25536         PR target/83926
25537         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25538         multiply in 32-bit mode.
25539         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25540         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25541         mode.
25543 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
25545         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25546         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25547         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25548         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25550 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
25552         PR lto/84213
25553         * dwarf2out.c (is_trivial_indirect_ref): New function.
25554         (dwarf2out_late_global_decl): Do not generate a location
25555         attribute for variables that have a non-trivial DECL_VALUE_EXPR
25556         and that are not defined in the current unit.
25558 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
25560         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25561         instead of a libcall for UNORDERED.
25563 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
25565         PR target/82641
25566         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25567         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25569 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25571         PR target/PR84295
25572         * config/s390/s390.c (s390_set_current_function): Invoke
25573         s390_indirect_branch_settings also if fndecl didn't change.
25575 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
25577         * config/rs6000/rs6000.md (blockage): Set length to zero.
25579 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
25581         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25583 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
25585         PR sanitizer/84285
25586         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25587         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25588         -static-lib*san.
25590         PR debug/84252
25591         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25592         PARALLEL incoming that failed vt_get_decl_and_offset check.
25594         PR middle-end/84237
25595         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25596         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25597         TREE_READONLY bit.
25598         (get_variable_section): For decls in named .bss* sections pass true as
25599         second argument to bss_initializer_p.
25601 2018-02-09  Marek Polacek  <polacek@redhat.com>
25602             Jakub Jelinek  <jakub@redhat.com>
25604         PR c++/83659
25605         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25606         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
25607         Sync some changes from cxx_fold_indirect_ref.
25609 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
25611         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25612         markers.
25613         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25614         (BLOCK_INLINE_ENTRY_LABEL): New.
25615         (dwarf2out_var_location): Disregard inline entry markers.
25616         (inline_entry_data): New struct.
25617         (inline_entry_data_hasher): New hashtable type.
25618         (inline_entry_data_hasher::hash): New.
25619         (inline_entry_data_hasher::equal): New.
25620         (inline_entry_data_table): New variable.
25621         (add_high_low_attributes): Add DW_AT_entry_pc and
25622         DW_AT_GNU_entry_view attributes if a pending entry is found
25623         in inline_entry_data_table.  Add old entry_pc attribute only
25624         if debug nonbinding markers are disabled.
25625         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25626         markers are enabled.
25627         (block_within_block_p, dwarf2out_inline_entry): New.
25628         (dwarf2out_finish): Check that no entries remained in
25629         inline_entry_data_table.
25630         * final.c (reemit_insn_block_notes): Handle inline entry notes.
25631         (final_scan_insn, notice_source_line): Likewise.
25632         (rest_of_clean_state): Skip inline entry markers.
25633         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25634         markers.
25635         * gimple.c (gimple_build_debug_inline_entry): New.
25636         * gimple.h (enum gimple_debug_subcode): Add
25637         GIMPLE_DEBUG_INLINE_ENTRY.
25638         (gimple_build_debug_inline_entry): Declare.
25639         (gimple_debug_inline_entry_p): New.
25640         (gimple_debug_nonbind_marker_p): Adjust.
25641         * insn-notes.def (INLINE_ENTRY): New.
25642         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25643         inline entry marker notes.
25644         (print_insn): Likewise.
25645         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25646         (INSN_DEBUG_MARKER_KIND): Likewise.
25647         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25648         * tree-inline.c (expand_call_inline): Build and insert
25649         debug_inline_entry stmt.
25650         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25651         inline entry blocks early, if nonbind markers are enabled.
25652         (dump_scope_block): Dump fragment info.
25653         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25654         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25655         (gimple_build_debug_inline_entry): New.
25656         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25657         Enable/disable inline entry points too.
25658         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25659         (DEBUG_INSN): Describe inline entry markers.
25661         * common.opt (gvariable-location-views): New.
25662         (gvariable-location-views=incompat5): New.
25663         * config.in: Rebuilt.
25664         * configure: Rebuilt.
25665         * configure.ac: Test assembler for view support.
25666         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25667         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25668         * dwarf2out.c (var_loc_view): New typedef.
25669         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25670         (dwarf2out_locviews_in_attribute): New.
25671         (dwarf2out_locviews_in_loclist): New.
25672         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25673         (enum dw_line_info_opcode): Add LI_adv_address.
25674         (struct dw_line_info_table): Add view.
25675         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25676         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25677         (zero_view_p): New variable.
25678         (ZERO_VIEW_P): New macro.
25679         (output_asm_line_debug_info): New.
25680         (struct var_loc_node): Add view.
25681         (add_AT_view_list, AT_loc_list): New.
25682         (add_var_loc_to_decl): Add view param.  Test it against last.
25683         (new_loc_list): Add view params.  Record them.
25684         (AT_loc_list_ptr): Handle loc and view lists.
25685         (view_list_to_loc_list_val_node): New.
25686         (print_dw_val): Handle dw_val_class_view_list.
25687         (size_of_die): Likewise.
25688         (value_format): Likewise.
25689         (loc_list_has_views): New.
25690         (gen_llsym): Set vl_symbol too.
25691         (maybe_gen_llsym, skip_loc_list_entry): New.
25692         (dwarf2out_maybe_output_loclist_view_pair): New.
25693         (output_loc_list): Output view list or entries too.
25694         (output_view_list_offset): New.
25695         (output_die): Handle dw_val_class_view_list.
25696         (output_dwarf_version): New.
25697         (output_compilation_unit_header): Use it.
25698         (output_skeleton_debug_sections): Likewise.
25699         (output_rnglists, output_line_info): Likewise.
25700         (output_pubnames, output_aranges): Update version comments.
25701         (output_one_line_info_table): Output view numbers in asm comments.
25702         (dw_loc_list): Determine current endview, pass it to new_loc_list.
25703         Call maybe_gen_llsym.
25704         (loc_list_from_tree_1): Adjust.
25705         (add_AT_location_description): Create view list attribute if
25706         needed, check it's absent otherwise.
25707         (convert_cfa_to_fb_loc_list): Adjust.
25708         (maybe_emit_file): Call output_asm_line_debug_info for test.
25709         (dwarf2out_var_location): Reset views as needed.  Precompute
25710         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
25711         attribute.  Set view.
25712         (new_line_info_table): Reset next view.
25713         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25714         (dwarf2out_source_line): Likewise.  Output view resets and labels to
25715         the assembler, or select appropriate line info opcodes.
25716         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25717         (optimize_string_length): Catch it.  Adjust.
25718         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
25719         dw_val_class_view_list, and remove it if no longer needed.
25720         (hash_loc_list): Hash view numbers.
25721         (loc_list_hasher::equal): Compare them.
25722         (optimize_location_lists): Check whether a view list symbol is
25723         needed, and whether the locview attribute is present, and
25724         whether they match.  Remove the locview attribute if no longer
25725         needed.
25726         (index_location_lists): Call skip_loc_list_entry for test.
25727         (dwarf2out_finish): Call output_asm_line_debug_info for test.
25728         Use output_dwarf_version.
25729         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25730         (struct dw_val_node): Add val_view_list.
25731         * final.c (SEEN_NEXT_VIEW): New.
25732         (set_next_view_needed): New.
25733         (clear_next_view_needed): New.
25734         (maybe_output_next_view): New.
25735         (final_start_function): Rename to...
25736         (final_start_function_1): ... this.  Take pointer to FIRST,
25737         add SEEN parameter.  Emit param bindings in the initial view.
25738         (final_start_function): Reintroduce SEEN-less interface.
25739         (final): Rename to...
25740         (final_1): ... this.  Take SEEN parameter.  Output final pending
25741         next view at the end.
25742         (final): Reintroduce seen-less interface.
25743         (final_scan_insn): Output pending next view before switching
25744         sections or ending a block.  Mark the next view as needed when
25745         outputting variable locations.  Notify debug backend of section
25746         changes, and of location view changes.
25747         (rest_of_handle_final): Adjust.
25748         * toplev.c (process_options): Autodetect value for debug variable
25749         location views option.  Warn on incompat5 without -gdwarf-5.
25750         * doc/invoke.texi (gvariable-location-views): New.
25751         (gvariable-location-views=incompat5): New.
25752         (gno-variable-location-views): New.
25754 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
25756         PR tree-optimization/84136
25757         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25758         that the result of find_edge is non-NULL.
25760 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25762         PR target/83008
25763         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25764         storing integer register in SImode.  Fix cost of 256 and 512
25765         byte aligned SSE register store.
25767 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25769         * config/i386/i386.c (ix86_multiplication_cost): Fix
25770         multiplication cost for TARGET_AVX512DQ.
25772 2018-02-08  Marek Polacek  <polacek@redhat.com>
25774         PR tree-optimization/84238
25775         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25776         get_range_strlen.
25778 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25780         PR tree-optimization/84265
25781         * tree-vect-stmts.c (vectorizable_store): Don't treat
25782         VMAT_CONTIGUOUS accesses as grouped.
25783         (vectorizable_load): Likewise.
25785 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25787         PR tree-optimization/81635
25788         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25789         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25790         (test_round_for_mask): New functions.
25791         (wide_int_cc_tests): Call test_round_for_mask.
25792         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25793         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25794         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25795         range returned by get_range_info.
25797 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
25799         PR ipa/81360
25800         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25801         * symtab.c: Include builtins.h
25802         (symtab_node::output_to_lto_symbol_table_p): Move here
25803         from lto-streamer-out.c:output_symbol_p.
25804         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25805         (output_symbol_p): Move all logic to symtab.c
25806         (produce_symtab): Update.
25808 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25810         * config/s390/s390-opts.h (enum indirect_branch): Define.
25811         * config/s390/s390-protos.h (s390_return_addr_from_memory)
25812         (s390_indirect_branch_via_thunk)
25813         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25814         (enum s390_indirect_branch_type): Define.
25815         * config/s390/s390.c (struct s390_frame_layout, struct
25816         machine_function): Remove.
25817         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25818         (indirect_branch_table_label_no, indirect_branch_table_name):
25819         Define variables.
25820         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25821         (enum s390_indirect_branch_option): Define.
25822         (s390_return_addr_from_memory): New function.
25823         (s390_handle_string_attribute): New function.
25824         (s390_attribute_table): Add new attribute handler.
25825         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25826         (s390_indirect_branch_via_thunk): New function.
25827         (s390_indirect_branch_via_inline_thunk): New function.
25828         (s390_function_ok_for_sibcall): When jumping via thunk disallow
25829         sibling call optimization for non z10 compiles.
25830         (s390_emit_call): Force indirect branch target to be a single
25831         register.  Add r1 clobber for non-z10 compiles.
25832         (s390_emit_epilogue): Emit return jump via return_use expander.
25833         (s390_reorg): Handle JUMP_INSNs as execute targets.
25834         (s390_option_override_internal): Perform validity checks for the
25835         new command line options.
25836         (s390_indirect_branch_attrvalue): New function.
25837         (s390_indirect_branch_settings): New function.
25838         (s390_set_current_function): Invoke s390_indirect_branch_settings.
25839         (s390_output_indirect_thunk_function):  New function.
25840         (s390_code_end): Implement target hook.
25841         (s390_case_values_threshold): Implement target hook.
25842         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25843         macros.
25844         * config/s390/s390.h (struct s390_frame_layout)
25845         (struct machine_function): Move here from s390.c.
25846         (TARGET_INDIRECT_BRANCH_NOBP_RET)
25847         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25848         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25849         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25850         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25851         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25852         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25853         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25854         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25855         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25856         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25857         (mnemonic attribute): Add values which aren't recognized
25858         automatically.
25859         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25860         pattern for branch conversion.  Fix mnemonic attribute.
25861         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25862         indirect branch via thunk if requested.
25863         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25864         ("*indirect_jump"): Disable for branch conversion using out of
25865         line thunks.
25866         ("indirect_jump_via_thunk<mode>_z10")
25867         ("indirect_jump_via_thunk<mode>")
25868         ("indirect_jump_via_inlinethunk<mode>_z10")
25869         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25870         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25871         ("casesi_jump_via_inlinethunk<mode>_z10")
25872         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25873         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25874         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25875         ("*indirect2_jump"): Disable for branch conversion.
25876         ("casesi_jump"): Turn into expander and expand patterns for branch
25877         conversion.
25878         ("return_use"): New expander.
25879         ("*return"): Emit return via thunk and rename it to ...
25880         ("*return<mode>"): ... this one.
25881         * config/s390/s390.opt: Add new options and and enum for the
25882         option values.
25884 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25886         * lra-constraints.c (match_reload): Unconditionally use
25887         gen_lowpart_SUBREG, rather than selecting between that
25888         and equivalent gen_rtx_SUBREG code.
25890 2018-02-08  Richard Biener  <rguenther@suse.de>
25892         PR tree-optimization/84233
25893         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25894         changed flag instead of boguously re-using phi_inserted.
25896 2018-02-08  Martin Jambor  <mjambor@suse.cz>
25898         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25899         static local variables.
25901 2018-02-08  Richard Biener  <rguenther@suse.de>
25903         PR tree-optimization/84278
25904         * tree-vect-stmts.c (vectorizable_store): When looking for
25905         smaller vector types to perform grouped strided loads/stores
25906         make sure the mode is supported by the target.
25907         (vectorizable_load): Likewise.
25909 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25911         * config/aarch64/aarch64.c (aarch64_components_for_bb):
25912         Increase LDP/STP opportunities by adding adjacent callee-saves.
25914 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25916         PR rtl-optimization/84068
25917         PR rtl-optimization/83459
25918         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25920 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
25922         PR tree-optimization/84224
25923         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25924         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25925         non-zero arguments.
25927 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
25929         PR target/84113
25930         * config/rs6000/altivec.md (*restore_world): Remove LR use.
25931         * config/rs6000/predicates.md (restore_world_operation): Adjust op
25932         count, remove one USE.
25934 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
25936         * doc/install.texi (Configuration): Document the
25937         --with-long-double-format={ibm,ieee} PowerPC configuration
25938         options.
25940         PR target/84154
25941         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25942         Convert from define_expand to be define_insn_and_split.  Rework
25943         float/double/_Float128 conversions to QI/HI/SImode to work with
25944         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
25945         conversions to QI/HImode types did a store and then a load to
25946         truncate the value.  For conversions to VSX registers, don't split
25947         the insn, instead emit the code directly.  Use the code iterator
25948         any_fix to combine signed and unsigned conversions.
25949         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25950         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25951         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25952         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25953         (fix_<mode>di2_hw): Likewise.
25954         (fixuns_<mode>di2_hw): Likewise.
25955         (fix_<mode>si2_hw): Likewise.
25956         (fixuns_<mode>si2_hw): Likewise.
25957         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25958         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25959         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25960         fix<uns>_trunc<SFDF:mode>si2_p8.
25961         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25962         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25963         (fix<uns>_<mode>_mem): Likewise.
25964         (fctiw<u>z_<mode>_mem): Likewise.
25965         (fix<uns>_<mode>_mem): Likewise.
25966         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25967         the register allocator from doing a direct move to the GPRs to do
25968         a store, and instead use the ISA 3.0 store byte/half-word from
25969         vector register instruction.  For IEEE 128-bit floating point,
25970         also optimize stores of 32-bit ints.
25971         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25973 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
25975         * genextract.c (push_pathstr_operand): New function to support
25976         [a-zA-Z].
25977         (walk_rtx): Call push_pathstr_operand.
25978         (print_path): Support [a-zA-Z].
25980 2018-02-07  Richard Biener  <rguenther@suse.de>
25982         PR tree-optimization/84037
25983         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25984         (cse_and_gimplify_to_preheader): Declare.
25985         (vect_get_place_in_interleaving_chain): Likewise.
25986         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25987         ivexpr_map.
25988         (_loop_vec_info::~_loop_vec_info): Delete it.
25989         (cse_and_gimplify_to_preheader): New function.
25990         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25991         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25992         (vectorizable_load): Likewise.  For grouped stores always base
25993         the IV on the first element.
25994         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25995         condition before gimplifying.
25997 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
25999         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26000         *DIV_EXPR and *MOD_EXPR.
26002 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
26004         PR target/84248
26005         * config/i386/i386.c (ix86_option_override_internal): Mask out
26006         the CF_SET bit when checking -fcf-protection.
26008 2018-02-07  Tom de Vries  <tom@codesourcery.com>
26010         PR libgomp/84217
26011         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26012         enough.
26014 2018-02-07  Richard Biener  <rguenther@suse.de>
26016         PR tree-optimization/84204
26017         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26018         this place.
26020         PR tree-optimization/84205
26021         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26022         special-case isl_ast_op_zdiv_r.
26024         PR tree-optimization/84223
26025         * graphite-scop-detection.c (gather_bbs::before_dom_children):
26026         Only add conditions from within the region.
26027         (gather_bbs::after_dom_children): Adjust.
26029 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
26031         PR target/84209
26032         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26033         * config/avr/avr.md: Only post-reload split REG-REG moves if
26034         either register is GENERAL_REG_P.
26036 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
26038         PR tree-optimization/84235
26039         * tree-ssa-scopedtables.c
26040         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26041         if the subtraction is performed in floating point type where NaNs are
26042         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26043         build 1.  Formatting fix.
26045 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
26047         PR target/84146
26048         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26049         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26050         and skip it regardless of bb boundaries.  Use CALL_P macro,
26051         don't test INSN_P (insn) together with CALL_P or JUMP_P check
26052         unnecessarily, formatting fix.
26054 2018-02-06  Michael Collison  <michael.collison@arm.com>
26056         * config/arm/thumb2.md:
26057         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26058         (*thumb_mov_notscc): Ditto.
26060 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
26062         PR target/84154
26063         * config/rs6000/rs6000.md (su code attribute): Use "u" for
26064         unsigned_fix, not "s".
26066 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26068         * configure.ac (gcc_fn_eh_frame_ro): New function.
26069         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26070         correct .eh_frame permissions.
26071         * configure: Regenerate.
26073 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
26075         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26076         irrelevant options.
26078 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26080         * config/rs6000/rs6000.c (rs6000_option_override_internal):
26081         Display warning message for -mno-speculate-indirect-jumps.
26083 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
26085         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26086         Undocumented.
26087         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26089 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
26091         PR tree-optimization/84225
26092         * tree-eh.c (find_trapping_overflow): Only call
26093         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26095 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26097         PR target/84145
26098         * config/i386/i386.c: Reimplement the check of possible options
26099         -mibt/-mshstk conbination. Change error messages.
26100         * doc/invoke.texi: Fix a typo: remove extra '='.
26102 2018-02-06  Marek Polacek  <polacek@redhat.com>
26104         PR tree-optimization/84228
26105         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26107 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
26109         PR target/82641
26110         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26111         emitted arch directives.
26112         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26113         __ARM_FEATURE_COPROC before changing architectures.
26115 2018-02-06  Richard Biener  <rguenther@suse.de>
26117         * config/i386/i386.c (print_reg): Fix typo.
26118         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26120 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
26122         * configure: Regenerate.
26124 2018-02-05  Martin Sebor  <msebor@redhat.com>
26126         PR tree-optimization/83369
26127         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26128         inlining context.
26130 2018-02-05  Martin Liska  <mliska@suse.cz>
26132         * doc/invoke.texi: Cherry-pick upstream r323995.
26134 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
26136         * ira.c (ira_init_register_move_cost): Adjust comment.
26138 2018-02-05  Martin Liska  <mliska@suse.cz>
26140         PR gcov-profile/84137
26141         * doc/gcov.texi: Fix typo in documentation.
26143 2018-02-05  Martin Liska  <mliska@suse.cz>
26145         PR gcov-profile/83879
26146         * doc/gcov.texi: Document necessity of --dynamic-list-data when
26147         using dlopen functionality.
26149 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
26151         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26152         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26153         _mm_maskz_range_ss, _mm_mask_range_round_ss,
26154         _mm_maskz_range_round_ss): New intrinsics.
26155         (__builtin_ia32_rangesd128_round)
26156         (__builtin_ia32_rangess128_round): Remove.
26157         (__builtin_ia32_rangesd128_mask_round,
26158         __builtin_ia32_rangess128_mask_round): New builtins.
26159         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26160         __builtin_ia32_rangess128_round): Remove.
26161         (__builtin_ia32_rangesd128_mask_round,
26162         __builtin_ia32_rangess128_mask_round): New builtins.
26163         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26164         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26165         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26166         "<round_saeonly_constraint>")): Changed to ...
26167         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26168         "<round_saeonly_scalar_constraint>")): ... this.
26169         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26170         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26171         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26172         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26173         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26175 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
26177         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26178         options.
26179         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26180         Remove all values except native, 8540 and 8548.
26182 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
26184         * config/i386/i386.c (ix86_output_function_return): Pass
26185         INVALID_REGNUM, instead of -1, as invalid register number to
26186         indirect_thunk_name and output_indirect_thunk.
26188 2018-02-02  Julia Koval  <julia.koval@intel.com>
26190         * config.gcc: Add -march=icelake.
26191         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26192         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26193         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26194         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26195         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26196         (processor_target_table): Add icelake.
26197         (ix86_option_override_internal): Handle new PTAs.
26198         (get_builtin_code_for_version): Handle icelake.
26199         (M_INTEL_COREI7_ICELAKE): New.
26200         (fold_builtin_cpu): Handle icelake.
26201         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26202         * doc/invoke.texi: Add -march=icelake.
26204 2018-02-02  Julia Koval  <julia.koval@intel.com>
26206         * config/i386/i386.c (ix86_option_override_internal): Change flags type
26207         to wide_int_bitmask.
26208         * wide-int-bitmask.h: New.
26210 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26212         PR target/84066
26213         * config/i386/i386.md: Replace Pmode with word_mode in
26214         builtin_setjmp_setup and builtin_longjmp to support x32.
26216 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
26218         PR target/56010
26219         PR target/83743
26220         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26221         #include "opts.h".
26222         (rs6000_supported_cpu_names): New static variable.
26223         (linux_cpu_translation_table): Likewise.
26224         (elf_platform) <cpu>: Define new static variable and use it.
26225         Translate kernel AT_PLATFORM name to canonical name if needed.
26226         Error if platform name is unknown.
26228 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
26230         PR target/84089
26231         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26233 2018-02-01  Jeff Law  <law@redhat.com>
26235         PR target/84128
26236         * config/i386/i386.c (release_scratch_register_on_entry): Add new
26237         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
26238         the scratch if RELEASE_VIA_POP is false.
26239         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26240         If we have to save a temporary register, decrement SIZE appropriately.
26241         Pass new arguments to release_scratch_register_on_entry.
26242         (ix86_adjust_stack_and_probe): Likewise.
26243         (ix86_emit_probe_stack_range): Pass new arguments to
26244         release_scratch_register_on_entry.
26246 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
26248         PR rtl-optimization/84157
26249         * combine.c (change_zero_ext): Use REG_P predicate in
26250         front of HARD_REGISTER_P predicate.
26252 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
26254         * config/avr/avr.c (avr_option_override): Move disabling of
26255         -fdelete-null-pointer-checks to...
26256         * common/config/avr/avr-common.c (avr_option_optimization_table):
26257         ...here.
26259 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26261         PR tree-optimization/81635
26262         * tree-data-ref.c (split_constant_offset_1): For types that
26263         wrap on overflow, try to use range info to prove that wrapping
26264         cannot occur.
26266 2018-02-01  Renlin Li  <renlin.li@arm.com>
26268         PR target/83370
26269         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26270         TAILCALL_ADDR_REGS.
26271         (aarch64_register_move_cost): Likewise.
26272         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26273         TAILCALL_ADDR_REGS.
26274         (REG_CLASS_NAMES): Likewise.
26275         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26276         TAILCALL_ADDR_REGS. Remove IP registers.
26277         * config/aarch64/aarch64.md (Ucs): Update register constraint.
26279 2018-02-01  Richard Biener  <rguenther@suse.de>
26281         * domwalk.h (dom_walker::dom_walker): Add additional constructor
26282         for specifying RPO order and allow NULL for that.
26283         * domwalk.c (dom_walker::dom_walker): Likewise.
26284         (dom_walker::walk): Handle NULL RPO order.
26285         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26286         in RPO order.
26287         (rewrite_update_dom_walker): Likewise.
26288         (mark_def_dom_walker): Likewise.
26290 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26292         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26293         (aarch64_maybe_expand_sve_subreg_move): Declare.
26294         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26295         * config/aarch64/predicates.md (aarch64_any_register_operand): New
26296         predicate.
26297         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26298         that are semantically a reverse operation.
26299         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26300         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26301         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26302         functions.
26303         (aarch64_can_change_mode_class): For big-endian, forbid changes
26304         between two SVE modes if they have different element sizes.
26306 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26308         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26309         the TImode handling for big-endian targets.
26311 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26313         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26314         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
26315         not just bytes.
26316         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26317         Remove BSWAP handing for big-endian targets and use the form of
26318         LD1RQ appropariate for the mode.
26320 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26322         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26323         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26324         duplicated element.
26326 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26328         PR tearget/83845
26329         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26330         check for operands that need to go through aarch64_sve_reload_be.
26332 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
26334         PR tree-optimization/81661
26335         PR tree-optimization/84117
26336         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26337         * tree-eh.c: Include gimplify.h.
26338         (find_trapping_overflow, replace_trapping_overflow,
26339         rewrite_to_non_trapping_overflow): New functions.
26340         * tree-vect-loop.c: Include tree-eh.h.
26341         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26342         * tree-data-ref.c: Include tree-eh.h.
26343         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26345 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
26347         PR rtl-optimization/84123
26348         * combine.c (change_zero_ext): Check if hard register satisfies
26349         can_change_dest_mode before calling gen_lowpart_SUBREG.
26351 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
26353         PR target/82444
26354         * ira.c (ira_init_register_move_cost): Remove assert.
26356 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26358         PR rtl-optimization/84071
26359         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26360         * doc/tm.texi: Regenerate.
26362 2018-01-31  Richard Biener  <rguenther@suse.de>
26364         PR tree-optimization/84132
26365         * tree-data-ref.c (analyze_miv_subscript): Properly
26366         check whether evolution_function_is_affine_multivariate_p
26367         before calling gcd_of_steps_may_divide_p.
26369 2018-01-31  Julia Koval  <julia.koval@intel.com>
26371         PR target/83618
26372         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26373         * config/i386/i386.md (rdpid_rex64) New.
26374         (rdpid): Make 32bit only.
26376 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
26378         PR lto/84105
26379         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26380         an IDENTIFIER_NODE for FUNCTION_TYPE's.
26382 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26384         Revert
26385         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26387         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26389 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26391         PR rtl-optimization/84071
26392         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26393         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26395 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26397         * config/arc/arc.c (arc_handle_aux_attribute): New function.
26398         (arc_attribute_table): Add 'aux' attribute.
26399         (arc_in_small_data_p): Consider aux like variables.
26400         (arc_is_aux_reg_p): New function.
26401         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26402         (arc_get_aux_arg): New function.
26403         (prepare_move_operands): Handle aux-register access.
26404         (arc_handle_aux_attribute): New function.
26405         * doc/extend.texi (ARC Variable attributes): Add subsection.
26407 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26409         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26410         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26411         (arc_attribute_table): Add 'uncached' attribute.
26412         (arc_print_operand): Print '.di' flag for uncached memory
26413         accesses.
26414         (arc_in_small_data_p): Do not consider for small data the uncached
26415         types.
26416         (arc_is_uncached_mem_p): New function.
26417         * config/arc/predicates.md (compact_store_memory_operand): Check
26418         for uncached memory accesses.
26419         (nonvol_nonimm_operand): Likewise.
26420         * doc/extend.texi (ARC Type Attribute): New subsection.
26422 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
26424         PR c/84100
26425         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26426         falign-loops=): Add Optimization flag.
26428 2018-01-30  Jeff Law  <law@redhat.com>
26430         PR target/84064
26431         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26432         INT_REGISTERS_SAVED.  Check it prior to calling
26433         get_scratch_register_on_entry.
26434         (ix86_adjust_stack_and_probe): Similarly.
26435         (ix86_emit_probe_stack_range): Similarly.
26436         (ix86_expand_prologue): Corresponding changes.
26438 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26440         PR target/40411
26441         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26442         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26444 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
26446         PR target/84112
26447         * lra-constraints.c (curr_insn_transform): Process AND in the
26448         address.
26450 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
26452         PR rtl-optimization/83986
26453         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26454         dependence against last_pending_memory_flush in addition to
26455         pending_jump_insns.
26457 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
26459         PR tree-optimization/81611
26460         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26461         copies.
26463 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26465         PR target/83758
26466         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26467         a reg rtx.
26469 2018-01-30  Richard Biener  <rguenther@suse.de>
26470             Jakub Jelinek  <jakub@redhat.com>
26472         PR tree-optimization/84111
26473         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26474         inner loops added during recursion, as they don't have up-to-date
26475         SSA form.
26477 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26479         PR ipa/81360
26480         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26481         (can_inline_edge_by_limits_p): ... here.
26482         (can_early_inline_edge_p, check_callers,
26483         update_caller_keys, update_callee_keys, recursive_inlining,
26484         add_new_edges_to_heap, speculation_useful_p,
26485         inline_small_functions,
26486         inline_small_functions, flatten_function,
26487         inline_to_all_callers_1): Update.
26489 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26491         * profile-count.c (profile_count::combine_with_ipa_count): Handle
26492         zeros correctly.
26494 2018-01-30  Richard Biener  <rguenther@suse.de>
26496         PR tree-optimization/83008
26497         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26498         invariant and constant vector uses in stmts when they need
26499         more than one stmt.
26501 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26503         PR bootstrap/84017
26504         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26505         * configure: Regenerate.
26507 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26509         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26510         pattern.
26511         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26512         Use gen_rtx_REG rather than gen_lowpart.
26514 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26516         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26517         rather than 0 when creating partial subregs.
26519 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26521         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26522         of usage.
26524 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
26526         PR target/81550
26527         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26528         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26529         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26530         flags.  This restores the settings used before the 2017-07-24.
26531         Turning off pre increment/decrement/modify allows IVOPTS to
26532         optimize DF/SF loops where the index is an int.
26534 2018-01-29  Richard Biener  <rguenther@suse.de>
26535             Kelvin Nilsen  <kelvin@gcc.gnu.org>
26537         PR bootstrap/80867
26538         * tree-vect-stmts.c (vectorizable_call): Don't call
26539         targetm.vectorize_builtin_md_vectorized_function if callee is
26540         NULL.
26542 2018-01-22  Carl Love  <cel@us.ibm.com>
26544         * doc/extend.tex: Fix typo in second arg in
26545         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26547 2018-01-29  Richard Biener  <rguenther@suse.de>
26549         PR tree-optimization/84086
26550         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26551         (flush_ssaname_freelist): When SSA names were released reset
26552         the SCEV hash table.
26554 2018-01-29  Richard Biener  <rguenther@suse.de>
26556         PR tree-optimization/84057
26557         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26558         removed paths when removing edges.
26560 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
26562         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26563         -mfunction-return=@var{choice}.
26565 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26567         PR diagnostic/84034
26568         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26569         Handle CR like TAB.
26570         (layout::print_source_line): Likewise.
26571         (test_get_line_width_without_trailing_whitespace): Add test cases.
26573 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
26575         PR middle-end/84040
26576         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26577         debug insns.
26579 2018-01-26  Jim Wilson  <jimw@sifive.com>
26581         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26583         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26584         specified.
26586 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26588         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26589         and CMP + SUB-immediate -> SUBS.
26591 2018-01-26  Martin Sebor  <msebor@redhat.com>
26593         PR tree-optimization/83896
26594         * tree-ssa-strlen.c (get_string_len): Rename...
26595         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
26596         Avoid assuming length is constant.
26597         (handle_char_store): Use HOST_WIDE_INT for string length.
26599 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
26601         PR target/81763
26602         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26603         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26605 2018-01-26  Richard Biener  <rguenther@suse.de>
26607         PR rtl-optimization/84003
26608         * dse.c (record_store): Only record redundant stores when
26609         the earlier store aliases at least all accesses the later one does.
26611 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
26613         PR rtl-optimization/83985
26614         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26615         REG_CFA_RESTORE insns.
26616         (delete_unmarked_insns): Don't ignore separate shrink wrapping
26617         REG_CFA_RESTORE insns here.
26619         PR c/83989
26620         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26621         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26623 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26625         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26626         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26627         (arc_init): Likewise.
26628         (arc_override_options): Likewise.
26629         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26630         value.
26631         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26632         support.
26633         * config/arc/arc.h (TARGET_DBNZ): Define.
26634         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26635         properly set the tune attribute.
26636         (dbnz): Use TARGET_DBNZ guard.
26637         * config/arc/arc.opt (mtune): Add core3 option.
26639 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26641         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26642         recognize new pic like addresses.
26643         (arc_delegitimize_address): Clean up.
26645 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26647         * config/arc/arc-arches.def: Option mrf16 valid for all
26648         architectures.
26649         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26650         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26651         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26652         * config/arc/arc-tables.opt: Regenerate.
26653         * config/arc/arc.c (arc_conditional_register_usage): Handle
26654         reduced register file case.
26655         (arc_file_start): Set must have build attributes.
26656         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26657         mrf16 option value.
26658         * config/arc/arc.opt (mrf16): Add new option.
26659         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26660         * config/arc/genmultilib.awk: Handle new mrf16 option.
26661         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26662         * config/arc/t-multilib: Regenerate.
26663         * doc/invoke.texi (ARC Options): Document mrf16 option.
26665 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26667         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26668         * config/arc/arc.c (arc_handle_secure_attribute): New function.
26669         (arc_attribute_table): Add 'secure_call' attribute.
26670         (arc_print_operand): Print secure call operand.
26671         (arc_function_ok_for_sibcall): Don't optimize tail calls when
26672         secure.
26673         (arc_is_secure_call_p): New function.  * config/arc/arc.md
26674         (call_i): Add support for sjli instruction.
26675         (call_value_i): Likewise.
26676         * config/arc/constraints.md (Csc): New constraint.
26678 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26679             John Eric Martin  <John.Martin@emmicro-us.com>
26681         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26682         * config/arc/arc.c (_arc_jli_section): New struct.
26683         (arc_jli_section): New type.
26684         (rc_jli_sections): New static variable.
26685         (arc_handle_jli_attribute): New function.
26686         (arc_attribute_table): Add jli_always and jli_fixed attribute.
26687         (arc_file_end): New function.
26688         (TARGET_ASM_FILE_END): Define.
26689         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26690         (arc_add_jli_section): New function.
26691         (jli_call_scan): Likewise.
26692         (arc_reorg): Call jli_call_scan.
26693         (arc_output_addsi): Remove 'S' from printing asm operand.
26694         (arc_is_jli_call_p): New function.
26695         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26696         operand.
26697         (movhi_insn): Likewise.
26698         (movsi_insn): Likewise.
26699         (movsi_set_cc_insn): Likewise.
26700         (loadqi_update): Likewise.
26701         (load_zeroextendqisi_update): Likewise.
26702         (load_signextendqisi_update): Likewise.
26703         (loadhi_update): Likewise.
26704         (load_zeroextendhisi_update): Likewise.
26705         (load_signextendhisi_update): Likewise.
26706         (loadsi_update): Likewise.
26707         (loadsf_update): Likewise.
26708         (movsicc_insn): Likewise.
26709         (bset_insn): Likewise.
26710         (bxor_insn): Likewise.
26711         (bclr_insn): Likewise.
26712         (bmsk_insn): Likewise.
26713         (bicsi3_insn): Likewise.
26714         (cmpsi_cc_c_insn): Likewise.
26715         (movsi_ne): Likewise.
26716         (movsi_cond_exec): Likewise.
26717         (clrsbsi2): Likewise.
26718         (norm_f): Likewise.
26719         (normw): Likewise.
26720         (swap): Likewise.
26721         (divaw): Likewise.
26722         (flag): Likewise.
26723         (sr): Likewise.
26724         (kflag): Likewise.
26725         (ffs): Likewise.
26726         (ffs_f): Likewise.
26727         (fls): Likewise.
26728         (call_i): Remove 'S' asm letter, add jli instruction.
26729         (call_value_i): Likewise.
26730         * config/arc/arc.op (mjli-always): New option.
26731         * config/arc/constraints.md (Cji): New constraint.
26732         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26733         operand.
26734         (subsf3_fpx): Likewise.
26735         (mulsf3_fpx): Likewise.
26736         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26737         asm operand.
26738         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26739         function attrbutes.
26740         * doc/invoke.texi (ARC): Document mjli-always option.
26742 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
26744         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26745         avoid addition with 0 and use incw and decw where possible.
26747 2018-01-26  Richard Biener  <rguenther@suse.de>
26749         PR tree-optimization/81082
26750         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26751         association if it requires casting to unsigned.
26752         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26753         from fold_plusminus_mult_expr to catch important cases late when
26754         range info is available.
26756 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26758         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26759         * configure.ac (hidden_linkonce): New test.
26760         * configure: Regenerate.
26761         * config.in: Regenerate.
26763 2018-01-26  Julia Koval  <julia.koval@intel.com>
26765         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26766         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26767         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26768         _mm_mask_bitshuffle_epi64_mask): Fix type.
26769         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26770         USI_FTYPE_V4DI_V4DI_USI): Remove.
26771         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26772         __builtin_ia32_vpshufbitqmb256_mask,
26773         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26774         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26775         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26777 2018-01-26  Alan Modra  <amodra@gmail.com>
26779         PR target/84033
26780         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26781         UNSPEC_VBPERMQ.  Sort other unspecs.
26783 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
26785         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26787 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
26789         PR middle-end/83055
26790         * predict.c (drop_profile): Do not push/pop cfun; update also
26791         node->count.
26792         (handle_missing_profiles): Fix logic looking for zero profiles.
26794 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
26796         PR middle-end/83977
26797         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26798         on functions with #pragma omp declare simd or functions with simd
26799         attribute.
26800         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26801         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26802         Remove trailing \n from warning_at calls.
26804 2018-01-25  Tom de Vries  <tom@codesourcery.com>
26806         PR target/84028
26807         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26808         for neutered workers.
26810 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
26812         PR target/68467
26813         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26814         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26816 2018-01-24  Jeff Law  <law@redhat.com>
26818         PR target/83994
26819         * i386.c (get_probe_interval): Move to earlier point.
26820         (ix86_compute_frame_layout): If -fstack-clash-protection and
26821         the frame is larger than the probe interval, then use pushes
26822         to save registers rather than reg->mem moves.
26823         (ix86_expand_prologue): Remove conditional for int_registers_saved
26824         assertion.
26826 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
26828         PR target/84014
26829         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26830         min/max for never referenced object.
26832 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
26834         PR middle-end/83977
26835         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26836         here.
26837         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26838         attributes from DECL_ATTRIBUTES (decl) without affecting
26839         DECL_ATTRIBUTES (current_function_decl).
26840         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26841         functions with non-NULL DECL_ABSTRACT_ORIGIN.
26843 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
26845         PR tree-optimization/83979
26846         * fold-const.c (fold_comparison): Use constant_boolean_node
26847         instead of boolean_{true,false}_node.
26849 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
26851         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26852         with zero counts.
26854 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26856         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26857         Simplify the clause that sets the length attribute.
26858         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26859         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26860         clause that sets the length attribute.
26861         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26863 2018-01-24  Tom de Vries  <tom@codesourcery.com>
26865         PR target/83589
26866         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26867         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26868         Add strict parameter.
26869         (prevent_branch_around_nothing): Insert dummy insn between branch to
26870         label and label with no ptx insn inbetween.
26871         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26873 2018-01-24  Tom de Vries  <tom@codesourcery.com>
26875         PR target/81352
26876         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26877         for neutered threads in warp.
26878         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26880 2018-01-24  Richard Biener  <rguenther@suse.de>
26882         PR tree-optimization/83176
26883         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26884         operands.
26886 2018-01-24  Richard Biener  <rguenther@suse.de>
26888         PR tree-optimization/82819
26889         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26890         code generating pluses that are no-ops in the target precision.
26892 2018-01-24  Richard Biener  <rguenther@suse.de>
26894         PR middle-end/84000
26895         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26897 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26899         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26900         to merge probabilities.
26901         * predict.c (probably_never_executed): Also mark as cold functions
26902         with global 0 profile and guessed local profile.
26903         * profile-count.c (profile_probability::combine_with_count): New
26904         member function.
26905         * profile-count.h (profile_probability::operator*,
26906         profile_probability::operator*=, profile_probability::operator/,
26907         profile_probability::operator/=): Reduce precision to adjusted
26908         and set value to guessed on contradictory divisions.
26909         (profile_probability::combine_with_freq): Remove.
26910         (profile_probability::combine_wiht_count): Declare.
26911         (profile_count::force_nonzero):: Set to adjusted.
26912         (profile_count::probability_in):: Set quality to adjusted.
26913         * tree-ssa-tail-merge.c (replace_block_by): Use
26914         combine_with_count.
26916 2018-01-23  Andrew Waterman  <andrew@sifive.com>
26917             Jim Wilson  <jimw@sifive.com>
26919         * config/riscv/riscv.c (riscv_stack_boundary): New.
26920         (riscv_option_override): Set riscv_stack_boundary.  Handle
26921         riscv_preferred_stack_boundary_arg.
26922         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26923         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26924         (STACK_BOUNDARY): Set to riscv_stack_boundary.
26925         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26926         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26927         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26929 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
26931         PR target/83905
26932         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26933         of struct ix86_frame.
26934         (ix86_expand_epilogue): Likewise.  Add a local variable for
26935         the reg_save_offset field in struct ix86_frame.
26937 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
26939         PR tree-optimization/82604
26940         * tree-loop-distribution.c (enum partition_kind): New enum item
26941         PKIND_PARTIAL_MEMSET.
26942         (partition_builtin_p): Support above new enum item.
26943         (generate_code_for_partition): Ditto.
26944         (compute_access_range): Differentiate cases that equality can be
26945         proven at all loops, the innermost loops or no loops.
26946         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26947         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
26948         (finalize_partitions, distribute_loop): Don't fuse partition of
26949         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26950         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26951         parloop is enabled.
26953 2018-01-23  Martin Liska  <mliska@suse.cz>
26955         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26956         order to ignore the predictor.
26957         (PRED_POLYMORPHIC_CALL): Likewise.
26958         (PRED_RECURSIVE_CALL): Likewise.
26960 2018-01-23  Martin Liska  <mliska@suse.cz>
26962         * tree-profile.c (tree_profiling): Print function header to
26963         aware reader which function we are working on.
26964         * value-prof.c (gimple_find_values_to_profile): Do not print
26965         not interesting value histograms.
26967 2018-01-23  Martin Liska  <mliska@suse.cz>
26969         * profile-count.h (enum profile_quality): Add
26970         profile_uninitialized as the first value. Do not number values
26971         as they are zero based.
26972         (profile_count::verify): Update sanity check.
26973         (profile_probability::verify): Likewise.
26975 2018-01-23  Nathan Sidwell  <nathan@acm.org>
26977         * doc/invoke.texi (ffor-scope): Deprecate.
26979 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26981         PR tree-optimization/83510
26982         * domwalk.c (set_all_edges_as_executable): New function.
26983         (dom_walker::dom_walker): Convert bool param
26984         "skip_unreachable_blocks" to enum reachability.  Move setup of
26985         edge flags to set_all_edges_as_executable and only do it when
26986         reachability is REACHABLE_BLOCKS.
26987         * domwalk.h (enum dom_walker::reachability): New enum.
26988         (dom_walker::dom_walker): Convert bool param
26989         "skip_unreachable_blocks" to enum reachability.
26990         (set_all_edges_as_executable): New decl.
26991         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
26992         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26993         "reachability".
26994         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26995         but converting true to REACHABLE_BLOCKS.
26996         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26997         * tree-vrp.c
26998         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26999         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27000         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27001         REACHABLE_BLOCKS.
27002         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27003         if check_all_array_refs will be called.
27005 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27007         * tree.c (selftest::test_location_wrappers): Add more test
27008         coverage.
27010 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27012         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27013         (selftest::test_bit_in_range): Likewise.
27015 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
27017         PR testsuite/83888
27018         * doc/sourcebuild.texi (vect_float): Say that the selector
27019         only describes the situation when -funsafe-math-optimizations is on.
27020         (vect_float_strict): Document.
27022 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
27024         PR tree-optimization/83965
27025         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27026         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27027         instead of checking only for a reduction.
27028         (vect_recog_widen_sum_pattern): Likewise.
27030 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27032         * predict.c (probably_never_executed): Only use precise profile info.
27033         (compute_function_frequency): Skip after inlining hack since we now
27034         have quality checking.
27036 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27038         * profile-count.h (profile_probability::very_unlikely,
27039         profile_probability::unlikely, profile_probability::even): Set
27040         precision to guessed.
27042 2018-01-23  Richard Biener  <rguenther@suse.de>
27044         PR tree-optimization/83963
27045         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27046         Properly terminate dominator walk when crossing the exit edge not
27047         when visiting its source block.
27049 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
27051         PR c++/83918
27052         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27053         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27055 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
27057         PR tree-optimization/83957
27058         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
27059         semicolon after for body surrounded by braces.
27061         PR tree-optimization/83081
27062         * profile-count.h (profile_probability::split): New method.
27063         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27064         Use profile_probability::split.
27065         (do_compare_rtx_and_jump): Fix adjustment of probabilities
27066         when splitting a single conditional jump into 2.
27068 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
27070         PR tree-optimization/69452
27071         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27072         decl.
27074 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27076         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27077         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27078         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27080 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27082         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27083         declaration.
27084         * config/rl78/rl78.md (movdi): New define_expand.
27085         * config/rl78/rl78.c (rl78_split_movdi): New function.
27087 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
27089         PR target/83862
27090         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27091         no longer used.
27092         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27093         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27094         128-bit to produce an UNSPEC move to get the double word with the
27095         signbit and then a shift directly to do signbit.
27096         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27097         implementation with a new version that just does either a direct
27098         move or a regular move.  Move memory interface to separate insns.
27099         Move insns so they are next to the expander.
27100         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27101         with signbit move.  Split big and little endian case.
27102         (signbit<mode>2_dm_mem_le): Likewise.
27103         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27104         (signbit<mode>2_dm2): Likewise.
27106 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27108         * config/rl78/rl78.md (anddi3): New define_expand.
27110 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27112         * config/rl78/rl78.md (umindi3): New define_expand.
27114 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27116         * config/rl78/rl78.md (smindi3): New define_expand.
27118 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27120         * config/rl78/rl78.md (smaxdi3): New define_expand.
27122 2018-01-22  Carl Love  <cel@us.ibm.com>
27124         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27125         LVX_V1TI): Add macro expansion.
27126         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27127         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27128         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27129         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27130         Change check to determine if the instruction is a byte reversing
27131         entry.  Fix typo in comment.
27132         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27133         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27134         Add def_builtin calls for new builtins.
27135         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27136         Add define_insn expansion.
27138 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27140         * config/rl78/rl78.md (umaxdi3): New define_expand.
27142 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27144         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27145         for non-QImode registers.
27147 2018-01-22  Richard Biener  <rguenther@suse.de>
27149         PR tree-optimization/83963
27150         * graphite-scop-detection.c (scop_detection::get_sese): Delay
27151         including the loop exit block.
27152         (scop_detection::merge_sese): Likewise.
27153         (scop_detection::add_scop): Do it here instead.
27155 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27157         * doc/sourcebuild.texi (arm_softfloat): Document.
27159 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
27161         PR gcc/77734
27162         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27163         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27164         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27166 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27167             David Edelsohn  <dje.gcc@gmail.com>
27169         PR target/83946
27170         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27171         Change "crset eq" to "crset 2".
27172         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27173         (*call_indirect_aix<mode>_nospec): Likewise.
27174         (*call_value_indirect_aix<mode>_nospec): Likewise.
27175         (*call_indirect_elfv2<mode>_nospec): Likewise.
27176         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27177         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27178         change assembly output from . to $.
27179         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27180         (indirect_jump<mode>_nospec): Change assembly output from . to $.
27181         (*tablejump<mode>_internal1_nospec): Likewise.
27183 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
27185         PR target/80870
27186         * config/sh/sh_optimize_sett_clrt.cc:
27187         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27189 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
27191         PR tree-optimization/83940
27192         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27193         offset_dt to vect_constant_def rather than vect_unknown_def_type.
27194         (vect_check_load_store_mask): Add a mask_dt_out parameter and
27195         use it to pass back the definition type.
27196         (vect_check_store_rhs): Likewise rhs_dt_out.
27197         (vect_build_gather_load_calls): Add a mask_dt argument and use
27198         it instead of a call to vect_is_simple_use.
27199         (vectorizable_store): Update calls to vect_check_load_store_mask
27200         and vect_check_store_rhs.  Use the dt returned by the latter instead
27201         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
27202         instead of calls to vect_is_simple_use.  Pass the scalar rather
27203         than the vector operand to vect_is_simple_use when handling
27204         second and subsequent copies of an rhs value.
27205         (vectorizable_load): Update calls to vect_check_load_store_mask
27206         and vect_build_gather_load_calls.  Use the cached mask_dt and
27207         gs_info.offset_dt instead of calls to vect_is_simple_use.
27209 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
27211         PR middle-end/83945
27212         * tree-emutls.c: Include gimplify.h.
27213         (lower_emutls_2): New function.
27214         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27215         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27216         it before further processing.
27218         PR target/83930
27219         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27220         UINTVAL (trueop1) instead of INTVAL (op1).
27222 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
27224         PR debug/81570
27225         PR debug/83728
27226         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27227         INCOMING_FRAME_SP_OFFSET if not defined.
27228         (scan_trace): Add ENTRY argument.  If true and
27229         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27230         emit a note to adjust the CFA offset.
27231         (create_cfi_notes): Adjust scan_trace callers.
27232         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27233         INCOMING_FRAME_SP_OFFSET in the CIE.
27234         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27235         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27236         Likewise.
27237         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27238         * doc/tm.texi: Regenerated.
27240 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27242         PR rtl-optimization/83147
27243         * lra-constraints.c (remove_inheritance_pseudos): Use
27244         lra_substitute_pseudo_within_insn.
27246 2018-01-19  Tom de Vries  <tom@codesourcery.com>
27247             Cesar Philippidis  <cesar@codesourcery.com>
27249         PR target/83920
27250         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27252 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
27254         PR target/83790
27255         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27256         spaces for function labels.
27258 2018-01-19  Martin Liska  <mliska@suse.cz>
27260         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27261         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27262         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27263         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27264         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27265         (PRED_CONST_RETURN): Change from 69 to 65.
27266         (PRED_NULL_RETURN): Change from 91 to 71.
27267         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27268         (PRED_LOOP_GUARD): Change from 66 to 73.
27270 2018-01-19  Martin Liska  <mliska@suse.cz>
27272         * predict.c (predict_insn_def): Add new assert.
27273         (struct branch_predictor): Change type to signed integer.
27274         (test_prediction_value_range): Amend test to cover
27275         PROB_UNINITIALIZED.
27276         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27277         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27278         (PRED_LOOP_ITERATIONS_MAX): Likewise.
27279         (PRED_LOOP_IV_COMPARE): Likewise.
27280         * predict.h (PROB_UNINITIALIZED): Define new constant.
27282 2018-01-19  Martin Liska  <mliska@suse.cz>
27284         * predict.c (dump_prediction): Add new format for
27285         analyze_brprob.py script which is enabled with -details
27286         suboption.
27287         * profile-count.h (precise_p): New function.
27289 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27291         PR tree-optimization/83922
27292         * tree-vect-loop.c (vect_verify_full_masking): Return false if
27293         there are no statements that need masking.
27294         (vect_active_double_reduction_p): New function.
27295         (vect_analyze_loop_operations): Use it when handling phis that
27296         are not in the loop header.
27298 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27300         PR tree-optimization/83914
27301         * tree-vect-loop.c (vectorizable_induction): Don't convert
27302         init_expr or apply the peeling adjustment for inductions
27303         that are nested within the vectorized loop.
27305 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27307         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27308         instead of NEG.
27310 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27312         PR sanitizer/81715
27313         PR testsuite/83882
27314         * function.h (gimplify_parameters): Add gimple_seq * argument.
27315         * function.c: Include gimple.h and options.h.
27316         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27317         for the added local temporaries if needed.
27318         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27319         if there are any parameter cleanups, wrap whole body into a
27320         try/finally with the cleanups.
27322 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
27324         PR target/82964
27325         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27326         Use GET_MODE_CLASS for scalar floating point.
27328 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27330         PR ipa/82256
27331         patch by PaX Team
27332         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27333         Fix call of call_cgraph_insertion_hooks.
27335 2018-01-18  Martin Sebor  <msebor@redhat.com>
27337         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27339 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27341         PR ipa/83619
27342         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27343         frequencies.
27345 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
27347         PR other/70268
27348         * common.opt: (-ffile-prefix-map): New option.
27349         * opts.c (common_handle_option): Defer it.
27350         * opts-global.c (handle_common_deferred_options): Handle it.
27351         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27352         * file-prefix-map.h: New file.
27353         (remap_debug_filename, add_debug_prefix_map): ...here.
27354         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27355         * final.c (debug_prefix_map, add_debug_prefix_map
27356         remap_debug_filename): Move to...
27357         * file-prefix-map.c: New file.
27358         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27359         generalize, get rid of alloca(), use strrchr() instead of strchr().
27360         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27361         Implement in terms of add_prefix_map().
27362         (remap_macro_filename, remap_debug_filename): Implement in term of
27363         remap_filename().
27364         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27365         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27366         * dbxout.c: Include file-prefix-map.h.
27367         * varasm.c: Likewise.
27368         * vmsdbgout.c: Likewise.
27369         * xcoffout.c: Likewise.
27370         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27371         * doc/cppopts.texi (-fmacro-prefix-map): Document.
27372         * doc/invoke.texi (-ffile-prefix-map): Document.
27373         (-fdebug-prefix-map): Update description.
27375 2018-01-18  Martin Liska  <mliska@suse.cz>
27377         * config/i386/i386.c (indirect_thunk_name): Document that also
27378         lfence is emitted.
27379         (output_indirect_thunk): Document why both instructions
27380         (pause and lfence) are generated.
27382 2018-01-18  Richard Biener  <rguenther@suse.de>
27384         PR tree-optimization/83887
27385         * graphite-scop-detection.c
27386         (scop_detection::get_nearest_dom_with_single_entry): Remove.
27387         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27388         (scop_detection::merge_sese): Re-implement with a flood-fill
27389         algorithm that properly finds a SESE region if it exists.
27391 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27393         PR c/61240
27394         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27395         pointer_diff optimizations use view_convert instead of convert.
27397 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27399         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27400         Generate different code for -mno-speculate-indirect-jumps.
27401         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27402         (*call_indirect_aix<mode>): Disable for
27403         -mno-speculate-indirect-jumps.
27404         (*call_indirect_aix<mode>_nospec): New define_insn.
27405         (*call_value_indirect_aix<mode>): Disable for
27406         -mno-speculate-indirect-jumps.
27407         (*call_value_indirect_aix<mode>_nospec): New define_insn.
27408         (*sibcall_nonlocal_sysv<mode>): Generate different code for
27409         -mno-speculate-indirect-jumps.
27410         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27412 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
27414         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27415         long double type, set the flags for noting the default long double
27416         type, even if we don't pass or return a long double type.
27418 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
27420         PR ipa/83051
27421         * ipa-inline.c (flatten_function): Do not overwrite final inlining
27422         failure.
27424 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
27426         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27427         support for merge[hl].
27428         (fold_mergehl_helper): New helper function.
27429         (tree-vector-builder.h): New #include for tree_vector_builder usage.
27430         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27431         (altivec_vmrglw_direct): Add xxmrglw insn.
27433 2018-01-17  Andrew Waterman  <andrew@sifive.com>
27435         * config/riscv/riscv.c (riscv_conditional_register_usage): If
27436         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27438 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
27440         PR lto/83121
27441         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27442         call the lto_location_cache before reading the
27443         DECL_SOURCE_LOCATION of the types.
27445 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
27446             Richard Sandiford  <richard.sandiford@linaro.org>
27448         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27449         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27450         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27451         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27452         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27453         Add declaration.
27454         * config/aarch64/constraints.md (aarch64_movti_operand):
27455         Limit immediates.
27456         * config/aarch64/predicates.md (Uti): Add new constraint.
27458 2018-01-17  Carl Love  <cel@us.ibm.com>
27460         * config/rs6000/vsx.md (define_expand xl_len_r,
27461         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27462         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27463         lxvll.
27464         (define_expand, define_insn): Move the shift left from  the
27465         define_insn to the define_expand for lxvl and stxvl instructions.
27466         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27467         and XL_LEN_R definitions to PURE.
27469 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
27471         * config/i386/i386.c (indirect_thunk_name): Declare regno
27472         as unsigned int.  Compare regno with INVALID_REGNUM.
27473         (output_indirect_thunk): Ditto.
27474         (output_indirect_thunk_function): Ditto.
27475         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
27476         in the call to output_indirect_thunk_function.
27478 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
27480         PR middle-end/83884
27481         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27482         rather than the size of inner_type to determine the stack slot size
27483         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27485 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
27487         PR target/83546
27488         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27489         to PTA_SILVERMONT.
27491 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
27493         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27494         endian Linux systems to optionally enable multilibs for selecting
27495         the long double type if the user configured an explicit type.
27496         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27497         have no long double multilibs if not defined.
27498         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27499         warn if the user used -mabi={ieee,ibm}longdouble and we built
27500         multilibs for long double.
27501         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27502         appropriate multilib option.
27503         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27504         multilib options.
27505         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27506         for building long double multilibs.
27507         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27509 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
27511         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27512         copies.
27514         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27515         64 bits.
27516         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27517         128 bits.
27519         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27520         variables.
27522         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27523         return value.
27525 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
27527         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27528         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27530 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27532         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27533         different rtl trees depending on TARGET_64BIT.
27534         (rs6000_gen_lvx): Likewise.
27536 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
27538         * config/visium/visium.md (nop): Tweak comment.
27539         (hazard_nop): Likewise.
27541 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27543         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27544         -mspeculate-indirect-jumps.
27545         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27546         for -mno-speculate-indirect-jumps.
27547         (*call_indirect_elfv2<mode>_nospec): New define_insn.
27548         (*call_value_indirect_elfv2<mode>): Disable for
27549         -mno-speculate-indirect-jumps.
27550         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27551         (indirect_jump): Emit different RTL for
27552         -mno-speculate-indirect-jumps.
27553         (*indirect_jump<mode>): Disable for
27554         -mno-speculate-indirect-jumps.
27555         (*indirect_jump<mode>_nospec): New define_insn.
27556         (tablejump): Emit different RTL for
27557         -mno-speculate-indirect-jumps.
27558         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27559         (tablejumpsi_nospec): New define_expand.
27560         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27561         (tablejumpdi_nospec): New define_expand.
27562         (*tablejump<mode>_internal1): Disable for
27563         -mno-speculate-indirect-jumps.
27564         (*tablejump<mode>_internal1_nospec): New define_insn.
27565         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27566         option.
27568 2018-01-16  Artyom Skrobov tyomitch@gmail.com
27570         * caller-save.c (insert_save): Drop unnecessary parameter.  All
27571         callers updated.
27573 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27574             Richard Biener  <rguenth@suse.de>
27576         PR libgomp/83590
27577         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27578         return early, inline manually is_gimple_sizepos.  Make sure if we
27579         call gimplify_expr we don't end up with a gimple constant.
27580         * tree.c (variably_modified_type_p): Don't return true for
27581         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
27582         * gimplify.h (is_gimple_sizepos): Remove.
27584 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27586         PR tree-optimization/83857
27587         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27588         vectorizable_live_operation for pure SLP statements.
27589         (vectorizable_live_operation): Handle PHIs.
27591 2018-01-16  Richard Biener  <rguenther@suse.de>
27593         PR tree-optimization/83867
27594         * tree-vect-stmts.c (vect_transform_stmt): Precompute
27595         nested_in_vect_loop_p since the scalar stmt may get invalidated.
27597 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27599         PR c/83844
27600         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27601         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27602         If off is not INTEGER_CST, issue a may not be aligned warning
27603         rather than isn't aligned.  Use isn%'t rather than isn't.
27604         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27605         into MULT_EXPR.
27606         <case MULT_EXPR>: Improve the case when bottom and one of the
27607         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27608         operand, in that case check if the other operand is multiple of
27609         bottom divided by the INTEGER_CST operand.
27611 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27613         PR target/83858
27614         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27615         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27616         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27617         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27618         * config/pa/pa.c (pa_function_arg_advance): Likewise.
27619         (pa_function_arg, pa_arg_partial_bytes): Likewise.
27620         (pa_function_arg_size): New function.
27622 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27624         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27625         in a separate statement.
27627 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27629         PR tree-optimization/83847
27630         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27631         group gathers and scatters.
27633 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27635         PR rtl-optimization/86620
27636         * params.def (max-sched-ready-insns): Bump minimum value to 1.
27638         PR rtl-optimization/83213
27639         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27640         to last if both are JUMP_INSNs.
27642         PR tree-optimization/83843
27643         * gimple-ssa-store-merging.c
27644         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27645         store_immediate_info for bswap/nop orig_stores.
27647 2018-01-15  Andrew Waterman  <andrew@sifive.com>
27649         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27650         !TARGET_MUL.
27651         <UDIV>: Increase cost if !TARGET_DIV.
27653 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
27655         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27656         (define_attr "cr_logical_3op"): New.
27657         (cceq_ior_compare): Adjust.
27658         (cceq_ior_compare_complement): Adjust.
27659         (*cceq_rev_compare): Adjust.
27660         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27661         (is_cracked_insn): Adjust.
27662         (insn_must_be_first_in_group): Adjust.
27663         * config/rs6000/40x.md: Adjust.
27664         * config/rs6000/440.md: Adjust.
27665         * config/rs6000/476.md: Adjust.
27666         * config/rs6000/601.md: Adjust.
27667         * config/rs6000/603.md: Adjust.
27668         * config/rs6000/6xx.md: Adjust.
27669         * config/rs6000/7450.md: Adjust.
27670         * config/rs6000/7xx.md: Adjust.
27671         * config/rs6000/8540.md: Adjust.
27672         * config/rs6000/cell.md: Adjust.
27673         * config/rs6000/e300c2c3.md: Adjust.
27674         * config/rs6000/e500mc.md: Adjust.
27675         * config/rs6000/e500mc64.md: Adjust.
27676         * config/rs6000/e5500.md: Adjust.
27677         * config/rs6000/e6500.md: Adjust.
27678         * config/rs6000/mpc.md: Adjust.
27679         * config/rs6000/power4.md: Adjust.
27680         * config/rs6000/power5.md: Adjust.
27681         * config/rs6000/power6.md: Adjust.
27682         * config/rs6000/power7.md: Adjust.
27683         * config/rs6000/power8.md: Adjust.
27684         * config/rs6000/power9.md: Adjust.
27685         * config/rs6000/rs64.md: Adjust.
27686         * config/rs6000/titan.md: Adjust.
27688 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27690         * config/i386/predicates.md (indirect_branch_operand): Rewrite
27691         ix86_indirect_branch_register logic.
27693 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27695         * config/i386/constraints.md (Bs): Update
27696         ix86_indirect_branch_register check.  Don't check
27697         ix86_indirect_branch_register with GOT_memory_operand.
27698         (Bw): Likewise.
27699         * config/i386/predicates.md (GOT_memory_operand): Don't check
27700         ix86_indirect_branch_register here.
27701         (GOT32_symbol_operand): Likewise.
27703 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27705         * config/i386/predicates.md (constant_call_address_operand):
27706         Rewrite ix86_indirect_branch_register logic.
27707         (sibcall_insn_operand): Likewise.
27709 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27711         * config/i386/constraints.md (Bs): Replace
27712         ix86_indirect_branch_thunk_register with
27713         ix86_indirect_branch_register.
27714         (Bw): Likewise.
27715         * config/i386/i386.md (indirect_jump): Likewise.
27716         (tablejump): Likewise.
27717         (*sibcall_memory): Likewise.
27718         (*sibcall_value_memory): Likewise.
27719         Peepholes of indirect call and jump via memory: Likewise.
27720         * config/i386/i386.opt: Likewise.
27721         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27722         (GOT_memory_operand): Likewise.
27723         (call_insn_operand): Likewise.
27724         (sibcall_insn_operand): Likewise.
27725         (GOT32_symbol_operand): Likewise.
27727 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27729         PR middle-end/83837
27730         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27731         type rather than type addr's type points to.
27732         (expand_omp_atomic_mutex): Likewise.
27733         (expand_omp_atomic): Likewise.
27735 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27737         PR target/83839
27738         * config/i386/i386.c (output_indirect_thunk_function): Use
27739         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27740         for  __x86_return_thunk.
27742 2018-01-15  Richard Biener  <rguenther@suse.de>
27744         PR middle-end/83850
27745         * expmed.c (extract_bit_field_1): Fix typo.
27747 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27749         PR target/83687
27750         * config/arm/iterators.md (VF): New mode iterator.
27751         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27752         Remove integer-related logic from pattern.
27753         (neon_vabd<mode>_3): Likewise.
27755 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27757         PR middle-end/82694
27758         * common.opt (fstrict-overflow): No longer an alias.
27759         (fwrapv-pointer): New option.
27760         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27761         also for pointer types based on flag_wrapv_pointer.
27762         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27763         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27764         opts->x_flag_wrapv got set.
27765         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27766         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27767         POINTER_TYPE_OVERFLOW_UNDEFINED.
27768         * match.pd: Likewise in address comparison pattern.
27769         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27771 2018-01-15  Richard Biener  <rguenther@suse.de>
27773         PR lto/83804
27774         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27775         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
27776         Reset type names to their identifier if their TYPE_DECL doesn't
27777         have linkage (and thus is used for ODR and devirt).
27778         (save_debug_info_for_decl): Remove.
27779         (save_debug_info_for_type): Likewise.
27780         (add_tree_to_fld_list): Adjust.
27781         * tree-pretty-print.c (dump_generic_node): Make dumping of
27782         type names more robust.
27784 2018-01-15  Richard Biener  <rguenther@suse.de>
27786         * BASE-VER: Bump to 8.0.1.
27788 2018-01-14  Martin Sebor  <msebor@redhat.com>
27790         PR other/83508
27791         * builtins.c (check_access): Avoid warning when the no-warning bit
27792         is set.
27794 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
27796         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27797         * ira-color (allocno_hard_regs_compare): Likewise.
27799 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
27801         PR target/83013
27802         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27803         Use .pushsection/.popsection.
27805 2018-01-14  Martin Sebor  <msebor@redhat.com>
27807         PR c++/81327
27808         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27810 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
27812         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27813         entry from extra_headers.
27814         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27815         extra_headers, make the list bitwise identical to the i?86-*-* one.
27817 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27819         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27820         -mcmodel=large with -mindirect-branch=thunk,
27821         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27822         -mfunction-return=thunk-extern.
27823         * doc/invoke.texi: Document -mcmodel=large is incompatible with
27824         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27825         -mfunction-return=thunk and -mfunction-return=thunk-extern.
27827 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27829         * config/i386/i386.c (print_reg): Print the name of the full
27830         integer register without '%'.
27831         (ix86_print_operand): Handle 'V'.
27832         * doc/extend.texi: Document 'V' modifier.
27834 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27836         * config/i386/constraints.md (Bs): Disallow memory operand for
27837         -mindirect-branch-register.
27838         (Bw): Likewise.
27839         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27840         (GOT_memory_operand): Likewise.
27841         (call_insn_operand): Likewise.
27842         (sibcall_insn_operand): Likewise.
27843         (GOT32_symbol_operand): Likewise.
27844         * config/i386/i386.md (indirect_jump): Call convert_memory_address
27845         for -mindirect-branch-register.
27846         (tablejump): Likewise.
27847         (*sibcall_memory): Likewise.
27848         (*sibcall_value_memory): Likewise.
27849         Disallow peepholes of indirect call and jump via memory for
27850         -mindirect-branch-register.
27851         (*call_pop): Replace m with Bw.
27852         (*call_value_pop): Likewise.
27853         (*sibcall_pop_memory): Replace m with Bs.
27854         * config/i386/i386.opt (mindirect-branch-register): New option.
27855         * doc/invoke.texi: Document -mindirect-branch-register option.
27857 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27859         * config/i386/i386-protos.h (ix86_output_function_return): New.
27860         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27861         set function_return_type.
27862         (indirect_thunk_name): Add ret_p to indicate thunk for function
27863         return.
27864         (output_indirect_thunk_function): Pass false to
27865         indirect_thunk_name.
27866         (ix86_output_indirect_branch_via_reg): Likewise.
27867         (ix86_output_indirect_branch_via_push): Likewise.
27868         (output_indirect_thunk_function): Create alias for function
27869         return thunk if regno < 0.
27870         (ix86_output_function_return): New function.
27871         (ix86_handle_fndecl_attribute): Handle function_return.
27872         (ix86_attribute_table): Add function_return.
27873         * config/i386/i386.h (machine_function): Add
27874         function_return_type.
27875         * config/i386/i386.md (simple_return_internal): Use
27876         ix86_output_function_return.
27877         (simple_return_internal_long): Likewise.
27878         * config/i386/i386.opt (mfunction-return=): New option.
27879         (indirect_branch): Mention -mfunction-return=.
27880         * doc/extend.texi: Document function_return function attribute.
27881         * doc/invoke.texi: Document -mfunction-return= option.
27883 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27885         * config/i386/i386-opts.h (indirect_branch): New.
27886         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27887         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27888         with local indirect jump when converting indirect call and jump.
27889         (ix86_set_indirect_branch_type): New.
27890         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27891         (indirectlabelno): New.
27892         (indirect_thunk_needed): Likewise.
27893         (indirect_thunk_bnd_needed): Likewise.
27894         (indirect_thunks_used): Likewise.
27895         (indirect_thunks_bnd_used): Likewise.
27896         (INDIRECT_LABEL): Likewise.
27897         (indirect_thunk_name): Likewise.
27898         (output_indirect_thunk): Likewise.
27899         (output_indirect_thunk_function): Likewise.
27900         (ix86_output_indirect_branch_via_reg): Likewise.
27901         (ix86_output_indirect_branch_via_push): Likewise.
27902         (ix86_output_indirect_branch): Likewise.
27903         (ix86_output_indirect_jmp): Likewise.
27904         (ix86_code_end): Call output_indirect_thunk_function if needed.
27905         (ix86_output_call_insn): Call ix86_output_indirect_branch if
27906         needed.
27907         (ix86_handle_fndecl_attribute): Handle indirect_branch.
27908         (ix86_attribute_table): Add indirect_branch.
27909         * config/i386/i386.h (machine_function): Add indirect_branch_type
27910         and has_local_indirect_jump.
27911         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27912         to true.
27913         (tablejump): Likewise.
27914         (*indirect_jump): Use ix86_output_indirect_jmp.
27915         (*tablejump_1): Likewise.
27916         (simple_return_indirect_internal): Likewise.
27917         * config/i386/i386.opt (mindirect-branch=): New option.
27918         (indirect_branch): New.
27919         (keep): Likewise.
27920         (thunk): Likewise.
27921         (thunk-inline): Likewise.
27922         (thunk-extern): Likewise.
27923         * doc/extend.texi: Document indirect_branch function attribute.
27924         * doc/invoke.texi: Document -mindirect-branch= option.
27926 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
27928         PR ipa/83051
27929         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27931 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
27933         * ipa-inline.c (want_inline_small_function_p): Return false if
27934         inlining has already failed with CIF_FINAL_ERROR.
27935         (update_caller_keys): Call want_inline_small_function_p before
27936         can_inline_edge_p.
27937         (update_callee_keys): Likewise.
27939 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27941         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27942         New function.
27943         (rs6000_quadword_masked_address_p): Likewise.
27944         (quad_aligned_load_p): Likewise.
27945         (quad_aligned_store_p): Likewise.
27946         (const_load_sequence_p): Add comment to describe the outer-most loop.
27947         (mimic_memory_attributes_and_flags): New function.
27948         (rs6000_gen_stvx): Likewise.
27949         (replace_swapped_aligned_store): Likewise.
27950         (rs6000_gen_lvx): Likewise.
27951         (replace_swapped_aligned_load): Likewise.
27952         (replace_swapped_load_constant): Capitalize argument name in
27953         comment describing this function.
27954         (rs6000_analyze_swaps): Add a third pass to search for vector loads
27955         and stores that access quad-word aligned addresses and replace
27956         with stvx or lvx instructions when appropriate.
27957         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27958         New function prototype.
27959         (rs6000_quadword_masked_address_p): Likewise.
27960         (rs6000_gen_lvx): Likewise.
27961         (rs6000_gen_stvx): Likewise.
27962         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27963         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27964         when memory address is aligned.
27965         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27966         this split to select lvx instruction when memory address is aligned.
27967         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27968         instruction when memory address is aligned.
27969         (*vsx_le_perm_load_v16qi): Likewise.
27970         (four unnamed splitters): Modify to select the stvx instruction
27971         when memory is aligned.
27973 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
27975         * predict.c (determine_unlikely_bbs): Handle correctly BBs
27976         which appears in the queue multiple times.
27978 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27979             Alan Hayward  <alan.hayward@arm.com>
27980             David Sherwood  <david.sherwood@arm.com>
27982         * tree-vectorizer.h (vec_lower_bound): New structure.
27983         (_loop_vec_info): Add check_nonzero and lower_bounds.
27984         (LOOP_VINFO_CHECK_NONZERO): New macro.
27985         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27986         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27987         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27988         fields.  Make seg_len the distance travelled, not including the
27989         access size.
27990         (dr_direction_indicator): Declare.
27991         (dr_zero_step_indicator): Likewise.
27992         (dr_known_forward_stride_p): Likewise.
27993         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27994         tree-ssanames.h.
27995         (runtime_alias_check_p): Allow runtime alias checks with
27996         variable strides.
27997         (operator ==): Compare access_size and align.
27998         (prune_runtime_alias_test_list): Rework for new distinction between
27999         the access_size and seg_len.
28000         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
28001         segment lengths.
28002         (get_segment_min_max): New function.
28003         (create_intersect_range_checks): Use it.
28004         (dr_step_indicator): New function.
28005         (dr_direction_indicator): Likewise.
28006         (dr_zero_step_indicator): Likewise.
28007         (dr_known_forward_stride_p): Likewise.
28008         * tree-loop-distribution.c (data_ref_segment_size): Return
28009         DR_STEP * (niters - 1).
28010         (compute_alias_check_pairs): Update call to the dr_with_seg_len
28011         constructor.
28012         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28013         (vect_preserves_scalar_order_p): New function, split out from...
28014         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
28015         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28016         (vect_vfa_access_size): New function.
28017         (vect_vfa_align): Likewise.
28018         (vect_compile_time_alias): Take access_size_a and access_b arguments.
28019         (dump_lower_bound): New function.
28020         (vect_check_lower_bound): Likewise.
28021         (vect_small_gap_p): Likewise.
28022         (vectorizable_with_step_bound_p): Likewise.
28023         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28024         depencies if the vectorization factor is 1.  Convert the checks
28025         for nonzero steps into checks on the bounds of DR_STEP.  Try using
28026         a bunds check for variable steps if the minimum required step is
28027         relatively small. Update calls to the dr_with_seg_len
28028         constructor and to vect_compile_time_alias.
28029         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28030         function.
28031         (vect_loop_versioning): Call it.
28032         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28033         when retrying.
28034         (vect_estimate_min_profitable_iters): Account for any bounds checks.
28036 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28037             Alan Hayward  <alan.hayward@arm.com>
28038             David Sherwood  <david.sherwood@arm.com>
28040         * doc/sourcebuild.texi (vect_scatter_store): Document.
28041         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28042         optabs.
28043         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28044         Document.
28045         * genopinit.c (main): Add supports_vec_scatter_store and
28046         supports_vec_scatter_store_cached to target_optabs.
28047         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28048         IFN_MASK_SCATTER_STORE.
28049         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28050         functions.
28051         * internal-fn.h (internal_store_fn_p): Declare.
28052         (internal_fn_stored_value_index): Likewise.
28053         * internal-fn.c (scatter_store_direct): New macro.
28054         (expand_scatter_store_optab_fn): New function.
28055         (direct_scatter_store_optab_supported_p): New macro.
28056         (internal_store_fn_p): New function.
28057         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28058         IFN_MASK_SCATTER_STORE.
28059         (internal_fn_mask_index): Likewise.
28060         (internal_fn_stored_value_index): New function.
28061         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28062         for scatter stores.
28063         * optabs-query.h (supports_vec_scatter_store_p): Declare.
28064         * optabs-query.c (supports_vec_scatter_store_p): New function.
28065         * tree-vectorizer.h (vect_get_store_rhs): Declare.
28066         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28067         true for scatter stores.
28068         (vect_gather_scatter_fn_p): Handle scatter stores too.
28069         (vect_check_gather_scatter): Consider using scatter stores if
28070         supports_vec_scatter_store_p.
28071         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28072         scatter stores too.
28073         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28074         internal_fn_stored_value_index.
28075         (check_load_store_masking): Handle scatter stores too.
28076         (vect_get_store_rhs): Make public.
28077         (vectorizable_call): Use internal_store_fn_p.
28078         (vectorizable_store): Handle scatter store internal functions.
28079         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28080         when deciding whether the end of the group has been reached.
28081         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28082         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28083         (mask_scatter_store<mode>): New insns.
28085 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28086             Alan Hayward  <alan.hayward@arm.com>
28087             David Sherwood  <david.sherwood@arm.com>
28089         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28090         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28091         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28092         function.
28093         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28094         Use vect_truncate_gather_scatter_offset if we can't treat the
28095         operation as a normal gather load or scatter store.
28096         (get_group_load_store_type): Take the gather_scatter_info
28097         as argument.  Try using a gather load or scatter store for
28098         single-element groups.
28099         (get_load_store_type): Update calls to get_group_load_store_type
28100         and vect_use_strided_gather_scatters_p.
28102 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28103             Alan Hayward  <alan.hayward@arm.com>
28104             David Sherwood  <david.sherwood@arm.com>
28106         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28107         optional tree argument.
28108         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28109         null target hooks.
28110         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28111         but continue to use the current value as a fallback.
28112         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28113         to compare the updates.
28114         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28115         (get_load_store_type): Use it when handling a strided access.
28116         (vect_get_strided_load_store_ops): New function.
28117         (vect_get_data_ptr_increment): Likewise.
28118         (vectorizable_load): Handle strided gather loads.  Always pass
28119         a step to vect_create_data_ref_ptr and bump_vector_ptr.
28121 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28122             Alan Hayward  <alan.hayward@arm.com>
28123             David Sherwood  <david.sherwood@arm.com>
28125         * doc/md.texi (gather_load@var{m}): Document.
28126         (mask_gather_load@var{m}): Likewise.
28127         * genopinit.c (main): Add supports_vec_gather_load and
28128         supports_vec_gather_load_cached to target_optabs.
28129         * optabs-tree.c (init_tree_optimization_optabs): Use
28130         ggc_cleared_alloc to allocate target_optabs.
28131         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28132         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28133         functions.
28134         * internal-fn.h (internal_load_fn_p): Declare.
28135         (internal_gather_scatter_fn_p): Likewise.
28136         (internal_fn_mask_index): Likewise.
28137         (internal_gather_scatter_fn_supported_p): Likewise.
28138         * internal-fn.c (gather_load_direct): New macro.
28139         (expand_gather_load_optab_fn): New function.
28140         (direct_gather_load_optab_supported_p): New macro.
28141         (direct_internal_fn_optab): New function.
28142         (internal_load_fn_p): Likewise.
28143         (internal_gather_scatter_fn_p): Likewise.
28144         (internal_fn_mask_index): Likewise.
28145         (internal_gather_scatter_fn_supported_p): Likewise.
28146         * optabs-query.c (supports_at_least_one_mode_p): New function.
28147         (supports_vec_gather_load_p): Likewise.
28148         * optabs-query.h (supports_vec_gather_load_p): Declare.
28149         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28150         and memory_type field.
28151         (NUM_PATTERNS): Bump to 15.
28152         * tree-vect-data-refs.c: Include internal-fn.h.
28153         (vect_gather_scatter_fn_p): New function.
28154         (vect_describe_gather_scatter_call): Likewise.
28155         (vect_check_gather_scatter): Try using internal functions for
28156         gather loads.  Recognize existing calls to a gather load function.
28157         (vect_analyze_data_refs): Consider using gather loads if
28158         supports_vec_gather_load_p.
28159         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28160         (vect_get_gather_scatter_offset_type): Likewise.
28161         (vect_convert_mask_for_vectype): Likewise.
28162         (vect_add_conversion_to_patterm): Likewise.
28163         (vect_try_gather_scatter_pattern): Likewise.
28164         (vect_recog_gather_scatter_pattern): New pattern recognizer.
28165         (vect_vect_recog_func_ptrs): Add it.
28166         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28167         internal_fn_mask_index and internal_gather_scatter_fn_p.
28168         (check_load_store_masking): Take the gather_scatter_info as an
28169         argument and handle gather loads.
28170         (vect_get_gather_scatter_ops): New function.
28171         (vectorizable_call): Check internal_load_fn_p.
28172         (vectorizable_load): Likewise.  Handle gather load internal
28173         functions.
28174         (vectorizable_store): Update call to check_load_store_masking.
28175         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28176         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28177         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28178         (aarch64_gather_scale_operand_d): New predicates.
28179         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28180         (mask_gather_load<mode>): New insns.
28182 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28183             Alan Hayward  <alan.hayward@arm.com>
28184             David Sherwood  <david.sherwood@arm.com>
28186         * optabs.def (fold_left_plus_optab): New optab.
28187         * doc/md.texi (fold_left_plus_@var{m}): Document.
28188         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28189         * internal-fn.c (fold_left_direct): Define.
28190         (expand_fold_left_optab_fn): Likewise.
28191         (direct_fold_left_optab_supported_p): Likewise.
28192         * fold-const-call.c (fold_const_fold_left): New function.
28193         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28194         * tree-parloops.c (valid_reduction_p): New function.
28195         (gather_scalar_reductions): Use it.
28196         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28197         (vect_finish_replace_stmt): Declare.
28198         * tree-vect-loop.c (fold_left_reduction_fn): New function.
28199         (needs_fold_left_reduction_p): New function, split out from...
28200         (vect_is_simple_reduction): ...here.  Accept reductions that
28201         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28202         (vect_force_simple_reduction): Also store the reduction type in
28203         the assignment's STMT_VINFO_REDUC_TYPE.
28204         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28205         (merge_with_identity): New function.
28206         (vect_expand_fold_left): Likewise.
28207         (vectorize_fold_left_reduction): Likewise.
28208         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
28209         scalar phi in place for it.  Check for target support and reject
28210         cases that would reassociate the operation.  Defer the transform
28211         phase to vectorize_fold_left_reduction.
28212         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28213         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28214         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28216 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28218         * tree-if-conv.c (predicate_mem_writes): Remove redundant
28219         call to ifc_temp_var.
28221 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28222             Alan Hayward  <alan.hayward@arm.com>
28223             David Sherwood  <david.sherwood@arm.com>
28225         * target.def (legitimize_address_displacement): Take the original
28226         offset as a poly_int.
28227         * targhooks.h (default_legitimize_address_displacement): Update
28228         accordingly.
28229         * targhooks.c (default_legitimize_address_displacement): Likewise.
28230         * doc/tm.texi: Regenerate.
28231         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28232         as an argument, moving assert of ad->disp == ad->disp_term to...
28233         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
28234         Try calling targetm.legitimize_address_displacement before expanding
28235         the address rather than afterwards, and adjust for the new interface.
28236         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28237         Match the new hook interface.  Handle SVE addresses.
28238         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28239         new hook interface.
28241 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28243         * Makefile.in (OBJS): Add early-remat.o.
28244         * target.def (select_early_remat_modes): New hook.
28245         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28246         * doc/tm.texi: Regenerate.
28247         * targhooks.h (default_select_early_remat_modes): Declare.
28248         * targhooks.c (default_select_early_remat_modes): New function.
28249         * timevar.def (TV_EARLY_REMAT): New timevar.
28250         * passes.def (pass_early_remat): New pass.
28251         * tree-pass.h (make_pass_early_remat): Declare.
28252         * early-remat.c: New file.
28253         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28254         function.
28255         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28257 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28258             Alan Hayward  <alan.hayward@arm.com>
28259             David Sherwood  <david.sherwood@arm.com>
28261         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28262         vfm1 with a bound_epilog parameter.
28263         (vect_do_peeling): Update calls accordingly, and move the prologue
28264         call earlier in the function.  Treat the base bound_epilog as 0 for
28265         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
28266         this base when peeling for gaps.
28267         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28268         with fully-masked loops.
28269         (vect_estimate_min_profitable_iters): Handle the single peeled
28270         iteration in that case.
28272 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28273             Alan Hayward  <alan.hayward@arm.com>
28274             David Sherwood  <david.sherwood@arm.com>
28276         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28277         single-element interleaving even if the size is not a power of 2.
28278         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28279         accesses for single-element interleaving if the group size is
28280         not a power of 2.
28282 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28283             Alan Hayward  <alan.hayward@arm.com>
28284             David Sherwood  <david.sherwood@arm.com>
28286         * doc/md.texi (fold_extract_last_@var{m}): Document.
28287         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28288         * optabs.def (fold_extract_last_optab): New optab.
28289         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28290         * internal-fn.c (fold_extract_direct): New macro.
28291         (expand_fold_extract_optab_fn): Likewise.
28292         (direct_fold_extract_optab_supported_p): Likewise.
28293         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28294         * tree-vect-loop.c (vect_model_reduction_cost): Handle
28295         EXTRACT_LAST_REDUCTION.
28296         (get_initial_def_for_reduction): Do not create an initial vector
28297         for EXTRACT_LAST_REDUCTION reductions.
28298         (vectorizable_reduction): Leave the scalar phi in place for
28299         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
28300         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
28301         epilogue code for EXTRACT_LAST_REDUCTION and defer the
28302         transform phase to vectorizable_condition.
28303         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28304         split out from...
28305         (vect_finish_stmt_generation): ...here.
28306         (vect_finish_replace_stmt): New function.
28307         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28308         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28309         pattern.
28310         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28312 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28313             Alan Hayward  <alan.hayward@arm.com>
28314             David Sherwood  <david.sherwood@arm.com>
28316         * doc/md.texi (extract_last_@var{m}): Document.
28317         * optabs.def (extract_last_optab): New optab.
28318         * internal-fn.def (EXTRACT_LAST): New internal function.
28319         * internal-fn.c (cond_unary_direct): New macro.
28320         (expand_cond_unary_optab_fn): Likewise.
28321         (direct_cond_unary_optab_supported_p): Likewise.
28322         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28323         loops using EXTRACT_LAST.
28324         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28325         (extract_last_<mode>): ...this optab.
28326         (vec_extract<mode><Vel>): Update accordingly.
28328 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28329             Alan Hayward  <alan.hayward@arm.com>
28330             David Sherwood  <david.sherwood@arm.com>
28332         * target.def (empty_mask_is_expensive): New hook.
28333         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28334         * doc/tm.texi: Regenerate.
28335         * targhooks.h (default_empty_mask_is_expensive): Declare.
28336         * targhooks.c (default_empty_mask_is_expensive): New function.
28337         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28338         if the target says that empty masks are expensive.
28339         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28340         New function.
28341         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28343 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28344             Alan Hayward  <alan.hayward@arm.com>
28345             David Sherwood  <david.sherwood@arm.com>
28347         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28348         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28349         (vect_use_loop_mask_for_alignment_p): New function.
28350         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28351         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28352         niters_skip argument.  Make sure that the first niters_skip elements
28353         of the first iteration are inactive.
28354         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28355         Update call to vect_set_loop_masks_directly.
28356         (get_misalign_in_elems): New function, split out from...
28357         (vect_gen_prolog_loop_niters): ...here.
28358         (vect_update_init_of_dr): Take a code argument that specifies whether
28359         the adjustment should be added or subtracted.
28360         (vect_update_init_of_drs): Likewise.
28361         (vect_prepare_for_masked_peels): New function.
28362         (vect_do_peeling): Skip prologue peeling if we're using a mask
28363         instead.  Update call to vect_update_inits_of_drs.
28364         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28365         mask_skip_niters.
28366         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28367         alignment.  Do not include the number of peeled iterations in
28368         the minimum threshold in that case.
28369         (vectorizable_induction): Adjust the start value down by
28370         LOOP_VINFO_MASK_SKIP_NITERS iterations.
28371         (vect_transform_loop): Call vect_prepare_for_masked_peels.
28372         Take the number of skipped iterations into account when calculating
28373         the loop bounds.
28374         * tree-vect-stmts.c (vect_gen_while_not): New function.
28376 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28377             Alan Hayward  <alan.hayward@arm.com>
28378             David Sherwood  <david.sherwood@arm.com>
28380         * doc/sourcebuild.texi (vect_fully_masked): Document.
28381         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28382         default value to 0.
28383         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28384         split out from...
28385         (vect_analyze_loop_2): ...here. Don't check the vectorization
28386         factor against the number of loop iterations if the loop is
28387         fully-masked.
28389 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28390             Alan Hayward  <alan.hayward@arm.com>
28391             David Sherwood  <david.sherwood@arm.com>
28393         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28394         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28395         (dump_groups): Update accordingly.
28396         (iv_use::mem_type): New member variable.
28397         (address_p): New function.
28398         (record_use): Add a mem_type argument and initialize the new
28399         mem_type field.
28400         (record_group_use): Add a mem_type argument.  Use address_p.
28401         Remove obsolete null checks of base_object.  Update call to record_use.
28402         (find_interesting_uses_op): Update call to record_group_use.
28403         (find_interesting_uses_cond): Likewise.
28404         (find_interesting_uses_address): Likewise.
28405         (get_mem_type_for_internal_fn): New function.
28406         (find_address_like_use): Likewise.
28407         (find_interesting_uses_stmt): Try find_address_like_use before
28408         calling find_interesting_uses_op.
28409         (addr_offset_valid_p): Use the iv mem_type field as the type
28410         of the addressed memory.
28411         (add_autoinc_candidates): Likewise.
28412         (get_address_cost): Likewise.
28413         (split_small_address_groups_p): Use address_p.
28414         (split_address_groups): Likewise.
28415         (add_iv_candidate_for_use): Likewise.
28416         (autoinc_possible_for_pair): Likewise.
28417         (rewrite_groups): Likewise.
28418         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28419         (determine_group_iv_cost): Update after split of USE_ADDRESS.
28420         (get_alias_ptr_type_for_ptr_address): New function.
28421         (rewrite_use_address): Rewrite address uses in calls that were
28422         identified by find_address_like_use.
28424 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28425             Alan Hayward  <alan.hayward@arm.com>
28426             David Sherwood  <david.sherwood@arm.com>
28428         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28429         TARGET_MEM_REFs.
28430         * gimple-expr.h (is_gimple_addressable: Likewise.
28431         * gimple-expr.c (is_gimple_address): Likewise.
28432         * internal-fn.c (expand_call_mem_ref): New function.
28433         (expand_mask_load_optab_fn): Use it.
28434         (expand_mask_store_optab_fn): Likewise.
28436 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28437             Alan Hayward  <alan.hayward@arm.com>
28438             David Sherwood  <david.sherwood@arm.com>
28440         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28441         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28442         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28443         (cond_umax@var{mode}): Document.
28444         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28445         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28446         (cond_umin_optab, cond_umax_optab): New optabs.
28447         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28448         (COND_IOR, COND_XOR): New internal functions.
28449         * internal-fn.h (get_conditional_internal_fn): Declare.
28450         * internal-fn.c (cond_binary_direct): New macro.
28451         (expand_cond_binary_optab_fn): Likewise.
28452         (direct_cond_binary_optab_supported_p): Likewise.
28453         (get_conditional_internal_fn): New function.
28454         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28455         Cope with reduction statements that are vectorized as calls rather
28456         than assignments.
28457         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28458         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28459         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28460         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28461         (UNSPEC_COND_EOR): New unspecs.
28462         (optab): Add mappings for them.
28463         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28464         (sve_int_op, sve_fp_op): New int attributes.
28466 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28467             Alan Hayward  <alan.hayward@arm.com>
28468             David Sherwood  <david.sherwood@arm.com>
28470         * optabs.def (while_ult_optab): New optab.
28471         * doc/md.texi (while_ult@var{m}@var{n}): Document.
28472         * internal-fn.def (WHILE_ULT): New internal function.
28473         * internal-fn.h (direct_internal_fn_supported_p): New override
28474         that takes two types as argument.
28475         * internal-fn.c (while_direct): New macro.
28476         (expand_while_optab_fn): New function.
28477         (convert_optab_supported_p): Likewise.
28478         (direct_while_optab_supported_p): New macro.
28479         * wide-int.h (wi::udiv_ceil): New function.
28480         * tree-vectorizer.h (rgroup_masks): New structure.
28481         (vec_loop_masks): New typedef.
28482         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28483         and fully_masked_p.
28484         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28485         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28486         (vect_max_vf): New function.
28487         (slpeel_make_loop_iterate_ntimes): Delete.
28488         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28489         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28490         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28491         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28492         internal-fn.h, stor-layout.h and optabs-query.h.
28493         (vect_set_loop_mask): New function.
28494         (add_preheader_seq): Likewise.
28495         (add_header_seq): Likewise.
28496         (interleave_supported_p): Likewise.
28497         (vect_maybe_permute_loop_masks): Likewise.
28498         (vect_set_loop_masks_directly): Likewise.
28499         (vect_set_loop_condition_masked): Likewise.
28500         (vect_set_loop_condition_unmasked): New function, split out from
28501         slpeel_make_loop_iterate_ntimes.
28502         (slpeel_make_loop_iterate_ntimes): Rename to..
28503         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
28504         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28505         (vect_do_peeling): Update call accordingly.
28506         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28507         loops.
28508         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28509         mask_compare_type, can_fully_mask_p and fully_masked_p.
28510         (release_vec_loop_masks): New function.
28511         (_loop_vec_info): Use it to free the loop masks.
28512         (can_produce_all_loop_masks_p): New function.
28513         (vect_get_max_nscalars_per_iter): Likewise.
28514         (vect_verify_full_masking): Likewise.
28515         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28516         retries, and free the mask rgroups before retrying.  Check loop-wide
28517         reasons for disallowing fully-masked loops.  Make the final decision
28518         about whether use a fully-masked loop or not.
28519         (vect_estimate_min_profitable_iters): Do not assume that peeling
28520         for the number of iterations will be needed for fully-masked loops.
28521         (vectorizable_reduction): Disable fully-masked loops.
28522         (vectorizable_live_operation): Likewise.
28523         (vect_halve_mask_nunits): New function.
28524         (vect_double_mask_nunits): Likewise.
28525         (vect_record_loop_mask): Likewise.
28526         (vect_get_loop_mask): Likewise.
28527         (vect_transform_loop): Handle the case in which the final loop
28528         iteration might handle a partial vector.  Call vect_set_loop_condition
28529         instead of slpeel_make_loop_iterate_ntimes.
28530         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28531         (check_load_store_masking): New function.
28532         (prepare_load_store_mask): Likewise.
28533         (vectorizable_store): Handle fully-masked loops.
28534         (vectorizable_load): Likewise.
28535         (supportable_widening_operation): Use vect_halve_mask_nunits for
28536         booleans.
28537         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28538         (vect_gen_while): New function.
28539         * config/aarch64/aarch64.md (umax<mode>3): New expander.
28540         (aarch64_uqdec<mode>): New insn.
28542 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28543             Alan Hayward  <alan.hayward@arm.com>
28544             David Sherwood  <david.sherwood@arm.com>
28546         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28547         (reduc_xor_scal_optab): New optabs.
28548         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28549         (reduc_xor_scal_@var{m}): Document.
28550         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28551         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28552         internal functions.
28553         * fold-const-call.c (fold_const_call): Handle them.
28554         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28555         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28556         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28557         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28558         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28559         (UNSPEC_XORV): New unspecs.
28560         (optab): Add entries for them.
28561         (BITWISEV): New int iterator.
28562         (bit_reduc_op): New int attributes.
28564 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28565             Alan Hayward  <alan.hayward@arm.com>
28566             David Sherwood  <david.sherwood@arm.com>
28568         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28569         * internal-fn.def (VEC_SHL_INSERT): New internal function.
28570         * optabs.def (vec_shl_insert_optab): New optab.
28571         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28572         (duplicate_and_interleave): Likewise.
28573         * tree-vect-loop.c: Include internal-fn.h.
28574         (neutral_op_for_slp_reduction): New function, split out from
28575         get_initial_defs_for_reduction.
28576         (get_initial_def_for_reduction): Handle option 2 for variable-length
28577         vectors by loading the neutral value into a vector and then shifting
28578         the initial value into element 0.
28579         (get_initial_defs_for_reduction): Replace the code argument with
28580         the neutral value calculated by neutral_op_for_slp_reduction.
28581         Use gimple_build_vector for constant-length vectors.
28582         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28583         but the first group_size elements have a neutral value.
28584         Use duplicate_and_interleave otherwise.
28585         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28586         Update call to get_initial_defs_for_reduction.  Handle SLP
28587         reductions for variable-length vectors by creating one vector
28588         result for each scalar result, with the elements associated
28589         with other scalar results stubbed out with the neutral value.
28590         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28591         Require IFN_VEC_SHL_INSERT for double reductions on
28592         variable-length vectors, or SLP reductions that have
28593         a neutral value.  Require can_duplicate_and_interleave_p
28594         support for variable-length unchained SLP reductions if there
28595         is no neutral value, such as for MIN/MAX reductions.  Also require
28596         the number of vector elements to be a multiple of the number of
28597         SLP statements when doing variable-length unchained SLP reductions.
28598         Update call to vect_create_epilog_for_reduction.
28599         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28600         and remove initial values.
28601         (duplicate_and_interleave): Make public.
28602         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28603         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28605 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28606             Alan Hayward  <alan.hayward@arm.com>
28607             David Sherwood  <david.sherwood@arm.com>
28609         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28610         (can_duplicate_and_interleave_p): New function.
28611         (vect_get_and_check_slp_defs): Take the vector of statements
28612         rather than just the current one.  Remove excess parentheses.
28613         Restriction rejectinon of vect_constant_def and vect_external_def
28614         for variable-length vectors to boolean types, or types for which
28615         can_duplicate_and_interleave_p is false.
28616         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28617         (duplicate_and_interleave): New function.
28618         (vect_get_constant_vectors): Use gimple_build_vector for
28619         constant-length vectors and suitable variable-length constant
28620         vectors.  Use duplicate_and_interleave for other variable-length
28621         vectors.  Don't defer the update when inserting new statements.
28623 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28624             Alan Hayward  <alan.hayward@arm.com>
28625             David Sherwood  <david.sherwood@arm.com>
28627         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28628         min_profitable_iters doesn't go negative.
28630 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28631             Alan Hayward  <alan.hayward@arm.com>
28632             David Sherwood  <david.sherwood@arm.com>
28634         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28635         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28636         * optabs.def (vec_mask_load_lanes_optab): New optab.
28637         (vec_mask_store_lanes_optab): Likewise.
28638         * internal-fn.def (MASK_LOAD_LANES): New internal function.
28639         (MASK_STORE_LANES): Likewise.
28640         * internal-fn.c (mask_load_lanes_direct): New macro.
28641         (mask_store_lanes_direct): Likewise.
28642         (expand_mask_load_optab_fn): Handle masked operations.
28643         (expand_mask_load_lanes_optab_fn): New macro.
28644         (expand_mask_store_optab_fn): Handle masked operations.
28645         (expand_mask_store_lanes_optab_fn): New macro.
28646         (direct_mask_load_lanes_optab_supported_p): Likewise.
28647         (direct_mask_store_lanes_optab_supported_p): Likewise.
28648         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28649         parameter.
28650         (vect_load_lanes_supported): Likewise.
28651         * tree-vect-data-refs.c (strip_conversion): New function.
28652         (can_group_stmts_p): Likewise.
28653         (vect_analyze_data_ref_accesses): Use it instead of checking
28654         for a pair of assignments.
28655         (vect_store_lanes_supported): Take a masked_p parameter.
28656         (vect_load_lanes_supported): Likewise.
28657         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28658         vect_store_lanes_supported and vect_load_lanes_supported.
28659         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28660         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28661         parameter.  Don't allow gaps for masked accesses.
28662         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
28663         and vect_load_lanes_supported.
28664         (get_load_store_type): Take a masked_p parameter and update
28665         call to get_group_load_store_type.
28666         (vectorizable_store): Update call to get_load_store_type.
28667         Handle IFN_MASK_STORE_LANES.
28668         (vectorizable_load): Update call to get_load_store_type.
28669         Handle IFN_MASK_LOAD_LANES.
28671 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28672             Alan Hayward  <alan.hayward@arm.com>
28673             David Sherwood  <david.sherwood@arm.com>
28675         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28676         modes for SVE.
28677         * config/aarch64/aarch64-protos.h
28678         (aarch64_sve_struct_memory_operand_p): Declare.
28679         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28680         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28681         (VPRED, vpred): Handle SVE structure modes.
28682         * config/aarch64/constraints.md (Utx): New constraint.
28683         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28684         (aarch64_sve_struct_nonimmediate_operand): New predicates.
28685         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28686         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28687         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28688         structure modes.  Split into pieces after RA.
28689         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28690         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28691         New patterns.
28692         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28693         SVE structure modes.
28694         (aarch64_classify_address): Likewise.
28695         (sizetochar): Move earlier in file.
28696         (aarch64_print_operand): Handle SVE register lists.
28697         (aarch64_array_mode): New function.
28698         (aarch64_sve_struct_memory_operand_p): Likewise.
28699         (TARGET_ARRAY_MODE): Redefine.
28701 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28702             Alan Hayward  <alan.hayward@arm.com>
28703             David Sherwood  <david.sherwood@arm.com>
28705         * target.def (array_mode): New target hook.
28706         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28707         * doc/tm.texi: Regenerate.
28708         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28709         * hooks.c (hook_optmode_mode_uhwi_none): New function.
28710         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28711         targetm.array_mode.
28712         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
28713         type sizes.
28715 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28716             Alan Hayward  <alan.hayward@arm.com>
28717             David Sherwood  <david.sherwood@arm.com>
28719         * fold-const.c (fold_binary_loc): Check the argument types
28720         rather than the result type when testing for a vector operation.
28722 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28724         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28725         * doc/tm.texi: Regenerate.
28727 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28728             Alan Hayward  <alan.hayward@arm.com>
28729             David Sherwood  <david.sherwood@arm.com>
28731         * doc/invoke.texi (-msve-vector-bits=): Document new option.
28732         (sve): Document new AArch64 extension.
28733         * doc/md.texi (w): Extend the description of the AArch64
28734         constraint to include SVE vectors.
28735         (Upl, Upa): Document new AArch64 predicate constraints.
28736         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28737         enum.
28738         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28739         (msve-vector-bits=): New option.
28740         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28741         SVE when these are disabled.
28742         (sve): New extension.
28743         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28744         modes.  Adjust their number of units based on aarch64_sve_vg.
28745         (MAX_BITSIZE_MODE_ANY_MODE): Define.
28746         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28747         aarch64_addr_query_type.
28748         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28749         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28750         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28751         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28752         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28753         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28754         (aarch64_simd_imm_zero_p): Delete.
28755         (aarch64_check_zero_based_sve_index_immediate): Declare.
28756         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28757         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28758         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28759         (aarch64_sve_float_mul_immediate_p): Likewise.
28760         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28761         rather than an rtx.
28762         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28763         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28764         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28765         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28766         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28767         (aarch64_regmode_natural_size): Likewise.
28768         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28769         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28770         left one place.
28771         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28772         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28773         for VG and the SVE predicate registers.
28774         (V_ALIASES): Add a "z"-prefixed alias.
28775         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28776         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28777         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28778         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28779         (REG_CLASS_NAMES): Add entries for them.
28780         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
28781         and the predicate registers.
28782         (aarch64_sve_vg): Declare.
28783         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28784         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28785         (REGMODE_NATURAL_SIZE): Define.
28786         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28787         SVE macros.
28788         * config/aarch64/aarch64.c: Include cfgrtl.h.
28789         (simd_immediate_info): Add a constructor for series vectors,
28790         and an associated step field.
28791         (aarch64_sve_vg): New variable.
28792         (aarch64_dbx_register_number): Handle VG and the predicate registers.
28793         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28794         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28795         (VEC_ANY_DATA, VEC_STRUCT): New constants.
28796         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28797         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28798         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28799         (aarch64_get_mask_mode): New functions.
28800         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28801         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28802         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
28803         predicate modes and predicate registers.  Explicitly restrict
28804         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
28805         to store a vector mode if it is recognized by
28806         aarch64_classify_vector_mode.
28807         (aarch64_regmode_natural_size): New function.
28808         (aarch64_hard_regno_caller_save_mode): Return the original mode
28809         for predicates.
28810         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28811         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28812         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28813         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28814         functions.
28815         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
28816         does not overlap dest if the function is frame-related.  Handle
28817         SVE constants.
28818         (aarch64_split_add_offset): New function.
28819         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28820         them aarch64_add_offset.
28821         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28822         and update call to aarch64_sub_sp.
28823         (aarch64_add_cfa_expression): New function.
28824         (aarch64_expand_prologue): Pass extra temporary registers to the
28825         functions above.  Handle the case in which we need to emit new
28826         DW_CFA_expressions for registers that were originally saved
28827         relative to the stack pointer, but now have to be expressed
28828         relative to the frame pointer.
28829         (aarch64_output_mi_thunk): Pass extra temporary registers to the
28830         functions above.
28831         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
28832         IP0 and IP1 values for SVE frames.
28833         (aarch64_expand_vec_series): New function.
28834         (aarch64_expand_sve_widened_duplicate): Likewise.
28835         (aarch64_expand_sve_const_vector): Likewise.
28836         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28837         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
28838         into the register, rather than emitting a SET directly.
28839         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28840         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28841         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28842         (offset_9bit_signed_scaled_p): New functions.
28843         (aarch64_replicate_bitmask_imm): New function.
28844         (aarch64_bitmask_imm): Use it.
28845         (aarch64_cannot_force_const_mem): Reject expressions involving
28846         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
28847         (aarch64_classify_index): Handle SVE indices, by requiring
28848         a plain register index with a scale that matches the element size.
28849         (aarch64_classify_address): Handle SVE addresses.  Assert that
28850         the mode of the address is VOIDmode or an integer mode.
28851         Update call to aarch64_classify_symbol.
28852         (aarch64_classify_symbolic_expression): Update call to
28853         aarch64_classify_symbol.
28854         (aarch64_const_vec_all_in_range_p): New function.
28855         (aarch64_print_vector_float_operand): Likewise.
28856         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
28857         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
28858         and the FP immediates 1.0 and 0.5.
28859         (aarch64_print_address_internal): Handle SVE addresses.
28860         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28861         (aarch64_regno_regclass): Handle predicate registers.
28862         (aarch64_secondary_reload): Handle big-endian reloads of SVE
28863         data modes.
28864         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28865         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28866         (aarch64_convert_sve_vector_bits): New function.
28867         (aarch64_override_options): Use it to handle -msve-vector-bits=.
28868         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28869         rather than an rtx.
28870         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28871         Handle SVE vector and predicate modes.  Accept VL-based constants
28872         that need only one temporary register, and VL offsets that require
28873         no temporary registers.
28874         (aarch64_conditional_register_usage): Mark the predicate registers
28875         as fixed if SVE isn't available.
28876         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28877         Return true for SVE vector and predicate modes.
28878         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28879         rather than an unsigned int.  Handle SVE modes.
28880         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
28881         SVE modes.
28882         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28883         if SVE is enabled.
28884         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28885         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28886         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28887         (aarch64_sve_float_mul_immediate_p): New functions.
28888         (aarch64_sve_valid_immediate): New function.
28889         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28890         Explicitly reject structure modes.  Check for INDEX constants.
28891         Handle PTRUE and PFALSE constants.
28892         (aarch64_check_zero_based_sve_index_immediate): New function.
28893         (aarch64_simd_imm_zero_p): Delete.
28894         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28895         vector modes.  Accept constants in the range of CNT[BHWD].
28896         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28897         ask for an Advanced SIMD mode.
28898         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28899         (aarch64_simd_vector_alignment): Handle SVE predicates.
28900         (aarch64_vectorize_preferred_vector_alignment): New function.
28901         (aarch64_simd_vector_alignment_reachable): Use it instead of
28902         the vector size.
28903         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28904         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28905         functions.
28906         (MAX_VECT_LEN): Delete.
28907         (expand_vec_perm_d): Add a vec_flags field.
28908         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28909         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28910         (aarch64_evpc_ext): Don't apply a big-endian lane correction
28911         for SVE modes.
28912         (aarch64_evpc_rev): Rename to...
28913         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
28914         (aarch64_evpc_rev_global): New function.
28915         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28916         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28917         MAX_VECT_LEN.
28918         (aarch64_evpc_sve_tbl): New function.
28919         (aarch64_expand_vec_perm_const_1): Update after rename of
28920         aarch64_evpc_rev.  Handle SVE permutes too, trying
28921         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28922         than aarch64_evpc_tbl.
28923         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28924         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28925         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28926         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28927         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28928         (aarch64_expand_sve_vcond): New functions.
28929         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28930         of aarch64_vector_mode_p.
28931         (aarch64_dwarf_poly_indeterminate_value): New function.
28932         (aarch64_compute_pressure_classes): Likewise.
28933         (aarch64_can_change_mode_class): Likewise.
28934         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28935         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28936         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28937         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28938         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28939         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28940         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28941         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28942         constraints.
28943         (Dn, Dl, Dr): Accept const as well as const_vector.
28944         (Dz): Likewise.  Compare against CONST0_RTX.
28945         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28946         of "vector" where appropriate.
28947         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28948         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28949         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28950         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28951         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28952         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28953         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28954         (v_int_equiv): Extend to SVE modes.
28955         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28956         mode attributes.
28957         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28958         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28959         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28960         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28961         (SVE_COND_FP_CMP): New int iterators.
28962         (perm_hilo): Handle the new unpack unspecs.
28963         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28964         attributes.
28965         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28966         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28967         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28968         (aarch64_equality_operator, aarch64_constant_vector_operand)
28969         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28970         (aarch64_sve_nonimmediate_operand): Likewise.
28971         (aarch64_sve_general_operand): Likewise.
28972         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28973         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28974         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28975         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28976         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28977         (aarch64_sve_float_arith_immediate): Likewise.
28978         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28979         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28980         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28981         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28982         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28983         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28984         (aarch64_sve_float_arith_operand): Likewise.
28985         (aarch64_sve_float_arith_with_sub_operand): Likewise.
28986         (aarch64_sve_float_mul_operand): Likewise.
28987         (aarch64_sve_vec_perm_operand): Likewise.
28988         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28989         (aarch64_mov_operand): Accept const_poly_int and const_vector.
28990         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28991         as well as const_vector.
28992         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28993         in file.  Use CONST0_RTX and CONSTM1_RTX.
28994         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
28995         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28996         Use aarch64_simd_imm_zero.
28997         * config/aarch64/aarch64-sve.md: New file.
28998         * config/aarch64/aarch64.md: Include it.
28999         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29000         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29001         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29002         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29003         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29004         (sve): New attribute.
29005         (enabled): Disable instructions with the sve attribute unless
29006         TARGET_SVE.
29007         (movqi, movhi): Pass CONST_POLY_INT operaneds through
29008         aarch64_expand_mov_immediate.
29009         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29010         CNT[BHSD] immediates.
29011         (movti): Split CONST_POLY_INT moves into two halves.
29012         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29013         Split additions that need a temporary here if the destination
29014         is the stack pointer.
29015         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29016         (*add<mode>3_poly_1): New instruction.
29017         (set_clobber_cc): New expander.
29019 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29021         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29022         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
29023         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29024         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29025         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
29026         Change innermode from fixed_mode_size to machine_mode.
29027         (simplify_subreg): Update call accordingly.  Handle a constant-sized
29028         subreg of a variable-length CONST_VECTOR.
29030 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29031             Alan Hayward  <alan.hayward@arm.com>
29032             David Sherwood  <david.sherwood@arm.com>
29034         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29035         (add_offset_to_base): New function, split out from...
29036         (create_mem_ref): ...here.  When handling a scale other than 1,
29037         check first whether the address is valid without the offset.
29038         Add it into the base if so, leaving the index and scale as-is.
29040 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
29042         PR c++/83778
29043         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29044         fold_for_warn before checking if arg2 is INTEGER_CST.
29046 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
29048         * config/rs6000/predicates.md (load_multiple_operation): Delete.
29049         (store_multiple_operation): Delete.
29050         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29051         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29052         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29053         guarded by TARGET_STRING.
29054         (rs6000_output_load_multiple): Delete.
29055         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29056         OPTION_MASK_STRING / TARGET_STRING handling.
29057         (print_operand) <'N', 'O'>: Add comment that these are unused now.
29058         (const rs6000_opt_masks) <"string">: Change mask to 0.
29059         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29060         (MASK_STRING): Delete.
29061         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29062         parts.  Simplify.
29063         (load_multiple): Delete.
29064         (*ldmsi8): Delete.
29065         (*ldmsi7): Delete.
29066         (*ldmsi6): Delete.
29067         (*ldmsi5): Delete.
29068         (*ldmsi4): Delete.
29069         (*ldmsi3): Delete.
29070         (store_multiple): Delete.
29071         (*stmsi8): Delete.
29072         (*stmsi7): Delete.
29073         (*stmsi6): Delete.
29074         (*stmsi5): Delete.
29075         (*stmsi4): Delete.
29076         (*stmsi3): Delete.
29077         (movmemsi_8reg): Delete.
29078         (corresponding unnamed define_insn): Delete.
29079         (movmemsi_6reg): Delete.
29080         (corresponding unnamed define_insn): Delete.
29081         (movmemsi_4reg): Delete.
29082         (corresponding unnamed define_insn): Delete.
29083         (movmemsi_2reg): Delete.
29084         (corresponding unnamed define_insn): Delete.
29085         (movmemsi_1reg): Delete.
29086         (corresponding unnamed define_insn): Delete.
29087         * config/rs6000/rs6000.opt (mno-string): New.
29088         (mstring): Replace by deprecation warning stub.
29089         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29091 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
29093         * regrename.c (regrename_do_replace): If replacing the same
29094         reg multiple times, try to reuse last created gen_raw_REG.
29096         PR debug/81155
29097         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29098         main to workaround a bug in GDB.
29100 2018-01-12  Tom de Vries  <tom@codesourcery.com>
29102         PR target/83737
29103         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29105 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
29107         PR rtl-optimization/80481
29108         * ira-color.c (get_cap_member): New function.
29109         (allocnos_conflict_by_live_ranges_p): Use it.
29110         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29111         (setup_slot_coalesced_allocno_live_ranges): Ditto.
29113 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
29115         PR target/83628
29116         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29117         (*saddl_se_1): Ditto.
29118         (*ssubsi_1): Ditto.
29119         (*ssubl_se_1): Ditto.
29121 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29123         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29124         rather than wi::to_widest for DR_INITs.
29125         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29126         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29127         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29128         INTEGER_CSTs.
29129         (vect_analyze_group_access_1): Note that here.
29131 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29133         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29134         polynomial type sizes.
29136 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29138         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29139         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29140         (gimple_add_tmp_var): Likewise.
29142 2018-01-12  Martin Liska  <mliska@suse.cz>
29144         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29145         (gimple_alloc_sizes): Likewise.
29146         (dump_gimple_statistics): Use PRIu64 in printf format.
29147         * gimple.h: Change uint64_t to int.
29149 2018-01-12  Martin Liska  <mliska@suse.cz>
29151         * tree-core.h: Use uint64_t instead of int.
29152         * tree.c (tree_node_counts): Likewise.
29153         (tree_node_sizes): Likewise.
29154         (dump_tree_statistics): Use PRIu64 in printf format.
29156 2018-01-12  Martin Liska  <mliska@suse.cz>
29158         * Makefile.in: As qsort_chk is implemented in vec.c, add
29159         vec.o to linkage of gencfn-macros.
29160         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29161         passing the info to record_node_allocation_statistics.
29162         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29163         and pass the info.
29164         * ggc-common.c (struct ggc_usage): Add operator== and use
29165         it in operator< and compare function.
29166         * mem-stats.h (struct mem_usage): Likewise.
29167         * vec.c (struct vec_usage): Remove operator< and compare
29168         function. Can be simply inherited.
29170 2018-01-12  Martin Jambor  <mjambor@suse.cz>
29172         PR target/81616
29173         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29174         * tree-ssa-math-opts.c: Include domwalk.h.
29175         (convert_mult_to_fma_1): New function.
29176         (fma_transformation_info): New type.
29177         (fma_deferring_state): Likewise.
29178         (cancel_fma_deferring): New function.
29179         (result_of_phi): Likewise.
29180         (last_fma_candidate_feeds_initial_phi): Likewise.
29181         (convert_mult_to_fma): Added deferring logic, split actual
29182         transformation to convert_mult_to_fma_1.
29183         (math_opts_dom_walker): New type.
29184         (math_opts_dom_walker::after_dom_children): New method, body moved
29185         here from pass_optimize_widening_mul::execute, added deferring logic
29186         bits.
29187         (pass_optimize_widening_mul::execute): Moved most of code to
29188         math_opts_dom_walker::after_dom_children.
29189         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29190         * config/i386/i386.c (ix86_option_override_internal): Added
29191         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29193 2018-01-12  Richard Biener  <rguenther@suse.de>
29195         PR debug/83157
29196         * dwarf2out.c (gen_variable_die): Do not reset old_die for
29197         inline instance vars.
29199 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
29201         PR target/81819
29202         * config/rx/rx.c (rx_is_restricted_memory_address):
29203         Handle SUBREG case.
29205 2018-01-12  Richard Biener  <rguenther@suse.de>
29207         PR tree-optimization/80846
29208         * target.def (split_reduction): New target hook.
29209         * targhooks.c (default_split_reduction): New function.
29210         * targhooks.h (default_split_reduction): Declare.
29211         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29212         target requests first reduce vectors by combining low and high
29213         parts.
29214         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29215         (get_vectype_for_scalar_type_and_size): Export.
29216         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29217         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29218         * doc/tm.texi: Regenerate.
29219         * config/i386/i386.c (ix86_split_reduction): Implement
29220         TARGET_VECTORIZE_SPLIT_REDUCTION.
29222 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29224         PR target/83368
29225         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29226         in PIC mode except for TARGET_VXWORKS_RTP.
29227         * config/sparc/sparc.c: Include cfgrtl.h.
29228         (TARGET_INIT_PIC_REG): Define.
29229         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29230         (sparc_pic_register_p): New predicate.
29231         (sparc_legitimate_address_p): Use it.
29232         (sparc_legitimize_pic_address): Likewise.
29233         (sparc_delegitimize_address): Likewise.
29234         (sparc_mode_dependent_address_p): Likewise.
29235         (gen_load_pcrel_sym): Remove 4th parameter.
29236         (load_got_register): Adjust call to above.  Remove obsolete stuff.
29237         (sparc_expand_prologue): Do not call load_got_register here.
29238         (sparc_flat_expand_prologue): Likewise.
29239         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29240         (sparc_use_pseudo_pic_reg): New function.
29241         (sparc_init_pic_reg): Likewise.
29242         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29243         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29245 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
29247         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29248         Add item for branch_cost.
29250 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29252         PR rtl-optimization/83565
29253         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29254         not extend the result to a larger mode for rotate operations.
29255         (num_sign_bit_copies1): Likewise.
29257 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29259         PR target/40411
29260         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29261         -symbolic.
29262         Use values-Xc.o for -pedantic.
29263         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29265 2018-01-12  Martin Liska  <mliska@suse.cz>
29267         PR ipa/83054
29268         * ipa-devirt.c (final_warning_record::grow_type_warnings):
29269         New function.
29270         (possible_polymorphic_call_targets): Use it.
29271         (ipa_devirt): Likewise.
29273 2018-01-12  Martin Liska  <mliska@suse.cz>
29275         * profile-count.h (enum profile_quality): Use 0 as invalid
29276         enum value of profile_quality.
29278 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
29280         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29281         -mext-string options.
29283 2018-01-12  Richard Biener  <rguenther@suse.de>
29285         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29286         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29287         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29288         Likewise.
29289         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29291 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
29293         * configure.ac (--with-long-double-format): Add support for the
29294         configuration option to change the default long double format on
29295         PowerPC systems.
29296         * config.gcc (powerpc*-linux*-*): Likewise.
29297         * configure: Regenerate.
29298         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29299         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29300         used without modification.
29302 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29304         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29305         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29306         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29307         MISC_BUILTIN_SPEC_BARRIER.
29308         (rs6000_init_builtins): Likewise.
29309         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29310         enum value.
29311         (speculation_barrier): New define_insn.
29312         * doc/extend.texi: Document __builtin_speculation_barrier.
29314 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29316         PR target/83203
29317         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29318         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29319         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29320         iterators.
29321         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
29322         integral modes instead of "ss" and "sd".
29323         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29324         vectors with 32-bit and 64-bit elements.
29325         (vecdupssescalarmodesuffix): New mode attribute.
29326         (vec_dup<mode>): Use it.
29328 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
29330         PR target/83330
29331         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29332         frame if argument is passed on stack.
29334 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29336         PR target/82682
29337         * ree.c (combine_reaching_defs): Optimize also
29338         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29339         reg2=any_extend(exp); reg1=reg2;, formatting fix.
29341 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29343         PR middle-end/83189
29344         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29346 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29348         PR middle-end/83718
29349         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29350         after they are computed.
29352 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
29354         PR tree-optimization/83695
29355         * gimple-loop-linterchange.cc
29356         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29357         reset cached scev information after interchange.
29358         (pass_linterchange::execute): Remove call to scev_reset_htab.
29360 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29362         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29363         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29364         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29365         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29366         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29367         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29368         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29369         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29370         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29371         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29372         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29373         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29374         (V_lane_reg): Likewise.
29375         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29376         New define_expand.
29377         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29378         (vfmal_lane_low<mode>_intrinsic,
29379         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29380         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29381         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29382         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29383         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29384         vfmsl_lane_high<mode>_intrinsic): New define_insns.
29386 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29388         * config/arm/arm-cpus.in (fp16fml): New feature.
29389         (ALL_SIMD): Add fp16fml.
29390         (armv8.2-a): Add fp16fml as an option.
29391         (armv8.3-a): Likewise.
29392         (armv8.4-a): Add fp16fml as part of fp16.
29393         * config/arm/arm.h (TARGET_FP16FML): Define.
29394         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29395         when appropriate.
29396         * config/arm/arm-modes.def (V2HF): Define.
29397         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29398         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29399         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29400         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29401         vfmsl_low, vfmsl_high): New set of builtins.
29402         * config/arm/iterators.md (PLUSMINUS): New code iterator.
29403         (vfml_op): New code attribute.
29404         (VFMLHALVES): New int iterator.
29405         (VFML, VFMLSEL): New mode attributes.
29406         (V_reg): Define mapping for V2HF.
29407         (V_hi, V_lo): New mode attributes.
29408         (VF_constraint): Likewise.
29409         (vfml_half, vfml_half_selector): New int attributes.
29410         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29411         define_expand.
29412         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29413         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29414         New define_insn.
29415         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29416         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29417         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29418         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
29419         documentation.
29420         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29421         Document new effective target and option set.
29423 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29425         * config/arm/arm-cpus.in (armv8_4): New feature.
29426         (ARMv8_4a): New fgroup.
29427         (armv8.4-a): New arch.
29428         * config/arm/arm-tables.opt: Regenerate.
29429         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29430         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29431         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29432         Add matching rules for -march=armv8.4-a and extensions.
29433         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29435 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
29437         PR target/81821
29438         * config/rx/rx.md (BW): New mode attribute.
29439         (sync_lock_test_and_setsi): Add mode suffix to insn output.
29441 2018-01-11  Richard Biener  <rguenther@suse.de>
29443         PR tree-optimization/83435
29444         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29445         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29446         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29448 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29449             Alan Hayward  <alan.hayward@arm.com>
29450             David Sherwood  <david.sherwood@arm.com>
29452         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29453         field.
29454         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
29455         (aarch64_print_address_internal): Use it to check for a zero offset.
29457 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29458             Alan Hayward  <alan.hayward@arm.com>
29459             David Sherwood  <david.sherwood@arm.com>
29461         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29462         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29463         Return a poly_int64 rather than a HOST_WIDE_INT.
29464         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29465         rather than a HOST_WIDE_INT.
29466         * config/aarch64/aarch64.h (aarch64_frame): Protect with
29467         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
29468         hard_fp_offset, frame_size, initial_adjust, callee_offset and
29469         final_offset from HOST_WIDE_INT to poly_int64.
29470         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29471         to_constant when getting the number of units in an Advanced SIMD
29472         mode.
29473         (aarch64_builtin_vectorized_function): Check for a constant number
29474         of units.
29475         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29476         GET_MODE_SIZE.
29477         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29478         attribute instead of GET_MODE_NUNITS.
29479         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29480         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29481         GET_MODE_SIZE for fixed-size registers.
29482         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29483         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29484         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29485         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29486         (aarch64_print_operand, aarch64_print_address_internal)
29487         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29488         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29489         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29490         Handle polynomial GET_MODE_SIZE.
29491         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
29492         wider than SImode without modification.
29493         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29494         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29495         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29496         passing and returning SVE modes.
29497         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29498         rather than GEN_INT.
29499         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29500         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29501         (aarch64_allocate_and_probe_stack_space): Likewise.
29502         (aarch64_layout_frame): Cope with polynomial offsets.
29503         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29504         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
29505         polynomial offsets.
29506         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29507         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29508         poly_int64 rather than a HOST_WIDE_INT.
29509         (aarch64_get_separate_components, aarch64_process_components)
29510         (aarch64_expand_prologue, aarch64_expand_epilogue)
29511         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29512         (aarch64_anchor_offset): New function, split out from...
29513         (aarch64_legitimize_address): ...here.
29514         (aarch64_builtin_vectorization_cost): Handle polynomial
29515         TYPE_VECTOR_SUBPARTS.
29516         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29517         GET_MODE_NUNITS.
29518         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29519         number of elements from the PARALLEL rather than the mode.
29520         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29521         rather than GET_MODE_BITSIZE.
29522         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29523         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29524         (aarch64_expand_vec_perm_const_1): Handle polynomial
29525         d->perm.length () and d->perm elements.
29526         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
29527         Apply to_constant to d->perm elements.
29528         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29529         polynomial CONST_VECTOR_NUNITS.
29530         (aarch64_move_pointer): Take amount as a poly_int64 rather
29531         than an int.
29532         (aarch64_progress_pointer): Avoid temporary variable.
29533         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29534         the mode attribute instead of GET_MODE.
29536 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29537             Alan Hayward  <alan.hayward@arm.com>
29538             David Sherwood  <david.sherwood@arm.com>
29540         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29541         x exists before using it.
29542         (aarch64_add_constant_internal): Rename to...
29543         (aarch64_add_offset_1): ...this.  Replace regnum with separate
29544         src and dest rtxes.  Handle the case in which they're different,
29545         including when the offset is zero.  Replace scratchreg with an rtx.
29546         Use 2 additions if there is no spare register into which we can
29547         move a 16-bit constant.
29548         (aarch64_add_constant): Delete.
29549         (aarch64_add_offset): Replace reg with separate src and dest
29550         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
29551         Use aarch64_add_offset_1.
29552         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29553         an rtx rather than an int.  Take the delta as a poly_int64
29554         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
29555         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29556         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29557         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29558         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29559         and aarch64_add_sp.
29560         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29561         aarch64_add_constant.
29563 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29565         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29566         Use scalar_float_mode.
29568 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29570         * config/aarch64/aarch64-simd.md
29571         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29572         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29573         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29574         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29575         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29576         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29577         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29578         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29579         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29580         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29582 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29584         PR target/83514
29585         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29586         targ_options->x_arm_arch_string is non NULL.
29588 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
29590         * config/aarch64/aarch64.h
29591         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
29593 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
29595         PR target/82096
29596         * expmed.c (emit_store_flag_force): Swap if const op0
29597         and change VOIDmode to mode of op0.
29599 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29601         PR rtl-optimization/83761
29602         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29603         than bytes to mode_for_size.
29605 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29607         PR middle-end/83189
29608         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29609         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29610         profile.
29612 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29614         PR middle-end/83575
29615         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29616         when in layout mode.
29617         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29618         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29619         partition fixup.
29621 2018-01-10  Michael Collison  <michael.collison@arm.com>
29623         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29624         * config/aarch64/aarch64-option-extension.def: Add
29625         AARCH64_OPT_EXTENSION of 'fp16fml'.
29626         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29627         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29628         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29629         * config/aarch64/constraints.md (Ui7): New constraint.
29630         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29631         (VFMLA_SEL_W): Ditto.
29632         (f16quad): Ditto.
29633         (f16mac1): Ditto.
29634         (VFMLA16_LOW): New int iterator.
29635         (VFMLA16_HIGH): Ditto.
29636         (UNSPEC_FMLAL): New unspec.
29637         (UNSPEC_FMLSL): Ditto.
29638         (UNSPEC_FMLAL2): Ditto.
29639         (UNSPEC_FMLSL2): Ditto.
29640         (f16mac): New code attribute.
29641         * config/aarch64/aarch64-simd-builtins.def
29642         (aarch64_fmlal_lowv2sf): Ditto.
29643         (aarch64_fmlsl_lowv2sf): Ditto.
29644         (aarch64_fmlalq_lowv4sf): Ditto.
29645         (aarch64_fmlslq_lowv4sf): Ditto.
29646         (aarch64_fmlal_highv2sf): Ditto.
29647         (aarch64_fmlsl_highv2sf): Ditto.
29648         (aarch64_fmlalq_highv4sf): Ditto.
29649         (aarch64_fmlslq_highv4sf): Ditto.
29650         (aarch64_fmlal_lane_lowv2sf): Ditto.
29651         (aarch64_fmlsl_lane_lowv2sf): Ditto.
29652         (aarch64_fmlal_laneq_lowv2sf): Ditto.
29653         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29654         (aarch64_fmlalq_lane_lowv4sf): Ditto.
29655         (aarch64_fmlsl_lane_lowv4sf): Ditto.
29656         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29657         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29658         (aarch64_fmlal_lane_highv2sf): Ditto.
29659         (aarch64_fmlsl_lane_highv2sf): Ditto.
29660         (aarch64_fmlal_laneq_highv2sf): Ditto.
29661         (aarch64_fmlsl_laneq_highv2sf): Ditto.
29662         (aarch64_fmlalq_lane_highv4sf): Ditto.
29663         (aarch64_fmlsl_lane_highv4sf): Ditto.
29664         (aarch64_fmlalq_laneq_highv4sf): Ditto.
29665         (aarch64_fmlsl_laneq_highv4sf): Ditto.
29666         * config/aarch64/aarch64-simd.md:
29667         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29668         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29669         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29670         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29671         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29672         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29673         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29674         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29675         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29676         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29677         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29678         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29679         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29680         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29681         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29682         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29683         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29684         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29685         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29686         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29687         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29688         (vfmlsl_low_u32): Ditto.
29689         (vfmlalq_low_u32): Ditto.
29690         (vfmlslq_low_u32): Ditto.
29691         (vfmlal_high_u32): Ditto.
29692         (vfmlsl_high_u32): Ditto.
29693         (vfmlalq_high_u32): Ditto.
29694         (vfmlslq_high_u32): Ditto.
29695         (vfmlal_lane_low_u32): Ditto.
29696         (vfmlsl_lane_low_u32): Ditto.
29697         (vfmlal_laneq_low_u32): Ditto.
29698         (vfmlsl_laneq_low_u32): Ditto.
29699         (vfmlalq_lane_low_u32): Ditto.
29700         (vfmlslq_lane_low_u32): Ditto.
29701         (vfmlalq_laneq_low_u32): Ditto.
29702         (vfmlslq_laneq_low_u32): Ditto.
29703         (vfmlal_lane_high_u32): Ditto.
29704         (vfmlsl_lane_high_u32): Ditto.
29705         (vfmlal_laneq_high_u32): Ditto.
29706         (vfmlsl_laneq_high_u32): Ditto.
29707         (vfmlalq_lane_high_u32): Ditto.
29708         (vfmlslq_lane_high_u32): Ditto.
29709         (vfmlalq_laneq_high_u32): Ditto.
29710         (vfmlslq_laneq_high_u32): Ditto.
29711         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29712         (AARCH64_FL_FOR_ARCH8_4): New.
29713         (AARCH64_ISA_F16FML): New ISA flag.
29714         (TARGET_F16FML): New feature flag for fp16fml.
29715         (doc/invoke.texi): Document new fp16fml option.
29717 2018-01-10  Michael Collison  <michael.collison@arm.com>
29719         * config/aarch64/aarch64-builtins.c:
29720         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29721         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29722         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29723         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29724         (AARCH64_ISA_SHA3): New ISA flag.
29725         (TARGET_SHA3): New feature flag for sha3.
29726         * config/aarch64/iterators.md (sha512_op): New int attribute.
29727         (CRYPTO_SHA512): New int iterator.
29728         (UNSPEC_SHA512H): New unspec.
29729         (UNSPEC_SHA512H2): Ditto.
29730         (UNSPEC_SHA512SU0): Ditto.
29731         (UNSPEC_SHA512SU1): Ditto.
29732         * config/aarch64/aarch64-simd-builtins.def
29733         (aarch64_crypto_sha512hqv2di): New builtin.
29734         (aarch64_crypto_sha512h2qv2di): Ditto.
29735         (aarch64_crypto_sha512su0qv2di): Ditto.
29736         (aarch64_crypto_sha512su1qv2di): Ditto.
29737         (aarch64_eor3qv8hi): Ditto.
29738         (aarch64_rax1qv2di): Ditto.
29739         (aarch64_xarqv2di): Ditto.
29740         (aarch64_bcaxqv8hi): Ditto.
29741         * config/aarch64/aarch64-simd.md:
29742         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29743         (aarch64_crypto_sha512su0qv2di): Ditto.
29744         (aarch64_crypto_sha512su1qv2di): Ditto.
29745         (aarch64_eor3qv8hi): Ditto.
29746         (aarch64_rax1qv2di): Ditto.
29747         (aarch64_xarqv2di): Ditto.
29748         (aarch64_bcaxqv8hi): Ditto.
29749         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29750         (vsha512h2q_u64): Ditto.
29751         (vsha512su0q_u64): Ditto.
29752         (vsha512su1q_u64): Ditto.
29753         (veor3q_u16): Ditto.
29754         (vrax1q_u64): Ditto.
29755         (vxarq_u64): Ditto.
29756         (vbcaxq_u16): Ditto.
29757         * config/arm/types.md (crypto_sha512): New type attribute.
29758         (crypto_sha3): Ditto.
29759         (doc/invoke.texi): Document new sha3 option.
29761 2018-01-10  Michael Collison  <michael.collison@arm.com>
29763         * config/aarch64/aarch64-builtins.c:
29764         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29765         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29766         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29767         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29768         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29769         (AARCH64_ISA_SM4): New ISA flag.
29770         (TARGET_SM4): New feature flag for sm4.
29771         * config/aarch64/aarch64-simd-builtins.def
29772         (aarch64_sm3ss1qv4si): Ditto.
29773         (aarch64_sm3tt1aq4si): Ditto.
29774         (aarch64_sm3tt1bq4si): Ditto.
29775         (aarch64_sm3tt2aq4si): Ditto.
29776         (aarch64_sm3tt2bq4si): Ditto.
29777         (aarch64_sm3partw1qv4si): Ditto.
29778         (aarch64_sm3partw2qv4si): Ditto.
29779         (aarch64_sm4eqv4si): Ditto.
29780         (aarch64_sm4ekeyqv4si): Ditto.
29781         * config/aarch64/aarch64-simd.md:
29782         (aarch64_sm3ss1qv4si): Ditto.
29783         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29784         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29785         (aarch64_sm4eqv4si): Ditto.
29786         (aarch64_sm4ekeyqv4si): Ditto.
29787         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29788         (sm3part_op): Ditto.
29789         (CRYPTO_SM3TT): Ditto.
29790         (CRYPTO_SM3PART): Ditto.
29791         (UNSPEC_SM3SS1): New unspec.
29792         (UNSPEC_SM3TT1A): Ditto.
29793         (UNSPEC_SM3TT1B): Ditto.
29794         (UNSPEC_SM3TT2A): Ditto.
29795         (UNSPEC_SM3TT2B): Ditto.
29796         (UNSPEC_SM3PARTW1): Ditto.
29797         (UNSPEC_SM3PARTW2): Ditto.
29798         (UNSPEC_SM4E): Ditto.
29799         (UNSPEC_SM4EKEY): Ditto.
29800         * config/aarch64/constraints.md (Ui2): New constraint.
29801         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29802         * config/arm/types.md (crypto_sm3): New type attribute.
29803         (crypto_sm4): Ditto.
29804         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29805         (vsm3tt1aq_u32): Ditto.
29806         (vsm3tt1bq_u32): Ditto.
29807         (vsm3tt2aq_u32): Ditto.
29808         (vsm3tt2bq_u32): Ditto.
29809         (vsm3partw1q_u32): Ditto.
29810         (vsm3partw2q_u32): Ditto.
29811         (vsm4eq_u32): Ditto.
29812         (vsm4ekeyq_u32): Ditto.
29813         (doc/invoke.texi): Document new sm4 option.
29815 2018-01-10  Michael Collison  <michael.collison@arm.com>
29817         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29818         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29819         (AARCH64_FL_FOR_ARCH8_4): New.
29820         (AARCH64_FL_V8_4): New flag.
29821         (doc/invoke.texi): Document new armv8.4-a option.
29823 2018-01-10  Michael Collison  <michael.collison@arm.com>
29825         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29826         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29827         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29828         * config/aarch64/aarch64-option-extension.def: Add
29829         AARCH64_OPT_EXTENSION of 'sha2'.
29830         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29831         (crypto): Disable sha2 and aes if crypto disabled.
29832         (crypto): Enable aes and sha2 if enabled.
29833         (simd): Disable sha2 and aes if simd disabled.
29834         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29835         New flags.
29836         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29837         (TARGET_SHA2): New feature flag for sha2.
29838         (TARGET_AES): New feature flag for aes.
29839         * config/aarch64/aarch64-simd.md:
29840         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29841         conditional on TARGET_AES.
29842         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29843         (aarch64_crypto_sha1hsi): Make pattern conditional
29844         on TARGET_SHA2.
29845         (aarch64_crypto_sha1hv4si): Ditto.
29846         (aarch64_be_crypto_sha1hv4si): Ditto.
29847         (aarch64_crypto_sha1su1v4si): Ditto.
29848         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29849         (aarch64_crypto_sha1su0v4si): Ditto.
29850         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29851         (aarch64_crypto_sha256su0v4si): Ditto.
29852         (aarch64_crypto_sha256su1v4si): Ditto.
29853         (doc/invoke.texi): Document new aes and sha2 options.
29855 2018-01-10  Martin Sebor  <msebor@redhat.com>
29857         PR tree-optimization/83781
29858         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29859         as string arrays.
29861 2018-01-11  Martin Sebor  <msebor@gmail.com>
29862             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29864         PR tree-optimization/83501
29865         PR tree-optimization/81703
29867         * tree-ssa-strlen.c (get_string_cst): Rename...
29868         (get_string_len): ...to this.  Handle global constants.
29869         (handle_char_store): Adjust.
29871 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
29872             Jim Wilson  <jimw@sifive.com>
29874         * config/riscv/riscv-protos.h (riscv_output_return): New.
29875         * config/riscv/riscv.c (struct machine_function): New naked_p field.
29876         (riscv_attribute_table, riscv_output_return),
29877         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29878         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29879         (riscv_compute_frame_info): Only compute frame->mask if not a naked
29880         function.
29881         (riscv_expand_prologue): Add early return for naked function.
29882         (riscv_expand_epilogue): Likewise.
29883         (riscv_function_ok_for_sibcall): Return false for naked function.
29884         (riscv_set_current_function): New.
29885         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29886         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29887         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29888         * doc/extend.texi (RISC-V Function Attributes): New.
29890 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
29892         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29893         check for 128-bit long double before checking TCmode.
29894         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29895         128-bit long doubles before checking TFmode or TCmode.
29896         (FLOAT128_IBM_P): Likewise.
29898 2018-01-10  Martin Sebor  <msebor@redhat.com>
29900         PR tree-optimization/83671
29901         * builtins.c (c_strlen): Unconditionally return zero for the empty
29902         string.
29903         Use -Warray-bounds for warnings.
29904         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29905         for non-constant array indices with COMPONENT_REF, arrays of
29906         arrays, and pointers to arrays.
29907         (gimple_fold_builtin_strlen): Determine and set length range for
29908         non-constant character arrays.
29910 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
29912         PR middle-end/81897
29913         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29914         empty blocks.
29916 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
29918         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29920 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29922         PR target/83399
29923         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29924         VECTOR_MEM_ALTIVEC_OR_VSX_P.
29925         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29926         indexed_or_indirect_operand predicate.
29927         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29928         (*vsx_le_perm_load_v8hi): Likewise.
29929         (*vsx_le_perm_load_v16qi): Likewise.
29930         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29931         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29932         (*vsx_le_perm_store_v8hi): Likewise.
29933         (*vsx_le_perm_store_v16qi): Likewise.
29934         (eight unnamed splitters): Likewise.
29936 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29938         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29939         * config/rs6000/emmintrin.h: Likewise.
29940         * config/rs6000/mmintrin.h: Likewise.
29941         * config/rs6000/xmmintrin.h: Likewise.
29943 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
29945         PR c++/43486
29946         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29947         "public_flag".
29948         * tree.c (tree_nop_conversion): Return true for location wrapper
29949         nodes.
29950         (maybe_wrap_with_location): New function.
29951         (selftest::check_strip_nops): New function.
29952         (selftest::test_location_wrappers): New function.
29953         (selftest::tree_c_tests): Call it.
29954         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29955         (maybe_wrap_with_location): New decl.
29956         (EXPR_LOCATION_WRAPPER_P): New macro.
29957         (location_wrapper_p): New inline function.
29958         (tree_strip_any_location_wrapper): New inline function.
29960 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
29962         PR target/83735
29963         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29964         stack_realign_offset for the largest alignment of stack slot
29965         actually used.
29966         (ix86_find_max_used_stack_alignment): New function.
29967         (ix86_finalize_stack_frame_flags): Use it.  Set
29968         max_used_stack_alignment if we don't realign stack.
29969         * config/i386/i386.h (machine_function): Add
29970         max_used_stack_alignment.
29972 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
29974         * config/arm/arm.opt (-mbranch-cost): New option.
29975         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29976         account.
29978 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
29980         PR target/83629
29981         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29982         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29984 2018-01-10  Richard Biener  <rguenther@suse.de>
29986         PR debug/83765
29987         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29988         early out so it also covers the case where we have a non-NULL
29989         origin.
29991 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
29993         PR tree-optimization/83753
29994         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29995         for non-strided grouped accesses if the number of elements is 1.
29997 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29999         PR target/81616
30000         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30001         * i386.h (TARGET_USE_GATHER): Define.
30002         * x86-tune.def (X86_TUNE_USE_GATHER): New.
30004 2018-01-10  Martin Liska  <mliska@suse.cz>
30006         PR bootstrap/82831
30007         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30008         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30009         partitioning.
30010         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30011         CLEANUP_NO_PARTITIONING is not set.
30013 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
30015         * doc/rtl.texi: Remove documentation of (const ...) wrappers
30016         for vectors, as a partial revert of r254296.
30017         * rtl.h (const_vec_p): Delete.
30018         (const_vec_duplicate_p): Don't test for vector CONSTs.
30019         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30020         * expmed.c (make_tree): Likewise.
30022         Revert:
30023         * common.md (E, F): Use CONSTANT_P instead of checking for
30024         CONST_VECTOR.
30025         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30026         checking for CONST_VECTOR.
30028 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30030         PR middle-end/83575
30031         * predict.c (force_edge_cold): Handle in more sane way edges
30032         with no prediction.
30034 2018-01-09  Carl Love  <cel@us.ibm.com>
30036         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30037         V4SI, V4SF types.
30038         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30039         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30040         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30041         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
30042         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30043         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
30044         * config/rs6000/rs6000-protos.h: Add extern defition for
30045         rs6000_generate_float2_double_code.
30046         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30047         function.
30048         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30049         (float2_v2df): Add define_expand.
30051 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
30053         PR target/83628
30054         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30055         op_mode in the force_to_mode call.
30057 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30059         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30060         instead of checking each element individually.
30061         (aarch64_evpc_uzp): Likewise.
30062         (aarch64_evpc_zip): Likewise.
30063         (aarch64_evpc_ext): Likewise.
30064         (aarch64_evpc_rev): Likewise.
30065         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30066         instead of checking each element individually.  Return true without
30067         generating rtl if
30068         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30069         whether all selected elements come from the same input, instead of
30070         checking each element individually.  Remove calls to gen_rtx_REG,
30071         start_sequence and end_sequence and instead assert that no rtl is
30072         generated.
30074 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30076         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30077         order of HIGH and CONST checks.
30079 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30081         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30082         if the destination isn't an SSA_NAME.
30084 2018-01-09  Richard Biener  <rguenther@suse.de>
30086         PR tree-optimization/83668
30087         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30088         move prologue...
30089         (canonicalize_loop_form): ... here, renamed from ...
30090         (canonicalize_loop_closed_ssa_form): ... this and amended to
30091         swap successor edges for loop exit blocks to make us use
30092         the RPO order we need for initial schedule generation.
30094 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
30096         PR tree-optimization/64811
30097         * match.pd: When optimizing comparisons with Inf, avoid
30098         introducing or losing exceptions from comparisons with NaN.
30100 2018-01-09  Martin Liska  <mliska@suse.cz>
30102         PR sanitizer/82517
30103         * asan.c (shadow_mem_size): Add gcc_assert.
30105 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
30107         Don't save registers in main().
30109         PR target/83738
30110         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30111         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30112         * config/avr/avr.c (avr_set_current_function): Don't error if
30113         naked, OS_task or OS_main are specified at the same time.
30114         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30115         OS_main.
30116         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30117         attribute.
30118         * common/config/avr/avr-common.c (avr_option_optimization_table):
30119         Switch on -mmain-is-OS_task for optimizing compilations.
30121 2018-01-09  Richard Biener  <rguenther@suse.de>
30123         PR tree-optimization/83572
30124         * graphite.c: Include cfganal.h.
30125         (graphite_transform_loops): Connect infinite loops to exit
30126         and remove fake edges at the end.
30128 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30130         * ipa-inline.c (edge_badness): Revert accidental checkin.
30132 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30134         PR ipa/80763
30135         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30136         symbols; not inline clones.
30138 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
30140         PR target/83507
30141         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30142         hard registers.  Formatting fixes.
30144         PR preprocessor/83722
30145         * gcc.c (try_generate_repro): Pass
30146         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30147         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30148         do_report_bug.
30150 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
30151             Kito Cheng  <kito.cheng@gmail.com>
30153         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30154         (riscv_leaf_function_p): Delete.
30155         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30157 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30159         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30160         function.
30161         (do_ifelse): New function.
30162         (do_isel): New function.
30163         (do_sub3): New function.
30164         (do_add3): New function.
30165         (do_load_mask_compare): New function.
30166         (do_overlap_load_compare): New function.
30167         (expand_compare_loop): New function.
30168         (expand_block_compare): Call expand_compare_loop() when appropriate.
30169         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30170         option description.
30171         (-mblock-compare-inline-loop-limit): New option.
30173 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30175         PR target/83677
30176         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30177         Reverse order of second and third operands in first alternative.
30178         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30179         of first and second elements in UNSPEC_VPERMR vector.
30180         (altivec_expand_vec_perm_le): Likewise.
30182 2018-01-08  Jeff Law  <law@redhat.com>
30184         PR rtl-optimizatin/81308
30185         * tree-switch-conversion.c (cfg_altered): New file scoped static.
30186         (process_switch): If group_case_labels makes a change, then set
30187         cfg_altered.
30188         (pass_convert_switch::execute): If a switch is converted, then
30189         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
30191         PR rtl-optimization/81308
30192         * recog.c (split_all_insns): Conditionally cleanup the CFG after
30193         splitting insns.
30195 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
30197         PR target/83663 - Revert r255946
30198         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30199         generation for cases where splatting a value is not useful.
30200         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30201         across a vec_duplicate and a paradoxical subreg forming a vector
30202         mode to a vec_concat.
30204 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30206         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30207         -march=armv8.3-a variants.
30208         * config/arm/t-multilib: Likewise.
30209         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
30211 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30213         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30214         to generate rtl.
30215         (cceq_ior_compare_complement): Give it a name so I can use it, and
30216         change boolean_or_operator predicate to boolean_operator so it can
30217         be used to generate a crand.
30218         (eqne): New code iterator.
30219         (bd/bd_neg): New code_attrs.
30220         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30221         a single define_insn.
30222         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30223         decrement (bdnzt/bdnzf/bdzt/bdzf).
30224         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30225         with the new names of the branch decrement patterns, and added the
30226         names of the branch decrement conditional patterns.
30228 2018-01-08  Richard Biener  <rguenther@suse.de>
30230         PR tree-optimization/83563
30231         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30232         cache.
30234 2018-01-08  Richard Biener  <rguenther@suse.de>
30236         PR middle-end/83713
30237         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30239 2018-01-08  Richard Biener  <rguenther@suse.de>
30241         PR tree-optimization/83685
30242         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30243         references to abnormals.
30245 2018-01-08  Richard Biener  <rguenther@suse.de>
30247         PR lto/83719
30248         * dwarf2out.c (output_indirect_strings): Handle empty
30249         skeleton_debug_str_hash.
30250         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30252 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30254         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30255         (emit_store_direct): Likewise.
30256         (arc_trampoline_adjust_address): Likewise.
30257         (arc_asm_trampoline_template): New function.
30258         (arc_initialize_trampoline): Use asm_trampoline_template.
30259         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30260         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30261         * config/arc/arc.md (flush_icache): Delete pattern.
30263 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30265         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30266         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30267         munaligned-access.
30269 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30271         PR target/83681
30272         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30273         by not USED_FOR_TARGET.
30274         (make_pass_resolve_sw_modes): Likewise.
30276 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30278         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30279         USED_FOR_TARGET.
30281 2018-01-08  Richard Biener  <rguenther@suse.de>
30283         PR middle-end/83580
30284         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30286 2018-01-08  Richard Biener  <rguenther@suse.de>
30288         PR middle-end/83517
30289         * match.pd ((t * 2) / 2) -> t): Add missing :c.
30291 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
30293         PR middle-end/81897
30294         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30295         basic blocks with a small number of successors.
30296         (convert_control_dep_chain_into_preds): Improve handling of
30297         forwarder blocks.
30298         (dump_predicates): Split apart into...
30299         (dump_pred_chain): ...here...
30300         (dump_pred_info): ...and here.
30301         (can_one_predicate_be_invalidated_p): Add debugging printfs.
30302         (can_chain_union_be_invalidated_p): Improve check for invalidation
30303         of paths.
30304         (uninit_uses_cannot_happen): Avoid unnecessary if
30305         convert_control_dep_chain_into_preds yielded nothing.
30307 2018-01-06  Martin Sebor  <msebor@redhat.com>
30309         PR tree-optimization/83640
30310         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30311         subtracting negative offset from size.
30312         (builtin_access::overlap): Adjust offset bounds of the access to fall
30313         within the size of the object if possible.
30315 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
30317         PR rtl-optimization/83699
30318         * expmed.c (extract_bit_field_1): Restrict the vector usage of
30319         extract_bit_field_as_subreg to cases in which the extracted
30320         value is also a vector.
30322         * lra-constraints.c (process_alt_operands): Test for the equivalence
30323         substitutions when detecting a possible reload cycle.
30325 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
30327         PR debug/83480
30328         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30329         by default if flag_selective_schedling{,2}.  Formatting fixes.
30331         PR rtl-optimization/83682
30332         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30333         if it has non-VECTOR_MODE element mode.
30334         (vec_duplicate_p): Likewise.
30336         PR middle-end/83694
30337         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30338         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30340 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30342         PR target/83604
30343         * config/i386/i386-builtin.def
30344         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30345         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30346         Require also OPTION_MASK_ISA_AVX512F in addition to
30347         OPTION_MASK_ISA_GFNI.
30348         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30349         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30350         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30351         to OPTION_MASK_ISA_GFNI.
30352         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30353         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30354         OPTION_MASK_ISA_AVX512BW.
30355         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30356         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30357         addition to OPTION_MASK_ISA_GFNI.
30358         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30359         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30360         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30361         to OPTION_MASK_ISA_GFNI.
30362         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30363         a requirement for all ISAs rather than any of them with a few
30364         exceptions.
30365         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30366         processing.
30367         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30368         bitmasks to be enabled with 3 exceptions, instead of requiring any
30369         enabled ISA with lots of exceptions.
30370         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30371         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30372         Change avx512bw in isa attribute to avx512f.
30373         * config/i386/sgxintrin.h: Add license boilerplate.
30374         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
30375         to __AVX512F__ and __AVX512VL to __AVX512VL__.
30376         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30377         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30378         defined.
30379         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30380         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30381         temporarily sse2 rather than sse if not enabled already.
30383         PR target/83604
30384         * config/i386/sse.md (VI248_VLBW): Rename to ...
30385         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
30386         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30387         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30388         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30389         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30390         mode iterator instead of VI248_VLBW.
30392 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
30394         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30395         (record_modified): Skip clobbers; add debug output.
30396         (param_change_prob): Use sreal frequencies.
30398 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30400         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30401         punt for user-aligned variables.
30403 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30405         * tree-chrec.c (chrec_contains_symbols): Return true for
30406         POLY_INT_CST.
30408 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
30410         PR target/82439
30411         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30412         of (x|y) == x for BICS pattern.
30414 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30416         PR tree-optimization/83605
30417         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30418         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30419         can throw.
30421 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30423         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30424         * config/epiphany/rtems.h: New file.
30426 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30427             Uros Bizjak  <ubizjak@gmail.com>
30429         PR target/83554
30430         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30431         QIreg_operand instead of register_operand predicate.
30432         * config/i386/i386.c (ix86_rop_should_change_byte_p,
30433         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30434         comments instead of -fmitigate[-_]rop.
30436 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
30438         PR bootstrap/81926
30439         * cgraphunit.c (symbol_table::compile): Switch to text_section
30440         before calling assembly_start debug hook.
30441         * run-rtl-passes.c (run_rtl_passes): Likewise.
30442         Include output.h.
30444 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30446         * tree-vrp.c (extract_range_from_binary_expr_1): Check
30447         range_int_cst_p rather than !symbolic_range_p before calling
30448         extract_range_from_multiplicative_op_1.
30450 2018-01-04  Jeff Law  <law@redhat.com>
30452         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30453         redundant test in assertion.
30455 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30457         * doc/rtl.texi: Document machine_mode wrapper classes.
30459 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30461         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30462         using tree_to_uhwi.
30464 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30466         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30467         the VEC_PERM_EXPR fold to fail.
30469 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30471         PR debug/83585
30472         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30473         to switched_sections.
30475 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30477         PR target/83680
30478         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30479         test for d.testing.
30481 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
30483         PR target/83387
30484         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30485         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30487 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30489         PR debug/83666
30490         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30491         is BLKmode and bitpos not zero or mode change is needed.
30493 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30495         PR target/83675
30496         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30497         TARGET_VIS2.
30499 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
30501         PR target/83628
30502         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30503         instead of MULT rtx.  Update all corresponding splitters.
30504         (*saddl_se): Ditto.
30505         (*ssub<modesuffix>): Ditto.
30506         (*ssubl_se): Ditto.
30507         (*cmp_sadd_di): Update split patterns.
30508         (*cmp_sadd_si): Ditto.
30509         (*cmp_sadd_sidi): Ditto.
30510         (*cmp_ssub_di): Ditto.
30511         (*cmp_ssub_si): Ditto.
30512         (*cmp_ssub_sidi): Ditto.
30513         * config/alpha/predicates.md (const23_operand): New predicate.
30514         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30515         Look for ASHIFT, not MULT inner operand.
30516         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30518 2018-01-04  Martin Liska  <mliska@suse.cz>
30520         PR gcov-profile/83669
30521         * gcov.c (output_intermediate_file): Add version to intermediate
30522         gcov file.
30523         * doc/gcov.texi: Document new field 'version' in intermediate
30524         file format. Fix location of '-k' option of gcov command.
30526 2018-01-04  Martin Liska  <mliska@suse.cz>
30528         PR ipa/82352
30529         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30531 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30533         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30535 2018-01-03  Martin Sebor  <msebor@redhat.com>
30537         PR tree-optimization/83655
30538         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30539         checking calls with invalid arguments.
30541 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30543         * tree-vect-stmts.c (vect_get_store_rhs): New function.
30544         (vectorizable_mask_load_store): Delete.
30545         (vectorizable_call): Return false for masked loads and stores.
30546         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
30547         instead of gimple_assign_rhs1.
30548         (vectorizable_load): Handle IFN_MASK_LOAD.
30549         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30551 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30553         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30554         split out from..,
30555         (vectorizable_mask_load_store): ...here.
30556         (vectorizable_load): ...and here.
30558 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30560         * tree-vect-stmts.c (vect_build_all_ones_mask)
30561         (vect_build_zero_merge_argument): New functions, split out from...
30562         (vectorizable_load): ...here.
30564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30566         * tree-vect-stmts.c (vect_check_store_rhs): New function,
30567         split out from...
30568         (vectorizable_mask_load_store): ...here.
30569         (vectorizable_store): ...and here.
30571 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30573         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30574         split out from...
30575         (vectorizable_mask_load_store): ...here.
30577 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30579         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30580         (vect_model_store_cost): Take a vec_load_store_type instead of a
30581         vect_def_type.
30582         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30583         (vect_model_store_cost): Take a vec_load_store_type instead of a
30584         vect_def_type.
30585         (vectorizable_mask_load_store): Update accordingly.
30586         (vectorizable_store): Likewise.
30587         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30589 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30591         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30592         IFN_MASK_LOAD calls here rather than...
30593         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30595 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30596             Alan Hayward  <alan.hayward@arm.com>
30597             David Sherwood  <david.sherwood@arm.com>
30599         * expmed.c (extract_bit_field_1): For vector extracts,
30600         fall back to extract_bit_field_as_subreg if vec_extract
30601         isn't available.
30603 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30604             Alan Hayward  <alan.hayward@arm.com>
30605             David Sherwood  <david.sherwood@arm.com>
30607         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30608         they are variable or constant sized.
30609         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30610         slots for constant-sized data.
30612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30613             Alan Hayward  <alan.hayward@arm.com>
30614             David Sherwood  <david.sherwood@arm.com>
30616         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30617         handling COND_EXPRs with boolean comparisons, try to find a better
30618         basis for the mask type than the boolean itself.
30620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30622         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30623         is calculated and how it can be overridden.
30624         * genmodes.c (max_bitsize_mode_any_mode): New variable.
30625         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30626         if defined.
30627         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30628         if nonzero.
30630 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30631             Alan Hayward  <alan.hayward@arm.com>
30632             David Sherwood  <david.sherwood@arm.com>
30634         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30635         Remove the mode argument.
30636         (aarch64_simd_valid_immediate): Remove the mode and inverse
30637         arguments.
30638         * config/aarch64/iterators.md (bitsize): New iterator.
30639         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30640         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30641         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30642         aarch64_simd_valid_immediate.
30643         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30644         (aarch64_reg_or_bic_imm): Likewise.
30645         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30646         with an insn_type enum and msl with a modifier_type enum.
30647         Replace element_width with a scalar_mode.  Change the shift
30648         to unsigned int.  Add constructors for scalar_float_mode and
30649         scalar_int_mode elements.
30650         (aarch64_vect_float_const_representable_p): Delete.
30651         (aarch64_can_const_movi_rtx_p)
30652         (aarch64_simd_scalar_immediate_valid_for_move)
30653         (aarch64_simd_make_constant): Update call to
30654         aarch64_simd_valid_immediate.
30655         (aarch64_advsimd_valid_immediate_hs): New function.
30656         (aarch64_advsimd_valid_immediate): Likewise.
30657         (aarch64_simd_valid_immediate): Remove mode and inverse
30658         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
30659         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30660         and aarch64_float_const_representable_p on the result.
30661         (aarch64_output_simd_mov_immediate): Remove mode argument.
30662         Update call to aarch64_simd_valid_immediate and use of
30663         simd_immediate_info.
30664         (aarch64_output_scalar_simd_mov_immediate): Update call
30665         accordingly.
30667 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30668             Alan Hayward  <alan.hayward@arm.com>
30669             David Sherwood  <david.sherwood@arm.com>
30671         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30672         (mode_nunits): Likewise CONST_MODE_NUNITS.
30673         * machmode.def (ADJUST_NUNITS): Document.
30674         * genmodes.c (mode_data::need_nunits_adj): New field.
30675         (blank_mode): Update accordingly.
30676         (adj_nunits): New variable.
30677         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30678         parameter.
30679         (emit_mode_size_inline): Set need_bytesize_adj for all modes
30680         listed in adj_nunits.
30681         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30682         listed in adj_nunits.  Don't emit case statements for such modes.
30683         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30684         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
30685         nothing if adj_nunits is nonnull.
30686         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30687         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30688         (emit_mode_fbit): Update use of print_maybe_const_decl.
30689         (emit_move_size): Likewise.  Treat the array as non-const
30690         if adj_nunits.
30691         (emit_mode_adjustments): Handle adj_nunits.
30693 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30695         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30696         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30697         (VECTOR_MODES): Use it.
30698         (make_vector_modes): Take the prefix as an argument.
30700 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30701             Alan Hayward  <alan.hayward@arm.com>
30702             David Sherwood  <david.sherwood@arm.com>
30704         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30705         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30706         for MODE_VECTOR_BOOL.
30707         * machmode.def (VECTOR_BOOL_MODE): Document.
30708         * genmodes.c (VECTOR_BOOL_MODE): New macro.
30709         (make_vector_bool_mode): New function.
30710         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30711         MODE_VECTOR_BOOL.
30712         * lto-streamer-in.c (lto_input_mode_table): Likewise.
30713         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30714         Likewise.
30715         * stor-layout.c (int_mode_for_mode): Likewise.
30716         * tree.c (build_vector_type_for_mode): Likewise.
30717         * varasm.c (output_constant_pool_2): Likewise.
30718         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30719         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
30720         for MODE_VECTOR_BOOL.
30721         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30722         of mode class checks.
30723         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30724         instead of a list of mode class checks.
30725         (expand_vector_scalar_condition): Likewise.
30726         (type_for_widest_vector_mode): Handle BImode as an inner mode.
30728 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30729             Alan Hayward  <alan.hayward@arm.com>
30730             David Sherwood  <david.sherwood@arm.com>
30732         * machmode.h (mode_size): Change from unsigned short to
30733         poly_uint16_pod.
30734         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30735         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30736         or if measurement_type is not polynomial.
30737         (fixed_size_mode::includes_p): Check for constant-sized modes.
30738         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30739         return a poly_uint16 rather than an unsigned short.
30740         (emit_mode_size): Change the type of mode_size from unsigned short
30741         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
30742         (emit_mode_adjustments): Cope with polynomial vector sizes.
30743         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30744         for GET_MODE_SIZE.
30745         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30746         for GET_MODE_SIZE.
30747         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30748         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30749         * caller-save.c (setup_save_areas): Likewise.
30750         (replace_reg_with_saved_mem): Likewise.
30751         * calls.c (emit_library_call_value_1): Likewise.
30752         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30753         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30754         (gen_lowpart_for_combine): Likewise.
30755         * convert.c (convert_to_integer_1): Likewise.
30756         * cse.c (equiv_constant, cse_insn): Likewise.
30757         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30758         (cselib_subst_to_values): Likewise.
30759         * dce.c (word_dce_process_block): Likewise.
30760         * df-problems.c (df_word_lr_mark_ref): Likewise.
30761         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30762         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30763         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30764         (rtl_for_decl_location): Likewise.
30765         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30766         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30767         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30768         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30769         (expand_expr_real_1): Likewise.
30770         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30771         (pad_below): Likewise.
30772         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30773         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30774         * ira.c (get_subreg_tracking_sizes): Likewise.
30775         * ira-build.c (ira_create_allocno_objects): Likewise.
30776         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30777         (ira_sort_regnos_for_alter_reg): Likewise.
30778         * ira-costs.c (record_operand_costs): Likewise.
30779         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30780         (resolve_simple_move): Likewise.
30781         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30782         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30783         (lra_constraints): Likewise.
30784         (CONST_POOL_OK_P): Reject variable-sized modes.
30785         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30786         (add_pseudo_to_slot, lra_spill): Likewise.
30787         * omp-low.c (omp_clause_aligned_alignment): Likewise.
30788         * optabs-query.c (get_best_extraction_insn): Likewise.
30789         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30790         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30791         (expand_mult_highpart, valid_multiword_target_p): Likewise.
30792         * recog.c (offsettable_address_addr_space_p): Likewise.
30793         * regcprop.c (maybe_mode_change): Likewise.
30794         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30795         * regrename.c (build_def_use): Likewise.
30796         * regstat.c (dump_reg_info): Likewise.
30797         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30798         (find_reloads, find_reloads_subreg_address): Likewise.
30799         * reload1.c (eliminate_regs_1): Likewise.
30800         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30801         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30802         (simplify_binary_operation_1, simplify_subreg): Likewise.
30803         * targhooks.c (default_function_arg_padding): Likewise.
30804         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30805         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30806         (verify_gimple_assign_ternary): Likewise.
30807         * tree-inline.c (estimate_move_cost): Likewise.
30808         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30809         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30810         (get_address_cost_ainc): Likewise.
30811         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30812         (vect_supportable_dr_alignment): Likewise.
30813         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30814         (vectorizable_reduction): Likewise.
30815         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30816         (vectorizable_operation, vectorizable_load): Likewise.
30817         * tree.c (build_same_sized_truth_vector_type): Likewise.
30818         * valtrack.c (cleanup_auto_inc_dec): Likewise.
30819         * var-tracking.c (emit_note_insn_var_location): Likewise.
30820         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30821         (ADDR_VEC_ALIGN): Likewise.
30823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30824             Alan Hayward  <alan.hayward@arm.com>
30825             David Sherwood  <david.sherwood@arm.com>
30827         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30828         unsigned short.
30829         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30830         or if measurement_type is polynomial.
30831         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30832         * combine.c (make_extraction): Likewise.
30833         * dse.c (find_shift_sequence): Likewise.
30834         * dwarf2out.c (mem_loc_descriptor): Likewise.
30835         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30836         (extract_bit_field, extract_low_bits): Likewise.
30837         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30838         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30839         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30840         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30841         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30842         * reload.c (find_reloads): Likewise.
30843         * reload1.c (alter_reg): Likewise.
30844         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30845         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30846         * tree-if-conv.c (predicate_mem_writes): Likewise.
30847         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30848         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30849         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30850         * valtrack.c (dead_debug_insert_temp): Likewise.
30851         * varasm.c (mergeable_constant_section): Likewise.
30852         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30854 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30855             Alan Hayward  <alan.hayward@arm.com>
30856             David Sherwood  <david.sherwood@arm.com>
30858         * expr.c (expand_assignment): Cope with polynomial mode sizes
30859         when assigning to a CONCAT.
30861 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30862             Alan Hayward  <alan.hayward@arm.com>
30863             David Sherwood  <david.sherwood@arm.com>
30865         * machmode.h (mode_precision): Change from unsigned short to
30866         poly_uint16_pod.
30867         (mode_to_precision): Return a poly_uint16 rather than an unsigned
30868         short.
30869         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30870         or if measurement_type is not polynomial.
30871         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
30872         in which the mode is already known to be a scalar_int_mode.
30873         * genmodes.c (emit_mode_precision): Change the type of mode_precision
30874         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
30875         initializer.
30876         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30877         for GET_MODE_PRECISION.
30878         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30879         for GET_MODE_PRECISION.
30880         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30881         as polynomial.
30882         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30883         (expand_field_assignment, make_extraction): Likewise.
30884         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30885         (get_last_value): Likewise.
30886         * convert.c (convert_to_integer_1): Likewise.
30887         * cse.c (cse_insn): Likewise.
30888         * expr.c (expand_expr_real_1): Likewise.
30889         * lra-constraints.c (simplify_operand_subreg): Likewise.
30890         * optabs-query.c (can_atomic_load_p): Likewise.
30891         * optabs.c (expand_atomic_load): Likewise.
30892         (expand_atomic_store): Likewise.
30893         * ree.c (combine_reaching_defs): Likewise.
30894         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30895         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30896         * tree.h (type_has_mode_precision_p): Likewise.
30897         * ubsan.c (instrument_si_overflow): Likewise.
30899 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30900             Alan Hayward  <alan.hayward@arm.com>
30901             David Sherwood  <david.sherwood@arm.com>
30903         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30904         polynomial numbers of units.
30905         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30906         (valid_vector_subparts_p): New function.
30907         (build_vector_type): Remove temporary shim and take the number
30908         of units as a poly_uint64 rather than an int.
30909         (build_opaque_vector_type): Take the number of units as a
30910         poly_uint64 rather than an int.
30911         * tree.c (build_vector_from_ctor): Handle polynomial
30912         TYPE_VECTOR_SUBPARTS.
30913         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30914         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30915         (build_vector_from_val): If the number of units is variable,
30916         use build_vec_duplicate_cst for constant operands and
30917         VEC_DUPLICATE_EXPR otherwise.
30918         (make_vector_type): Remove temporary is_constant ().
30919         (build_vector_type, build_opaque_vector_type): Take the number of
30920         units as a poly_uint64 rather than an int.
30921         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30922         VECTOR_CST_NELTS.
30923         * cfgexpand.c (expand_debug_expr): Likewise.
30924         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30925         (store_constructor, expand_expr_real_1): Likewise.
30926         (const_scalar_mask_from_tree): Likewise.
30927         * fold-const-call.c (fold_const_reduction): Likewise.
30928         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30929         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30930         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30931         (fold_relational_const): Likewise.
30932         (native_interpret_vector): Likewise.  Change the size from an
30933         int to an unsigned int.
30934         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30935         TYPE_VECTOR_SUBPARTS.
30936         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30937         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30938         duplicating a non-constant operand into a variable-length vector.
30939         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30940         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30941         * ipa-icf.c (sem_variable::equals): Likewise.
30942         * match.pd: Likewise.
30943         * omp-simd-clone.c (simd_clone_subparts): Likewise.
30944         * print-tree.c (print_node): Likewise.
30945         * stor-layout.c (layout_type): Likewise.
30946         * targhooks.c (default_builtin_vectorization_cost): Likewise.
30947         * tree-cfg.c (verify_gimple_comparison): Likewise.
30948         (verify_gimple_assign_binary): Likewise.
30949         (verify_gimple_assign_ternary): Likewise.
30950         (verify_gimple_assign_single): Likewise.
30951         * tree-pretty-print.c (dump_generic_node): Likewise.
30952         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30953         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30954         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30955         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30956         (vect_shift_permute_load_chain): Likewise.
30957         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30958         (expand_vector_condition, optimize_vector_constructor): Likewise.
30959         (lower_vec_perm, get_compute_type): Likewise.
30960         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30961         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30962         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30963         (vect_recog_mask_conversion_pattern): Likewise.
30964         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30965         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30966         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30967         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30968         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30969         (vectorizable_shift, vectorizable_operation, vectorizable_store)
30970         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30971         (supportable_widening_operation): Likewise.
30972         (supportable_narrowing_operation): Likewise.
30973         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30974         Likewise.
30975         * varasm.c (output_constant): Likewise.
30977 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30978             Alan Hayward  <alan.hayward@arm.com>
30979             David Sherwood  <david.sherwood@arm.com>
30981         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30982         so that both the length == 3 and length != 3 cases set up their
30983         own permute vectors.  Add comments explaining why we know the
30984         number of elements is constant.
30985         (vect_permute_load_chain): Likewise.
30987 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30988             Alan Hayward  <alan.hayward@arm.com>
30989             David Sherwood  <david.sherwood@arm.com>
30991         * machmode.h (mode_nunits): Change from unsigned char to
30992         poly_uint16_pod.
30993         (ONLY_FIXED_SIZE_MODES): New macro.
30994         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30995         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30996         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30997         New typedefs.
30998         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30999         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31000         or if measurement_type is not polynomial.
31001         * genmodes.c (ZERO_COEFFS): New macro.
31002         (emit_mode_nunits_inline): Make mode_nunits_inline return a
31003         poly_uint16.
31004         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31005         Use ZERO_COEFFS when emitting initializers.
31006         * data-streamer.h (bp_pack_poly_value): New function.
31007         (bp_unpack_poly_value): Likewise.
31008         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31009         for GET_MODE_NUNITS.
31010         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31011         for GET_MODE_NUNITS.
31012         * tree.c (make_vector_type): Remove temporary shim and make
31013         the real function take the number of units as a poly_uint64
31014         rather than an int.
31015         (build_vector_type_for_mode): Handle polynomial nunits.
31016         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31017         * emit-rtl.c (const_vec_series_p_1): Likewise.
31018         (gen_rtx_CONST_VECTOR): Likewise.
31019         * fold-const.c (test_vec_duplicate_folding): Likewise.
31020         * genrecog.c (validate_pattern): Likewise.
31021         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31022         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31023         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31024         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31025         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31026         * rtlanal.c (subreg_get_info): Likewise.
31027         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31028         (vect_grouped_load_supported): Likewise.
31029         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31030         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31031         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31032         (simplify_const_unary_operation, simplify_binary_operation_1)
31033         (simplify_const_binary_operation, simplify_ternary_operation)
31034         (test_vector_ops_duplicate, test_vector_ops): Likewise.
31035         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31036         instead of CONST_VECTOR_NUNITS.
31037         * varasm.c (output_constant_pool_2): Likewise.
31038         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31039         explicit-encoded elements in the XVEC for variable-length vectors.
31041 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31043         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31046             Alan Hayward  <alan.hayward@arm.com>
31047             David Sherwood  <david.sherwood@arm.com>
31049         * coretypes.h (fixed_size_mode): Declare.
31050         (fixed_size_mode_pod): New typedef.
31051         * builtins.h (target_builtins::x_apply_args_mode)
31052         (target_builtins::x_apply_result_mode): Change type to
31053         fixed_size_mode_pod.
31054         * builtins.c (apply_args_size, apply_result_size, result_vector)
31055         (expand_builtin_apply_args_1, expand_builtin_apply)
31056         (expand_builtin_return): Update accordingly.
31058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31060         * cse.c (hash_rtx_cb): Hash only the encoded elements.
31061         * cselib.c (cselib_hash_rtx): Likewise.
31062         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31063         CONST_VECTOR encoding.
31065 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31066             Jeff Law  <law@redhat.com>
31068         PR target/83641
31069         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31070         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31071         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31072         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31074         PR target/83641
31075         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31076         explicitly probe *sp in a noreturn function if there were any callee
31077         register saves or frame pointer is needed.
31079 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31081         PR debug/83621
31082         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31083         BLKmode for ternary, binary or unary expressions.
31085         PR debug/83645
31086         * var-tracking.c (delete_vta_debug_insn): New inline function.
31087         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31088         insns from get_insns () to NULL instead of each bb separately.
31089         Use delete_vta_debug_insn.  No longer static.
31090         (vt_debug_insns_local, variable_tracking_main_1): Adjust
31091         delete_vta_debug_insns callers.
31092         * rtl.h (delete_vta_debug_insns): Declare.
31093         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31094         instead of variable_tracking_main.
31096 2018-01-03  Martin Sebor  <msebor@redhat.com>
31098         PR tree-optimization/83603
31099         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31100         arguments past the endof the argument list in functions declared
31101         without a prototype.
31102         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31103         Avoid checking when arguments are null.
31105 2018-01-03  Martin Sebor  <msebor@redhat.com>
31107         PR c/83559
31108         * doc/extend.texi (attribute const): Fix a typo.
31109         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31110         issuing -Wsuggest-attribute for void functions.
31112 2018-01-03  Martin Sebor  <msebor@redhat.com>
31114         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31115         offset_int::from instead of wide_int::to_shwi.
31116         (maybe_diag_overlap): Remove assertion.
31117         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31118         * gimple-ssa-sprintf.c (format_directive): Same.
31119         (parse_directive): Same.
31120         (sprintf_dom_walker::compute_format_length): Same.
31121         (try_substitute_return_value): Same.
31123 2018-01-03  Jeff Law  <law@redhat.com>
31125         PR middle-end/83654
31126         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31127         non-constant residual for zero at runtime and avoid probing in
31128         that case.  Reorganize code for trailing problem to mirror handling
31129         of the residual.
31131 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31133         PR tree-optimization/83501
31134         * tree-ssa-strlen.c (get_string_cst): New.
31135         (handle_char_store): Call get_string_cst.
31137 2018-01-03  Martin Liska  <mliska@suse.cz>
31139         PR tree-optimization/83593
31140         * tree-ssa-strlen.c: Include tree-cfg.h.
31141         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31142         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31143         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31144         to false.
31145         (strlen_dom_walker::before_dom_children): Call
31146         gimple_purge_dead_eh_edges. Dump tranformation with details
31147         dump flags.
31148         (strlen_dom_walker::before_dom_children): Update call by adding
31149         new argument cleanup_eh.
31150         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31152 2018-01-03  Martin Liska  <mliska@suse.cz>
31154         PR ipa/83549
31155         * cif-code.def (VARIADIC_THUNK): New enum value.
31156         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31157         thunks.
31159 2018-01-03  Jan Beulich  <jbeulich@suse.com>
31161         * sse.md (mov<mode>_internal): Tighten condition for when to use
31162         vmovdqu<ssescalarsize> for TI and OI modes.
31164 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31166         Update copyright years.
31168 2018-01-03  Martin Liska  <mliska@suse.cz>
31170         PR ipa/83594
31171         * ipa-visibility.c (function_and_variable_visibility): Skip
31172         functions with noipa attribure.
31174 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31176         * gcc.c (process_command): Update copyright notice dates.
31177         * gcov-dump.c (print_version): Ditto.
31178         * gcov.c (print_version): Ditto.
31179         * gcov-tool.c (print_version): Ditto.
31180         * gengtype.c (create_file): Ditto.
31181         * doc/cpp.texi: Bump @copying's copyright year.
31182         * doc/cppinternals.texi: Ditto.
31183         * doc/gcc.texi: Ditto.
31184         * doc/gccint.texi: Ditto.
31185         * doc/gcov.texi: Ditto.
31186         * doc/install.texi: Ditto.
31187         * doc/invoke.texi: Ditto.
31189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31191         * vector-builder.h (vector_builder::m_full_nelts): Change from
31192         unsigned int to poly_uint64.
31193         (vector_builder::full_nelts): Update prototype accordingly.
31194         (vector_builder::new_vector): Likewise.
31195         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31196         (vector_builder::operator ==): Likewise.
31197         (vector_builder::finalize): Likewise.
31198         * int-vector-builder.h (int_vector_builder::int_vector_builder):
31199         Take the number of elements as a poly_uint64 rather than an
31200         unsigned int.
31201         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31202         from unsigned int to poly_uint64.
31203         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31204         (vec_perm_indices::new_vector): Likewise.
31205         (vec_perm_indices::length): Likewise.
31206         (vec_perm_indices::nelts_per_input): Likewise.
31207         (vec_perm_indices::input_nelts): Likewise.
31208         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31209         number of elements per input as a poly_uint64 rather than an
31210         unsigned int.  Use the original encoding for variable-length
31211         vectors, rather than clamping each individual element.
31212         For the second and subsequent elements in each pattern,
31213         clamp the step and base before clamping their sum.
31214         (vec_perm_indices::series_p): Handle polynomial element counts.
31215         (vec_perm_indices::all_in_range_p): Likewise.
31216         (vec_perm_indices_to_tree): Likewise.
31217         (vec_perm_indices_to_rtx): Likewise.
31218         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31219         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31220         (tree_vector_builder::new_binary_operation): Handle polynomial
31221         element counts.  Return false if we need to know the number
31222         of elements at compile time.
31223         * fold-const.c (fold_vec_perm): Punt if the number of elements
31224         isn't known at compile time.
31226 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31228         * vec-perm-indices.h (vec_perm_builder): Change element type
31229         from HOST_WIDE_INT to poly_int64.
31230         (vec_perm_indices::element_type): Update accordingly.
31231         (vec_perm_indices::clamp): Handle polynomial element_types.
31232         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31233         (vec_perm_indices::all_in_range_p): Likewise.
31234         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31235         than shwi trees.
31236         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31237         polynomial vec_perm_indices element types.
31238         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31239         * fold-const.c (fold_vec_perm): Likewise.
31240         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31241         * tree-vect-generic.c (lower_vec_perm): Likewise.
31242         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31243         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31244         element type to HOST_WIDE_INT.
31246 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31247             Alan Hayward  <alan.hayward@arm.com>
31248             David Sherwood  <david.sherwood@arm.com>
31250         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31251         rather than an int.  Use plus_constant.
31252         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31253         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31255 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31256             Alan Hayward  <alan.hayward@arm.com>
31257             David Sherwood  <david.sherwood@arm.com>
31259         * calls.c (emit_call_1, expand_call): Change struct_value_size from
31260         a HOST_WIDE_INT to a poly_int64.
31262 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31263             Alan Hayward  <alan.hayward@arm.com>
31264             David Sherwood  <david.sherwood@arm.com>
31266         * calls.c (load_register_parameters): Cope with polynomial
31267         mode sizes.  Require a constant size for BLKmode parameters
31268         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
31269         forces a parameter to be padded at the lsb end in order to
31270         fill a complete number of words, require the parameter size
31271         to be ordered wrt UNITS_PER_WORD.
31273 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31274             Alan Hayward  <alan.hayward@arm.com>
31275             David Sherwood  <david.sherwood@arm.com>
31277         * reload1.c (spill_stack_slot_width): Change element type
31278         from unsigned int to poly_uint64_pod.
31279         (alter_reg): Treat mode sizes as polynomial.
31281 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31282             Alan Hayward  <alan.hayward@arm.com>
31283             David Sherwood  <david.sherwood@arm.com>
31285         * reload.c (complex_word_subreg_p): New function.
31286         (reload_inner_reg_of_subreg, push_reload): Use it.
31288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31289             Alan Hayward  <alan.hayward@arm.com>
31290             David Sherwood  <david.sherwood@arm.com>
31292         * lra-constraints.c (process_alt_operands): Reject matched
31293         operands whose sizes aren't ordered.
31294         (match_reload): Refer to this check here.
31296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31297             Alan Hayward  <alan.hayward@arm.com>
31298             David Sherwood  <david.sherwood@arm.com>
31300         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31301         that the mode size is in the set {1, 2, 4, 8, 16}.
31303 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31304             Alan Hayward  <alan.hayward@arm.com>
31305             David Sherwood  <david.sherwood@arm.com>
31307         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31308         Use plus_constant instead of gen_rtx_PLUS.
31310 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31311             Alan Hayward  <alan.hayward@arm.com>
31312             David Sherwood  <david.sherwood@arm.com>
31314         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31315         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31316         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31317         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31318         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31319         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31320         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31321         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31322         * config/i386/i386.c (ix86_push_rounding): ...this new function.
31323         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31324         a poly_int64.
31325         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31326         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31327         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31328         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31329         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31330         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31331         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31332         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31333         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31334         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31335         function.
31336         * expr.c (emit_move_resolve_push): Treat the input and result
31337         of PUSH_ROUNDING as a poly_int64.
31338         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31339         (emit_push_insn): Likewise.
31340         * lra-eliminations.c (mark_not_eliminable): Likewise.
31341         * recog.c (push_operand): Likewise.
31342         * reload1.c (elimination_effects): Likewise.
31343         * rtlanal.c (nonzero_bits1): Likewise.
31344         * calls.c (store_one_arg): Likewise.  Require the padding to be
31345         known at compile time.
31347 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31348             Alan Hayward  <alan.hayward@arm.com>
31349             David Sherwood  <david.sherwood@arm.com>
31351         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31352         Use plus_constant instead of gen_rtx_PLUS.
31354 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31355             Alan Hayward  <alan.hayward@arm.com>
31356             David Sherwood  <david.sherwood@arm.com>
31358         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31359         rather than an int.
31361 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31362             Alan Hayward  <alan.hayward@arm.com>
31363             David Sherwood  <david.sherwood@arm.com>
31365         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31366         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31367         via stack temporaries.  Treat the mode size as polynomial too.
31369 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31370             Alan Hayward  <alan.hayward@arm.com>
31371             David Sherwood  <david.sherwood@arm.com>
31373         * expr.c (expand_expr_real_2): When handling conversions involving
31374         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31375         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
31376         as a poly_uint64 too.
31378 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31379             Alan Hayward  <alan.hayward@arm.com>
31380             David Sherwood  <david.sherwood@arm.com>
31382         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31384 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31385             Alan Hayward  <alan.hayward@arm.com>
31386             David Sherwood  <david.sherwood@arm.com>
31388         * combine.c (can_change_dest_mode): Handle polynomial
31389         REGMODE_NATURAL_SIZE.
31390         * expmed.c (store_bit_field_1): Likewise.
31391         * expr.c (store_constructor): Likewise.
31392         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31393         and polynomial REGMODE_NATURAL_SIZE.
31394         (gen_lowpart_common): Likewise.
31395         * reginfo.c (record_subregs_of_mode): Likewise.
31396         * rtlanal.c (read_modify_subreg_p): Likewise.
31398 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31399             Alan Hayward  <alan.hayward@arm.com>
31400             David Sherwood  <david.sherwood@arm.com>
31402         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31403         numbers of elements.
31405 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31406             Alan Hayward  <alan.hayward@arm.com>
31407             David Sherwood  <david.sherwood@arm.com>
31409         * match.pd: Cope with polynomial numbers of vector elements.
31411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31412             Alan Hayward  <alan.hayward@arm.com>
31413             David Sherwood  <david.sherwood@arm.com>
31415         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31416         in a POINTER_PLUS_EXPR.
31418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31419             Alan Hayward  <alan.hayward@arm.com>
31420             David Sherwood  <david.sherwood@arm.com>
31422         * omp-simd-clone.c (simd_clone_subparts): New function.
31423         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31424         (ipa_simd_modify_function_body): Likewise.
31426 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31427             Alan Hayward  <alan.hayward@arm.com>
31428             David Sherwood  <david.sherwood@arm.com>
31430         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31431         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31432         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31433         (expand_vector_condition, vector_element): Likewise.
31434         (subparts_gt): New function.
31435         (get_compute_type): Use subparts_gt.
31436         (count_type_subparts): Delete.
31437         (expand_vector_operations_1): Use subparts_gt instead of
31438         count_type_subparts.
31440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31441             Alan Hayward  <alan.hayward@arm.com>
31442             David Sherwood  <david.sherwood@arm.com>
31444         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31445         (vect_compile_time_alias): ...this new function.  Do the calculation
31446         on poly_ints rather than trees.
31447         (vect_prune_runtime_alias_test_list): Update call accordingly.
31449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31450             Alan Hayward  <alan.hayward@arm.com>
31451             David Sherwood  <david.sherwood@arm.com>
31453         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31454         numbers of units.
31455         (vect_schedule_slp_instance): Likewise.
31457 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31458             Alan Hayward  <alan.hayward@arm.com>
31459             David Sherwood  <david.sherwood@arm.com>
31461         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31462         constant and extern definitions for variable-length vectors.
31463         (vect_get_constant_vectors): Note that the number of units
31464         is known to be constant.
31466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31467             Alan Hayward  <alan.hayward@arm.com>
31468             David Sherwood  <david.sherwood@arm.com>
31470         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31471         of units as polynomial.  Choose between WIDE and NARROW based
31472         on multiple_p.
31474 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31475             Alan Hayward  <alan.hayward@arm.com>
31476             David Sherwood  <david.sherwood@arm.com>
31478         * tree-vect-stmts.c (simd_clone_subparts): New function.
31479         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31481 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31482             Alan Hayward  <alan.hayward@arm.com>
31483             David Sherwood  <david.sherwood@arm.com>
31485         * tree-vect-stmts.c (vectorizable_call): Treat the number of
31486         vectors as polynomial.  Use build_index_vector for
31487         IFN_GOMP_SIMD_LANE.
31489 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31490             Alan Hayward  <alan.hayward@arm.com>
31491             David Sherwood  <david.sherwood@arm.com>
31493         * tree-vect-stmts.c (get_load_store_type): Treat the number of
31494         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31495         for variable-length vectors.
31496         (vectorizable_mask_load_store): Treat the number of units as
31497         polynomial, asserting that it is constant if the condition has
31498         already been enforced.
31499         (vectorizable_store, vectorizable_load): Likewise.
31501 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31502             Alan Hayward  <alan.hayward@arm.com>
31503             David Sherwood  <david.sherwood@arm.com>
31505         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31506         of units as polynomial.  Punt if we can't tell at compile time
31507         which vector contains the final result.
31509 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31510             Alan Hayward  <alan.hayward@arm.com>
31511             David Sherwood  <david.sherwood@arm.com>
31513         * tree-vect-loop.c (vectorizable_induction): Treat the number
31514         of units as polynomial.  Punt on SLP inductions.  Use an integer
31515         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
31516         cast of such a series for variable-length floating-point
31517         reductions.
31519 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31520             Alan Hayward  <alan.hayward@arm.com>
31521             David Sherwood  <david.sherwood@arm.com>
31523         * tree.h (build_index_vector): Declare.
31524         * tree.c (build_index_vector): New function.
31525         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31526         of units as polynomial, forcibly converting it to a constant if
31527         vectorizable_reduction has already enforced the condition.
31528         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
31529         to create a {1,2,3,...} vector.
31530         (vectorizable_reduction): Treat the number of units as polynomial.
31531         Choose vectype_in based on the largest scalar element size rather
31532         than the smallest number of units.  Enforce the restrictions
31533         relied on above.
31535 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31536             Alan Hayward  <alan.hayward@arm.com>
31537             David Sherwood  <david.sherwood@arm.com>
31539         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31540         number of units as polynomial.
31542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31543             Alan Hayward  <alan.hayward@arm.com>
31544             David Sherwood  <david.sherwood@arm.com>
31546         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31547         * target.def (autovectorize_vector_sizes): Return the vector sizes
31548         by pointer, using vector_sizes rather than a bitmask.
31549         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31550         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31551         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31552         Likewise.
31553         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31554         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31555         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31556         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31557         * omp-general.c (omp_max_vf): Likewise.
31558         * omp-low.c (omp_clause_aligned_alignment): Likewise.
31559         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31560         * tree-vect-loop.c (vect_analyze_loop): Likewise.
31561         * tree-vect-slp.c (vect_slp_bb): Likewise.
31562         * doc/tm.texi: Regenerate.
31563         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31564         to a poly_uint64.
31565         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31566         the vector size as a poly_uint64 rather than an unsigned int.
31567         (current_vector_size): Change from an unsigned int to a poly_uint64.
31568         (get_vectype_for_scalar_type): Update accordingly.
31569         * tree.h (build_truth_vector_type): Take the size and number of
31570         units as a poly_uint64 rather than an unsigned int.
31571         (build_vector_type): Add a temporary overload that takes
31572         the number of units as a poly_uint64 rather than an unsigned int.
31573         * tree.c (make_vector_type): Likewise.
31574         (build_truth_vector_type): Take the number of units as a poly_uint64
31575         rather than an unsigned int.
31577 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31578             Alan Hayward  <alan.hayward@arm.com>
31579             David Sherwood  <david.sherwood@arm.com>
31581         * target.def (get_mask_mode): Take the number of units and length
31582         as poly_uint64s rather than unsigned ints.
31583         * targhooks.h (default_get_mask_mode): Update accordingly.
31584         * targhooks.c (default_get_mask_mode): Likewise.
31585         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31586         * doc/tm.texi: Regenerate.
31588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31589             Alan Hayward  <alan.hayward@arm.com>
31590             David Sherwood  <david.sherwood@arm.com>
31592         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31593         * omp-general.c (omp_max_vf): Likewise.
31594         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31595         (expand_omp_simd): Handle polynomial safelen.
31596         * omp-low.c (omplow_simd_context): Add a default constructor.
31597         (omplow_simd_context::max_vf): Change from int to poly_uint64.
31598         (lower_rec_simd_input_clauses): Update accordingly.
31599         (lower_rec_input_clauses): Likewise.
31601 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31602             Alan Hayward  <alan.hayward@arm.com>
31603             David Sherwood  <david.sherwood@arm.com>
31605         * tree-vectorizer.h (vect_nunits_for_cost): New function.
31606         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31607         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31608         (vect_analyze_slp_cost): Likewise.
31609         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31610         (vect_model_load_cost): Likewise.
31612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31613             Alan Hayward  <alan.hayward@arm.com>
31614             David Sherwood  <david.sherwood@arm.com>
31616         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31617         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31618         from an unsigned int * to a poly_uint64_pod *.
31619         (calculate_unrolling_factor): New function.
31620         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
31622 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31623             Alan Hayward  <alan.hayward@arm.com>
31624             David Sherwood  <david.sherwood@arm.com>
31626         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31627         from an unsigned int to a poly_uint64.
31628         (_loop_vec_info::slp_unrolling_factor): Likewise.
31629         (_loop_vec_info::vectorization_factor): Change from an int
31630         to a poly_uint64.
31631         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31632         (vect_get_num_vectors): New function.
31633         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31634         (vect_get_num_copies): Use vect_get_num_vectors.
31635         (vect_analyze_data_ref_dependences): Change max_vf from an int *
31636         to an unsigned int *.
31637         (vect_analyze_data_refs): Change min_vf from an int * to a
31638         poly_uint64 *.
31639         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31640         than an unsigned HOST_WIDE_INT.
31641         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31642         (vect_analyze_data_ref_dependence): Change max_vf from an int *
31643         to an unsigned int *.
31644         (vect_analyze_data_ref_dependences): Likewise.
31645         (vect_compute_data_ref_alignment): Handle polynomial vf.
31646         (vect_enhance_data_refs_alignment): Likewise.
31647         (vect_prune_runtime_alias_test_list): Likewise.
31648         (vect_shift_permute_load_chain): Likewise.
31649         (vect_supportable_dr_alignment): Likewise.
31650         (dependence_distance_ge_vf): Take the vectorization factor as a
31651         poly_uint64 rather than an unsigned HOST_WIDE_INT.
31652         (vect_analyze_data_refs): Change min_vf from an int * to a
31653         poly_uint64 *.
31654         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31655         vfm1 as a poly_uint64 rather than an int.  Make the same change
31656         for the returned bound_scalar.
31657         (vect_gen_vector_loop_niters): Handle polynomial vf.
31658         (vect_do_peeling): Likewise.  Update call to
31659         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31660         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31661         be constant.
31662         * tree-vect-loop.c (vect_determine_vectorization_factor)
31663         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31664         (vect_get_known_peeling_cost): Likewise.
31665         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31666         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31667         (vect_transform_loop): Likewise.  Use the lowest possible VF when
31668         updating the upper bounds of the loop.
31669         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
31670         rather than an int.
31671         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31672         polynomial unroll factors.
31673         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31674         (vect_make_slp_decision): Likewise.
31675         (vect_supported_load_permutation_p): Likewise, and polynomial
31676         vf too.
31677         (vect_analyze_slp_cost): Handle polynomial vf.
31678         (vect_slp_analyze_node_operations): Likewise.
31679         (vect_slp_analyze_bb_1): Likewise.
31680         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31681         than an unsigned HOST_WIDE_INT.
31682         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31683         (vectorizable_load): Handle polynomial vf.
31684         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31685         a poly_uint64.
31686         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31689             Alan Hayward  <alan.hayward@arm.com>
31690             David Sherwood  <david.sherwood@arm.com>
31692         * match.pd: Handle bit operations involving three constants
31693         and try to fold one pair.
31695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31697         * tree-vect-loop-manip.c: Include gimple-fold.h.
31698         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31699         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
31700         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31701         Add a path that uses a step of VF instead of 1, but disable it
31702         for now.
31703         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31704         and niters_no_overflow parameters.  Update calls to
31705         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31706         Create a new SSA name if the latter choses to use a ste other
31707         than zero, and return it via niters_vector_mult_vf_var.
31708         * tree-vect-loop.c (vect_transform_loop): Update calls to
31709         vect_do_peeling, vect_gen_vector_loop_niters and
31710         slpeel_make_loop_iterate_ntimes.
31711         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31712         (vect_gen_vector_loop_niters): Update declarations after above changes.
31714 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
31716         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31717         128-bit round to integer instructions.
31718         (ceil<mode>2): Likewise.
31719         (btrunc<mode>2): Likewise.
31720         (round<mode>2): Likewise.
31722 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31724         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31725         unaligned VSX load/store on P8/P9.
31726         (expand_block_clear): Allow the use of unaligned VSX
31727         load/store on P8/P9.
31729 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31731         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31732         New function.
31733         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31734         swap associated with both a load and a store.
31736 2018-01-02  Andrew Waterman  <andrew@sifive.com>
31738         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31739         * config/riscv/riscv.md (clear_cache): Use it.
31741 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
31743         * web.c: Remove out-of-date comment.
31745 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31747         * expr.c (fixup_args_size_notes): Check that any existing
31748         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31749         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31750         (emit_single_push_insn): ...here.
31752 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31754         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31755         (const_vector_encoded_nelts): New function.
31756         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31757         (const_vector_int_elt, const_vector_elt): Declare.
31758         * emit-rtl.c (const_vector_int_elt_1): New function.
31759         (const_vector_elt): Likewise.
31760         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31761         of CONST_VECTOR_ELT.
31763 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31765         * expr.c: Include rtx-vector-builder.h.
31766         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31767         directly on the tree encoding.
31768         (const_vector_from_tree): Likewise.
31769         * optabs.c: Include rtx-vector-builder.h.
31770         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31771         sequence of "u" values.
31772         * vec-perm-indices.c: Include rtx-vector-builder.h.
31773         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31774         directly on the vec_perm_indices encoding.
31776 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31778         * doc/rtl.texi (const_vector): Describe new encoding scheme.
31779         * Makefile.in (OBJS): Add rtx-vector-builder.o.
31780         * rtx-vector-builder.h: New file.
31781         * rtx-vector-builder.c: Likewise.
31782         * rtl.h (rtx_def::u2): Add a const_vector field.
31783         (CONST_VECTOR_NPATTERNS): New macro.
31784         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31785         (CONST_VECTOR_DUPLICATE_P): Likewise.
31786         (CONST_VECTOR_STEPPED_P): Likewise.
31787         (CONST_VECTOR_ENCODED_ELT): Likewise.
31788         (const_vec_duplicate_p): Check for a duplicated vector encoding.
31789         (unwrap_const_vec_duplicate): Likewise.
31790         (const_vec_series_p): Check for a non-duplicated vector encoding.
31791         Say that the function only returns true for integer vectors.
31792         * emit-rtl.c: Include rtx-vector-builder.h.
31793         (gen_const_vec_duplicate_1): Delete.
31794         (gen_const_vector): Call gen_const_vec_duplicate instead of
31795         gen_const_vec_duplicate_1.
31796         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31797         (gen_const_vec_duplicate): Use rtx_vector_builder.
31798         (gen_const_vec_series): Likewise.
31799         (gen_rtx_CONST_VECTOR): Likewise.
31800         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31801         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31802         Build a new vector rather than modifying a CONST_VECTOR in-place.
31803         (handle_special_swappables): Update call accordingly.
31804         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31805         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31806         Build a new vector rather than modifying a CONST_VECTOR in-place.
31807         (handle_special_swappables): Update call accordingly.
31809 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31811         * simplify-rtx.c (simplify_const_binary_operation): Use
31812         CONST_VECTOR_ELT instead of XVECEXP.
31814 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31816         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31817         the selector elements to be different from the data elements
31818         if the selector is a VECTOR_CST.
31819         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31820         ssizetype for the selector.
31822 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31824         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31825         before testing each element individually.
31826         * tree-vect-generic.c (lower_vec_perm): Likewise.
31828 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31830         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31831         * selftest-run-tests.c (selftest::run_tests): Call it.
31832         * vector-builder.h (vector_builder::operator ==): New function.
31833         (vector_builder::operator !=): Likewise.
31834         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31835         (vec_perm_indices::all_from_input_p): New function.
31836         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31837         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31838         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31839         instead of reading the VECTOR_CST directly.  Detect whether both
31840         vector inputs are the same before constructing the vec_perm_indices,
31841         and update the number of inputs argument accordingly.  Use the
31842         utility functions added above.  Only construct sel2 if we need to.
31844 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31846         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31847         the broadcast of the low byte.
31848         (expand_mult_highpart): Use an explicit encoding for the permutes.
31849         * optabs-query.c (can_mult_highpart_p): Likewise.
31850         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31851         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31852         (vectorizable_bswap): Likewise.
31853         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31854         explicit encoding for the power-of-2 permutes.
31855         (vect_permute_store_chain): Likewise.
31856         (vect_grouped_load_supported): Likewise.
31857         (vect_permute_load_chain): Likewise.
31859 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31861         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31862         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31863         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31864         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31865         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31866         (vect_gen_perm_mask_any): Likewise.
31868 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31870         * int-vector-builder.h: New file.
31871         * vec-perm-indices.h: Include int-vector-builder.h.
31872         (vec_perm_indices): Redefine as an int_vector_builder.
31873         (auto_vec_perm_indices): Delete.
31874         (vec_perm_builder): Redefine as a stand-alone class.
31875         (vec_perm_indices::vec_perm_indices): New function.
31876         (vec_perm_indices::clamp): Likewise.
31877         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31878         (vec_perm_indices::new_vector): New function.
31879         (vec_perm_indices::new_expanded_vector): Update for new
31880         vec_perm_indices class.
31881         (vec_perm_indices::rotate_inputs): New function.
31882         (vec_perm_indices::all_in_range_p): Operate directly on the
31883         encoded form, without computing elided elements.
31884         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31885         encoding.  Update for new vec_perm_indices class.
31886         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31887         the given vec_perm_builder.
31888         (expand_vec_perm_var): Update vec_perm_builder constructor.
31889         (expand_mult_highpart): Use vec_perm_builder instead of
31890         auto_vec_perm_indices.
31891         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31892         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
31893         or double series encoding as appropriate.
31894         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31895         vec_perm_indices instead of auto_vec_perm_indices.
31896         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31897         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31898         (vect_permute_store_chain): Likewise.
31899         (vect_grouped_load_supported): Likewise.
31900         (vect_permute_load_chain): Likewise.
31901         (vect_shift_permute_load_chain): Likewise.
31902         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31903         (vect_transform_slp_perm_load): Likewise.
31904         (vect_schedule_slp_instance): Likewise.
31905         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31906         (vectorizable_mask_load_store): Likewise.
31907         (vectorizable_bswap): Likewise.
31908         (vectorizable_store): Likewise.
31909         (vectorizable_load): Likewise.
31910         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31911         vec_perm_indices instead of auto_vec_perm_indices.  Use
31912         tree_to_vec_perm_builder to read the vector from a tree.
31913         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31914         vec_perm_builder instead of a vec_perm_indices.
31915         (have_whole_vector_shift): Use vec_perm_builder and
31916         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
31917         truncation to calc_vec_perm_mask_for_shift.
31918         (vect_create_epilog_for_reduction): Likewise.
31919         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31920         from auto_vec_perm_indices to vec_perm_indices.
31921         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31922         instead of changing individual elements.
31923         (aarch64_vectorize_vec_perm_const): Use new_vector to install
31924         the vector in d.perm.
31925         * config/arm/arm.c (expand_vec_perm_d::perm): Change
31926         from auto_vec_perm_indices to vec_perm_indices.
31927         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31928         instead of changing individual elements.
31929         (arm_vectorize_vec_perm_const): Use new_vector to install
31930         the vector in d.perm.
31931         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31932         Update vec_perm_builder constructor.
31933         (rs6000_expand_interleave): Likewise.
31934         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31935         (rs6000_expand_interleave): Likewise.
31937 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31939         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31940         to qimode could truncate the indices.
31941         * optabs.c (expand_vec_perm_var): Likewise.
31943 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31945         * Makefile.in (OBJS): Add vec-perm-indices.o.
31946         * vec-perm-indices.h: New file.
31947         * vec-perm-indices.c: Likewise.
31948         * target.h (vec_perm_indices): Replace with a forward class
31949         declaration.
31950         (auto_vec_perm_indices): Move to vec-perm-indices.h.
31951         * optabs.h: Include vec-perm-indices.h.
31952         (expand_vec_perm): Delete.
31953         (selector_fits_mode_p, expand_vec_perm_var): Declare.
31954         (expand_vec_perm_const): Declare.
31955         * target.def (vec_perm_const_ok): Replace with...
31956         (vec_perm_const): ...this new hook.
31957         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31958         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31959         * doc/tm.texi: Regenerate.
31960         * optabs.def (vec_perm_const): Delete.
31961         * doc/md.texi (vec_perm_const): Likewise.
31962         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31963         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31964         expand_vec_perm for constant permutation vectors.  Assert that
31965         the mode of variable permutation vectors is the integer equivalent
31966         of the mode that is being permuted.
31967         * optabs-query.h (selector_fits_mode_p): Declare.
31968         * optabs-query.c: Include vec-perm-indices.h.
31969         (selector_fits_mode_p): New function.
31970         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31971         is defined, instead of checking whether the vec_perm_const_optab
31972         exists.  Use targetm.vectorize.vec_perm_const instead of
31973         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
31974         fit in the vector mode before using a variable permute.
31975         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31976         vec_perm_indices instead of an rtx.
31977         (expand_vec_perm): Replace with...
31978         (expand_vec_perm_const): ...this new function.  Take the selector
31979         as a vec_perm_indices rather than an rtx.  Also take the mode of
31980         the selector.  Update call to shift_amt_for_vec_perm_mask.
31981         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31982         Use vec_perm_indices::new_expanded_vector to expand the original
31983         selector into bytes.  Check whether the indices fit in the vector
31984         mode before using a variable permute.
31985         (expand_vec_perm_var): Make global.
31986         (expand_mult_highpart): Use expand_vec_perm_const.
31987         * fold-const.c: Includes vec-perm-indices.h.
31988         * tree-ssa-forwprop.c: Likewise.
31989         * tree-vect-data-refs.c: Likewise.
31990         * tree-vect-generic.c: Likewise.
31991         * tree-vect-loop.c: Likewise.
31992         * tree-vect-slp.c: Likewise.
31993         * tree-vect-stmts.c: Likewise.
31994         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31995         Delete.
31996         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31997         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31998         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31999         (aarch64_vectorize_vec_perm_const): ...this new function.
32000         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32001         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32002         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32003         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32004         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32005         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32006         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32007         into...
32008         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
32009         check for NEON modes.
32010         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32011         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32012         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32013         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32014         into...
32015         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
32016         the old VEC_PERM_CONST conditions.
32017         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32018         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32019         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32020         (ia64_vectorize_vec_perm_const_ok): Merge into...
32021         (ia64_vectorize_vec_perm_const): ...this new function.
32022         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32023         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32024         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32025         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32026         * config/mips/mips.c (mips_expand_vec_perm_const)
32027         (mips_vectorize_vec_perm_const_ok): Merge into...
32028         (mips_vectorize_vec_perm_const): ...this new function.
32029         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32030         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32031         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32032         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32033         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32034         (rs6000_expand_vec_perm_const): Delete.
32035         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32036         Delete.
32037         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32038         (altivec_expand_vec_perm_const_le): Take each operand individually.
32039         Operate on constant selectors rather than rtxes.
32040         (altivec_expand_vec_perm_const): Likewise.  Update call to
32041         altivec_expand_vec_perm_const_le.
32042         (rs6000_expand_vec_perm_const): Delete.
32043         (rs6000_vectorize_vec_perm_const_ok): Delete.
32044         (rs6000_vectorize_vec_perm_const): New function.
32045         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32046         an element count and rtx array.
32047         (rs6000_expand_extract_even): Update call accordingly.
32048         (rs6000_expand_interleave): Likewise.
32049         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32050         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32051         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32052         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32053         (rs6000_expand_vec_perm_const): Delete.
32054         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32055         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32056         (altivec_expand_vec_perm_const_le): Take each operand individually.
32057         Operate on constant selectors rather than rtxes.
32058         (altivec_expand_vec_perm_const): Likewise.  Update call to
32059         altivec_expand_vec_perm_const_le.
32060         (rs6000_expand_vec_perm_const): Delete.
32061         (rs6000_vectorize_vec_perm_const_ok): Delete.
32062         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
32063         reference to the SPE evmerge intructions.
32064         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32065         an element count and rtx array.
32066         (rs6000_expand_extract_even): Update call accordingly.
32067         (rs6000_expand_interleave): Likewise.
32068         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32069         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32070         new function.
32071         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32073 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32075         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32076         vector mode and that that mode matches the mode of the data
32077         being permuted.
32078         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32079         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
32080         directly using expand_vec_perm_1 when forcing selectors into
32081         registers.
32082         (expand_vec_perm_var): New function, split out from expand_vec_perm.
32084 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32086         * optabs-query.h (can_vec_perm_p): Delete.
32087         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32088         * optabs-query.c (can_vec_perm_p): Split into...
32089         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32090         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32091         particular selector is valid.
32092         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32093         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32094         (vect_grouped_load_supported): Likewise.
32095         (vect_shift_permute_load_chain): Likewise.
32096         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32097         (vect_transform_slp_perm_load): Likewise.
32098         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32099         (vectorizable_bswap): Likewise.
32100         (vect_gen_perm_mask_checked): Likewise.
32101         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
32102         implementations of variable permutation vectors into account
32103         when deciding which selector to use.
32104         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32105         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32106         with a false third argument.
32107         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32108         to test whether the constant selector is valid and can_vec_perm_var_p
32109         to test whether a variable selector is valid.
32111 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32113         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32114         * optabs-query.c (can_vec_perm_p): Likewise.
32115         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32116         instead of vec_perm_indices.
32117         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32118         (vect_gen_perm_mask_checked): Likewise,
32119         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32120         (vect_gen_perm_mask_checked): Likewise,
32122 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32124         * optabs-query.h (qimode_for_vec_perm): Declare.
32125         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32126         (qimode_for_vec_perm): ...this new function.
32127         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32129 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32131         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32132         does not have a conditional at the top.
32134 2018-01-02  Richard Biener  <rguenther@suse.de>
32136         * ipa-inline.c (big_speedup_p): Fix expression.
32138 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32140         PR target/81616
32141         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32142         for generic 4->6.
32144 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32146         PR target/81616
32147         Generic tuning.
32148         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32149         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32150         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32151         cond_taken_branch_cost 3->4.
32153 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
32155         PR tree-optimization/83581
32156         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32157         TODO_cleanup_cfg if any changes have been made.
32159         PR middle-end/83608
32160         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32161         convert_modes if target mode has the right side, but different mode
32162         class.
32164         PR middle-end/83609
32165         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32166         last argument when extracting from CONCAT.  If either from_real or
32167         from_imag is NULL, use expansion through memory.  If result is not
32168         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32169         the parts directly to inner mode, if even that fails, use expansion
32170         through memory.
32172         PR middle-end/83623
32173         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32174         check for bswap in mode rather than HImode and use that in expand_unop
32175         too.
32177 Copyright (C) 2018 Free Software Foundation, Inc.
32179 Copying and distribution of this file, with or without modification,
32180 are permitted in any medium without royalty provided the copyright
32181 notice and this notice are preserved.