Eliminate source_location in favor of location_t
[official-gcc.git] / gcc / ChangeLog
blob9f474bb00750c356ba0b4ea122b937ab96540340
1 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
3         * builtins.c: Replace "source_location" with "location_t".
4         * diagnostic-show-locus.c: Likewise.
5         * diagnostic.c: Likewise.
6         * dumpfile.c: Likewise.
7         * gcc-rich-location.h: Likewise.
8         * genmatch.c: Likewise.
9         * gimple.h: Likewise.
10         * gimplify.c: Likewise.
11         * input.c: Likewise.
12         * input.h: Likewise.  Eliminate the typedef.
13         * omp-expand.c: Likewise.
14         * selftest.h: Likewise.
15         * substring-locations.h (get_source_location_for_substring):
16         Rename to..
17         (get_location_within_string): ...this.
18         * tree-cfg.c: Replace "source_location" with "location_t".
19         * tree-cfgcleanup.c: Likewise.
20         * tree-diagnostic.c: Likewise.
21         * tree-into-ssa.c: Likewise.
22         * tree-outof-ssa.c: Likewise.
23         * tree-parloops.c: Likewise.
24         * tree-phinodes.c: Likewise.
25         * tree-phinodes.h: Likewise.
26         * tree-ssa-loop-ivopts.c: Likewise.
27         * tree-ssa-loop-manip.c: Likewise.
28         * tree-ssa-phiopt.c: Likewise.
29         * tree-ssa-phiprop.c: Likewise.
30         * tree-ssa-threadupdate.c: Likewise.
31         * tree-ssa.c: Likewise.
32         * tree-ssa.h: Likewise.
33         * tree-vect-loop-manip.c: Likewise.
35 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
37         * doc/extend.texi: Fix typo in the weakref description.
39 2018-11-13  Richard Biener  <rguenther@suse.de>
41         PR tree-optimization/86991
42         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
43         group building until we have successfully detected the SLP
44         reduction.
45         (vect_is_simple_reduction): Remove fixup code here.
47 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
49         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
50         (dump_gimple_stmt): Use it.
51         (dump_gimple_stmt_loc): Likewise.
52         (dump_gimple_expr): Likewise.
53         (dump_gimple_expr_loc): Likewise.
54         (dump_generic_expr): Likewise.
55         (dump_generic_expr_loc): Likewise.
56         (dump_printf): Likewise.
57         (dump_printf_loc): Likewise.
58         (dump_dec): Likewise.
59         (dump_dec): Likewise.
60         (dump_hex): Likewise.
61         (dump_symtab_node): Likewise.
62         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
63         Guard dump call with dump_enabled_p.
64         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
65         * graphite-optimize-isl.c (optimize_isl): Likewise.
66         * graphite.c (graphite_transform_loops): Likewise.
67         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
68         * tree-parloops.c (parallelize_loops): Likewise.
69         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
70         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
71         (vect_prune_runtime_alias_test_list): Likewise.
72         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
73         (vect_estimate_min_profitable_iters): Likewise.
74         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
75         (vect_build_slp_tree_2): Likewise.
76         (vect_supported_load_permutation_p): Likewise.
77         (vect_slp_analyze_operations): Likewise.
78         (vect_slp_analyze_bb_1): Likewise.
79         (vect_slp_bb): Likewise.
80         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
81         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
82         (pass_slp_vectorize::execute): Likewise.
83         (increase_alignment): Likewise.
85 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
87         PR ipa/87955
88         * ipa-inline.c (report_inline_failed_reason): Guard calls to
89         cl_target_option_print_diff and cl_optimization_print_diff with
90         if (dump_file).
92 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
94         * doc/invoke.texi (-fsave-optimization-record): Note that the
95         output is compressed.
96         * optinfo-emit-json.cc: Include <zlib.h>.
97         (optrecord_json_writer::write): Compress the output.
99 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
101         * tree-vrp.c (value_range_base::dump): Dump type.
102         Do not use INF nomenclature for 1-bit types.
103         (dump_value_range): Group all variants to common dumping code.
104         (debug): New overloaded functions for value_ranges.
105         (value_range_base::dump): Remove no argument version.
106         (value_range::dump): Same.
108 2018-11-13  Richard Biener  <rguenther@suse.de>
110         PR tree-optimization/87931
111         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
112         nested cycles we support to latch computations vectorizable_reduction
113         handles.
115 2018-11-13  Martin Liska  <mliska@suse.cz>
117         PR tree-optimization/87885
118         * cfghooks.c (account_profile_record): Rename
119         to ...
120         (profile_record_check_consistency): ... this.
121         Calculate missing num_mismatched_freq_in.
122         (profile_record_account_profile): New function
123         that calculates time and size of a function.
124         * cfghooks.h (struct profile_record): Remove
125         all tuples.
126         (struct cfg_hooks): Remove after_pass flag.
127         (account_profile_record): Rename to ...
128         (profile_record_check_consistency): ... this.
129         (profile_record_account_profile): New.
130         * cfgrtl.c (rtl_account_profile_record): Remove
131         after_pass flag.
132         * passes.c (check_profile_consistency): Do only
133         checking.
134         (account_profile): Calculate size and time of
135         function only.
136         (pass_manager::dump_profile_report): Reformat
137         output.
138         (execute_one_ipa_transform_pass): Call
139         consistency check before clean upand call account_profile
140         after a clean up is done.
141         (execute_one_pass): Call check_profile_consistency and
142         account_profile instead of using after_pass flag..
143         * tree-cfg.c (gimple_account_profile_record): Likewise.
145 2018-11-13  Martin Liska  <mliska@suse.cz>
147         PR sanitizer/87930
148         * config/i386/i386.c (ix86_option_override_internal): Error
149         about usage -mabi=ms and -fsanitize={,kernel-}address.
151 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
153         * config/aarch64/aarch64.c
154         (aarch64_vectorize_preferred_vector_alignment): Change return type to
155         poly_uint64.
156         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
157         alignment being a poly int.
158         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
159         return type to poly_uint64.
160         * target.def (default_preferred_vector_alignment): Likewise.
161         * targhooks.c (default_preferred_vector_alignment): Likewise.
162         * targhooks.h (default_preferred_vector_alignment): Likewise.
163         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
164         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
165         poly int.
166         (vect_update_misalignment_for_peel): Likewise.
167         (vect_enhance_data_refs_alignment): Likewise.
168         (vect_find_same_alignment_drs): Likewise.
169         (vect_duplicate_ssa_name_ptr_info): Likewise.
170         (vect_setup_realignment): Likewise.
171         (vect_can_force_dr_alignment_p): Change alignment parameter type to
172         poly_uint64.
173         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
174         mask with a compile time variable vector alignment.
175         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
176         int.
177         (vect_do_peeling): Exit early if vector alignment is not constant.
178         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
179         a poly int.
180         (vectorizable_store): Likewise.
181         (vectorizable_load): Likweise.
182         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
183         poly_uint64.
184         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
185         poly int.
186         (vect_can_force_dr_alignment_p): Change alignment parameter type to
187         poly_uint64.
189 2018-11-13  Richard Biener  <rguenther@suse.de>
191         PR tree-optimization/87962
192         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
193         detect outer reduction for disqualifying in-loop uses.
195 2018-11-13  Richard Biener  <rguenther@suse.de>
197         PR tree-optimization/87967
198         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
199         for constants for the scalar loop.
201 2018-11-13  Alan Modra  <amodra@gmail.com>
203         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
204         integer constants when -mcmodel=medium.
206 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
208         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
209         * config/arc/elf.h (PROFILE_HOOK): Define.
210         * config/arc/linux.h (PROFILE_HOOK): Likewise.
212 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
214         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
215         jump table data in the text section.
217 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
219         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
220         to fit the eh_return pattern.
221         * config/arc/arc.md (eh_return): Define.
222         (VUNSPEC_ARC_EH_RETURN): Likewise.
223         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
224         new implementation.
225         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
228 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
230         * common/config/arc/arc-common.c (arc_option_optimization_table):
231         Millicode optimization is default on for size optimizations.
232         * config/arc/arc-protos.h (arc_check_multi): New function.
233         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
234         (ENTER_LEAVE_START_REG): Define.
235         (ENTER_LEAVE_END_REG): Likewise.
236         (arc_override_options): Disable millicode when long calls option
237         is on.
238         (arc_frame_info): Change it from int to bool.
239         (arc_compute_frame_size): Clean up.
240         (arc_save_restore): Remove.
241         (frame_save_reg): New function.
242         (frame_restore_reg): Likewise.
243         (arc_enter_leave_p): Likewise.
244         (arc_save_callee_saves): Likewise.
245         (arc_restore_callee_saves): Likewise.
246         (arc_save_callee_enter): Likewise.
247         (arc_restore_callee_leave): Likewise.
248         (arc_save_callee_milli): Likewise.
249         (arc_restore_callee_milli): Likewise.
250         (arc_expand_prologue): Reimplement to emit enter/leave
251         instructions.
252         (arc_expand_epilogue): Likewise.
253         (arc_check_multi): New function.
254         * config/arc/arc.md (push_multi_fp): New pattern.
255         (push_multi_fp_blink): Likewise.
256         (pop_multi_fp): Likewise.
257         (pop_multi_fp_blink): Likewise.
258         (pop_multi_fp_ret): Likewise.
259         (pop_multi_fp_blink_ret): Likewise.
260         * config/arc/arc.opt (mmillicode): Update option.
261         (mcode-density-frame): New option.
262         * config/arc/predicates.md (push_multi_operand): New predicate.
263         (pop_multi_operand): Likewise.
264         * doc/invoke.texi (ARC): Update ARC options information.
267 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
269         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
270         * config/arc/arc.c (operands_ok_ldd_std): New function.
271         (mem_ok_for_ldd_std): Likewise.
272         (gen_operands_ldd_std): Likewise.
273         * config/arc/arc.md: Add peephole2 rules for std/ldd.
275 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
277         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
278         test on stack_usage_file.
279         (lang_dependent_init): Do not open the .su file if generating LTO.
281 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
283         PR rtl-optimization/87918
284         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
285         simplify_gen_relational rather than simplify_gen_binary.
287 2018-11-13  Richard Biener  <rguenther@suse.de>
289         * tree-ssanames.h (set_range_info): Use value_range_base.
290         (get_range_info): Likewise.
291         * tree-ssanames.c (set_range_info): Likewise.
292         (get_range_info): Likewise.
293         * tree-vrp.c (value_range_base::union_helper): Split
294         out common parts of value_range[_base]::union_.
295         (value_range_base::union_): Update.
296         (value_range::union_): Likewise.
297         (determine_value_range_1): Use value_range_base.
298         (determine_value_range): Likewise.
299         * tree-vrp.h (value_range_base::union_helper): Move ...
300         (value_range::union_helper): ... from here.
302 2018-11-13  Alan Modra  <amodra@gmail.com>
304         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
305         offset for PRE_DEC.
306         (rs6000_secondary_reload_gpr): Don't call find_replacement.
308 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
310         PR middle-end/59634
311         * doc/invoke.texi (Optimize Options): Clarify that the
312         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
313         apply to data cache size.
315 2018-11-13  Alan Modra  <amodra@gmail.com>
317         * config/rs6000/predicates.md (logical_const_operand),
318         (logical_operand): Correct comment.
319         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
321 2018-11-13  Alan Modra  <amodra@gmail.com>
323         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
325 2018-11-13  Alan Modra  <amodra@gmail.com>
327         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
328         description.
329         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
330         covered by alternative.
331         (movcc_internal1): Ignore h for register preference.
332         (mov<mode>_hardfloat64): Likewise.
333         (mov<mode>_softfloat): Ignore c, l, h for register preference.
335 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
337         PR preprocessor/47823
338         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
339         documentation to...
340         (Pragmas): ...here.
341         * doc/extend.texi (Pragmas): Note additional pragmas documented
342         in the CPP manual.
344 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
346         PR middle-end/86677
347         PR middle-end/87528
348         * tree-scalar-evolution.c (expression_expensive_p): Make BUILTIN POPCOUNT
349         as expensive when backend does not define it.
351 2018-11-12  Fredrik Noring  <noring@nocrew.org>
353         * config.gcc: Update with-llsc defaults for MIPS r5900.
355 2018-11-12  Martin Liska  <mliska@suse.cz>
357         PR gcov-profile/87442
358         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
359         options.
360         * doc/invoke.texi: Document them.
361         * tree-profile.c (parse_profile_filter): New.
362         (parse_profile_file_filtering): Likewise.
363         (release_profile_file_filtering): Likewise.
364         (include_source_file_for_profile): Likewise.
365         (tree_profiling): Filter source files based on the
366         newly added options.
368 2018-11-12  Martin Liska  <mliska@suse.cz>
370         PR target/87903
371         * doc/extend.texi: Add missing values for __builtin_cpu_is and
372         __builtin_cpu_supports for x86 target.
374 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
376         PR middle-end/21110
377         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
378         have to be Pmode.
379         (Arithmetic): Likewise for "lo_sum".
381 2018-11-12  Renlin Li  <renlin.li@arm.com>
383         PR target/87815
384         * dse.c (get_stored_val): Add check for compile-time constantness
385         of gap.
387 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
389         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
390         (ARMv8_5a): New fgroup.
391         (armv8.5-a): New arch.
392         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
393         sb and predres.
394         * config/arm/arm-tables.opt: Regenerate.
395         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
396         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
397         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
398         Add matching rules for -march=armv8.5-a and extensions.
399         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
400         Add sb and predres to all armv8-a except armv8.5-a.
402 2018-11-12  Richard Biener  <rguenther@suse.de>
404         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
405         overload for single value.
406         (value_range[_base]::set_nonnull): New.
407         (value_range[_base]::set_null): Likewise.
408         (value_range): Document bitmap copying behavior, mark
409         copy constructor and assignment operator deleted.
410         (value_range::move): New.
411         (value_range::set_and_canonicalize): Default bitmap to zero.
412         (set_value_range_to_nonnull): Remove.
413         (set_value_range_to_null): Likewise.
414         (set_value_range): Likewise.
415         (set_value_range_to_value): Likewise.
416         (extract_range_from_unary_expr): Work on value_range_base.
417         (extract_range_from_binary_expr_1): Likewise.  Rename to...
418         (extract_range_from_binary_expr): ... this.
419         * tree-vrp.c (value_range::update): Clear equiv bitmap
420         if required.
421         (value_range::move): New, move equiv bitmap.
422         (value_range_base::set_undefined): Avoid assignment.
423         (value_range::set_undefined): Likewise.
424         (value_range_base::set_varying): Likewise.
425         (value_range::set_varying): Likewise.
426         (set_value_range): Remove.
427         (value_range_base::set): New overload for value.
428         (value_range::set): Likewise.
429         (set_value_range_to_nonnull): Remove.
430         (value_range_base::set_nonnull): New.
431         (value_range::set_nonnull): Likewise.
432         (set_value_range_to_null): Remove.
433         (value_range_base::set_null): New.
434         (value_range::set_null): Likewise.
435         (range_is_null): Work on value_range_base.
436         (range_is_nonnull): Likewise.
437         (ranges_from_anti_range): Likewise.
438         (extract_range_into_wide_ints): Likewise.
439         (extract_range_from_multiplicative_op): Likewise.
440         (extract_range_from_binary_expr): Likewise.  Update for API changes.
441         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
442         handling.
443         (value_range::intersect_helper): Avoid copy and assignment.
444         (value_range::union_helper): Likewise.
445         (determine_value_range_1): Adjust.
446         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
447         Avoid assignment by using move.
448         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
449         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
450         Likewise.
451         * tree-ssanames.c (get_range_info): Likewise.
452         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
453         * vr-values.c (vr_values::get_value_range): Adjust.
454         (vr_values::update_value_range): Likewise.
455         (symbolic_range_based_on_p): Work on value_range_base.
456         (vr_values::extract_range_from_binary_expr): Use value_range_base.
457         (vr_values::extract_range_from_unary_expr): Likewise.
458         (vr_values::extract_range_from_cond_expr): Avoid assignment.
459         (vr_values::extract_range_from_comparison): Adjust.
460         (vr_values::check_for_binary_op_overflow): Use value_range_base.
461         (vr_values::extract_range_basic): Adjust.
462         (vr_values::adjust_range_with_scev): Likewise.
463         (vr_values::vrp_visit_assignment_or_call): Likewise.
464         (vr_values::get_vr_for_comparison): Change API to avoid
465         assignment and copy construction.
466         (vr_values::compare_name_with_value): Adjust accordingly.
467         (vr_values::compare_names): Likewise.
468         (vr_values::extract_range_from_phi_node): Avoid assignment and
469         bogus in-place modify of equiv bitmap.
470         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
471         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
472         for extract_range_from_unary_expr API change.
473         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
475 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
477         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
479 2018-11-12  Richard Biener  <rguenther@suse.de>
481         * tree-vrp.h (value_range_base::symbolic_p,
482         value_range_base::constant_p, value_range_base::zero_p,
483         value_range_base::singleton_p): Move from value_range.
484         (value_range::dump): Add.
485         * gimple-ssa-evrp-analyze.c
486         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
487         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
488         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
489         Use set_varying.
490         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
491         (value_range::constant_p): Likewise.
492         (value_range::singleton_p): Likewise.
493         (value_range_base::dump): Add.
494         (set_value_range_to_undefined): Remove.
495         (set_value_range_to_varying): Likewise.
496         (range_int_cst_p): Take value_range_base argument.
497         (range_int_cst_singleton_p): Likewise.
498         (value_range_constant_singleton): Likewise.
499         (vrp_set_zero_nonzero_bits): Likewise.
500         (extract_range_from_multiplicative_op): Use set_varying.
501         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
502         (extract_range_from_unary_expr): Likewise.
503         (dump_value_range_base): Change to overload of dump_value_range.
504         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
505         (vrp_prop::visit_stmt): Likewise.
506         (value_range::intersect_helper): Likewise.
507         (value_range::union_helper): Likewise.
508         (determine_value_range_1): Likewise.
510 2018-11-12  Richard Biener  <rguenther@suse.de>
512         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
513         (set_value_range_to_null): Likewise.
514         * vr-values.c (vr_values::extract_range_from_comparison):
515         Clear equiv for constant singleton ranges.
517 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
519         * config/i386/sse.md: Combine VFIXUPIMM* patterns
520         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
521         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
522         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
523         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
524         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
525         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
527 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
529         PR c/69502
530         * doc/extend.texi (Common Type Attributes): For the align type
531         attribute, copy language about decreasing alignment from the
532         corresponding variable attribute.
534 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
536         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
537         -frounding-math.
539 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
541         PR c++/43105
542         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
543         -frtti and -fno-rtti code.
545 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
547         PR c/26366
548         * doc/extend.texi (Other Builtins): Document probability associated
549         with __builtin_expect.
551 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
553         PR target/87928
554         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
555         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
556         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
557         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
559 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
561         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
563 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
565         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
567 2018-11-11  Richard Biener  <rguenther@suse.de>
569         * tree-vrp.h (class value_range_base): New base class for
570         value_range containing all but the m_equiv member.
571         (dump_value_range_base): Add.
572         (range_includes_zero_p): Work on value_range_base.
573         * tree-vrp.c (value_range_base::set): Split out base handling
574         from...
575         (value_range::set): this.
576         (value_range::set_equiv): New.
577         (value_range_base::value_range_base): New constructors.
578         (value_range_base::check): Split out base handling from...
579         (value_range::check): this.
580         (value_range::equal_p): Refactor in terms of
581         ignore_equivs_equal_p which is now member of the base.
582         (value_range_base::set_undefined): New.
583         (value_range_base::set_varying): Likewise.
584         (value_range_base::dump):Split out base handling from...
585         (value_range::dump): this.
586         (value_range_base::set_and_canonicalize): Split out base handling
587         from...
588         (value_range::set_and_canonicalize): this.
589         (value_range_base::union_): New.
590         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
591         for m_vr.
592         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
593         instead of value_range everywhere.
594         (ipcp_vr_lattice::print): Use dump_value_range_base.
595         (ipcp_vr_lattice::meet_with): Adjust.
596         (ipcp_vr_lattice::meet_with_1): Likewise.
597         (ipa_vr_operation_and_type_effects): Likewise.
598         (propagate_vr_across_jump_function): Likewise.
599         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
600         (ipa_get_value_range): Likewise.
601         (ipa_set_jfunc_vr): Likewise.
602         (ipa_compute_jump_functions_for_edge): Likewise.
604 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
606         PR middle-end/65703
607         * doc/invoke.texi (Optimize Options): Add @opindex entries
608         for the positive forms of -fno-xxx and -mno-xxx options
609         that were lacking them.
611 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
613         * combine.c (make_more_copies): Only make an intermediate copy if the
614         dest of a move is a pseudo.
616 2018-11-09  Maya Rashish  <coypu@sdf.org>
618         PR target/87221
619         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
620         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
622 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
624         PR driver/41179
625         PR middle-end/65703
626         * doc/invoke.texi (Optimize Options): Clarify default behavior
627         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
629 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
631         PR tree-optimization/87940
632         * expr.c (string_constant): Don't strip NOPS in subexpressions.
633         Fold PLUS_EXPR correctly.
635 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
637         PR target/87762
638         * config/s390/s390.c (s390_safe_relative_long_p): New function.
639         (annotate_constant_pool_refs): Skip insns which support
640         relative addressing.
641         (annotate_constant_pool_refs_1): New helper function.
642         (find_constant_pool_ref): Skip insns which support relative
643         addression.
644         (find_constant_pool_ref_1): New helper function.
645         (replace_constant_pool_ref): Skip insns which support
646         relative addressing.
647         (replace_constant_pool_ref_1): New helper function.
648         (s390_mainpool_start): Adapt to the new signature.
649         (s390_mainpool_finish): Likewise.
650         (s390_chunkify_start): Likewise.
651         (s390_chunkify_finish): Likewise.
652         (pass_s390_early_mach::execute): Likewise.
653         (s390_prologue_plus_offset): Likewise.
654         (s390_emit_prologue): Likewise.
655         (s390_emit_epilogue): Likewise.
657 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
659         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
660         but unsupported lastprivate with conditional modifier.
662 2018-11-09  Jeff Law  <law@redhat.com>
664         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
665         unused argument better.  Add gcc_unreachable to silence warning.
667 2018-11-09  Martin Sebor  <msebor@redhat.com>
669         PR middle-end/81824
670         * attribs.c (has_attribute): New helper function.
671         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
672         * attribs.h (decls_mismatched_attributes): Declare.
673         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
674         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
675         * common.opt (-Wattribute-alias): Take an argument.
676         (-Wno-attribute-alias): New option.
677         * doc/extend.texi (Common Function Attributes): Document copy.
678         (Common Variable Attributes): Same.
679         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
680         (-Wattribute-alias): Document new option argument.
682 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
684         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
685         matching criteria.  Remove unused array initializer.
687 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
688             Jinsong Ji  <jji@us.ibm.com>
690         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
691         constraints by introducing a new temporary.
692         (_mm_cvtss_si64): Likewise.
694 2018-11-09  Martin Liska  <mliska@suse.cz>
696         * common.opt: Add -fipa-stack-alignment flag.
697         * doc/invoke.texi: Document it.
698         * final.c (rest_of_clean_state): Guard stack
699         shrinking with flag.
701 2018-11-09  Martin Liska  <mliska@suse.cz>
703         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
704         to ...
705         (ipa_discover_variable_flags): ... this.
706         * common.opt: Come up with new flag -fipa-reference-addressable.
707         * doc/invoke.texi: Document it.
708         * ipa-reference.c (propagate): Call the renamed fn.
709         * ipa-visibility.c (whole_program_function_and_variable_visibility):
710         Likewise.
711         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
712         ...
713         (ipa_discover_variable_flags): ... this.  Discover
714         non-addressable variables only with the newly added flag.
715         * opts.c: Enable the newly added flag with -O1 and higher
716         optimization level.
718 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
720         * json.cc (selftest::test_writing_literals): Fix comment.
722 2018-11-09  Martin Liska  <mliska@suse.cz>
724         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
725         string to a stack buffer.
726         (aarch64_parse_cpu): Likewise.
727         (aarch64_parse_tune): Likewise.
729 2018-11-09  Richard Biener  <rguenther@suse.de>
731         PR tree-optimization/87953
732         * tree-vect-loop.c (vectorizable_reduction): For analysis
733         always pass ops[0] to vectorizable_condition.
735 2018-11-09  Stafford Horne  <shorne@gmail.com>
736             Richard Henderson  <rth@twiddle.net>
737             Joel Sherrill  <joel@rtems.org>
739         * common/config/or1k/or1k-common.c: New file.
740         * config/or1k/*: New.
741         * config.gcc (or1k*-*-*): New.
742         * configure.ac (or1k*-*-*): New test for openrisc tls.
743         * configure: Regenerated.
744         * doc/install.texi: Document OpenRISC triplets.
745         * doc/invoke.texi: Document OpenRISC arguments.
746         * doc/md.texi: Document OpenRISC.
748 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
750         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
751         (arm7tdmi-s): Delete CPU.
752         (arm710t): Add aliases for arm720t and arm740t.
753         (arm720t, arm740t): Delete CPUs.
754         (arm920t): Add aliases for arm920, arm922t and arm940t.
755         (arm920, arm922t, arm940t): Delete CPUs.
756         (arm10tdmi): Add alias for arm1020t.
757         (arm1020t): Delete CPU.
758         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
759         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
760         (arm10e): Add aliases for arm1020e and arm1022e.
761         (arm1020e, arm1022e): Delete CPU.
762         * config/arm/arm.md (generic_sched): Remove entries that are now
763         handled by aliases.
764         (generic_vfp): Likewise.
765         * config/arm/arm1020e.md: Simplify tuning selection based on alias
766         changes.
767         * config/arm/arm-tune.md: Regenerated.
768         * config/arm/arm-tables.opt: Regenerated.
770 2018-11-09  Richard Biener  <rguenther@suse.de>
772         PR tree-optimization/87621
773         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
774         op with only phi inputs.
775         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
776         (ch_base::copy_headers): Run CSE on copied loop headers.
777         (pass_ch_vect::process_loop_p): Simplify.
779 2018-11-09  Alexandre Oliva <oliva@adacore.com>
781         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
782         for non-w64 x86_64 biarch.
784 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
786         PR rtl-optimization/86438
787         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
788         of in_b for the compare if in_b is SET_DEST.
790         PR target/87793
791         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
792         non-toplevel UNSPEC.
794 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
796         * tree-vrp.c (value_range::check): Do not access internals
797         directly.
798         (value_range::singleton_p): Same.
799         (value_range::type): Same.
800         (vrp_finalize): Use value_range API.
802 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
804         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
806 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
808         * vr-values.c (vr_values::get_value_range): Use value_range API
809         instead of piecing together ranges.
810         (vr_values::update_value_range): Same.
812 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
814         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
815         of performing ad-hoc calculations.
816         * tree-ssanames.c (set_range_info): New overloaded function
817         accepting value_range &.
818         (get_range_info): Same.
819         * tree-ssanames.h (set_range_info_raw): Remove.
820         (set_range_info): New prototype.
821         (get_range_info): Same.
822         * tree-vrp.h (value_range::null_p): Rename to zero_p.
823         * tree-vrp.c (value_range::null_p): Same.
825 2018-11-09  Jan Hubicka  <jh@suse.cz>
827         * tree.c (fld_type_variant_equal_p): Test user align flag.
828         (flt_type_variant): Copy user align flag.
829         (fld_incomplete_type_of): Clear it.
831 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
833         * config/arm/neon.md (div<mode>3): New pattern.
835 2018-11-08  Andi Kleen  <ak@linux.intel.com>
837         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
838         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
839         (ix86_handle_option): Handle OPT_mptwrite.
840         * config/i386/cpuid.h (bit_PTWRITE): Add.
841         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
842         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
843         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
844         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
845         (ix86_option_override_internal): Handle PTA_PTWRITE.
846         (ix86_valid_target_attribute_inner_p): Define ptwrite.
847         (def_builtin2): Force UINT64 to be 64bit only.
848         * config/i386/i386.h (TARGET_PTWRITE): Add.
849         (TARGET_PTWRITE_P): Add.
850         (PTA_PTWRITE): Add.
851         * config/i386/i386.md: Define ptwrite.
852         * config/i386/i386.opt: Add -mptwrite.
853         * config/i386/immintrin.h (_ptwrite64): Add.
854         (_ptwrite32): Add
855         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
856         * doc/invoke.texi: Document -mptwrite.
858 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
860         PR rtl-optimization/87600
861         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
862         * lra-constraints.c (process_alt_operands): Skip illegal hard
863         register usage.  Prefer reloading non hard register operands.
865 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
867         PR other/36572
868         * doc/invoke.texi (Optimize Options): Clarify default behavior
869         for -fno-sched-interblock and -fno-sched-spec.
871 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
873         * collect2.c (linker_select):  Add USE_LLD_LD.
874         (ld_suffixes): Add ld.lld.
875         (main): Handle -fuse-ld=lld.
876         * common.opt (-fuse-ld=lld): New option.
877         * doc/invoke.texi (-fuse-ld=lld): Document.
878         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
880 2018-11-08  Paul Koning  <ni1d@arrl.net>
882         * config/pdp11/constraints.md: Add "Z" series constraints for use
883         with pre-dec and post-inc addressing.
884         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
885         (pdp11_expand_operands): Add int argument (word count).
886         (pdp11_sp_frame_offset): Delete.
887         (pdp11_cmp_length): New function.
888         (pushpop_regeq): New function.
889         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
890         Add hook.
891         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
892         frame layout.
893         (pdp11_initial_elimination_offset): Ditto.
894         (pdp11_expand_operands): Add word count argument.  Bugfixes.
895         (output_move_multiple): Change how pointer adjustment is done.
896         (pdp11_gen_int_label): Correct format.
897         (output_ascii): Ditto.
898         (pdp11_asm_output_var): Add code for DEC assembler case.
899         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
900         value.
901         (legitimate_const_double_p): Ditto.
902         (pdp11_register_move_cost): Adjust for new register classes.
903         (pdp11_regno_reg_class): Ditto.
904         (expand_block_move): Delete.
905         (pushpop_regeq): New function.
906         (pdp11_legitimate_address_p): Bugfix in check for constant
907         offset.
908         (pdp11_sp_frame_offset): Delete.
909         (pdp11_reg_save_size): New helper function for new frame layout.
910         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
911         (pdp11_expand_shift): Bugfix in check for constant shift count.
912         (pdp11_shift_length): Ditto.
913         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
914         (pdp11_cmp_length): New function.
915         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
916         some compile options.
917         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
918         (CALL_USED_REGISTERS): Ditto.
919         (ELIMINABLE_REGS): Ditto.
920         (REGISTER_NAMES): Ditto.
921         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
922         constraints.
923         (REG_CLASS_NAMES): Ditto.
924         (REG_CLASS_CONTENTS): Ditto.  Also remove
925         HARD_FRAME_POINTER_REGNUM.
926         (CPU_REG_CLASS): New macro.
927         (CLASS_MAX_NREGS): Adjust for new register classes.
928         (FUNCTION_PROFILER): Make no-op.
929         (may_call_alloca): Remove unused declaration.
930         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
931         (ASM_OUTPUT_SKIP): Fix format.
932         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
933         (HARD_FRAME_POINTER_REGNUM): Remove.
934         (return): Delete.
935         (*rts): Rename.  Remove epilogue related checks.
936         (cmpsi, cmpdi): New insn.
937         (cbranch<mode>4): Change to apply to SI and DI modes as well.
938         (mov<mode>): Change constraints to enforce that push/pop
939         destination cannot use the same register as source.
940         (*mov<mode><cc_cc>): Ditto.
941         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
942         at assembly output rather than as RTL expander.
943         (zero_extendqihi2): Bugfix in check for same registers.
944         (adddi3_nocc): Bugfix in check for constant operand.
945         (addsi3_nocc): Ditto.
946         (subdi3_nocc): Ditto.
947         (subsi3_nocc): Ditto.
948         (negdi2_nocc): Copy input to pdp11_expand_operands.
949         (negsi2_nocc): Ditto.
950         (bswap2_nocc): Ditto.
951         * config/pdp11/pdp11.opt (mlra): Fix documentation.
952         * config/pdp11/t-pdp11: Use -Os.
954 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
956         * config/arm/parsecpu.awk (/alias/): New parsing rule.
957         (/begin cpu/): Check that the cpu name hasn't been previously defined.
958         (gen_comm_data): Print out CPU alias tables.
959         (check_cpu): Match aliases when checking the CPU name.
960         * config/arm/arm-protos.h (cpu_alias): New structure.
961         (cpu_option): Add entry for aliases.
962         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
963         strongarm1100 and strongarm1110.
964         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
965         (config/arm/arm-generic.md): Remove redundant references to
966         strongarm110, strongarm1100 and strongarm1110.
967         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
968         Scan aliases for additional hints.
969         (arm_parse_cpu_option_name): Also match a cpu name against the list
970         of aliases.
971         * config/arm/arm-tables.opt: Regenerated.
972         * config/arm/arm-tune.md: Regenerated.
974 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
976         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
977         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
978         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
979         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
980         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
981         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
982         * gengtype.c (open_base_files): Add omp-general.h.
983         * gimple.c (gimple_build_omp_critical):
984         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
985         gimple_omp_taskgroup_set_clauses.
986         (gimple_build_omp_atomic_load): Add mo argument, call
987         gimple_omp_atomic_set_memory_order.
988         (gimple_build_omp_atomic_store): Likewise.
989         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
990         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
991         instead of GSS_OMP.
992         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
993         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
994         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
995         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
996         different value for GF_OMP_ATOMIC_NEED_VALUE.
997         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
998         comments.
999         (struct gimple_statement_omp_single_layout): And remove here.
1000         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1001         than gimple_statement_omp_single_layout.
1002         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1003         GIMPLE_OMP_TEAMS.
1004         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1005         (gimple_omp_subcode): Formatting fix.
1006         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1007         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1008         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1009         gimple_omp_teams_host, gimple_omp_teams_set_host,
1010         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1011         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1012         gimple_omp_taskgroup_set_clauses): New inline functions.
1013         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1014         (gimple_build_omp_atomic_store): Likewise.
1015         (gimple_omp_atomic_seq_cst_p): Remove.
1016         (gimple_omp_atomic_memory_order): New function.
1017         (gimple_omp_atomic_set_seq_cst): Remove.
1018         (gimple_omp_atomic_set_memory_order): New function.
1019         (gimple_build_omp_taskgroup): Add clauses argument.
1020         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1021         (dump_gimple_omp_task): Print taskwait with depend clauses.
1022         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1023         dump_omp_atomic_memory_order.
1024         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1025         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1026         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1027         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1028         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1029         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1030         ORT_UNTIED_TASKLOOP enumerators.
1031         (enum gimplify_defaultmap_kind): New.
1032         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1033         target_map_pointers_as_0len_arrays members, add defaultmap.
1034         (new_omp_context): Initialize defaultmap member.
1035         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1036         (maybe_fold_stmt): Don't fold even in host teams regions.
1037         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1038         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
1039         ctx->omp_firstprivatize_variable.
1040         (omp_add_variable): Don't add private/firstprivate for VLAs in
1041         ORT_TASKGROUP.
1042         (omp_default_clause): Print "taskloop" rather than "task" if
1043         ORT_*TASKLOOP.
1044         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1045         Handle new defaultmap clause kinds.
1046         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
1047         iterator to be lastprivate or private.  Fix up diagnostics if linear
1048         is used on collapse>1 simd iterator.
1049         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1050         (gimplify_omp_depend): New function.
1051         (gimplify_scan_omp_clauses): Add shared clause on parallel for
1052         combined parallel master taskloop{, simd} if taskloop has
1053         firstprivate, lastprivate or reduction clause.  Handle
1054         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
1055         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
1056         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
1057         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
1058         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
1059         lastprivate.
1060         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
1061         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.  
1062         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
1063         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1064         (gimplify_omp_task): Handle taskwait with depend clauses.
1065         (gimplify_omp_for): Add shared clause on parallel for combined
1066         parallel master taskloop{, simd} if taskloop has firstprivate,
1067         lastprivate or reduction clause.  Use ORT_TASKLOOP or
1068         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
1069         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
1070         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
1071         __for_end and __for_range temporaries on OMP_PARALLEL for
1072         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
1073         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1074         sandwiched in between two taskloops.
1075         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1076         instead of ctx->omp_firstprivatize_variable.
1077         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1078         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
1079         host teams, use gimplify_and_return_first etc. for body like
1080         for target or target data constructs, and at the end call
1081         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1082         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1083         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1084         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1085         gimple_omp_atomic_set_seq_cst calls.
1086         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1087         case, handle taskgroup clauses.
1088         * lto-streamer-out.c (hash_tree): Handle
1089         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1090         * Makefile.in (GTFILES): Add omp-general.h.
1091         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1092         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1093         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1094         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1095         BUILT_IN_GOMP_LOOP_DOACROSS_START,
1096         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1097         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1098         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1099         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1100         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1101         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1102         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1103         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1104         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1105         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1106         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1107         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1108         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1109         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1110         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1111         * omp-expand.c (workshare_safe_to_combine_p): Return false for
1112         non-worksharing loops.
1113         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1114         (determine_parallel_type): Don't combine parallel with worksharing
1115         which has _reductemp_ clause.
1116         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1117         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1118         if there is nonmonotonic modifier or if there is no modifier and no
1119         ordered clause.  For dynamic and guided schedule without monotonic
1120         and nonmonotonic modifier, default to nonmonotonic.
1121         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
1122         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1123         task reductions.
1124         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1125         there are any reduction clauses.
1126         (expand_taskwait_call): New function.
1127         (expand_teams_call): New function.
1128         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1129         expand_teams_call for it.  Formatting fix.  Handle taskwait with
1130         depend clauses.
1131         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
1132         of worksharing loops with task reductions.
1133         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1134         expansion of worksharing loops with task reductions.
1135         (expand_omp_sections): Handle expansion of sections with task
1136         reductions.
1137         (expand_omp_synch): For host teams call expand_omp_taskreg.
1138         (omp_memory_order_to_memmodel): New function.
1139         (expand_omp_atomic_load, expand_omp_atomic_store,
1140         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1141         instead of gimple_omp_atomic_seq_cst_p.
1142         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1143         depend clauses as a standalone directive.
1144         * omp-general.c (enum omp_requires): New variable.
1145         (omp_extract_for_data): Initialize have_reductemp member.  Allow
1146         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1147         GT_EXPR loops depending on incr sign.  Formatting fixes.
1148         * omp-general.h (struct omp_for_data): Add have_reductemp member.
1149         (enum omp_requires): New enum.
1150         (omp_requires_mask): Declare.
1151         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1152         Fix comment typos.
1153         * omp-low.c (struct omp_context): Add task_reductions and
1154         task_reduction_map fields.
1155         (is_host_teams_ctx): New function.
1156         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1157         (use_pointer_for_field): Use is_global_var instead of
1158         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1159         in outer contexts.
1160         (build_outer_var_ref): Ignore taskgroup outer contexts.
1161         (delete_omp_context): Release task_reductions and task_reduction_map.
1162         (scan_sharing_clauses): Don't add any fields for reduction clause on
1163         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
1164         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1165         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
1166         Handle OMP_CLAUSE_NONTEMPORAL.
1167         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1168         needed.
1169         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1170         clauses with task modifier.
1171         (scan_omp_task): Handle taskwait with depend clauses.
1172         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1173         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1174         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1175         (scan_omp_for): Fix comment formatting.
1176         (scan_omp_teams): Handle host teams constructs.
1177         (check_omp_nesting_restrictions): Allow teams with no outer
1178         OpenMP context.  Adjust diagnostics for teams strictly nested into
1179         some explicit OpenMP construct other than target.  Allow OpenMP atomics
1180         inside of simd regions.
1181         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1182         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1183         taskreg_nesting_level while scanning host teams construct.
1184         (task_reduction_read): New function.
1185         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1186         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1187         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
1188         second argument create_tmp_var if it is NULL.  Don't ignore shared
1189         clauses in is_host_teams_ctx contexts.  Handle
1190         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1191         clauses.
1192         (lower_reduction_clauses): Ignore reduction clauses with task
1193         modifier.  Remove second argument create_tmp_var if it is NULL.
1194         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1195         (lower_send_clauses): Ignore reduction clauses with task modifier.
1196         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
1197         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
1198         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1199         rely that it is the last stmt in body so far.  Ignore outer taskgroup
1200         contexts.
1201         (omp_task_reductions_find_first, omp_task_reduction_iterate,
1202         lower_omp_task_reductions): New functions.
1203         (lower_omp_sections): Handle reduction clauses with taskgroup
1204         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
1205         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1206         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
1207         modifiers.
1208         (lower_omp_taskgroup): Handle taskgroup reductions.
1209         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1210         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1211         (lower_depend_clauses): If there are any
1212         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1213         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
1214         seen, assume lowering is done already and return early.  Set kind
1215         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1216         (lower_omp_taskreg): Handle reduction clauses with task modifier on
1217         parallel construct.  Handle reduction clause on taskloop construct.
1218         Handle taskwait with depend clauses.
1219         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1220         for host teams constructs.
1221         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1222         nontemporal and _reductemp_ clause entries.
1223         (omp_clause_code_name): Likewise.
1224         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1225         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1226         * tree-core.h (enum omp_clause_code): Add
1227         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1228         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1229         (struct tree_base): Add omp_atomic_memory_order field into union.
1230         Remove OMP_ATOMIC_SEQ_CST comment.
1231         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1232         and OMP_CLAUSE_DEPEND_DEPOBJ.
1233         (struct tree_omp_clause): Add subcode.defaultmap_kind.
1234         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1235         OpenMP constructs with body and clauses operands.
1236         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1237         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1238         (OMP_TASKGROUP_CLAUSES): Define.
1239         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1240         OMP_CLAUSE__LOOPTEMP_.
1241         (OMP_ATOMIC_SEQ_CST): Remove.
1242         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1243         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1244         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1245         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1246         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1247         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1248         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1249         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1250         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1251         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1252         Define.
1253         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1254         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1255         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1256         (convert_local_omp_clauses): Likewise.  Remove useless test.
1257         * tree-parloops.c (create_call_for_reduction_1): Pass
1258         OMP_MEMORY_ORDER_RELAXED as new argument to
1259         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1260         * tree-pretty-print.c (dump_omp_iterators): New function.
1261         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1262         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
1263         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1264         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
1265         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
1266         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
1267         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1268         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1269         (dump_omp_atomic_memory_order): New function.
1270         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
1271         taskwait with depend clauses.
1272         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1273         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1274         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1275         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1276         write_ts_omp_clause_tree_pointers): Likewise.
1278 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1280         PR ipa/86395
1281         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1282         "-missed", "-note", and "-all" sub-options.
1283         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1284         API.
1285         (can_early_inline_edge_p): Likewise.
1286         (want_early_inline_function_p): Likewise.
1287         (want_inline_self_recursive_call_p): Likewise.
1288         (recursive_inlining): Likewise.
1289         (inline_small_functions): Likewise.
1290         (flatten_function): Likewise.
1291         (ipa_inline): Likewise.
1292         (inline_always_inline_functions): Likewise.
1293         (early_inline_small_functions): Likewise.
1294         (early_inliner): Likewise.
1295         * tree-inline.c (expand_call_inline): Likewise.
1297 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1299         * pretty-print.c (pp_format): Handle %f.
1300         (selftest::test_pp_format): Add test of %f.
1301         * pretty-print.h (pp_double): New macro.
1303 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1305         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1306         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1307         (dump_pretty_printer::decode_format): Implement "%C" for
1308         cgraph_node *.
1309         (selftest::test_capture_of_dump_calls): Rename "where" to
1310         "stmt_loc".  Convert test_decl to a function decl and set its
1311         location.  Add a symbol_table_test RAII instance and a
1312         cgraph_node, using it to test "%C" and dump_symtab_node.
1314 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1316         PR middle-end/87916
1317         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1319 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1321         * cgraph.c: Include "selftest.h".
1322         (saved_symtab): New variable.
1323         (selftest::symbol_table_test::symbol_table_test): New ctor.
1324         (selftest::symbol_table_test::~symbol_table_test): New dtor.
1325         (selftest::test_symbol_table_test): New test.
1326         (selftest::cgraph_c_tests): New.
1327         * cgraph.h (saved_symtab): New decl.
1328         (selftest::symbol_table_test): New class.
1329         * selftest-run-tests.c (selftest::run_tests): Call
1330         selftest::cgraph_c_tests.
1331         * selftest.h (selftest::cgraph_c_tests): New decl.
1333 2018-11-08  Richard Biener  <rguenther@suse.de>
1335         * tree-data-ref.h (lambda_int): New typedef.
1336         (lambda_vector_gcd): Adjust.
1337         (lambda_vector_new): Likewise.
1338         (lambda_matrix_new): Likewise.
1339         * tree-data-ref.c  (print_lambda_vector): Adjust.
1341 2018-11-08  Richard Biener  <rguenther@suse.de>
1343         PR tree-optimization/87929
1344         * tree-complex.c (expand_complex_comparison): Clean EH.
1346 2018-11-08  Martin Liska  <mliska@suse.cz>
1348         * doc/extend.texi: Reword.
1349         * predict.c (expr_expected_value_1): Likewise.
1351 2018-11-08  Richard Biener  <rguenther@suse.de>
1353         PR tree-optimization/87913
1354         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1355         of extreme values to ordered comparisons.
1357 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1359         PR middle-end/42726
1360         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1362 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1364         * doc/invoke.texi: Remove leading dash from @opindex entries
1365         throughout the file.
1367 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1369         PR driver/80828
1370         * doc/invoke.texi (Option Summary): Add -e and --entry.
1371         (Link Options): Likewise.
1373 2018-11-07  Nathan Sidwell  <nathan@acm.org>
1375         PR 87926
1376         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1377         --disable-checking bootstrap.
1379 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1381         * configure: Regenerated.
1383 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1385         PR c/87691
1386         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1387         to the mode of the widest field iff the widest field has mode class
1388         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1389         reference.
1391 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
1393         * common.opt: Add -Wattribute-warning.
1394         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1395         * expr.c (expand_expr_real_1): Add new attribute to warning_at
1396         call to allow user configure behavior of "warning" attribute.
1398 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
1400         * target.def: Put @: after every vs., e.g., and i.e. where it is
1401         followed by whitespace.
1402         * doc/extend.texi: Ditto.
1403         * doc/fragments.texi: Ditto.
1404         * doc/gimple.texi: Ditto.
1405         * doc/implement-c.texi: Ditto.
1406         * doc/install.texi: Ditto.
1407         * doc/invoke.texi: Ditto.
1408         * doc/md.texi: Ditto.
1409         * doc/plugins.texi: Ditto.
1410         * doc/rtl.texi: Ditto.
1411         * doc/sourcebuild.texi: Ditto.
1412         * doc/tm.texi.in: Ditto.
1413         * doc/ux.texi: Ditto.
1414         * doc/tm.texi: Regenerate.
1416 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1418         * config/arm/arm-cpus.in (ares): New entry.
1419         * config/arm/arm-tables.opt: Regenerate.
1420         * config/arm/arm-tune.md: Likewise.
1421         * doc/invoke.texi (ARM Options): Document ares.
1423 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1425         * config/aarch64/aarch64-cores.def (ares): Define.
1426         * config/aarch64/aarch64-tune.md: Regenerate.
1427         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1429 2018-11-07  Jan Hubicka  <jh@suse.cz>
1431         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1432         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1433         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1434         TYPE_DECL.
1436 2018-11-07  Richard Biener  <rguenther@suse.de>
1438         PR tree-optimization/87914
1439         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1440         of nested cycles.
1441         (vectorizable_reduction): Handle shifts and rotates by dispatching
1442         to vectorizable_shift.
1443         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1444         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
1445         def cases.
1446         (vectorizable_shift): Export and handle being called as
1447         vect_nested_cycle.
1448         (vect_analyze_stmt): Call vectorizable_shift after
1449         vectorizable_reduction.
1450         * tree-vectorizer.h (vectorizable_shift): Declare.
1452 2018-11-07  Jan Hubicka  <jh@suse.cz>
1454         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1455         than const decls in TREE_VALUE of enum.
1456         (dump_type_inheritance_graph): Improve duplicate dumping.
1457         (free_enum_values): New.
1458         (build_type_inheritance_graph): Use it.
1459         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1460         which are not main variants or not ODR types.
1461         (verify_type_variant): Expect variants to have no TYPE_VALUES.
1463 2018-11-07  Richard Biener  <rguenther@suse.de>
1465         * ipa-inline.c (want_inline_small_function_p): Compute
1466         big_speedup_p lazily and last.
1468 2018-11-07  Jan Hubicka  <jh@suse.cz>
1470         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1471         building incomplete variant of complete type.
1472         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1473         variant of complete type.
1475 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1477         * config/mips/mips.c: Fix typo in documentation of
1478         mips_loongson_ext2_prefetch_cookie.
1479         (mips_option_override): fix brain twister logical.
1480         * config/mips/mips.h: Fix typo in documentation of
1481         ISA_HAS_CTZ_CTO and define pattern.
1482         * config/mips/mips.md (prefetch): Hoist EXT2 above
1483         the 2EF/EXT block.
1484         (prefetch_indexed): Hoist EXT2 above the EXT block.
1486 2018-11-07  Jan Hubicka  <jh@suse.cz>
1488         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1489         return and parameter types of function and method types.
1490         (free_lang_data_in_cgraph): Update.
1492 2018-11-07  Martin Liska  <mliska@suse.cz>
1494         PR rtl-optimization/87868
1495         * postreload-gcse.c (eliminate_partially_redundant_load): Set
1496         threshold to max_count if we would overflow.
1497         * profile-count.h: Make max_count a public constant.
1499 2018-11-07  Martin Liska  <mliska@suse.cz>
1501         * mem-stats.h: Fix GNU coding style.
1503 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1505         * config/mips/gs264e.md: New.
1506         * config/mips/mips-cpus.def: Define gs264e.
1507         * config/mips/mips-tables.opt: Regenerate.
1508         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1509         gs264e.
1510         (mips_issue_rate): Add support for gs264e.
1511         (mips_multipass_dfa_lookahead): Likewise.
1512         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1513         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1514         (MIPS_ASE_MSA_SPEC): New.
1515         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1516         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1517         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1518         * config/mips/mips.md: Include gs264e.md.
1519         (processor): Add gs264e.
1520         * config/mips/mips.opt (MSA): Use Mask instead of Var.
1521         * doc/invoke.texi: Add gs264e to supported architectures.
1523 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1525         * config/mips/gs464e.md: New.
1526         * config/mips/mips-cpus.def: Define gs464e.
1527         * config/mips/mips-tables.opt: Regenerate.
1528         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1529         gs464e.
1530         (mips_issue_rate): Add support for gs464e.
1531         (mips_multipass_dfa_lookahead): Likewise.
1532         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1533         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1534         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1535         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1536         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1537         * config/mips/mips.md: Include gs464e.md.
1538         (processor): Add gs464e.
1539         * doc/invoke.texi: Add gs464e to supported architectures.
1541 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1543         * config/mips/loongson3a.md: Rename to ...
1544         * config/mips/gs464.md: ... here.
1545         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1546         as an alias of gs464 processor.
1547         * config/mips/mips-tables.opt: Regenerate.
1548         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1549         instead of PROCESSOR_LOONGSON_3A.
1550         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1551         TUNE_LOONGSON_3A.
1552         (mips_option_override): Enable MMI and EXT for gs464.
1553         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1554         Rename TUNE_LOONGSON_3A to TUNE_GS464.
1555         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1556         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1557         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1558         TARGET_LOONGSON_3A.
1559         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1560         (processor): Add gs464;
1561         * doc/invoke.texi: Add gs464 to supported architectures.
1563 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1565         * config/mips/mips-protos.h
1566         (mips_loongson_ext2_prefetch_cookie): New prototype.
1567         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1568         (mips_option_override): Enable TARGET_LOONGSON_EXT when
1569         TARGET_LOONGSON_EXT2 is true.
1570         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1571         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1572         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1573         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1574         TARGET_LOONGSON_EXT2.
1575         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1576         (define_insn "ctz<mode>2"): New insn pattern.
1577         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1578         (define_insn "prefetch_indexed_<mode>"): Include
1579         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1580         * config/mips/mips.opt (-mloongson-ext2): Add option.
1581         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1583 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1585         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1586         __mips_loongson_ext.
1587         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1588         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1589         -mloongson-ext.
1590         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1591         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1592         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1593         instead of TARGET_LOONGSON_3A.
1594         * config/mips/mips.opt (-mloongson-ext): Add option.
1595         * gcc/doc/invoke.texi (-mloongson-ext): Document.
1597 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1599         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1600         * config/mips/loongson.md: Move to ...
1601         * config/mips/loongson-mmi.md: here; Adjustment.
1602         * config/mips/loongson.h: Move to ...
1603         State as deprecated. Include loongson-mmiintrin.h for back
1604         compatibility and warning.
1605         * config/mips/loongson-mmiintrin.h: ... here.
1606         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1607         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1608         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1609         (mips_option_override): Make sure MMI use hard float;
1610         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1611         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1612         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1613         TARGET_LOONGSON_VECTORS.
1614         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1615         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1616         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1617         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1618         -mloongson-mmi.
1619         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1620         TARGET_LOONGSON_VECTORS.
1621         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1622         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1623         (Loongson MMI patterns): Include loongson-mmi.md instead of
1624         loongson.md.
1625         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1626         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1628 2018-11-07  Richard Biener  <rguenther@suse.de>
1630         PR lto/87906
1631         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1632         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1634 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
1636         PR rtl-optimization/87874
1637         * lra.c (lra_substitute_pseudo): Do not create a subreg for
1638         const wide ints.
1640 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
1642         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1643         if not in indexed or indirect form.
1644         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1645         (bswap<mode>2_store): Ditto.
1647 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
1649         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1650         the UNSPEC.
1652 2018-11-06  Richard Biener  <rguenther@suse.de>
1654         PR tree-optimization/86850
1655         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1656         instead of src.m_vec.
1658 2018-11-06  Jan Hubicka  <jh@suse.cz>
1660         * tree.c (fld_simplified_type_name): Break out form ...
1661         (free_lang_data_in_type): ... here.
1662         (fld_type_variant_equal_p): Use it.
1664 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1666         * config/default-d.c: Include memmodel.h.
1668         * config/sol2-d.c: New file.
1669         * config/t-sol2 (sol2-d.o): New rule.
1670         * config.gcc <*-*-solaris2*>: Set d_target_objs,
1671         target_has_targetdm.
1673 2018-11-06  Jan Hubicka  <jh@suse.cz>
1675         * tree.c (fld_type_variant): Also copy alignment; be sure that
1676         new variant is equal.
1678 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1680         PR target/87762
1681         * config/s390/s390.md: Add relative_long attribute.
1683 2018-11-06  Jan Hubicka  <jh@suse.cz>
1685         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1686         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1687         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1688         stream TYPE_NEEDS_CONSTRUCTING.
1689         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1690         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1692 2018-11-06  Richard Biener  <rguenther@suse.de>
1694         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1695         dump-scope ...
1696         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1698 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1700         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1701         REG_CLASS_CONTENTS[GEN_REGS].
1702         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1704 2018-11-06  Jan Hubicka  <jh@suse.cz>
1706          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1708 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1710         PR sanitizer/80953
1711         * config/sol2.h (ASAN_CC1_SPEC): Define.
1712         (LD_WHOLE_ARCHIVE_OPTION): Define.
1713         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1714         (ASAN_REJECT_SPEC): Provide default.
1715         (LIBASAN_EARLY_SPEC): Define.
1716         (LIBTSAN_EARLY_SPEC): Define.
1717         (LIBLSAN_EARLY_SPEC): Define.
1718         * config/i386/sol2.h (CC1_SPEC): Redefine.
1719         (ASAN_REJECT_SPEC): Define.
1721         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1722         (TARGET_ASAN_SHADOW_OFFSET): Define.
1723         (sparc_asan_shadow_offset): New function.
1724         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1725         (ASAN_REJECT_SPEC): Define.
1727 2018-11-06  Jan Hubicka  <jh@suse.cz>
1729         * tree.c (fld_type_variant): Copy canonical type.
1730         (fld_incomplete_type_of): Check that canonical types looks sane;
1731         copy canonical type.
1732         (verify_type): Accept when incomplete type has complete canonical type.
1734 2018-11-06  Jan Hubicka  <jh@suse.cz>
1736         * tree.c (free_lang_data): Reset overwite_assembler_name,
1737         print_xnode, print_decl, print_type and print_identifier of
1738         langhooks.
1740 2018-11-06  Richard Biener  <rguenther@suse.de>
1742         PR tree-optimization/87889
1743         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1744         Do nothing if old and new arg are the same
1746 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1748         PR target/87723
1749         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1750         attributes for operands 3 and 4.
1752 2018-11-06  Richard Biener  <rguenther@suse.de>
1754         PR middle-end/18041
1755         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1756         matching bitfield insertion.
1758 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
1760         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
1761         (reg_next_debug_use): New.
1762         (attempt_change): Propagate adjusted expression into affected
1763         debug insns.
1764         (merge_in_block): Track uses in debug insns.
1765         (pass_inc_dec::execute): Allocate and release
1766         reg_next_debug_use.
1768 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1770         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1771         (_mm512_fixupimm_round_pd): Update parameters and builtin.
1772         (_mm512_maskz_fixupimm_round_pd): Ditto.
1773         (_mm512_fixupimm_round_ps): Ditto.
1774         (_mm512_maskz_fixupimm_round_ps): Ditto.
1775         (_mm_fixupimm_round_sd): Ditto.
1776         (_mm_maskz_fixupimm_round_sd): Ditto.
1777         (_mm_fixupimm_round_ss): Ditto.
1778         (_mm_maskz_fixupimm_round_ss): Ditto.
1779         (_mm512_fixupimm_pd): Ditto.
1780         (_mm512_maskz_fixupimm_pd): Ditto.
1781         (_mm512_fixupimm_ps): Ditto.
1782         (_mm512_maskz_fixupimm_ps): Ditto.
1783         (_mm_fixupimm_sd): Ditto.
1784         (_mm_maskz_fixupimm_sd): Ditto.
1785         (_mm_fixupimm_ss): Ditto.
1786         (_mm_maskz_fixupimm_ss): Ditto.
1787         (_mm512_mask_fixupimm_round_pd): Update builtin.
1788         (_mm512_mask_fixupimm_round_ps): Ditto.
1789         (_mm_mask_fixupimm_round_sd): Ditto.
1790         (_mm_mask_fixupimm_round_ss): Ditto.
1791         (_mm512_mask_fixupimm_pd): Ditto.
1792         (_mm512_mask_fixupimm_ps): Ditto.
1793         (_mm_mask_fixupimm_sd): Ditto.
1794         (_mm_mask_fixupimm_ss): Ditto.
1795         * config/i386/avx512vlintrin.h:
1796         (_mm256_fixupimm_pd): Update parameters and builtin.
1797         (_mm256_maskz_fixupimm_pd): Ditto.
1798         (_mm256_fixupimm_ps): Ditto.
1799         (_mm256_maskz_fixupimm_ps): Ditto.
1800         (_mm_fixupimm_pd): Ditto.
1801         (_mm_maskz_fixupimm_pd): Ditto.
1802         (_mm_fixupimm_ps): Ditto.
1803         (_mm_maskz_fixupimm_ps): Ditto.
1804         (_mm256_mask_fixupimm_pd): Update builtin.
1805         (_mm256_mask_fixupimm_ps): Ditto.
1806         (_mm_mask_fixupimm_pd): Ditto.
1807         (_mm_mask_fixupimm_ps): Ditto.
1808         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1809         * config/i386/i386-builtin.def: Update builtin definitions.
1810         * config/i386/i386.c: Handle new builtin types and remove useless ones.
1811         * config/i386/sse.md: Update VFIXUPIMM* patterns.
1812         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1813         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1814         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1815         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1816         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1817         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1818         * config/i386/subst.md:
1819         (round_saeonly_sd_mask_operand4): Add new subst_attr.
1820         (round_saeonly_sd_mask_op4): Ditto.
1821         (round_saeonly_expand_operand5): Ditto.
1822         (round_saeonly_expand): Update.
1824 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
1826         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1828 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
1830         PR rtl-optimization/87871
1831         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1833 2018-11-05  Paul Koning  <ni1d@arrl.net>
1835         * doc/sourcebuild.texi (target attributes): Document new "inf"
1836         effective target keyword.
1838 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1840         * config/s390/s390.c (s390_register_move_cost): Increase costs for
1841         moves involving the CC reg.
1843 2018-11-05  Richard Biener  <rguenther@suse.de>
1845         PR tree-optimization/87873
1846         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1847         argument.
1848         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1849         * tree-vect-loop.c (vect_transform_loop): When splitting the
1850         loop exit also create forwarder PHIs for constants.
1851         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1852         Handle constant to_arg, add extra checking we match up the correct
1853         PHIs.
1855 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1857         * config/s390/s390.md: QImode and HImode for load on condition.
1859 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1861         * config/s390/predicates.md: Fix typo.
1862         * config/s390/s390.md: Allow immediates for load on condition.
1864 2018-11-05  Martin Liska  <mliska@suse.cz>
1866         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1867         * bitmap.h (struct bitmap_usage): Likewise.
1868         * ggc-common.c (SCALE): Remove.
1869         (LABEL): Likewise.
1870         (struct ggc_usage): Use SIZE_AMOUNT. And update
1871         compare method.
1872         * ggc-page.c (SCALE): Remove.
1873         (STAT_LABEL): Remove.
1874         (ggc_print_statistics): Use SIZE_AMOUNT.
1875         * gimple.h (SCALE): Remove.
1876         (LABEL): Likewise.
1877         * input.c (ONE_K): Remove.
1878         (ONE_M): Likewise.
1879         (SCALE): Likewise.
1880         (STAT_LABEL): Likewise.
1881         (FORMAT_AMOUNT): Likewise.
1882         (dump_line_table_statistics): Use SIZE_AMOUNT.
1883         * mem-stats.h (struct mem_usage): Likewise.
1884         * rtl.c (dump_rtx_statistics): Likewise.
1885         (rtx_alloc_counts): Change type to size_t.
1886         (rtx_alloc_sizes): Likewise.
1887         (rtx_count_cmp): New.
1888         (dump_rtx_statistics): Sort first based on counts.
1889         * tree.c (tree_nodes_cmp): New.
1890         (tree_codes_cmp): New.
1891         (dump_tree_statistics): Sort first based on counts.
1892         * system.h (ONE_K): New.
1893         (ONE_M): Likewise.
1894         (SIZE_SCALE): Likewise.
1895         (SIZE_LABEL): Likewise.
1896         (SIZE_AMOUNT): Likewise.
1897         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1898         * tree-dfa.c (dump_dfa_stats): Likewise.
1899         * tree-phinodes.c (phinodes_print_statistics): Likewise.
1900         * tree-ssanames.c (ssanames_print_statistics): Likewise.
1901         * tree.c (dump_tree_statistics): Likewise.
1902         * vec.c (struct vec_usage): Likewise.
1903         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1904         trigger a -Werror=format-overflow with
1905         --enable-gather-detailed-stats.
1907 2018-11-05  Martin Liska  <mliska@suse.cz>
1909         * mem-stats.h (mem_alloc_description::release_instance_overhead):
1910         Return T *.
1911         * vec.c (struct vec_usage): Register m_element_size.
1912         (vec_prefix::register_overhead): New arguments: elements and
1913         element_size.
1914         (vec_prefix::release_overhead): Subtract elements.
1915         * vec.h (struct vec_prefix): Change signature.
1916         (va_heap::reserve): Pass proper arguments.
1917         (va_heap::release): Likewise.
1919 2018-11-05  Martin Liska  <mliska@suse.cz>
1921         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1922         style.
1923         * vec.c: Likewise.
1925 2018-11-05  Richard Biener  <rguenther@suse.de>
1927         * tree-scalar-evolution.h (final_value_replacement_loop): Update
1928         prototype.
1929         * tree-scalar-evolution.c (final_value_replacement_loop): Return
1930         whether anything was done.
1931         (scev_const_prop): Remove constant propagation part, fold
1932         remains into ...
1933         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1934         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1935         conditionally.
1937 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
1939         PR tree-optimization/87859
1940         * gimple-ssa-store-merging.c (struct merged_store_group): Add
1941         only_constants and first_nonmergeable_order members.
1942         (merged_store_group::merged_store_group): Initialize them.
1943         (merged_store_group::do_merge): Clear only_constants member if
1944         adding something other than INTEGER_CST store.
1945         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1946         stores with order >= first_nonmergeable_order.  Use
1947         merged_store->only_constants instead of always recomputing it.
1948         Set merged_store->first_nonmergeable_order if we've skipped any
1949         stores.  Attempt to merge overlapping INTEGER_CST stores that
1950         we would otherwise skip.
1952         PR sanitizer/87837
1953         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1955 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
1957         PR target/87853
1958         * config/i386/emmintrin.h (__v16qs): New to cope with option
1959         -funsigned-char.
1960         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
1961         (_mm_cmplt_epi8): Likewise.
1962         (_mm_cmpgt_epi8): Likewise.
1964 2018-11-05  Richard Biener  <rguenther@suse.de>
1966         PR rtl-optimization/87852
1967         * fwprop.c (use_killed_between): Only consider single-defs of the
1968         use whose definition statement dominates the use.
1970 2018-11-05  Martin Liska  <mliska@suse.cz>
1972         PR web/87829
1973         * doc/invoke.texi: Remove options that are
1974         not disabled with -Os.
1976 2018-11-05  Martin Liska  <mliska@suse.cz>
1978         PR c/87811
1979         * doc/extend.texi: Update constrain about the last argument
1980         of __builtin_expect_with_probability.
1982 2018-11-05  Martin Liska  <mliska@suse.cz>
1984         PR c/87811
1985         * predict.c (expr_expected_value_1): Verify
1986         that last argument is a real constants and emit
1987         error.
1989 2018-11-05  Martin Liska  <mliska@suse.cz>
1991         PR gcov-profile/77698
1992         * ipa-profile.c (ipa_profile): Adjust hotness threshold
1993         only in LTO mode.
1995 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1997         PR tree-optimization/86572
1998         * builtins.c (c_strlen): Handle negative offsets in a safe way.
2000 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2002         PR tree-optimization/87672
2003         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2004         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2006 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
2008         PR middle-end/58372
2009         * cfgexpand.c (pass_expand::execute): Move the call to
2010         finish_eh_generation in front of the call to expand_stack_alignment.
2012 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2014         * common/config/i386/i386-common.c (processor_alias_table): Add
2015         znver2 entry.
2016         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2017         (case ${target}): Add znver2.
2018         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2019         -march=native recognize znver2 processors.
2020         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2021         * config/i386/i386.c (m_znver2): New definition.
2022         (m_ZNVER): New definition.
2023         (m_AMD_MULTIPLE): Includes m_znver2.
2024         (processor_cost_table): Add znver2 entry.
2025         (processor_target_table): Add znver2 entry.
2026         (get_builtin_code_for_version): Set priority for
2027         PROCESSOR_ZNVER2.
2028         (processor_model): Add M_AMDFAM17H_ZNVER2.
2029         (arch_names_table): Ditto.
2030         (ix86_reassociation_width): Include znver2.
2031         * config/i386/i386.h (TARGET_znver2): New definition.
2032         (struct ix86_size_cost): Add TARGET_ZNVER2.
2033         (enum processor_type): Add PROCESSOR_ZNVER2.
2034         * config/i386/i386.md (define_attr "cpu"): Add znver2.
2035         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2036         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2037         (ix86_adjust_cost): Add znver2.
2038         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
2039         * gcc/doc/extend.texi: Add details about znver2.
2040         * gcc/doc/invoke.texi: Add details about znver2.
2042 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
2044         PR target/87079
2046         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2047         pattern.
2049 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2051         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2052         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2054 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
2056         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2057         shrink-wrapping when -mtrack-speculation.
2059 2018-11-02  Richard Biener  <rguenther@suse.de>
2061         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2062         (pop_cost_one_pair): Do not free pair.
2063         (pop_best_coalesce): Likewise.
2064         (create_coalesce_list): Initialize obstack.
2065         (delete_coalesce_list): Free obstack.
2066         (find_coalesce_pair): Obstack-allocate coalesce pairs.
2067         (add_cost_one_coalesce): Likewise.
2068         (struct live_track): Remove bitmap pointer indirections.
2069         (new_live_track): Adjust.
2070         (delete_live_track): Likewise.
2071         (live_track_remove_partition): Likewise.
2072         (live_track_add_partition): Likewise.
2073         (live_track_live_p): Likewise.
2074         (live_track_process_def): Likewise.
2075         (live_track_clear_base_vars): Likewise.
2077 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2079         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2080         * configure: Regenerate.
2081         * config.in: Regenerate.
2082         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2083         HAVE_AS_REGISTER_PSEUDO_OP guard.
2084         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2085         !HAVE_AS_REGISTER_PSEUDO_OP support.
2086         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2087         guard.
2089 2018-11-02  Richard Biener  <rguenther@suse.de>
2091         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2092         with is_type_die.
2094 2018-11-02  Richard Biener  <rguenther@suse.de>
2096         PR tree-optimization/87776
2097         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2098         executable when iterating but running into rpo-vn-max-loop-depth
2099         and not eliding the iteration.
2101 2018-11-30  Jan Hubicka  <jh@suse.cz>
2103         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2104         TYPE_DECL.
2106 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
2108         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2109         prototype.
2110         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2111         Combine with rs6000_address_for_fpconvert.
2112         (rs6000_address_for_fpconvert): Combine with
2113         rs6000_force_indexed_or_indirect_mem.
2114         (rs6000_expand_vector_init): Change function call from
2115         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2116         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2117         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2118         (floatsi<mode>2_lfiwax_mem): Ditto.
2119         (floatunssi<mode>2_lfiwzx): Ditto.
2120         (floatunssi<mode>2_lfiwzx_mem): Ditto.
2121         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2122         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2123         (fix_trunc<mode>si2_stfiwx): Ditto.
2124         (fixuns_trunc<mode>si2_stfiwx): Ditto.
2125         (float_<mode>si2_hw): Ditto.
2126         (floatuns_<mode>si2_hw): Ditto.
2127         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2128         (vsx_splat_<mode>): Ditto.
2130 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
2132         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2133         at end of assembler input text.
2134         * configure: Regenerate.
2136 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
2138         PR tree-optimization/87826
2139         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2140         negative or larger or equal to type's precision.
2142 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
2144         * opts.c (default_options_table): Do not enable
2145         OPT_fdelayed_branch at -Og.
2146         * doc/invoke.texi (-fdelayed-branch): Document it.
2148 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2150         * optabs-libfuncs.c (build_libfunc_function_visibility):
2151         New, split out from...
2152         (build_libfunc_function): ... here.
2153         (init_one_libfunc_visibility): New, split out from ...
2154         (init_one_libfunc): ... here.
2156         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2157         scratch register need not be early-clobber.  Document the reason
2158         why we cannot use ST<OP>.
2160 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
2162         PR bootstrap/82856
2163         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
2164         line for second argument of AC_DEFINE_UNQUOTED.
2165         * doc/install.texi (Tools/packages necessary for modifying GCC):
2166         Update to autoconf 2.69 and automake 1.15.1.
2167         * aclocal.m4, config.in, configure: Regenerate.
2169 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
2171         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2172         initialization.
2174 2018-10-31  Martin Liska  <mliska@suse.cz>
2176         PR driver/83193
2177         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2178         Add new argument invalid_extension.
2179         (aarch64_get_all_extension_candidates): New function.
2180         (aarch64_rewrite_selected_cpu): Add NULL to function call.
2181         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2182         new argument.
2183         (aarch64_get_all_extension_candidates): New function.
2184         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2185         argument invalid_extension.
2186         (aarch64_parse_cpu): Likewise.
2187         (aarch64_print_hint_for_extensions): New function.
2188         (aarch64_validate_mcpu): Provide hint about invalid extension.
2189         (aarch64_validate_march): Likewise.
2190         (aarch64_handle_attr_arch): Pass new argument.
2191         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2192         (aarch64_handle_attr_isa_flags): Likewise.
2194 2018-10-31  Richard Biener  <rguenther@suse.de>
2196         PR middle-end/70359
2197         PR middle-end/86270
2198         * tree-outof-ssa.c (insert_backedge_copies): Restrict
2199         copy generation to useful cases.  Place the copy before
2200         the definition of the backedge value when possible.
2202 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2204         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2205         * config/arc/arc.c (arc_active_insn): New function.
2206         (check_store_cacheline_hazard): Likewise.
2207         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2208         (arc_override_options): Disable delay slot scheduler for older
2209         A7.
2210         (arc_store_addr_hazard_p): New implementation, old one renamed to
2211         ...
2212         (arc_store_addr_hazard_internal_p): Renamed.
2213         (arc_reorg): Don't combine into brcc instructions which are part
2214         of hardware hazard solution.
2215         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2216         (tune_arc700): Likewise.
2217         * config/arc/arc.opt (arc7xx): New tune value.
2218         * config/arc/arc700.md: Improve A7 scheduler.
2220 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2222         * config/arc/arc.c (arc_override_options): Remove
2223         TARGET_COMPACT_CASESI.
2224         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2225         (CASE_VECTOR_MODE): Likewise.
2226         (CASE_VECTOR_PC_RELATIVE): Likewise.
2227         (CASE_VECTOR_SHORTEN_MODE): Likewise.
2228         (CASE_VECTOR_SHORTEN_MODE1): Delete.
2229         (ADDR_VEC_ALIGN): Update.
2230         (ASM_OUTPUT_CASE_LABEL): Undefine.
2231         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2232         (TARGET_BI_BIH): Define.
2233         (DEFAULT_BRANCH_INDEX): Likewise.
2234         * config/arc/arc.md (casesi): Rework to accept BI/BIH
2235         instructions, remove compact_casesi use case.
2236         (casesi_compact_jump): Remove.
2237         (casesi_dispatch): New pattern.
2238         * config/arc/arc.opt: Add mbranch-index option. Deprecate
2239         compact_casesi option.
2240         * doc/invoke.texi: Document mbranch-index option.
2242 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2244         * config/arc/arc.c (arc_get_tp): Remove function.
2245         (arc_emit_call_tls_get_addr): Likewise.
2246         (arc_call_tls_get_addr): New function.
2247         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2248         * config/arc/arc.md (tls_load_tp_soft): Remove.
2249         (tls_gd_get_addr): Likewise.
2251 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2253         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2254         (mulsi3_600_lib): Remove pattern.
2255         (umulsi3_highpart_600_lib_le): Likewise.
2256         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2257         (umulsidi3): Remove call to umulsidi3_600_lib.
2258         (umulsidi3_600_lib): Remove pattern.
2259         (peephole2): Remove peephole using the above deprecated patterns.
2261 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2263         PR target/87374
2264         * config/arm/arm.c (arm_option_check_internal): Disable the combined
2265         use of -mslow-flash-data and -mword-relocations.
2266         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2267         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2268         flag_pic.
2269         * doc/invoke.texi (-mword-relocations): Mention conflict with
2270         -mslow-flash-data.
2271         (-mslow-flash-data): Reciprocally.
2273 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2275         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2276         16-byte modes held in GP registers to use an even regno.
2278         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2279         (aarch64_atomic_ldop_supported_p): Remove.
2280         (aarch64_gen_atomic_ldop): Remove.
2281         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2282         Fully expand LSE operations here.
2283         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2284         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2285         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2286         and use ATOMIC_LDOP instead; use register_operand for the input;
2287         drop the split and emit insns directly.
2288         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2289         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2290         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2292         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2293         (aarch64_gen_atomic_ldop): Don't call it.
2294         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2295         Use aarch64_reg_or_zero.
2296         (aarch64_atomic_exchange<ALLI>): Likewise.
2297         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2298         operand 0; use aarch64_reg_or_zero for input; merge ...
2299         (@aarch64_atomic_swp<ALLI>): ... this and remove.
2301         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2302         (aarch64_split_compare_and_swap): Use it.
2303         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
2304         test oldval against the proper predicate.
2305         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2306         Use nonmemory_operand for expected.
2307         (cas_short_expected_pred): New.
2308         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2309         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2310         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2311         (aarch64_plushi_operand): New.
2313         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2314         Force oldval into the rval register for TARGET_LSE; emit the compare
2315         during initial expansion so that it may be deleted if unused.
2316         (aarch64_gen_atomic_cas): Remove.
2317         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2318         Change =&r to +r for operand 0; use match_dup for operand 2;
2319         remove is_weak and mod_f operands as unused.  Drop the split
2320         and merge with...
2321         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2322         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2323         (@aarch64_atomic_cas<GPI>): Similarly.
2325 2018-10-31  Richard Biener  <rguenther@suse.de>
2327         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2328         using ABSU_EXPR.
2330 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2332         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2333         * config/aarch64/aarch64.md: Include saphira.md
2334         * config/aarch64/saphira.md: New file for pipeline description.
2336 2018-10-30  Martin Sebor  <msebor@redhat.com>
2338         PR middle-end/87041
2339         * gimple-ssa-sprintf.c (format_directive): Use %G to include
2340         inlining context.
2341         (sprintf_dom_walker::compute_format_length):
2342         Avoid setting POSUNDER4K here.
2343         (get_destination_size): Handle null argument values.
2344         (get_user_idx_format): New function.
2345         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2346         functions, including user-defined with attribute format printf.
2347         Use %G to include inlining context.
2348         Set POSUNDER4K here.
2350 2018-10-30  Jan Hubicka  <jh@suse.cz>
2352         * params.def (lto-partitions): Bump from 32 to 128.
2354 2018-10-30  Jan Hubicka  <jh@suse.cz>
2356         * tree.c
2357         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2358         head in file.
2359         (free_lang_data_in_type): Forward declare.
2360         (fld_type_variant_equal_p): New function.
2361         (fld_type_variant): New function
2362         (fld_incomplete_types): New hash.
2363         (fld_incomplete_type_of): New function
2364         (fld_simplfied-type): New function.
2365         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2366         (free_lang_data): Allocate and free fld_incomplete_type; update call
2367         of free_lang_data_in_decl.
2369 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
2371         * gcov.c (output_lines): Remove duplicate line.
2373 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
2375         * config/rs6000/rs6000.md (bswapdi2): Force address into register
2376         if not in indexed or indirect form.
2377         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2378         (bswapdi2_store): Ditto.
2379         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2380         helper function.
2381         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2382         Prototype for helper function.
2384 2018-10-30  Martin Sebor  <msebor@redhat.com>
2386         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2387         (target, pragma GCC optimize, pragma GCC target): Ditto.
2389 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
2391         * doc/extend.texi: Fix prototype and description of
2392         __builtin_expect_with_probability.
2394 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
2396         * cgraph.h (clone_function_name_1): Replaced by new
2397           clone_function_name_numbered that takes name as string; for
2398           privatize_symbol_name_1 use only.
2399           (clone_function_name): Renamed to
2400           clone_function_name_numbered to be explicit about numbering.
2401           (clone_function_name): New two-argument function that does
2402           not number its output.
2403           (clone_function_name): New three-argument function that
2404           takes a number to append to its output.
2405         * cgraphclones.c (duplicate_thunk_for_node):
2406           (clone_function_name_1): Renamed.
2407           (clone_function_name_numbered): Two new functions.
2408           (clone_function_name): Improved documentation.
2409           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2410         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2411         * final.c (final_scan_insn_1): Use the new clone_function_name
2412           without numbering.
2413         * multiple_target.c (create_dispatcher_calls): Ditto.
2414           (create_target_clone): Ditto.
2415         * omp-expand.c (grid_expand_target_grid_body): Ditto.
2416         * omp-low.c (create_omp_child_function_name): Ditto.
2417         * omp-simd-clone.c (simd_clone_create): Ditto.
2418         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2419           new clone_function_name without numbering.
2421 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
2423         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2424         Assert that the allocation size is not zero.
2426 2018-10-30  Richard Biener  <rguenther@suse.de>
2428         PR tree-optimization/87800
2429         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2430         non-induction or reduction PHIs.
2432 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2434         * config/aarch64/falkor-tag-collision-avoidance.c
2435         (execute_tag_collision_avoidance): Call df_note_add_problem.
2437 2018-10-30  Martin Liska  <mliska@suse.cz>
2439         * doc/extend.texi: Fix typo in documentation
2440         of __builtin_expect_with_probability.
2442 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2444         PR c++/87721
2445         * input.c (get_substring_ranges_for_loc): Detect if
2446         linemap_resolve_location gives us a NULL map, and reject
2447         this case.
2449 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
2451         * config.gcc (xstormy16-*-elf): Set tm_d_file.
2453 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
2454             Martin Sebor  <msebor@redhat.com>
2455             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
2457         * doc/ux.texi (Quoting): New subsection, adapted from material at
2458         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2459         MartinSebor and ManuelLopezIbanez.
2460         (Fix-it hints): Note that fix-it hints shouldn't be marked for
2461         translation.
2463 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
2465         PR middle-end/87469
2466         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2467         max value.
2469 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
2471         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2473 2018-10-29  Paul Koning  <ni1d@arrl.net>
2475         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2477 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
2479         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2480         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2481         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2482         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2483         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2484         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2485         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2486         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2487         Change 'vector' to '__vector'.
2488         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2489         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2490         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2491         _mm_avg_pu16): Likewise.  And, whitespace corrections.
2493 2018-10-29  Richard Biener  <rguenther@suse.de>
2495         PR tree-optimization/87785
2496         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2497         internal defs.
2499 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2501         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2503 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2505         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2506         ports configuration macro, defaults to "gnu".
2507         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2508         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2510 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2512         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2514 2018-10-29  Richard Biener  <rguenther@suse.de>
2516         PR tree-optimization/87790
2517         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2518         (vect_make_slp_decision): Adjust.
2519         (vect_slp_analyze_bb_1): Likewise.
2520         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2521         edges.
2523 2018-10-29  Richard Biener  <rguenther@suse.de>
2525         PR tree-optimization/87785
2526         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2527         and processing.
2528         (vect_build_slp_tree): Likewise.
2529         (vect_gather_slp_loads): New function.
2530         (vect_analyze_slp_instance): Gather loads separately from the
2531         SLP tree build.
2533 2018-10-29  Martin Liska  <mliska@suse.cz>
2535         * Makefile.in: Make dependency to json.o.
2536         * doc/gcov.texi: Document new JSON format, remove
2537         old intermediate format documentation.
2538         * gcov.c (struct function_info): Come up with m_name and
2539         m_demangled_name.
2540         (function_info::function_info): Initialize it.
2541         (function_info::~function_info): Release it.
2542         (main): Rename flag_intermediate_format to flag_json_format.
2543         (print_usage): Describe --json-format.
2544         (process_args): Set flag_json_format.
2545         (output_intermediate_line): Remove.
2546         (output_intermediate_json_line): Likewise.
2547         (get_gcov_intermediate_filename): Return new extension
2548         ".gcov.json.gz".
2549         (output_intermediate_file): Implement JSON emission.
2550         (output_json_intermediate_file): Implement JSON emission.
2551         (generate_results): Use ::get_name for function name.
2552         Handle JSON output file.
2553         (read_graph_file): Use ::get_name instead of cplus_demangle.
2554         (read_count_file): Likewise.
2555         (solve_flow_graph): Likewise.
2556         (add_line_counts): Likewise.
2557         (accumulate_line_counts): Use new flag_json_format.
2558         (output_function_details): Use ::get_name instead of cplus_demangle.
2559         (output_lines): Likewise.
2560         * json.cc (test_writing_literals): Add new tests.
2561         * json.h (class literal): Add new boolean constructor.
2563 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
2565         PR rtl-optimization/87701
2566         PR rtl-optimization/87780
2567         * combine.c (make_more_copies): Rewrite.
2569 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
2571         * doc/generic.texi (ABSU_EXPR): Document.
2572         * match.pd (absu(x)*absu(x) -> x*x): Handle.
2573         (absu(absu(X)) -> absu(X)): Likewise.
2574         (absu(-X) -> absu(X)): Likewise.
2575         (absu(X)  where X is nonnegative -> X): Likewise.
2577 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
2579         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2580         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2581         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2582         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2583         (s-tm-texi): Also check timestamp on d-target.def.
2584         (generated_files): Add TM_D_H and d-target-hooks-def.h.
2585         (build/genhooks.o): Also depend on D_TARGET_DEF.
2586         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2587         variables.
2588         * config/aarch64/aarch64-d.c: New file.
2589         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2590         Define.
2591         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2592         prototype.
2593         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2594         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2595         * config/arm/arm-d.c: New file.
2596         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2597         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2598         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2599         * config/arm/t-arm (arm-d.o): New rule.
2600         * config/default-d.c: New file.
2601         * config/glibc-d.c: New file.
2602         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2603         * config/i386/i386-d.c: New file.
2604         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2605         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2606         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2607         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2608         * config/i386/t-i386 (i386-d.o): New rule.
2609         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2610         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2611         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2612         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2613         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2614         * config/mips/mips-d.c: New file.
2615         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2616         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2617         * config/mips/t-mips (mips-d.o): New rule.
2618         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2619         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2620         * config/powerpcspe/powerpcspe-d.c: New file.
2621         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2622         New prototype.
2623         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2624         Support GNU D by using 0 as the language type.
2625         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2626         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2627         * config/riscv/riscv-d.c: New file.
2628         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2629         prototype.
2630         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2631         * config/riscv/t-riscv (riscv-d.o): New rule.
2632         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2633         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2634         * config/rs6000/rs6000-d.c: New file.
2635         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2636         prototype.
2637         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2638         Support GNU D by using 0 as the language type.
2639         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2640         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2641         * config/s390/s390-d.c: New file.
2642         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2643         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2644         * config/s390/t-s390 (s390-d.o): New rule.
2645         * config/sparc/sparc-d.c: New file.
2646         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2647         prototype.
2648         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2649         * config/sparc/t-sparc (sparc-d.o): New rule.
2650         * config/t-glibc (glibc-d.o): New rule.
2651         * configure: Regenerated.
2652         * configure.ac (tm_d_file): New variable.
2653         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2654         * doc/contrib.texi (Contributors): Add self for the D frontend.
2655         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2656         * doc/install.texi (Configuration): Mention libphobos as an option for
2657         --enable-shared.  Mention d as an option for --enable-languages.
2658         (Testing): Mention check-d as a target.
2659         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2660         name suffixes.  Mention d as a -x option.
2661         * doc/sourcebuild.texi (Top Level): Mention libphobos.
2662         * doc/standards.texi (Standards): Add section on D language.
2663         * doc/tm.texi: Regenerated.
2664         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2665         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2666         * dwarf2out.c (is_dlang): New function.
2667         (gen_compile_unit_die): Use DW_LANG_D for D.
2668         (declare_in_namespace): Return module die for D, instead of adding
2669         extra declarations into the namespace.
2670         (gen_namespace_die): Generate DW_TAG_module for D.
2671         (gen_decl_die): Handle CONST_DECLSs for D.
2672         (dwarf2out_decl): Likewise.
2673         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2674         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2675         kinds of aggregates.
2676         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2677         * genhooks.c: Include d/d-target.def.
2679 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
2681         PR target/85669
2682         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2683         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2684         (STACK_DYNAMIC_OFFSET): Likewise.
2686 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
2688         PR target/80024
2689         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2690         error message.
2692 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
2694         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2695         return type and other typos.
2697 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2699         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2700         a shorter sequence with fewer branches.
2701         (emit_final_str_compare_gpr): Ditto.
2703 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2705         * config/rs6000/tmmintrin.h: New file.
2706         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2708 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2710         * config/rs6000/mmintrin.h: Enable 32bit compilation.
2711         * config/rs6000/xmmintrin.h: Likewise.
2713 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2715         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2717 2018-10-26  Richard Biener  <rguenther@suse.de>
2719         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2720         and wrapper.
2721         (vect_mark_slp_stmts_relevant): Likewise.
2722         (vect_detect_hybrid_slp_stmts): Likewise.
2723         (vect_bb_slp_scalar_cost): Likewise.
2724         (vect_remove_slp_scalar_calls): Likewise.
2726 2018-10-26  Jan Hubicka  <jh@suse.cz>
2728         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2729         (warn_types_mismatch): Fix walk of DECL_NAME.
2730         (odr_types_equivalent_p): Fix overactive assert.
2732 2018-10-26  Richard Biener  <rguenther@suse.de>
2734         PR tree-optimization/87105
2735         * tree-vectorizer.h (_slp_tree::refcnt): New member.
2736         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2737         refcnt.
2738         (vect_create_new_slp_node): Initialize refcnt to one.
2739         (bst_traits): Move.
2740         (scalar_stmts_set_t, bst_fail): Remove.
2741         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2742         (vect_build_slp_tree): Add bst_map argument and lookup
2743         already created SLP nodes.
2744         (vect_print_slp_tree): Handle a SLP graph, print SLP node
2745         addresses.
2746         (vect_slp_rearrange_stmts): Handle a SLP graph.
2747         (vect_analyze_slp_instance): Adjust and free SLP nodes from
2748         the CSE map.  Fix indenting.
2749         (vect_schedule_slp_instance): Add short-cut.
2751 2018-10-26  Martin Liska  <mliska@suse.cz>
2753         PR testsuite/86158
2754         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2755         addr_expr and not with pointers.
2757 2018-10-26  Jan Hubicka  <jh@suse.cz>
2759         * tree.c (free_lang_data_in_type): Only check main variants.
2760         * ipa-devirt.c (warn_odr): Make static.
2761         (types_same_for_odr): Drop strict variant.
2762         (types_odr_comparable): Likewise.
2763         (odr_or_derived_type_p): Look for main variants.
2764         (odr_name_hasher::equal): Cleanup comment.
2765         (odr_subtypes_equivalent): Add warn and warned arguments; check main
2766         variants.
2767         (type_variants_equivalent_p): break out from ...
2768         (odr_types_equivalent): ... here; go for main variants where needed.
2769         (warn_odr): ... here; turn static.
2770         (warn_types_mismatch): Compare mangled names of main variants.
2771         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2772         (type_with_linkage_p): Sanity check that we look at main variant.
2773         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2774         * tree.h (types_same_for_odr): Drop strict argument.
2776 2018-10-26  Richard Biener  <rguenther@suse.de>
2778         PR tree-optimization/87746
2779         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2780         Simplify and fix WRT strided store groups with size not
2781         equal to step in element count.
2782         (vect_analyze_group_access_1): Dump the whole group.
2784 2018-10-25  Carl Love  <cel@us.ibm.com>
2786         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2787         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2788         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
2789         precicion entry for each overloaded builtin.
2790         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2791         VSCEDPUO): Rename overloaded name.
2792         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2793         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2794         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2795         define_expand for xscmpexqp instruction.
2796         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2798 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2799             Jinsong Ji <jji@us.ibm.com>
2801         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2802         function with vec_sl.
2803         (_mm_slli_epi32): Likewise.
2804         (_mm_slli_epi64): Likewise.
2805         (_mm_srai_epi16): Replace deprecated function with vec_sra.
2806         (_mm_srai_epi32): Likewise.
2807         (_mm_srli_epi16): Replace deprecated function with vec_sr.
2808         (_mm_srli_epi32): Likewise.
2809         (_mm_srli_epi64): Likewise.
2810         (_mm_sll_epi16): Replace deprecated function with vec_sl.
2811         (_mm_sll_epi32): Likewise.
2812         (_mm_sll_epi64): Likewise.
2813         (_mm_sra_epi16): Replace deprecated function with vec_sra.
2814         (_mm_sra_epi32): Likewise.
2815         (_mm_srl_epi16): Replace deprecated function with vec_sr.
2816         (_mm_srl_epi32): Likewise.
2817         (_mm_srl_epi64): Likewise.
2819 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2820             Jinsong Ji <jji@us.ibm.com>
2822         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2823         comparison operators with vec_cmp* for compatibility due to
2824         unfortunate history; clean up formatting and use types more
2825         appropriately.
2826         (_mm_sll_epi32): Likewise.
2827         (_mm_sll_epi64): Likewise.
2828         (_mm_srl_epi16): Likewise.
2829         (_mm_srl_epi32): Likewise.
2830         (_mm_srl_epi64): Likewise.
2832 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2833             Jinsong Ji <jji@us.ibm.com>
2835         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2836         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2837         __vector __bool int.  Use vec_cmpgt in preference to deprecated
2838         function vec_vcmpgtfp.
2839         (_mm_max_ps): Likewise.
2841 2018-10-25  Jeff Law  <law@redhat.com>
2843         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2844         if returning false.
2846 2018-10-25  Martin Sebor  <msebor@redhat.com>
2848         * doc/extend.texi (aligned): Expand attribute description.
2849         (Alignment): Rename section.  Discuss function arguments.
2851 2018-10-25  Jan Hubicka  <jh@suse.cz>
2853         * ipa-devirt.c (main_odr_variant): Remove.
2854         (hash_odr_name, types_same_for_odr, types_odr_comparable,
2855         odr_name_hasher::equal, odr_subtypes_equivalent_p):
2856         Drop use of main_odr_variant.
2857         (add_type_duplicate): Silence confused warnings on integer types.
2858         (get_odr_type): Always look for main variant.
2859         (register_odr_type): Simplify.
2861 2018-10-25  Richard Biener  <rguenther@suse.de>
2863         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2864         Initialize ng to silence error with release checking bootstrap.
2866 2018-10-25  Richard Biener  <rguenther@suse.de>
2868         * tree-if-conv.c: Include tree-ssa-sccvn.h.
2869         (tree_if_conversion): Run CSE on the if-converted loop body.
2871 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2873         * config/s390/constraints.md (ZL): New constraint.
2874         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2875         operands.
2876         * config/s390/s390.md (movdi_larl): Remove.
2877         (movdi_64): Add the LARL alternative.
2879 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2881         PR bootstrap/87747
2882         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2883         (RTX_CODE_HWINT_P): New macro.
2884         (rtx_code_size): Use RTX_CODE_HWINT_P ().
2886 2018-10-25  Jan Hubicka  <jh@suse.cz>
2888         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2889         is anonymous.
2891 2018-10-25  Richard Biener  <rguenther@suse.de>
2893         PR tree-optimization/87665
2894         PR tree-optimization/87745
2895         * tree-vectorizer.h (get_earlier_stmt): Remove.
2896         (get_later_stmt): Pick up UID from the original non-pattern stmt.
2898 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
2900         * options.texi (Deprecated): Move list to Var section.
2902 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
2903             Jinsong Ji <jji@us.ibm.com>
2905         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2906         __vector long to __vector long long.
2907         (_mm_cvtpd_ps): Likewise.
2908         (_mm_cvttpd_epi32): Likewise.
2909         (_mm_cvtpi32_pd): Likewise.
2910         (_mm_unpackhi_epi64): Likewise.
2911         (_mm_unpacklo_epi64): Likewise.
2913 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
2915         PR rtl-optimization/87720
2916         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2918 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
2920         * gimple-ssa-isolate-paths.c
2921         (find_implicit_erroneous_behavior): Do not change code if the
2922         pass is running for warnings only.
2923         (find_explicit_erroneous_behavior): Likewise.
2925 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
2927         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2928         Define as rs6000_mangle_decl_assembler_name.
2929         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2930         long double to IEEE long double, switch the names of the long
2931         double built-in functions to be <func>f128 instead of <func>l.
2933 2018-10-24  Martin Sebor  <msebor@redhat.com>
2935         * doc/extend.texi (nonnull): List no-argument form.  Reference
2936         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2938 2018-10-24  Richard Biener  <rguenther@suse.de>
2940         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2942 2018-10-24  Martin Liska  <mliska@suse.cz>
2944         PR tree-optimization/84436
2945         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2946         Remove.
2947         (switch_conversion::contains_linear_function_p): New.
2948         (switch_conversion::build_one_array): Support linear
2949         transformation on input.
2950         * tree-switch-conversion.h (struct switch_conversion): Add
2951         contains_linear_function_p declaration.
2953 2018-10-24  Richard Biener  <rguenther@suse.de>
2955         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2956         if its argument is CONSTANT_CLASS_P.
2958 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
2960         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
2961         it is wrong for forward declarations.
2963 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2965         * config/s390/s390.c (s390_check_qrst_address): Add the missing
2966         SYMBOL_REF_P () check.
2968 2018-10-24  Richard Biener  <rguenther@suse.de>
2970         PR tree-optimization/87105
2971         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
2972         dump classification.
2973         (vect_analyze_data_ref_accesses): Handle duplicate loads and
2974         stores by splitting the affected group after the fact.
2975         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
2976         fail the SLP build because of size constraints.
2978 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2980         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
2981         * configure: Regenerate.
2982         * config.in: Regenerate.
2983         * varasm.c (mergeable_string_section): Use readonly_data_section
2984         if linker doesn't support SHF_MERGE with alignment > 8.
2985         (mergeable_constant_section): Likewise.
2987 2018-10-24  Richard Biener  <rguenther@suse.de>
2989         PR tree-optimization/84013
2990         * tree-ssa-structalias.c (struct msdi_data): New struct for
2991         marshalling data to walk_stmt_load_store_ops.
2992         (maybe_set_dependence_info): Refactor as callback for
2993         walk_stmt_load_store_ops.
2994         (compute_dependence_clique): Set restrict info on all stmt kinds.
2996 2018-10-24  Martin Liska  <mliska@suse.cz>
2998         * cgraph.c (cgraph_node::dump):
2999         Remove reduntant dumps and make tp_first_run dump more compact.
3001 2018-10-24  Richard Biener  <rguenther@suse.de>
3003         PR tree-optimization/87665
3004         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3005         to reflect reality.
3007 2018-10-12  Jeff Law  <law@redhat.com>
3009         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3010         for H8/S.
3012 2018-10-23  Richard Biener  <rguenther@suse.de>
3014         * tree-vrp.c (add_assert_info): Guard dump_printf with
3015         dump_enabled_p.
3016         * gimple-ssa-evrp-analyze.c
3017         (evrp_range_analyzer::record_ranges_from_incoming_edge):
3018         Use value_range::ignore_equivs_equal_p.
3020 2018-10-23  Richard Biener  <rguenther@suse.de>
3022         PR tree-optimization/87105
3023         PR tree-optimization/87608
3024         * passes.def (pass_all_early_optimizations): Add early phi-opt
3025         after dce.
3026         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3027         addition to debug stmts.
3028         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3029         and abs replacement early.
3030         * tree-cfg.c (gimple_empty_block_p): Likewise.
3032 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
3034         PR target/86383
3035         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3036         specified to configure.
3037         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3039 2018-10-23  Richard Biener  <rguenther@suse.de>
3041         PR tree-optimization/87700
3042         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3044 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
3046         PR target/87674
3047         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3048         second argument from __mmask16 to __mmask8.
3049         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3050         _mm_mask_packs_epi32): Likewise.
3051         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3052         Likewise.
3053         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
3055 2018-10-23  Richard Biener  <rguenther@suse.de>
3057         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3059 2018-10-23  Richard Biener  <rguenther@suse.de>
3061         PR tree-optimization/86144
3062         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3063         over simd attribute.
3065 2018-10-23  Richard Biener  <rguenther@suse.de>
3067         PR tree-optimization/87693
3068         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3069         the case we do not find the taken edge.
3071 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
3072             Jinsong Ji  <jji@us.ibm.com>
3074         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3075         (_mm_store_pd): Use unaligned vector type for pointer cast.
3076         (_mm_maskmoveu_si128): Likewise.
3077         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3078         (_mm_store_ps): Use unaligned vector type for pointer cast.
3080 2018-10-22  Paul Koning  <ni1d@arrl.net>
3082         * symtab.c (symtab_node::increase_alignment): Correct max
3083         alignment check.
3085 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
3087         PR tree-optimization/87633
3088         * match.pd: Do not generate unordered integer comparisons.
3090 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3092         PR rtl-optimization/87600
3093         * combine.c: Add include of expr.h.
3094         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3095         register to a pseudo.
3096         (make_more_copies): New function, add a copy to a new pseudo after
3097         the moves from hard registers into pseudos.
3098         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3099         later.  Call make_more_copies.
3101 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
3103         * lra-constraints.c (process_alt_operands): New local array,
3104         matching_early_clobber.  Check matching_early_clobber before
3105         decrementing reject, and set matching_early_clobber after.
3107 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3109         PR target/87598
3110         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3111         call output_addr_const and hope for the best.
3113 2018-10-22  Richard Biener  <rguenther@suse.de>
3115         * gimple-ssa-evrp-analyze.c
3116         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3117         smarter about what ranges to use.
3118         * tree-vrp.c (add_assert_info): Dump here.
3119         (register_edge_assert_for_2): Instead of here at multiple but
3120         not all places.
3122         * gcc.dg/tree-ssa/evrp12.c: New testcase.
3123         * gcc.dg/predict-6.c: Adjust.
3124         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3125         * gcc.dg/tree-ssa/vrp02.c: Likewise.
3126         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3128 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
3129         Richard Biener  <rguenther@suse.de>
3131         * bitmap.h: Update data structure documentation, including a
3132         description of bitmap views as either linked-lists or splay trees.
3133         (struct bitmap_element_def): Update comments for splay tree bitmaps.
3134         (struct bitmap_head_def): Likewise.
3135         (bitmap_list_view, bitmap_tree_view): New prototypes.
3136         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3137         tree_form fields.
3138         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3139         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3140         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3141         released bitmap element here.
3142         (bitmap_element_free): Remove.
3143         (bitmap_elt_clear_from): Work on splay tree bitmaps.
3144         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
3145         this function similar ones such that linked-list bitmap implementation
3146         functions are grouped.
3147         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3148         and moved for grouping.
3149         (bitmap_list_insert_element_after): Renamed from
3150         bitmap_elt_insert_after, and moved for grouping.
3151         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3152         (bitmap_tree_link_left, bitmap_tree_link_right,
3153         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3154         bitmap_tree_link_element, bitmap_tree_unlink_element,
3155         bitmap_tree_find_element): New functions for splay-tree bitmap
3156         implementation.
3157         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3158         Renamed and moved, see above entries.
3159         (bitmap_tree_listify_from): New function to convert part of a splay
3160         tree bitmap to a linked-list bitmap.
3161         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3162         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3163         (bitmap_find_bit): Remove.
3164         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3165         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3166         Handle splay tree bitmaps.
3167         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3168         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3169         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3170         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3171         bitmap_intersect_compl_p, bitmap_ior_and_compl,
3172         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3173         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
3174         corresponding changes to use linked-list specific bitmap_element
3175         manipulation functions as applicable for efficiency.
3176         (bitmap_tree_to_vec): New function.
3177         (debug_bitmap_elt_file): New function split out from ...
3178         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
3179         (bitmap_print): Likewise.
3181         PR tree-optimization/63155
3182         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3183         SSA edge worklists.
3184         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3185         in tree-view.
3187 2018-10-22  Martin Liska  <mliska@suse.cz>
3189         PR tree-optimization/87686
3190         Revert
3191         2018-08-29  Martin Liska  <mliska@suse.cz>
3193         * tree-switch-conversion.c (switch_conversion::expand):
3194         Strenghten assumption about gswitch statements.
3196 2018-10-22  Martin Liska  <mliska@suse.cz>
3198         * ipa-icf.c (sem_item::compare_attributes): Remove.
3199         (sem_item::compare_referenced_symbol_properties): Use
3200         attribute_list_equal instead.
3201         (sem_function::equals_wpa): Likewise.
3202         * ipa-icf.h: Remove compare_attributes.
3204 2018-10-22  Richard Biener  <rguenther@suse.de>
3206         PR middle-end/87682
3207         * mem-stats.h (mem_usage::operator==): Fix pasto.
3209 2018-10-22  Richard Biener  <rguenther@suse.de>
3211         PR tree-optimization/87640
3212         * tree-vrp.c (set_value_range_with_overflow): Decompose
3213         incomplete result.
3214         (extract_range_from_binary_expr_1): Adjust.
3216 2018-10-22  Martin Jambor  <mjambor@suse.cz>
3218         * tree-eh.h (stmt_could_throw_p): Add function parameter.
3219         (stmt_can_throw_external): Likewise.
3220         (stmt_can_throw_internal): Likewise.
3221         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3222         (lower_eh_constructs_2): Likewise.
3223         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3224         (stmt_can_throw_external): Likewise.
3225         (stmt_can_throw_internal): Likewise.
3226         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3227         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3228         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3229         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3230         (pass_lower_eh_dispatch::execute): Pass cfun to
3231         stmt_can_throw_external.
3232         (cleanup_empty_eh): Likewise.
3233         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3234         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3235         stmt_can_throw_external instead of pushing it to cfun.
3236         (symbol_table::create_edge): Likewise.
3237         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3238         stmt_can_throw_internal.
3239         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3240         to stmt_could_throw_p.
3241         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3242         stmt_can_throw_internal.
3243         (pass_store_merging::execute): Likewise.
3244         * gimple-ssa-strength-reduction.c
3245         (find_candidates_dom_walker::before_dom_children): Pass cfun to
3246         stmt_could_throw_p.
3247         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3248         stmt_can_throw_internal.
3249         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3250         to stmt_can_throw_external.
3251         (check_stmt): Pass cfun to stmt_could_throw_p.
3252         (check_stmt): Pass cfun to stmt_can_throw_external.
3253         (pass_nothrow::execute): Likewise.
3254         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3255         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3256         stmt_can_throw_internal.
3257         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3258         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3259         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3260         * tree-complex.c (expand_complex_libcall): Pass cfun to
3261         stmt_could_throw_p and to stmt_can_throw_internal.
3262         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3263         * tree-inline.c (copy_edges_for_bb): Likewise.
3264         (maybe_move_debug_stmts_to_successors): Likewise.
3265         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3266         stmt_could_throw_p.
3267         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3268         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3269         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3270         stmt_can_throw_internal.
3271         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3272         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3273         stmt_could_throw_p.
3274         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3275         stmt_can_throw_internal.
3276         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3277         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3278         stmt_could_throw_p.
3279         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3280         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3281         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3282         (convert_mult_to_fma_1): Likewise.
3283         (convert_to_divmod): Likewise.
3284         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3285         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3286         * tree-ssa-propagate.c
3287         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3288         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3289         (maybe_optimize_range_tests): Likewise.
3290         (linearize_expr_tree): Likewise.
3291         (reassociate_bb): Likewise.
3292         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3293         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3294         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3295         (handle_char_store): Likewise.
3296         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3297         stmt_can_throw_internal.
3298         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3299         stmt_could_throw_p.
3300         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3301         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3302         (vectorizable_simd_clone_call): Likewise.
3303         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3304         (gimple_stringop_fixed_value): Likewise.
3306 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
3308         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3309         literal pool references.
3310         (s390_check_qrst_address): Adapt to the new behavior of
3311         s390_loadrelative_operand_p ().
3313 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3315         PR target/72782
3316         * config/i386/sse.md (*andnot<mode>3_bcst): New.
3318 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3320         PR target/72782
3321         * config/i386/sse.md (*<code><mode>3_bcst): New.
3323 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3325         PR target/72782
3326         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3327         V4DI, V16SI and V8DI.
3328         (*sub<mode>3<mask_name>_bcst): New.
3329         (*add<mode>3<mask_name>_bcst): Likewise.
3331 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
3332             Jinsong Ji  <jji@us.ibm.com>
3334         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3335         __m64 with __vector unsigned long long for compatibility.
3336         (_mm_movemask_epi8): Likewise.
3337         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3338         (_mm_cvttps_pi32): Likewise.
3339         (_mm_cvtpi32_ps): Likewise.
3340         (_mm_cvtps_pi16): Likewise.
3341         (_mm_loadh_pi): Likewise.
3342         (_mm_storeh_pi): Likewise.
3343         (_mm_movehl_ps): Likewise.
3344         (_mm_movelh_ps): Likewise.
3345         (_mm_loadl_pi): Likewise.
3346         (_mm_storel_pi): Likewise.
3347         (_mm_movemask_ps): Likewise.
3348         (_mm_shuffle_pi16): Likewise.
3350 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3352         PR target/72782
3353         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3354         __builtin_ia32_vfnmsubpd512_mask.
3355         (_mm512_mask_fnmsub_round_pd): Likewise.
3356         (_mm512_fnmsub_pd): Likewise.
3357         (_mm512_mask_fnmsub_pd): Likewise.
3358         (_mm512_maskz_fnmsub_round_pd): Use
3359         __builtin_ia32_vfnmsubpd512_maskz.
3360         (_mm512_maskz_fnmsub_pd): Likewise.
3361         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3362         (_mm512_mask_fnmsub_round_ps): Likewise.
3363         (_mm512_fnmsub_ps): Likewise.
3364         (_mm512_mask_fnmsub_ps): Likewise.
3365         (_mm512_maskz_fnmsub_round_ps): Use
3366         __builtin_ia32_vfnmsubps512_maskz.
3367         (_mm512_maskz_fnmsub_ps): Likewise.
3368         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3369         __builtin_ia32_vfnmsubpd256_mask.
3370         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3371         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3372         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3373         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3374         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3375         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3376         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3377         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3378         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3379         __builtin_ia32_vfnmsubpd.
3380         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3381         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3382         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3383         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3384         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3385         * config/i386/i386-builtin.def: Add
3386         __builtin_ia32_vfnmsubpd256_mask,
3387         __builtin_ia32_vfnmsubpd256_maskz,
3388         __builtin_ia32_vfnmsubpd128_mask,
3389         __builtin_ia32_vfnmsubpd128_maskz,
3390         __builtin_ia32_vfnmsubps256_mask,
3391         __builtin_ia32_vfnmsubps256_maskz,
3392         __builtin_ia32_vfnmsubps128_mask,
3393         __builtin_ia32_vfnmsubps128_maskz,
3394         __builtin_ia32_vfnmsubpd512_mask,
3395         __builtin_ia32_vfnmsubpd512_maskz,
3396         __builtin_ia32_vfnmsubps512_mask,
3397         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3398         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3399         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3400         __builtin_ia32_vfnmsubpd256.
3401         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3402         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3403         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3404         Likewise.
3405         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3406         Likewise.
3407         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3408         Likewise.
3409         (fmai_vmfnmsub_<mode><round_name>): Likewise.
3411 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3413         PR target/72782
3414         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3415         __builtin_ia32_vfnmaddpd512_mask.
3416         (_mm512_mask_fnmadd_round_pd): Likewise.
3417         (_mm512_fnmadd_pd): Likewise.
3418         (_mm512_mask_fnmadd_pd): Likewise.
3419         (_mm512_maskz_fnmadd_round_pd): Use
3420         __builtin_ia32_vfnmaddpd512_maskz.
3421         (_mm512_maskz_fnmadd_pd): Likewise.
3422         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3423         (_mm512_mask_fnmadd_round_ps): Likewise.
3424         (_mm512_fnmadd_ps): Likewise.
3425         (_mm512_mask_fnmadd_ps): Likewise.
3426         (_mm512_maskz_fnmadd_round_ps): Use
3427         __builtin_ia32_vfnmaddps512_maskz.
3428         (_mm512_maskz_fnmadd_ps): Likewise.
3429         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3430         __builtin_ia32_vfnmaddpd256_mask.
3431         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3432         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3433         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3434         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3435         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3436         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3437         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3438         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3439         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3440         __builtin_ia32_vfnmaddpd.
3441         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3442         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3443         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3444         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3445         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3446         * config/i386/i386-builtin.def: Add
3447         __builtin_ia32_vfnmaddpd256_mask,
3448         __builtin_ia32_vfnmaddpd256_maskz,
3449         __builtin_ia32_vfnmaddpd128_mask,
3450         __builtin_ia32_vfnmaddpd128_maskz,
3451         __builtin_ia32_vfnmaddps256_mask,
3452         __builtin_ia32_vfnmaddps256_maskz,
3453         __builtin_ia32_vfnmaddps128_mask,
3454         __builtin_ia32_vfnmaddps128_maskz,
3455         __builtin_ia32_vfnmaddpd512_mask,
3456         __builtin_ia32_vfnmaddpd512_maskz,
3457         __builtin_ia32_vfnmaddps512_mask,
3458         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3459         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3460         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3461         __builtin_ia32_vfnmaddpd256.
3462         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3463         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3464         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3465         Likewise.
3466         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3467         Likewise.
3468         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3469         Likewise.
3470         (fmai_vmfnmadd_<mode><round_name>): Likewise.
3472 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3474         PR target/72782
3475         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3476         __builtin_ia32_vfmsubpd512_mask.
3477         (_mm512_mask_fmsub_round_pd): Likewise.
3478         (_mm512_fmsub_pd): Likewise.
3479         (_mm512_mask_fmsub_pd): Likewise.
3480         (_mm512_maskz_fmsub_round_pd): Use
3481         __builtin_ia32_vfmsubpd512_maskz.
3482         (_mm512_maskz_fmsub_pd): Likewise.
3483         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3484         (_mm512_mask_fmsub_round_ps): Likewise.
3485         (_mm512_fmsub_ps): Likewise.
3486         (_mm512_mask_fmsub_ps): Likewise.
3487         (_mm512_maskz_fmsub_round_ps): Use
3488         __builtin_ia32_vfmsubps512_maskz.
3489         (_mm512_maskz_fmsub_ps): Likewise.
3490         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3491         __builtin_ia32_vfmsubpd256_mask.
3492         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3493         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3494         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3495         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3496         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3497         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3498         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3499         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3500         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3501         __builtin_ia32_vfmsubpd.
3502         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3503         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3504         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3505         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3506         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3507         * config/i386/i386-builtin.def: Add
3508         __builtin_ia32_vfmsubpd256_mask,
3509         __builtin_ia32_vfmsubpd256_maskz,
3510         __builtin_ia32_vfmsubpd128_mask,
3511         __builtin_ia32_vfmsubpd128_maskz,
3512         __builtin_ia32_vfmsubps256_mask,
3513         __builtin_ia32_vfmsubps256_maskz,
3514         __builtin_ia32_vfmsubps128_mask,
3515         __builtin_ia32_vfmsubps128_maskz,
3516         __builtin_ia32_vfmsubpd512_mask,
3517         __builtin_ia32_vfmsubpd512_maskz,
3518         __builtin_ia32_vfmsubps512_mask,
3519         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3520         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3521         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3522         __builtin_ia32_vfmsubpd256.
3523         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3524         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3525         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3526         Likewise.
3527         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3528         Likewise.
3529         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3530         Likewise.
3531         (fmai_vmfmsub_<mode><round_name>): Likewise.
3533 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3535         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3536         Remove plus.  Renamed to ...
3537         (*sub<mode>3<mask_name>_bcst): This.
3538         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3539         (*add<mode>3<mask_name>_bcst): This.
3541 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3543         PR target/72782
3544         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3546 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3548         PR target/87662
3549         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3550         (_mm_or_epi32): Likewise.
3551         (_mm256_xor_epi32): Likewise.
3552         (_mm_xor_epi32): Likewise.
3553         (_mm256_or_epi64): Likewise.
3554         (_mm_or_epi64): Likewise.
3555         (_mm256_xor_epi64): Likewise.
3556         (_mm_xor_epi64): Likewise.
3558 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
3560         PR target/72782
3561         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3563 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
3565         PR middle-end/87647
3566         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3568 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
3570         * doc/ux.texi: Move @section directly after @node.
3572 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
3574         PR middle-end/85488
3575         PR middle-end/87649
3576         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3577         depend closely nested inside of loop with ordered clause with
3578         a parameter.
3580 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
3582         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3583         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3584         * doc/ux.texi: New file.
3586 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
3588         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3589         be the first CR field allocated.
3591 2018-10-19  Richard Biener  <rguenther@suse.de>
3593         PR target/87657
3594         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3595         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3597 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3599         PR target/72782
3600         * config/i386/sse.md
3601         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3602         (*add<mode>3<mask_name>_bcst_2): Likewise.
3604 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3606         * config/i386/sse.md
3607         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3608         Replace nonimmediate_operand with register_operand.
3609         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3610         Likewise.
3611         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3612         Likewise.
3614 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3616         PR rtl-optimization/87596
3617         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3618         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3619         for instructions in FROM..TO range.
3621 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
3623         * cfgexpand.c (expand_one_var): Use specific wording in error message
3624         for non-local frame variables.
3625         * stor-layout.c (layout_decl): Do not issue a warning for them.
3627 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
3629         * haifa-sched.c (priority): Add force_recompute parameter.
3630         (apply_replacement): Call priority () with force_recompute = true.
3631         (restore_pattern): Likewise.
3633 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3635         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3636         HOST_BITS_PER_WIDE_INT.
3637         (test_vector_ops_duplicate): Likewise.
3639 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3641         PR target/72782
3642         * config/i386/sse.md (VF_AVX512): New.
3643         (avx512bcst): Likewise.
3644         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3645         Likewise.
3646         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3647         Likewise.
3648         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3649         Likewise.
3651 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
3653         * doc/invoke.texi (-dumpversion): Improve grammar.
3654         (-dumpfullversion): Make more consistent with -dumpversion.
3656 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
3658         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3659         Set JUMP_LABEL to the jump insn.
3660         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3661         Predict emitted jump and add label to jump insn.
3663 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
3665         PR tree-optimization/87562
3666         * input.c (get_substring_ranges_for_loc): Use
3667         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3668         getting the linemap for the endpoint.  Verify that it's either
3669         in the same linemap as the start point's spelling location, or
3670         at least in the same file.
3672 2018-10-18  Richard Biener  <rguenther@suse.de>
3674         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3675         feed width-specific load/store costs through ix86_vec_cost.
3676         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3677         (k8_cost): Likewise.
3678         (bdver_cost): Likewise.
3679         (znver1_cost): Likewise.
3680         (btver1_cost): Likewise.
3681         (btver2_cost): Likewise.
3683 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3685         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3686         to simplify subreg of vec_merge.
3688 2018-10-18  Richard Biener  <rguenther@suse.de>
3690         * config/i386/i386.c: Fix costing of vector FMA.
3692 2018-10-18  Richard Biener  <rguenther@suse.de>
3694         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3695         and argument.
3696         (ix86_builtin_vectorization_cost): For vec_construct properly
3697         cost insertion into SSE regs.
3698         (...): Adjust calls to ix86_vec_cost.
3700 2018-10-18  Richard Biener  <rguenther@suse.de>
3702         PR middle-end/87087
3703         Revert
3704         2018-02-07  Richard Biener  <rguenther@suse.de>
3706         PR tree-optimization/84204
3707         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3708         this place.
3710 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3712         PR target/87537
3713         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3714         of vec_duplicate.
3715         (test_vector_ops_duplicate): Add test for a scalar subreg of a
3716         VEC_MERGE of a VEC_DUPLICATE.
3718 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3720         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3721         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3722         * doc/standards.texi (C Language): Document C2X.
3723         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3724         (rl78_option_override): Handle "GNU C2X" language name.
3726 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3728         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3729         Document C17 as published in 2018.
3731 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
3733         PR middle-end/87623
3734         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3735         bail out if both sides do not have the same storage order.
3737 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3739         * bitmap.c (bitmap_head::dump): New.
3740         * bitmap.h (bitmap_head): Add dump().
3741         * gimple-ssa-evrp-analyze.c
3742         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3743         (evrp_range_analyzer::set_ssa_range_info): Same.
3744         (evrp_range_analyzer::record_ranges_from_phis): Same.
3745         (evrp_range_analyzer::record_ranges_from_stmt): Same.
3746         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3747         * gimple-ssa-sprintf.c (get_int_range): Same.
3748         (format_integer): Same.
3749         (sprintf_dom_walker::handle_gimple_call): Same.
3750         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3751         (ipcp_vr_lattice::top_p): Same.
3752         (ipcp_vr_lattice::bottom_p): Same.
3753         (ipcp_vr_lattice::set_to_bottom): Same.
3754         (ipa_vr_operation_and_type_effects): Same.
3755         (propagate_vr_across_jump_function): Same.
3756         (ipcp_store_vr_results): Same.
3757         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3758         (ipa_print_node_jump_functions_for_edge): Same.
3759         (ipa_get_value_range): Same.
3760         (ipa_compute_jump_functions_for_edge): Same.
3761         (ipa_write_jump_function): Same.
3762         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3763         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3764         Same.
3765         * vr-values.c (set_value_range_to_nonnegative): Same.
3766         (set_value_range_to_truthvalue): Same.
3767         (vr_values::get_value_range): Same.
3768         (vr_values::set_defs_to_varying): Same.
3769         (vr_values::update_value_range): Same.
3770         (symbolic_range_based_on_p): Same.
3771         (vr_values::op_with_boolean_value_range_p): Same.
3772         (vr_values::extract_range_for_var_from_comparison_expr): Same.
3773         (vr_values::extract_range_from_ssa_name): Same.
3774         (vr_values::extract_range_from_binary_expr): Same.
3775         (vr_values::extract_range_from_unary_expr): Same.
3776         (vr_values::extract_range_from_cond_expr): Same.
3777         (vr_values::extract_range_from_comparison): Same.
3778         (vr_values::check_for_binary_op_overflow): Same.
3779         (vr_values::extract_range_basic): Same.
3780         (vr_values::extract_range_from_assignment): Same.
3781         (compare_ranges): Same.
3782         (compare_range_with_value): Same.
3783         (vr_values::adjust_range_with_scev): Same.
3784         (vrp_valueize): Same.
3785         (vrp_valueize_1): Same.
3786         (vr_values::get_vr_for_comparison): Same.
3787         (vr_values::compare_name_with_value): Same.
3788         (vr_values::compare_names): Same.
3789         (vr_values::vrp_evaluate_conditional): Same.
3790         (find_case_label_ranges): Same.
3791         (vr_values::vrp_visit_switch_stmt): Same.
3792         (vr_values::extract_range_from_phi_node): Same.
3793         (vr_values::simplify_div_or_mod_using_ranges): Same.
3794         (vr_values::simplify_bit_ops_using_ranges): Same.
3795         (test_for_singularity): Same.
3796         (range_fits_type_p): Same.
3797         (vr_values::simplify_cond_using_ranges_1): Same.
3798         (vr_values::simplify_switch_using_ranges): Same.
3799         (vr_values::simplify_float_conversion_using_ranges): Same.
3800         (vr_values::two_valued_val_range_p): Same.
3801         (vr_values::add_equivalence): Move to value_range::equiv_add.
3802         * vr-values.h (vr_values::add_equivalence): Remove.
3803         (VR_INITIALIZER): Remove.
3804         * tree-vrp.c (value_range::set): New.
3805         (value_range::equiv_add): New.
3806         (value_range::value_range): New.
3807         (value_range::deep_copy): New.
3808         (value_range::check): New.
3809         (value_range::equal_p): New.
3810         (value_range::ignore_equivs_equal_p): New.
3811         (value_range::operator==): New.
3812         (value_range::operator!=): New.
3813         (value_range::symbolic_p): New.
3814         (value_range::numeric_p): New.
3815         (value_range::set_undefined): New.
3816         (value_range::set_varying): New.
3817         (value_range::may_contain_p): New.
3818         (value_range::equiv_clear): New.
3819         (value_range::singleton_p): New.
3820         (value_range::intersect): New.
3821         (value_range::dump): New.
3822         (value_range::set_and_canonicalize): New.
3823         (set_value_range): Adjust for value_range API.
3824         (set_value_range_to_undefined): Same.
3825         (set_value_range_to_varying): Same.
3826         (set_and_canonicalize_value_range): Same.
3827         (set_value_range_to_nonnull): Same.
3828         (set_value_range_to_null): Same.
3829         (range_is_null): Same.
3830         (range_is_nonnull): Same.
3831         (range_int_cst_p): Same.
3832         (range_int_cst_singleton_p): Same.
3833         (symbolic_range_p): Same.
3834         (range_includes_zero_p): Same.
3835         (value_range_constant_singleton): Same.
3836         (vrp_set_zero_nonzero_bits): Same.
3837         (ranges_from_anti_range): Same.
3838         (extract_range_into_wide_ints): Same.
3839         (extract_range_from_multiplicative_op): Same.
3840         (set_value_range_with_overflow): Same.
3841         (extract_range_from_binary_expr_1): Same.
3842         (extract_range_from_unary_expr): Same.
3843         (dump_value_range): Same.
3844         (debug_value_range): Same.
3845         (vrp_prop::check_array_ref): Same.
3846         (vrp_prop::check_mem_ref): Same.
3847         (vrp_prop::vrp_initialize): Same.
3848         (vrp_prop::visit_stmt): Same.
3849         (intersect_ranges): Same.
3850         (vrp_prop::visit_phi): Same.
3851         (vrp_prop::vrp_finalize): Same.
3852         (determine_value_range_1): Same.
3853         (determine_value_range): Same.
3854         (vrp_intersect_ranges_1): Rename to...
3855         (vrp_intersect_1): this.
3856         (vrp_intersect_ranges): Rename to...
3857         (value_range::intersect_helper): ...this.
3858         (vrp_meet_1): Rename to...
3859         (value_range::union_helper): ...this.
3860         (vrp_meet): Rename to...
3861         (value_range::union_): ...this.
3862         (copy_value_range): Remove.
3863         * tree-vrp.h (struct value_range): Rewrite into a proper class.
3864         (value_range::vrtype): New.
3865         (value_range::type): New.
3866         (value_range::equiv): New.
3867         (value_range::min): New.
3868         (value_range::max): New.
3869         (value_range::varying_p): New.
3870         (value_range::undefined_p): New.
3871         (value_range::null_p): New.
3872         (value_range::equiv_add): New.
3873         (copy_value_range): Remove.
3875 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
3877         * Makefile.in (SELFTEST_TARGETS): New.
3878         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3879         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3880         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3881         c/Make-lang.in.
3882         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3883         (selftest-c++-gdb, selftest-c++-valgrind): Move to
3884         cp/Make-lang.in.
3885         * configure: Regenerate.
3886         * configure.ac (selftest_languages): New.
3888 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3890         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3891         overflow wraps argument.
3892         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3893         wide_int_range_multiplicative_op.
3894         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3895         overflow wraps argument.
3896         (wide_int_range_multiplicative_op): Same.
3897         (wide_int_range_lshift): Same.
3898         (wide_int_range_div): Same.
3899         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3900         (wide_int_range_lshift): Same.
3901         (wide_int_range_div): Same.
3903 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3905         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3906         use sign as argument.
3907         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3908         wide_int_range_shift_undefined_p.
3910 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3912         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3913         Rename to...
3914         (@despeculate_copy<ALLI_TI:mode>): ... This.
3915         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3916         switch statement.
3918 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3920         * config.gcc: Obsolete *-*-solaris2.10*.
3921         * doc/install.texi (Specific, *-*-solaris2*): Document it.
3923 2018-10-12  Jeff Law  <law@redhat.com>
3925         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3926         reg + sym +- const_int addressing modes.
3928 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
3930         * common.opt (fdiagnostics-minimum-margin-width=): New option.
3931         * diagnostic-show-locus.c (layout::layout): Apply the minimum
3932         margin width.
3933         (layout::start_annotation_line): Only print up to 3 of the
3934         margin character, to avoid touching the left-hand side.
3935         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3936         minimum margin width, as set by test_diagnostic_context's ctor.
3937         (selftest::test_fixit_insert_containing_newline): Likewise.
3938         (selftest::test_fixit_insert_containing_newline_2): Likewise.
3939         (selftest::test_line_numbers_multiline_range): Clear
3940         dc.min_margin_width.
3941         * diagnostic.c (diagnostic_initialize): Initialize
3942         min_margin_width.
3943         * diagnostic.h (struct diagnostic_context): Add field
3944         "min_margin_width".
3945         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3946         * opts.c (common_handle_option): Handle
3947         OPT_fdiagnostics_minimum_margin_width_.
3948         * selftest-diagnostic.c
3949         (selftest::test_diagnostic_context::test_diagnostic_context):
3950         Initialize min_margin_width to 6.
3951         * toplev.c (general_init): Initialize global_dc->min_margin_width.
3953 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
3955         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3956         Fix usage of "error_at_rich_loc" in the comment.
3958 2018-10-15  Renlin Li  <renlin.li@arm.com>
3960         PR target/87563
3961         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
3962         if-conversioned loop when it contains ifn with types not
3963         supported by backend.
3964         * internal-fn.c (expand_direct_optab_fn): Add an assert.
3965         (direct_internal_fn_supported_p): New helper function.
3966         * internal-fn.h (direct_internal_fn_supported_p): Declare.
3968 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
3970         PR target/87572
3971         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3972         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3973         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3975 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
3977         PR tree-optimization/87022
3978         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
3979         bits in dist vector rather than the first one.
3981 2018-10-15  Richard Biener  <rguenther@suse.de>
3983         PR middle-end/87610
3984         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
3985         (visit_loadstore): When a used restrict tag escaped verify that
3986         the points-to solution of "other" pointers do not include
3987         escaped.
3988         (compute_dependence_clique): If a used restrict tag escaped
3989         communicated that down to visit_loadstore.
3991 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
3993         * config/s390/s390.c (s390_expand_vec_init): Force vector element
3994         into reg if it isn't a general operand.
3996 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
3998         PR target/87599
3999         * config/i386/sse.md (*vec_dupv2di): Add register source to
4000         movddup.
4002 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
4004         PR target/87572
4005         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4006         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4007         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4008         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4010 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
4012         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4013         (notice_args_size): Set it in the current trace if no insn that can
4014         throw internally has been seen yet.
4015         (connect_traces): When connecting args_size between traces, allow the
4016         incoming values not to match if there is an insn setting it before the
4017         first insn that can throw internally; in that case, force the creation
4018         of a CFI note on this latter insn.
4020 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
4022         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4023         the base class, because using the injected-class-name was not clearly
4024         specified until DR 176.
4026 2018-10-12  Paul Koning  <ni1d@arrl.net>
4028         * config/pdp11/pdp11.md (doloop_end): New expander.
4029         (doloop_end_insn): renamed from "doloop_end".
4030         (addqi3): New pattern.
4031         (subqi3): New pattern.
4032         * config/pdp11/predicates.md (incdec_operand): New predicate.
4034 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
4036         PR middle-end/81376
4037         * real.c (format_helper::can_represent_integral_type_p): New function
4038         * real.h (format_helper::can_represent_integral_type_p): Ditto.
4039         * match.pd: New pattern.
4041 2018-10-12  Alexandre Oliva <oliva@adacore.com>
4043         * configure.ac: Introduce --enable-large-address-aware
4044         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4045         * doc/install.texi: Document it.
4046         * configure, config.in: Rebuilt.
4047         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4048         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4049         (LINK_SPEC): Insert it.
4050         * config/i386/mingw-w64.h: Likewise.
4052         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4054 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
4056         PR rtl-optimization/87600
4057         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4059 2018-10-12  Paul Koning  <ni1d@arrl.net>
4061         * doc/md.texi (doloop_end): Document that the pattern code may
4062         need to check operand mode.
4064 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
4066         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4067         to zero-extend between int and floating-point registers.
4068         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4069         ldp into floating-point registers.  Add type and arch attributes.
4070         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4071         Use f_loads for type attribute.
4073 2018-10-11  Martin Sebor  <msebor@redhat.com>
4075         * doc/extend.texi (attribute packed): Correct typos.
4077 2018-10-11  Martin Sebor  <msebor@redhat.com>
4079         * doc/extend.texi (attribute flatten): Mention interaction with
4080         noinline.
4082 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
4084         PR target/87156
4085         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4086         Set new_decl virtual flag to zero.
4088 2018-10-11  Martin Sebor  <msebor@redhat.com>
4090         PR middle-end/87593
4091         * doc/extend.texi (attribute format_arg): Discuss using multiple
4092         attributes on a single function.
4094 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4096         PR tree-optimization/86829
4097         * match.pd (sin (atan (x))): New simplification rules.
4098         (cos (atan (x))): Likewise.
4099         * real.c (build_sinatan_real): New function.
4100         * real.h (build_sinatan_real): Prototype.
4102 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
4104         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4105         function.
4106         (fold_mergeeo_helper): New helper function.
4107         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4108         intrinsics.  Correct some whitespace indentation issues.
4110 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
4112         PR target/87511
4113         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4114         Use HOST_WIDE_INT_1U for shift.
4116 2018-10-11  Doug Rupp  <rupp@adacore.com>
4117             Olivier Hainque  <hainque@adacore.com>
4119         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4120         Pass --relax to the linker for RTPs.
4121         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4123 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
4124             Jan Hubicka  <jh@suse.cz>
4125             Martin Jambor  <mjambor@suse.cz>
4127         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4128         the same elements are repeated rather than printing all of them.
4129         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4130         "repeated" elements.
4131         * read-rtl-function.c (test_loading_repeat): New function.
4132         (read_rtl_function_c_tests): Call test_loading_repeat.
4133         * rtl-tests.c (test_dumping_repeat): New function.
4134         (rtl_tests_c_tests): Call test_dumping_repeat.
4136 2018-10-11  Richard Biener  <rguenther@suse.de>
4138         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4139         bdver?_cost): Unify to ...
4140         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4141         * config/i386/i386.c (processor_cost_table): Adjust.
4143 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
4145         PR middle-end/87574
4146         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4147         the thunk when expanding to GIMPLE.
4149 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4151         * varasm.c (mergeable_string_section): Don't try to move zero-length
4152         strings to the merge section.
4154 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
4156         PR target/87573
4157         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4159 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
4161         PR target/87550
4162         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4163         to special_args set.
4165 2018-10-10  Richard Biener  <rguenther@suse.de>
4167         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4168         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4169         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4170         and recursing and pattern terminating the recursion on SSE
4171         vector width using ix86_expand_reduc.
4172         (reduc_sminmax_scal_<mode>): Split into part reducing to half
4173         width and recursing and SSE2 vector variant doing the final
4174         reduction with ix86_expand_reduc.
4175         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4176         with terminating the recursion at AVX level, splitting that
4177         to SSE there.
4179 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
4181         * genmatch.c (error_cb): Rename to...
4182         (diagnostic_cb): ...this, converting int params to enums.
4183         (fatal_at): Update for renaming.
4184         (warning_at): Likewise.
4185         (main): Likewise.
4186         * input.c (selftest::ebcdic_execution_charset::apply):
4187         Update for renaming of...
4188         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4189         to...
4190         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4191         converting level and reason to enums.
4192         (class selftest::lexer_error_sink): Rename to...
4193         (class selftest::lexer_test_options): ...this, renaming field
4194         "m_errors" to "m_diagnostics".
4195         (selftest::lexer_test_options::apply): Update for renaming of...
4196         (selftest::lexer_test_options::on_error): ...this, renaming to...
4197         (selftest::lexer_test_options::on_diagnostic): ...this
4198         converting level and reason to enums.
4199         (selftest::test_lexer_string_locations_raw_string_unterminated):
4200         Update for renamings.
4201         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4202         "reason".
4204 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
4206         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4207         * config/rs6000/pmmintrin.h: New file.
4209 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
4211         PR tree-optimization/86659
4212         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4214 2018-10-09  Richard Biener  <rguenther@suse.de>
4216         PR tree-optimization/63155
4217         * tree-ssa-structalias.c: Include tree-ssa.h.
4218         (get_constraint_for_ssa_var): For undefs return nothing_id.
4219         (find_func_aliases): Cleanup PHI handling.
4221 2018-10-09  Richard Biener  <rguenther@suse.de>
4223         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4224         replacements.
4226 2018-10-09  Martin Liska  <mliska@suse.cz>
4228         * asan.c (asan_emit_stack_protection): If a stack variable
4229         is located in a same file as current function, then emit
4230         line info into variable definition string.
4232 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4234         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4235         information.
4237 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4239         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4240         on the thunk.
4242 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4244         PR tree-optimization/86659
4245         * gimple-match.h (struct gimple_match_op): Add reverse field.
4246         (gimple_match_op::set_op): New overloaded method.
4247         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4248         the REF_REVERSE_STORAGE_ORDER flag on the value.
4249         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4250         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4251         
4252 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
4254         PR middle-end/63155
4255         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4256         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4258 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
4260         PR target/87517
4261         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4262         Defined with __builtin_ia32_vfmaddsubpd512_mask.
4264 2018-10-08  Richard Biener  <rguenther@suse.de>
4266         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4267         cost the same as AVX128 ones.
4269 2018-10-08  Paul Koning  <ni1d@arrl.net>
4271         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4272         (expand_block_move): New function.
4273         * config/pdp11/pdp11.c (output_block_move): Remove.
4274         (expand_block_move): New function.
4275         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4276         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4277         (*movmemhi1): Remove.
4279 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
4281         * config/s390/2827.md: Increase latencies for some FP instructions.
4283 2018-10-08  Richard Biener  <rguenther@suse.de>
4285         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4286         Open a dump scope.
4287         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4288         * tree-vectorizer.h (dump_stmt_cost): Adjust.
4289         (add_stmt_cost): Dump return value of the hook.
4291 2018-10-08  Richard Biener  <rguenther@suse.de>
4293         PR tree-optimization/63155
4294         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4295         (ssa_propagation_engine::ssa_propagate): Remove redundant
4296         bitmap bit clearing.
4298 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
4300         PR rtl-optimization/86939
4301         PR rtl-optimization/87479
4302         * ira.h (non_conflicting_reg_copy_p): New prototype.
4303         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4304         (make_hard_regno_dead): Don't add conflicts for register
4305         ignore_reg_for_conflicts.
4306         (make_object_dead): Likewise.
4307         (non_conflicting_reg_copy_p): New function.
4308         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4309         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4310         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4311         (make_hard_regno_dead): Don't add conflicts for register
4312         ignore_reg_for_conflicts.  Remove special conflict handling of
4313         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
4314         check_pic_pseudo_p and update callers.
4315         (mark_pseudo_dead): Don't add conflicts for register
4316         ignore_reg_for_conflicts.
4317         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4319 2018-10-05  Andrew Waterman  <andrew@sifive.com>
4320             Jim Wilson  <jimw@sifive.com>
4322         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4323         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
4324         new pattern using HONOR_SNANS that emits one extra instruction.
4326 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
4328         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4329         patterns): Merge SI and DI patterns to a GPR pattern.
4330         (unnamed define_insn and define_split for record form of that): Merge
4331         to a single define_insn_and_split pattern.
4333 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
4335         PR c++/56856
4336         * input.c (expand_location_to_spelling_point): Add param "aspect"
4337         and use rather than hardcoding LOCATION_ASPECT_CARET.
4338         (get_substring_ranges_for_loc): Handle the case of a single token
4339         within a macro expansion.
4340         * input.h (expand_location_to_spelling_point): Add "aspect" param,
4341         defaulting to LOCATION_ASPECT_CARET.
4343 2018-10-05  Paul Koning  <ni1d@arrl.net>
4345         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4346         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4347         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4348         (pdp11_guard_type): New function.
4350 2018-10-05  Paul Koning  <ni1d@arrl.net>
4352         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4353         * config/pdp11/pdp11.opt (mfloat32): Remove.
4354         (mfloat64): Remove.
4355         * doc/invoke.texi (pdp11 -mfloat32): Remove:
4356         (pdp11 -mfloat64): Remove.
4358 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4360         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4361         (*cmp<mode>_cc_i387): Ditto.
4362         (*cmpu<mode>_cc_i387): Ditto.
4363         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4364         * config/i386/i386.c (ix86_expand_fp_compare): Remove
4365         "scratch" argument.
4366         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4367         Emit x86_sahf_1 pattern.
4368         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4369         (ix86_expand_carry_flag_compare): Ditto.
4371 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4373         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4374         to reg_or_0_operand.  Add "C" constraint.
4375         (*cmpxf_cc_i387): Ditto.
4376         (*cmp<mode>_i387): Change operand 2 predicate
4377         to nonimm_or_0_operand.  Add "C" constraint.
4378         (*cmp<mode>_cc_i387): Ditto.
4379         (*cmp<mode>_0_i387): Remove insn pattern.
4380         (*cmp<mode>_0_cc_i387): Ditto.
4382 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4384         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4385         * config/i386/predicates.md (nonimm_or_0_operand): Rename
4386         from vector_move_operand.  Update all uses.
4388 2018-10-05  Martin Sebor  <msebor@redhat.com>
4390         PR tree-optimization/87490
4391         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4392         consistently.
4394 2018-10-05  Richard Biener  <rguenther@suse.de>
4396         PR tree-optimization/63155
4397         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4398         vertical space in dumpfiles.
4399         * tree-ssa-propagate.h
4400         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4401         * tree-ssa-propagate.c (cfg_blocks_back): New global.
4402         (ssa_edge_worklist_back): Likewise.
4403         (curr_order): Likewise.
4404         (cfg_blocks_get): Remove abstraction.
4405         (cfg_blocks_add): Likewise.
4406         (cfg_blocks_empty_p): Likewise.
4407         (add_ssa_edge): Add to current or next worklist based on
4408         RPO index.
4409         (add_control_edge): Likewise.
4410         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4411         into ...
4412         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
4413         iteration from CFG and SSA edge worklist so we process
4414         everything in RPO order, prioritizing forward progress
4415         over iteration.
4416         (ssa_prop_init): Allocate new worklists, do not dump
4417         immediate uses.
4418         (ssa_prop_fini): Free new worklists.
4420 2018-10-05  Richard Biener  <rguenther@suse.de>
4422         * tree-core.h (tree_block::abstract_flag): Remove.
4423         (tree_block::block_num): Make full 32bits.
4424         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4425         * tree.h (BLOCK_ABSTRACT): Remove.
4426         * dwarf2out.c (gen_lexical_block_die): Remove dead code
4427         resulting from BLOCK_ABSTRACT being always false.
4428         (gen_inlined_subroutine_die): Likewise.
4429         (gen_block_die): Likewise.
4430         * tree.c (block_ultimate_origin): Likewise.
4431         * tree-pretty-print.c (dump_block_node): Remove code dealing
4432         with BLOCK_ABSTRACT.
4433         * tree-ssa-live.c (dump_scope_block): Likewise.
4434         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4435         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4437 2018-10-05   Richard Biener  <rguenther@suse.de>
4439         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4440         is asked for initialize mode to the component mode of the
4441         vector type.
4443 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
4445         PR target/87522
4446         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4447         assembler for -mavx.
4448         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4450 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
4452         PR target/87509
4453         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4454         RS6000_BTM_DFP.
4455         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4456         to be DImode.  When using mffscrn, force the operand to a register.
4458 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
4460         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4461         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4462         X87MODEF mode iterator.
4463         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4464         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4465         X87MODEF mode iterator.
4467 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
4469         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4470         -Wno-prio-ctor-dtor.
4472 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4474         * Makefile.in (OBJS): Add opt-problem.o.
4475         * dump-context.h: Include "selftest.h.
4476         (selftest::temp_dump_context): New forward decl.
4477         (class dump_context): Make friend of class
4478         selftest::temp_dump_context.
4479         (dump_context::dump_loc_immediate): New decl.
4480         (class dump_pretty_printer): Move here from dumpfile.c.
4481         (class temp_dump_context): Move to namespace selftest.
4482         (temp_dump_context::temp_dump_context): Add param
4483         "forcibly_enable_dumping".
4484         (selftest::verify_dumped_text):
4485         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4486         (selftest::verify_item):
4487         (ASSERT_IS_TEXT): Move here from dumpfile.c.
4488         (ASSERT_IS_TREE): Likewise.
4489         (ASSERT_IS_GIMPLE): Likewise.
4490         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4491         to...
4492         (dump_context::dump_loc_immediate): ...this new function.
4493         (class dump_pretty_printer): Move to dump-context.h.
4494         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4495         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4496         (temp_dump_context::temp_dump_context): Move to "selftest"
4497         namespace.  Add param "forcibly_enable_dumping", and use it to
4498         conditionalize the use of m_pp;
4499         (selftest::verify_dumped_text): Make non-static.
4500         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4501         (selftest::verify_item): Make non-static.
4502         (ASSERT_IS_TEXT): Move to dump-context.h.
4503         (ASSERT_IS_TREE): Likewise.
4504         (ASSERT_IS_GIMPLE): Likewise.
4505         (selftest::test_capture_of_dump_calls): Pass "true" for new
4506         param of temp_dump_context.
4507         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4508         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
4509         TDF_COMPARE_DEBUG.
4510         * opt-problem.cc: New file.
4511         * opt-problem.h: New file.
4512         * optinfo-emit-json.cc
4513         (selftest::test_building_json_from_dump_calls): Pass "true" for
4514         new param of temp_dump_context.
4515         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4516         (optinfo::emit_for_opt_problem): New function.
4517         (optinfo::emit): Clarity which emit_item is used.
4518         * optinfo.h (optinfo::get_dump_location): New accessor.
4519         (optinfo::emit_for_opt_problem): New decl.
4520         (optinfo::emit): Make const.
4521         * selftest-run-tests.c (selftest::run_tests): Call
4522         selftest::opt_problem_cc_tests.
4523         * selftest.h (selftest::opt_problem_cc_tests): New decl.
4524         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4525         bool to opt_result, converting fprintf messages to
4526         opt_result::failure_at calls.  Add "stmt" param for use by the
4527         failure_at calls.
4528         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4529         (runtime_alias_check_p): Convert return type from bool to
4530         opt_result, converting dump_printf calls to
4531         opt_result::failure_at, using the statement DDR_A for their
4532         location.
4533         (find_data_references_in_stmt): Convert return type from bool to
4534         opt_result, converting "return false" to opt_result::failure_at
4535         with a new message.
4536         * tree-data-ref.h: Include "opt-problem.h".
4537         (dr_analyze_innermost): Convert return type from bool to opt_result,
4538         and add a const gimple * param.
4539         (find_data_references_in_stmt): Convert return type from bool to
4540         opt_result.
4541         (runtime_alias_check_p): Likewise.
4542         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4543         dr_analyze_innermost.
4544         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4545         Convert return type from bool to opt_result, adding a message for
4546         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4547         (vect_analyze_data_ref_dependence): Convert return type from bool
4548         to opt_result.  Change sense of return type from "false"
4549         effectively meaning "no problems" to "false" meaning a problem,
4550         so that "return false" becomes "return opt_result::success".
4551         Convert "return true" calls to opt_result::failure_at, using
4552         the location of statement A rather than vect_location.
4553         (vect_analyze_data_ref_dependences): Convert return type from bool
4554         to opt_result.
4555         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4556         calls to opt_result::failure_at, using the stmt location rather
4557         than vect_location.
4558         (vect_verify_datarefs_alignment): Convert return type from bool
4559         to opt_result.
4560         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
4561         into multiple more-tightly-scoped copies.
4562         (vect_analyze_data_refs_alignment): Convert return type from bool
4563         to opt_result.
4564         (vect_analyze_data_ref_accesses): Likewise, converting a
4565         "return false" to a "return opt_result::failure_at", adding a
4566         new message.
4567         (vect_prune_runtime_alias_test_list): Convert return type from
4568         bool to opt_result, converting dump_printf_loc to
4569         opt_result::failure_at.  Add a %G to show the pertinent statement,
4570         and use the stmt's location rather than vect_location.
4571         (vect_find_stmt_data_reference): Convert return type from
4572         bool to opt_result, converting dump_printf_loc to
4573         opt_result::failure_at, using stmt's location.
4574         (vect_analyze_data_refs):  Convert return type from bool to
4575         opt_result.  Convert "return false" to "return
4576         opt_result::failure_at", adding messages as needed.
4577         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4578         type from bool to opt_result.
4579         (vect_determine_vf_for_stmt): Likewise.
4580         (vect_determine_vectorization_factor): Likewise, converting
4581         dump_printf_loc to opt_result::failure_at, using location of phi
4582         rather than vect_location.
4583         (vect_analyze_loop_form_1): Convert return type from bool to
4584         opt_result, converting dump_printf_loc calls, retaining the use of
4585         vect_location.
4586         (vect_analyze_loop_form): Convert return type from loop_vec_info
4587         to opt_loop_vec_info.
4588         (vect_analyze_loop_operations): Convert return type from bool to
4589         opt_result, converting dump_printf_loc calls, using the location
4590         of phi/stmt rather than vect_location where available.  Convert
4591         various "return false" to "return opt_result::failure_at" with
4592         "unsupported phi" messages.
4593         (vect_get_datarefs_in_loop): Convert return type from bool to
4594         opt_result.  Add a message for the
4595         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4596         (vect_analyze_loop_2): Convert return type from bool to
4597         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
4598         each "goto again;", adding new messages where needed.
4599         Add "unsupported grouped {store|load}" messages.
4600         (vect_analyze_loop): Convert return type from loop_vec_info to
4601         opt_loop_vec_info.
4602         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4603         bool to opt_result.
4604         * tree-vect-stmts.c (process_use): Likewise, converting
4605         dump_printf_loc call and using stmt location, rather than
4606         vect_location.
4607         (vect_mark_stmts_to_be_vectorized): Likeise.
4608         (vect_analyze_stmt): Likewise, adding a %G.
4609         (vect_get_vector_types_for_stmt): Convert return type from bool to
4610         opt_result, converting dump_printf_loc calls and using stmt
4611         location, rather than vect_location.
4612         (vect_get_mask_type_for_stmt): Convert return type from tree to
4613         opt_tree, converting dump_printf_loc calls and using stmt location.
4614         * tree-vectorizer.c: Include "opt-problem.h.
4615         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4616         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
4617         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
4618         enabled, use it to report at the top level "couldn't vectorize
4619         loop" followed by the problem.
4620         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4621         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4622         to opt_result.
4623         (vect_analyze_stmt): Likewise.
4624         (vect_get_vector_types_for_stmt): Likewise.
4625         (tree vect_get_mask_type_for_stmt): Likewise.
4626         (vect_analyze_data_ref_dependences): Likewise.
4627         (vect_enhance_data_refs_alignment): Likewise.
4628         (vect_analyze_data_refs_alignment): Likewise.
4629         (vect_verify_datarefs_alignment): Likewise.
4630         (vect_analyze_data_ref_accesses): Likewise.
4631         (vect_prune_runtime_alias_test_list): Likewise.
4632         (vect_find_stmt_data_reference): Likewise.
4633         (vect_analyze_data_refs): Likewise.
4634         (vect_analyze_loop): Convert return type from loop_vec_info to
4635         opt_loop_vec_info.
4636         (vect_analyze_loop_form): Likewise.
4637         (vect_analyze_slp): Convert return type from bool to opt_result.
4639 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4641         * doc/invoke.texi (-fopt-info): Document new "internals"
4642         sub-option.
4643         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4644         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4645         MSG_ALL_KINDS.
4646         (optinfo_verbosity_options): Add "internals".
4647         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4648         (dump_context::apply_dump_filter_p): New member function.
4649         (dump_context::dump_loc): Use apply_dump_filter_p rather than
4650         explicitly masking the dump_kind.
4651         (dump_context::begin_scope): Increment the scope depth first.  Use
4652         apply_dump_filter_p rather than explicitly masking the dump_kind.
4653         (dump_context::emit_item): Use apply_dump_filter_p rather than
4654         explicitly masking the dump_kind.
4655         (dump_dec): Likewise.
4656         (dump_hex): Likewise.
4657         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4658         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4659         (opt_info_switch_p): Update handling of default
4660         MSG_OPTIMIZED_LOCATIONS to cope with default of
4661         MSG_PRIORITY_USER_FACING.
4662         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4663         masking the dump_kind.
4664         (selftest::test_capture_of_dump_calls): Update test_dump_context
4665         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4666         than MSG_ALL.  Generalize scope test to be run at all four
4667         combinations of with/without MSG_PRIORITY_USER_FACING and
4668         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4669         for each of the two values.
4670         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4671         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
4672         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4673         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4674         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4675         with MSG_PRIORITY_*.
4676         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4677         dump messages as MSG_PRIORITY_USER_FACING.
4678         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4679         about the interaction with MSG_PRIORITY_*.
4681 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4683         * varasm.c (output_constant): Add new parameter merge_strings.
4684         Make strings properly zero terminated in merge string sections.
4685         (mergeable_string_section): Don't fail if the last char is non-zero.
4686         (assemble_variable_contents): Handle merge string sections.
4687         (assemble_variable): Likewise.
4688         (assemble_constant_contents): Likewise.
4689         (output_constant_def_contents): Likewise.
4690         (output_constructor_array_range,
4691         output_constructor_regular_field): Adjust call to output_constant.
4692         (output_object_block): Adjust call to assemble_constant_contents
4693         and assemble_variable_contents.
4695 2018-10-04  Martin Liska  <mliska@suse.cz>
4697         PR c/87483
4698         * cgraphunit.c (process_function_and_variable_attributes):
4699         Warn about a function with alias attribute and a body.
4701 2018-10-04  Martin Liska  <mliska@suse.cz>
4703         PR ipa/82625
4704         * multiple_target.c (redirect_to_specific_clone): New function.
4705         (ipa_target_clone): Use it.
4706         * tree-inline.c: Fix comment.
4708 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4710         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4711         fields.
4712         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4713         (gcc::dump_manager::register_pass): New member function, adapted
4714         from loop body in gcc::pass_manager::register_pass, adding a
4715         call to update_dfi_for_opt_info.
4716         (gcc::dump_manager::opt_info_enable_passes): Store the
4717         -fopt-info options into the new fields.  Move the loop
4718         bodies into...
4719         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4720         function.
4721         * dumpfile.h (struct opt_pass): New forward decl.
4722         (gcc::dump_manager::register_pass): New decl.
4723         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4724         (class gcc::dump_manager): Add fields "m_optgroup_flags",
4725         "m_optinfo_flags", and "m_optinfo_filename".
4726         * passes.c (gcc::pass_manager::register_pass): Move all of the
4727         dump-handling code to gcc::dump_manager::register_pass.
4729 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
4731         PR rtl-optimization/87466
4732         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4733         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4734         * doc/tm.texi: Regenerate.
4735         * ira-lives.c (process_bb_node_lives): Use the new target hook.
4736         * lra-lives.c (process_bb_lives): Likewise.
4737         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4738         Define.
4740 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
4742         * params.c (add_params): Fix initialization.
4744 2018-10-04  Martin Liska  <mliska@suse.cz>
4746         PR gcov-profile/84107
4747         * tree-profile.c (init_ic_make_global_vars):
4748         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4749         Come up with new ic_tuple* variables.  Emit
4750         __gcov_indirect_call{,_topn} variables.
4751         (gimple_gen_ic_profiler): Access the variable
4752         and emit gimple.
4753         (gimple_gen_ic_func_profiler): Access
4754         __gcov_indirect_call.callee field.
4755         (gimple_init_gcov_profiler): Use ptr_type_node.
4756         * value-prof.c (gimple_ic): Use ptr_type_node.
4758 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4760         PR tree-optimization/85787
4761         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4762         into this function and add support for detecting multiple phis.
4763         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4765 2018-10-04  Martin Liska  <mliska@suse.cz>
4767         PR ipa/87491
4768         * ipa-inline.c (inline_to_all_callers_1):
4769         Call ultimate_alias_target for node being inlined.
4771 2018-10-03  Jeff Law  <law@redhat.com>
4773         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4774         target's wchar_t.
4775         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4776         * tree.h (get_typenode_from_name): Prototype.
4778 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4780         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4781         Change operand 2 predicate to nonimmediate_operand.
4782         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4784 2018-10-03  Martin Sebor  <msebor@redhat.com>
4785             Jeff Law  <law@redhat.com>
4787         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4788         initialize it.
4789         (get_string_length): Detect unterminated arrays.
4790         (format_string): Same.
4791         (format_directive): Warn about unterminated arrays.
4792         (handle_gimple_call): Mark statements with no_warning as needed.
4794 2018-10-03  Jim Wilson  <jimw@sifive.com>
4796         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4797         also define __riscv_abi_rve.  Delete trailing white space.
4799 2018-10-03  Paul Koning  <ni1d@arrl.net>
4801         Enable LRA register allocator for PDP11.
4802         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4803         (R): Likewise.
4804         (D): Likewise.
4805         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4806         * config/pdp11/pdp11.opt (-mlra): New option.
4807         * doc/invoke.texi (PDP-11 Options): Document -mlra.
4809 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4811         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4812         (*<absneg:code>extend<mode>xf2): Ditto.
4814 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4816         PR tree-optimization/87415
4817         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4818         precision fields.
4820 2018-10-02  Jeff Law  <law@redhat.com>
4822         * gimple-fold.c (get_range_strlen): Only set *nonstr when
4823         an unterminated string is discovered.  Bubble up range
4824         even for unterminated strings.
4825         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4826         indicates the string was not terminated via NONSTR.
4828 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4830         * tree-vrp.c (extract_range_from_unary_expr): Special case all
4831         pointer conversions.
4832         Do not do anything special for anti-ranges.
4834 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
4836         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4837         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4839 2018-10-03  Martin Liska  <mliska@suse.cz>
4841         PR gcov-profile/86109
4842         * coverage.c (coverage_begin_function): Do not
4843         mark lambdas as artificial.
4844         * tree-core.h (struct GTY): Remove tm_clone_flag
4845         and introduce new lambda_function.
4846         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4848 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4850         PR target/87474
4851         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4852         P8_VECTOR and VSX are enabled.
4854 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4856         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4857         0x3907 as CPU model number.
4859 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4861         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4862         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4863         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4864         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4865         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4866         * config/s390/s390.md: Likewise. Rename also the cpu attribute
4867         value from arch12 to z14.
4869 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
4871         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4872         (isinfxf2): Ditto.
4873         (isinf<mode>2): Ditto.
4875 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
4877         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4878         before emitting fxam.  Perform calculations in XFmode.
4880 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
4882         * match.pd (((X /[ex] A) +- B) * A): New transformation.
4884 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
4886         PR middle-end/87319
4887         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4888         * tree.c (signed_or_unsigned_type_for): Handle complex.
4890 2018-10-02  Jeff Law  <law@redhat.com>
4892         * gimple-fold.c (get_range_strlen): Remove dead code.
4894 2018-10-02  Martin Sebor  <msebor@redhat.com>
4895             Jeff Law  <law@redhat.com>
4897         * builtins.c (unterminated_array): Add new arguments.
4898         If argument is not terminated, bubble up size and exact
4899         state to callers.
4900         (expand_builtin_strnlen): Detect, avoid expanding
4901         and diagnose unterminated arrays.
4902         (c_strlen): Fill in offset of start of unterminated strings.
4903         * builtins.h (unterminated_array): Update prototype.
4905 2018-10-02  Richard Biener  <rguenther@suse.de>
4907         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4908         of haddv4df, first reduce to SSE width and exploit the fact
4909         that we only need element zero with the reduction result.
4910         (reduc_plus_scal_v2df): Likewise.
4912 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
4914         * dojump.h (do_jump): Delete.
4915         (do_jump_1): Likewise.
4916         (split_comparison): Move around.
4917         * dojump.c (do_jump): Make static.
4918         (do_jump_1): Likewise.
4919         (jumpifnot): Move around.
4920         (jumpifnot_1): Likewise.
4921         (jumpif): Likewise.
4922         (jumpif_1): Likewise.
4923         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4925 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
4927         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4928         insns in the delay slot and add_insn_after for the jump insn.
4930 2018-10-02  Richard Biener  <rguenther@suse.de>
4932         * tree-inline.c (expand_call_inline): Use the location of
4933         the callee declaration for the inline-entry marker.
4934         * final.c (notice_source_line): Remove special-casing of
4935         NOTE_INSN_INLINE_ENTRY.
4937 2018-10-01  Carl Love  <cel@us.ibm.com>
4939         PR 69431
4940         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4941         (__builtin_mtfsb0): New.
4942         (__builtin_mtfsb1): New.
4943         ( __builtin_set_fpscr_rn): New.
4944         (__builtin_set_fpscr_drn): New.
4945         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4946         (rs6000_expand_set_fpscr_rn_builtin): Add.
4947         (rs6000_expand_set_fpscr_drn_builtin): Add.
4948         (rs6000_expand_builtin): Add case statement entries for
4949         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4950         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4951         RS6000_BUILTIN_MFFSL.
4952         (rs6000_init_builtins): Add ftype initialization and def_builtin
4953         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4954         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4955         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4956         rs6000_mffscdrn): Add define_insn.
4957         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
4958         * doc/extend.texi: Add documentation for the builtins.
4960 2018-10-01  Richard Biener  <rguenther@suse.de>
4962         PR tree-optimization/87465
4963         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
4964         causing branch miscounts.
4966 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4968         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
4969         aarch64_option_default_param):  New.
4970         (params.h): Include.
4971         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
4972         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
4973         stack-clash protection validation code.
4975 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4977         * params.c (validate_param): New.
4978         (add_params): Use it.
4979         (set_param_value): Refactor param validation into validate_param.
4980         (diagnostic.h): Include.
4981         * diagnostic.h (diagnostic_ready_p): New.
4983 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4985         * params.c (set_param_value):
4986         Add index of parameter being validated.
4987         * common/common-target.def (option_validate_param): New.
4988         * common/common-targhooks.h (default_option_validate_param): New.
4989         * common/common-targhooks.c (default_option_validate_param): New.
4990         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
4991         * doc/tm.texi: Regenerate.
4993 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4995         PR target/86486
4996         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4997         Add validation for stack-clash parameters and set defaults.
4999 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5001         PR target/86486
5002         * configure.ac: Add stack-clash-protection-guard-size.
5003         * doc/install.texi: Document it.
5004         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5005         * params.def: Update comment for guard-size.
5006         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5007         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5008         * configure: Regenerate.
5010 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5012         PR target/86486
5013         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5014         STACK_DYNAMIC_OFFSET): New.
5015         * config/aarch64/aarch64.c (aarch64_layout_frame):
5016         Update outgoing args size.
5017         (aarch64_stack_clash_protection_alloca_probe_range,
5018         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5020 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5022         PR target/86486
5023         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5024         probe ranges.
5025         * target.def (stack_clash_protection_alloca_probe_range): New.
5026         (stack_clash_protection_final_dynamic_probe): Remove.
5027         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5028         (default_stack_clash_protection_final_dynamic_probe): Remove.
5029         * targhooks.c: Likewise.
5030         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5031         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5032         * doc/tm.texi: Regenerate.
5034 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5036         PR target/86486
5037         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5038         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5039         aarch64_clamp_to_uimm12_shift): New.
5040         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5041         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5043 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5045         PR target/86486
5046         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5048 2018-10-01  Jeff Law  <law@redhat.com>
5049             Richard Sandiford <richard.sandiford@linaro.org>
5050             Tamar Christina  <tamar.christina@arm.com>
5052         PR target/86486
5053         * config/aarch64/aarch64.md
5054         (probe_stack_range): Add k (SP) constraint.
5055         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5056         STACK_CLASH_MAX_UNROLL_PAGES): New.
5057         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5058         stack probes for stack clash.
5059         (aarch64_allocate_and_probe_stack_space): New.
5060         (aarch64_expand_prologue): Use it.
5061         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5062         (aarch64_sub_sp): Add emit_move_imm optional param.
5064 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
5066         PR tree-optimization/87261
5067         * match.pd: Remove trailing whitespace.
5068         Add (x & y) | ~(x | y) -> ~(x ^ y),
5069         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5071 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5073         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5074         constraints.
5075         (ashlsi3_insn): Update instruction constraints.
5076         (ashrsi3_insn): Likewise.
5077         (rotrsi3): Likewise.
5078         (add_shift): Likewise.
5079         * config/arc/constraints.md (Csz): New 32 bit constraint. It
5080         avoids placing in the limm field small constants which, otherwise,
5081         could end into a small instruction.
5083 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5085         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5086         destination register is not odd-even.
5087         (umaddsidi4_split): Likewise.
5089 2018-10-01  Richard Biener  <rguenther@suse.de>
5091         * tree-inline.c (expand_call_inline): Store origin of fn
5092         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5093         * tree.c (block_ultimate_origin): Simplify and do some
5094         checking.
5096 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
5098         * config/i386/mmx.md (EMMS): New int iterator.
5099         (emms): New int attribute.
5100         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5101         EMMS int iterator.  Explicitly declare clobbers.
5102         (mmx_emms): Remove expander.
5103         (mmx_femms): Ditto.
5104         * config/i386/predicates.md (emms_operation): Remove predicate.
5105         (vzeroall_pattern): New predicate.
5106         (vzeroupper_pattern): Rename from vzeroupper_operation.
5107         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5108         vzeroupper_pattern and vzeroall_pattern predicates.
5110 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
5112         PR rtl-optimization/86939
5113         * ira-lives.c (make_hard_regno_born): Rename from this...
5114         (make_hard_regno_live): ... to this.  Remove update to conflict
5115         information.  Update function comment.
5116         (make_hard_regno_dead): Add conflict information update.  Update
5117         function comment.
5118         (make_object_born): Rename from this...
5119         (make_object_live): ... to this.  Remove update to conflict information.
5120         Update function comment.
5121         (make_object_dead):  Add conflict information update.  Update function
5122         comment.
5123         (mark_pseudo_regno_live): Call make_object_live.
5124         (mark_pseudo_regno_subword_live): Likewise.
5125         (mark_hard_reg_dead): Update function comment.
5126         (mark_hard_reg_live): Call make_hard_regno_live.
5127         (process_bb_node_lives): Likewise.
5128         * lra-lives.c (make_hard_regno_born): Rename from this...
5129         (make_hard_regno_live): ... to this.  Remove update to conflict
5130         information.  Remove now uneeded check_pic_pseudo_p argument.
5131         Update function comment.
5132         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5133         to conflict information.  Update function comment.
5134         (mark_pseudo_live): Remove update to conflict information.  Update
5135         function comment.
5136         (mark_pseudo_dead): Add conflict information update.
5137         (mark_regno_live): Call make_hard_regno_live.
5138         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5139         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5141 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
5143         PR target/87370
5144         * config/i386/i386.c (construct_container): Use TImode for
5145         BLKmode values in 2 integer registers.
5147 2018-09-29  Jeff Law  <law@redhat.com>
5149         * builtins.c (unterminated_array): Pass in c_strlen_data * to
5150         c_strlen rather than just a tree *.
5151         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5152         Update recursive calls appropriately.  If caller did not provide a
5153         suitable data pointer, create a local one.  When a non-terminated
5154         string is discovered, bubble up information about the string via the
5155         c_strlen_data object.
5156         * builtins.h (c_strlen): Update prototype.
5157         (c_strlen_data): New structure.
5158         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5159         For a type 2 call, if c_strlen indicates a non-terminated string
5160         use the length of the non-terminated string.
5161         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5163 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
5165         PR target/87467
5166         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5167         __m512d type for __A argument rather than __m512.
5169 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
5171         * match.pd (simple_comparison): Don't optimize if either operand is
5172         a function pointer when target needs function pointer canonicalization.
5174 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5176         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5177         power5 .. power9 to remove indirection.
5178         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5179         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5180         ASM_CPU_476_SPEC): Delete.
5181         (ASM_CPU_SPEC): Adjust.
5182         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5183         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5185 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5187         * config.in: Delete HAVE_AS_DCI.
5188         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5189         * config/rs6000/rs6000.h: Ditto.
5190         * configure.ac: Delete HAVE_AS_DCI.
5191         * configure: Regenerate.
5193 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5195         * config.in (HAVE_AS_LWSYNC): Delete.
5196         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5197         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5198         do it as a .long .
5199         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5200         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5201         as a .long .
5202         * configure.ac: Delete HAVE_AS_LWSYNC.
5203         * configure: Regenerate.
5205 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5206             Pierre-Marie de Rodat  <derodat@adacore.com>
5208         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5209         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5210         (cgraph_node::create_thunk): Add indirect_offset parameter.
5211         (thunk_adjust): Likewise.
5212         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5213         and initialize the corresponding field with it.
5214         (cgraph_node::dump): Dump indirect_offset field.
5215         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5216         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5217         (thunk_adjust): Add indirect_offset parameter and deal with it.
5218         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5219         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
5220         or if the thunk is external or local.  Fix formatting.  Do not chain
5221         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
5222         if any, in the GIMPLE representation.
5223         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5224         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5225         (input_node): Read indirect_offset field.
5226         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5227         call to thunk_adjust.
5228         * tree-nested.c (struct nesting_info): Add thunk_p field.
5229         (create_nesting_tree): Set it.
5230         (convert_all_function_calls): Copy static chain from targets to thunks.
5231         (finalize_nesting_tree_1): Return early for thunks.
5232         (unnest_nesting_tree_1): Do not finalize thunks.
5233         (gimplify_all_functions): Do not gimplify thunks.
5235 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5237         * opt-suggestions.c (option_proposer::build_option_suggestions):
5238         Release "option_values".
5240 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5242         * coverage.c (get_coverage_counts): Convert problem-reporting dump
5243         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5244         * dumpfile.c (kind_as_string): New function.
5245         (dump_loc): Rather than a hardcoded prefix of "note: ", use
5246         kind_as_string to vary the prefix based on dump_kind.
5247         (selftest::test_capture_of_dump_calls): Update for above.
5249 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5251         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5252         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
5254 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5256         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5257         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5258         INVALID_REGNUM instead of FPSR_REG.
5259         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5260         * config/i386/i386.md: Update comment of FP compares.
5261         (fldenv): Do not clobber FPSR_REG.
5263 2018-09-28  Richard Biener  <rguenther@suse.de>
5265         * tree.h (BLOCK_ORIGIN): New.
5266         * omp-expand.c (grid_expand_target_grid_body): Assign
5267         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5268         * tree-inline.c (remap_block): Likewise.
5269         * auto-profile.c (get_function_decl_from_block): Simplify
5270         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5271         * langhooks.c (lhd_print_error_function): Likewise.
5272         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5273         Likewise.
5274         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5275         * tree.c (block_nonartificial_location): Likewise.
5276         (block_ultimate_origin): Likewise.
5277         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
5278         no longer needed LTO case.
5280 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
5281             Jan Hubicka  <jh@suse.cz>
5282             Martin Jambor  <mjambor@suse.cz>
5284         * simplify-rtx.c (simplify_merge_mask): New function.
5285         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5286         same masks are used in op1 or op2.
5287         (test_vec_merge): New function.
5288         (test_vector_ops): Call test_vec_merge.
5290 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5292         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5293         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5294         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5295         (cypress_costs): Set it.
5296         (supersparc_costs): Likewise.
5297         (hypersparc_costs): Likewise.
5298         (leon_cost): Likewise.
5299         (leon3_costs): Likewise.
5300         (sparclet_costs): Likewise.
5301         (ultrasparc_costs): Likewise.
5302         (ultrasparc_costs): Likewise.
5303         (niagara_costs): Likewise.
5304         (niagara2_costs): Likewise.
5305         (niagara3_costs): Likewise.
5306         (niagara4_costs): Likewise.
5307         (niagara7_costs): Likewise.
5308         (m8_costs): Likewise.
5309         (TARGET_CAN_FOLLOW_JUMP): Define.
5310         (pass_work_around_errata::gate): Minor tweak.
5311         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5312         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5313         Automaitcally clear MASK_FSMULD mask for V7 processors.
5314         (sparc_can_follow_jump): New static function.
5315         (output_ubranch): Deal with CROSSING_JUMP_P.
5316         (sparc_use_sched_lookahead): Rewrite using switch statement.
5317         (sparc_issue_rate): Reorder.
5318         (sparc_branch_cost): New function.
5320 2018-09-27  Martin Sebor  <msebor@redhat.com>
5322         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5323         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5324         (int_fits_type_p): Same.
5326 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
5328         * config/i386/i386.md (FPCR_REG): Remove.
5329         (UNSPEC_FLDCW): Remove.
5330         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5331         (x86_fldcw_1): Remove insn pattern.
5332         (fnstenv): Do not clobber FPCR_REG.
5333         (fldenv): Ditto.
5334         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5335         (CALL_USED_REGISTERS): Ditto.
5336         (REG_ALLOC_ORDER): Ditto.
5337         (REG_CLASS_CONTENTS): Ditto.
5338         (HI_REGISTER_NAMES): Ditto.
5339         (ADDITIONAL_REGISTER_NAMES): Use defines instead
5340         of numerical constants.
5341         * config/i386/i386.c (regclass_map): Remove fpsr register.
5342         (dbx_register_map): Ditto.
5343         (dbx64_register_map): Ditto.
5344         (svr4_dbx_register_map): Ditto.
5345         (print_reg): Do not handle FPCR_REG.
5347 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
5349         PR target/87149
5350         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5351         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5352         Delete, always treat as true.
5353         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5354         Ditto.  Simplify remaining code.
5355         * config/powerpcspe/powerpcspe.h: Ditto.
5356         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5357         Simplify remaining code.
5358         (rs6000_expand_builtin): Ditto.
5359         * config/rs6000/rs6000.h: Ditto.
5360         * configure.ac: Ditto.
5361         * configure: Regenerate.
5363 2018-09-27  Martin Liska  <mliska@suse.cz>
5365         * coverage.c (get_coverage_counts): Revert the formatting
5366         of missing profile opt info.
5368 2018-09-27  Richard Biener  <rguenther@suse.de>
5370         PR debug/37801
5371         PR debug/87440
5372         * dwarf2out.c (set_block_origin_self): Do not mark outermost
5373         block as we do not output that.
5374         (gen_inlined_subroutine_die): Elide the originally outermost
5375         block, matching what we do for concrete instances.
5376         (decls_for_scope): Add parameter specifying whether to recurse
5377         to subblocks.
5379 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
5380             Tom de Vries  <tom@codesourcery.com>
5382         PR 82089
5384         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5385         STORE_FLAG_VALUE == 1.
5387 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
5389         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5390         constant definitions.
5391         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5392         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5393         ("speculation_barrier"): New expander definition.
5395 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
5397         PR gcov-profile/86957
5398         * common.opt: New warning option -Wmissing-profile.
5399         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5400         * doc/invoke.texi: Document -Wmissing-profile.
5402 2018-09-26  Jim Wilson  <jimw@sifive.com>
5404         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5405         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5407 2018-09-26  Martin Sebor  <msebor@redhat.com>
5409         * tree.c (zerop): Change return type to bool.
5410         (integer_zerop, integer_onep, integer_each_onep): Same.
5411         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5412         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5413         (real_onep, real_minus_onep, chain_index): Same.
5414         (print_type_hash_statistics, type_list_equal): Same.
5415         * tree.h (zerop): Same.
5416         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5417         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5418         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5419         (real_onep, real_minus_onep, chain_index): Same.
5420         (print_type_hash_statistics, type_list_equal): Same.
5422 2018-09-26  Jim Wilson  <jimw@sifive.com>
5424         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5426 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
5428         PR target/87414
5429         * config/i386/i386.c: Include debug.h and dwarf2out.h.
5430         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5431         call.
5433 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
5435         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5437 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
5439         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5440         and FP_SECOND_SSE_REGS.
5441         (REG_CLASS_NAMES): Ditto.
5442         (REG_CLASS_CONTENTS): Ditto.
5443         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5444         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5445         (ix86_preferred_output_reload_class): Ditto.
5446         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5447         clobber constraint to "=&f".
5448         (fix_truncdi_i387): Ditto.
5449         (lrintxfdi2): Ditto.
5450         (fistdi2_<rounding>): Ditto.
5451         (fpremxf4_i387): Change "=u" constraint to "=f".
5452         (fprem1xf4_i387): Ditto.
5453         (sincosxf3): Ditto.
5454         (fptanxf4_i387): Ditto.
5455         (fxtractxf3_i387): Ditto.
5456         (fscalexf4_i387): Ditto.
5457         (atan2xf3): Change "u" constraint to "f".
5458         (fyl2xxf3_i387): Ditto.
5459         (fyl2xp1xf3_i387): Ditto.
5461 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
5463         PR target/87439
5464         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5465         for removed I387_MASK_PM entity.
5468 2018-09-26  Jeff Law  <law@redhat.com>
5469         Revert
5470         2018-09-26  Alexey Neyman  <stilor@att.net>
5472         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5473         headers are no longer pulled in by <isl/val.h>.
5475 2018-09-26  Richard Biener  <rguenther@suse.de>
5477         PR debug/87443
5478         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5479         or concrete instance DIE to the tree.  Create abstract origin
5480         attributes also for concrete instances.
5482 2018-09-26  Alexey Neyman  <stilor@att.net>
5484         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5485         headers are no longer pulled in by <isl/val.h>.
5487 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
5489         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5490         Use new helper functions.
5491         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5492         Use new helper functions.
5493         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5494         aarch_mm_needs_release): New declarations.
5495         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5496         aarch_mm_needs_release): New.
5498 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
5500         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5501         (arm32_output_mi_thunk): Deal with long calls.
5503 2018-09-26  Richard Biener  <rguenther@suse.de>
5505         PR debug/87428
5506         PR debug/87362
5507         * tree-inline.c (expand_call_inline): When the location
5508         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5509         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5510         the inserted BLOCK to make inlined_function_outer_scope_p
5511         recognize it.
5512         * dwarf2out.c (add_call_src_coords_attributes): Do not add
5513         coords for reserved locations.
5515 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5517         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5518         (*call_indirect_nonlocal_sysv<mode>): Ditto.
5519         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5520         (*sibcall_nonlocal_sysv<mode>): Ditto.
5521         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5522         (<bd>_<mode>): Ditto.
5523         (<bd>tf_<mode>): Ditto.
5525 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5527         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5528         control string as a list of templates instead of as C code.
5529         (*altivec_movti): Ditto.
5530         * config/rs6000/darwin.md (movdf_low_di): Ditto.
5532 2018-09-25  Jim Wilson  <jimw@sifive.com>
5534         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5535         when target symbol is weak.
5537 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5539         PR c/87387
5540         * builtins.c (unterminated_array): Simplify.
5541         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
5542         where pointer arithmetic is safe.
5544 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5546         PR target/86987
5547         * config/rs6000/altivec.md (altivec_vspltb): Use
5548         const_0_to_15_operand instead of u5bit_cint_operand.
5549         (*altivec_vspltb_internal): Ditto.
5550         (altivec_vspltb_direct): Ditto.
5551         (altivec_vsplth): Use const_0_to_7_operand instead of
5552         u5bit_cint_operand.
5553         (*altivec_vsplth_internal): Ditto.
5554         (altivec_vsplth_direct): Ditto.
5555         (altivec_vspltw): Use const_0_to_3_operand instead of
5556         u5bit_cint_operand.
5557         (*altivec_vspltw_internal): Ditto.
5558         (altivec_vspltw_direct): Ditto.
5559         (altivec_vspltsf): Ditto.
5560         (*altivec_vspltsf_internal): Ditto.
5561         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5562         various splats with the proper size immediate.  Reorder the various
5563         cases by ascending size of immediate, and put all such together.
5565 2018-09-25  Richard Biener  <rguenther@suse.de>
5567         PR debug/83941
5568         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5569         GC-ification.
5570         (maybe_create_die_with_external_ref): Do not create
5571         DW_TAG_imported_unit here.
5572         (add_abstract_origin_attribute): Handle external BLOCK refs.
5573         (dwarf2out_abstract_function): Simplify LTO case.
5574         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5575         rather than using maybe_create_die_with_external_ref.
5577 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
5579         PR target/71278
5580         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5581         (frndintxf2_mask_pm_i387): Ditto.
5582         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5583         Enable for !flag_trapping_math.
5584         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5585         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5586         Change operand 1 predicate to nonimmediate_operand.
5587         (attr "i387_cw"): Remove mask_pm.
5588         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5589         (enum ix86_entity): Remove I387_MASK_PM.
5590         * config/i386/i386.c (ix86_i387_mode_needed): Do not
5591         handle I387_MASK_PM.
5592         (ix86_mode_needed): Ditto.
5593         (ix86_mode_after): Ditto.
5594         (ix86_mode_entry): Ditto.
5595         (ix86_mode_exit): Ditto.
5596         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5598 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
5600         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5601         to_update_switch_stmts to vNULL instead of calling create on them
5602         immediately.
5604 2018-09-25  Richard Biener  <rguenther@suse.de>
5606         PR tree-optimization/87402
5607         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5608         (visit_phi): Re-instantiate handling of supposed to be VARYING
5609         but non-VARYING backedge value.
5611 2018-09-25  Richard Biener  <rguenther@suse.de>
5613         PR debug/83941
5614         * dwarf2out.c (struct sym_off_pair): New.
5615         (external_die_map): New global.
5616         (lookup_decl_die): When in LTO create DIEs lazily from the
5617         external_die_map.
5618         (lookup_block_die): New function, create DIEs lazily in LTO.
5619         (equate_block_to_die): New function.
5620         (dwarf2out_die_ref_for_decl): During WPA get the association
5621         from the external DIE map.
5622         (dwarf2out_register_external_die): Record mapping into the
5623         external DIE map.
5624         (maybe_create_die_with_external_ref): New function split out from
5625         DIE generation part of old dwarf2out_register_external_die.
5626         (add_abstract_origin_attribute): Do not return the DIE.  When
5627         in LTO reference externals directly.
5628         (dwarf2out_abstract_function): When in LTO ignore calls for
5629         decls with external DIEs (already present abstract instances).
5630         (gen_call_site_die): Adjust.
5631         (add_high_low_attributes): Likewise.
5632         (gen_lexical_block_die): Likewise.
5633         (gen_inlined_subroutine_die): Likewie.
5634         (gen_block_die): Likewise.
5635         (dwarf2out_inline_entry): Likewise.
5636         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5637         DIEs.
5639 2018-09-25  Martin Liska  <mliska@suse.cz>
5641         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5642         integers and not by a float value.
5644 2018-09-25  Martin Liska  <mliska@suse.cz>
5646         PR fortran/87394
5647         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5648         instead of NULL.
5649         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5650         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5651         * godump.c (go_format_type): Remove extra parenthesis.
5653 2018-09-25  Martin Liska  <mliska@suse.cz>
5655         * alias.c (set_dest_equal_p): Remove unused function.
5656         * config/i386/i386.c (def_builtin_pure2): Likewise.
5657         * diagnostic-show-locus.c (class layout): Remove
5658         unused field.
5659         (layout::layout): Likewise here.
5660         * dump-context.h (class temp_dump_context): Likewise.
5661         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5662         (add_AT_loclistsptr): Likewise.
5663         (add_AT_offset): Likewise.
5664         (get_AT_hi_pc): Likewise.
5665         (is_comdat_die): Likewise.
5666         (type_is_enum): Likewise.
5667         (ceiling): Likewise.
5668         (add_AT_vms_delta): Likewise.
5669         (is_class_die): Likewise.
5670         * edit-context.c (class line_event): Remove unused field.
5671         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5672         unused function.
5673         * ipa-cp.c (ipa_get_vr_lat): Likewise.
5674         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5675         (ok_for_base_p_nonstrict): Likewise.
5676         * tree-chrec.c (is_not_constant_evolution): Likewise.
5677         (chrec_fold_poly_cst): Likewise.
5678         * tree-if-conv.c (has_pred_critical_p): Likewise.
5679         * tree-ssa-coalesce.c (print_exprs): Likewise.
5680         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5681         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5682         * tree-vrp.c (value_ranges_intersect_p): Likewise.
5683         (value_range_nonnegative_p): Likewise.
5685 2018-09-25  Martin Liska  <mliska@suse.cz>
5687         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5688         Do not handle "GNU Pascal".
5689         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5690         Likewise.
5691         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5692         from documentation. Likewise.
5693         * dbxout.c (dbxout_range_type): Likewise.
5694         * doc/cpp.texi: Likewise.
5695         * doc/extend.texi: Likewise.
5696         * doc/frontends.texi: Likewise.
5697         * doc/invoke.texi: Remove Pascal entry.
5698         * tree.def (CLEANUP_POINT_EXPR): Likewise.
5699         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5701 2018-09-25  Martin Liska  <mliska@suse.cz>
5703         PR middle-end/86078
5704         * doc/invoke.texi: Document all parameters and remove default
5705         of the parameters.
5707 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
5709         PR bootstrap/87417
5710         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5711         contains HOST_WIDE_INTs when computing its size.
5713 2018-09-24  Jim Wilson  <jimw@sifive.com>
5715         PR target/87391
5716         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5717         not TARGET_RVE.
5718         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5720 2018-09-24  Andrew Pinski  <apinski@marvell.com>
5722         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5723         access prev before checking it for NULLness in the
5724         AARCH64_FUSE_CMP_BRANCH case.
5726 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
5728         PR target/82699
5729         * config/i386/i386.c (rest_of_insert_endbranch): Set
5730         endbr_queued_at_entrance to true and don't insert ENDBR if
5731         x86_function_profiler will be called.
5732         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5733         is true.
5734         * config/i386/i386.h (machine_function): Add
5735         endbr_queued_at_entrance.
5737 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5739         * genattrtab.c (mk_attr_alt): Use alternative_mask.
5740         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5741         types.
5742         (check_attr_test): Use alternative_mask.
5743         (get_attr_value): Likewise.
5744         (compute_alternative_mask): Use alternative_mask and XWINT.
5745         (make_alternative_compare): Use alternative_mask.
5746         (attr_alt_subset_p): Use XWINT.
5747         (attr_alt_subset_of_compl_p): Likewise.
5748         (attr_alt_intersection): Use alternative_mask and XWINT.
5749         (attr_alt_union): Likewise.
5750         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5751         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5752         (simplify_test_exp): Use alternative_mask and XWINT.
5753         (write_test_expr): Use alternative_mask and XWINT, adjust bit
5754         number calculation to support 64 bits.  Generate code that
5755         checks 64-bit masks.
5756         (main): Use alternative_mask.
5757         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5759 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5761         PR target/80080
5762         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5763         RETURN+USE when returning via %r14.
5765 2018-09-24  Martin Liska  <mliska@suse.cz>
5767         * gcov.c (output_lines): Print colorization legend
5768         for both flag_use_colors and flag_use_hotness_colors.
5769         Reword the help.
5771 2018-09-24  Martin Liska  <mliska@suse.cz>
5773         * coverage.c (get_coverage_counts): Use warning_at
5774         with current_function_decl location. Use %qD in warning
5775         message.
5777 2018-09-24  Martin Liska  <mliska@suse.cz>
5779         * memory-block.h (memory_block_pool::release): Annotate with
5780         valgrind that the memory is not accessible.
5782 2018-09-24  Martin Liska  <mliska@suse.cz>
5784         PR sanitizer/85774
5785         * asan.c: Make asan_handled_variables extern.
5786         * asan.h: Likewise.
5787         * cfgexpand.c (expand_stack_vars): Make sure
5788         a representative is unpoison if another
5789         variable in the partition is handled by
5790         use-after-scope sanitization.
5792 2018-09-24  Richard Biener  <rguenther@suse.de>
5794         PR tree-optimization/63155
5795         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5796         the worklist when the edge of the respective argument isn't
5797         executable.
5799 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5801         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5802         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5803         (MASK_CLASS_P): Update for rename.
5804         (MAYBE_MASK_CLASS_P): Ditto.
5805         (REG_CLASS_NAMES): Update.
5806         (REG_CLASS_CONTENT): Update.
5807         * config/i386/i386.c (regclass_map): Update for MASK_REG
5808         and ALL_MASK_REGS rename.
5809         * config/i386/constraints.md (Yk): Update for rename.
5810         (k): Ditto.
5812 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5814         * config/i386/i386.h (enum reg_class): Remove
5815         EVEX_SSE_REGS and MOD4_SSE_REGS.
5816         (REG_CLASS_NAMES): Update.
5817         (REG_CLASS_CONTENT): Update.
5818         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5819         registers as ALL_SSE_REGS.
5820         (ix86_additional_allocno_class_p): Remove.
5821         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5822         (ix86_register_priority): Lower priority of EVEX SSE registers.
5823         Use IN_RANGE macro where appropriate.
5824         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5825         AVX-5124VNNIW checks.
5826         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5827         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5828         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5829         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5830         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5831         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5832         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5833         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5834         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5835         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5836         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5837         * config/i386/constraints.md (Yh): Remove.
5839 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5841         * config/i386/i386.c (regclass_map): Declare integer REX registers
5842         as GENERAL_REGS.
5844 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
5846         * doc/service.texi (Service): Switch the fsf.org link to https.
5848 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
5850         PR target/86798
5851         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5852         Define to speculation_safe_value_not_needed.
5854 2018-09-21  Florian Weimer  <fweimer@redhat.com>
5856         PR middle-end/81035
5857         * doc/extend.texi (Common Function Attributes): Mention that
5858         noreturn suppresses tail call optimization.
5860 2018-09-21  Jeff Law  <law@redhat.com>
5862         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5863         vr_values::cleanup_edges_and_switches.
5864         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5865         vr_values class.
5866         (identify_jump_threads): Remove EDGE_IGNORE handling.
5867         (execute_vrp): Move handling of to_remove_edges and
5868         to_update_switch_stmts into vr_values class member functions.
5869         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5870         (to_update_switch_stmts): Likewise.
5871         * vr-values.c: Include cfghooks.h.
5872         (vr_values::vr_values): Initialize to_remove_edges and
5873         to_update_switch_stmts.
5874         (vr_values::~vr_values): Verify to_remove_edges and
5875         to_update_switch_stmts are empty.
5876         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5877         (vr_values::cleanup_edges_and_switches): New member function.
5878         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5879         function.  Add new data members.
5881 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
5883         PR tree-optimization/87309
5884         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5885         calls with pflags and alt_flags.
5886         (selftest::test_capture_of_dump_calls): Add test of interaction of
5887         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5889 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5891         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5893 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5895         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5897 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5899         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5900         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5901         (VXWORKS_LIBS_RTP): Minor reordering.
5903 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5905         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5906         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5908 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5910         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5911         (PTRDIFF_TYPE): Likewise.
5913 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5915         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5916         triplet, similar to support for VxWorks7.
5917         * config/vxworks-dummy.h: Provide a default definition
5918         of TARGET_VXWORKS64 to 0.
5920 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5922         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5923         * config/vxworks-dummy.h: here.
5925 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5927         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5929 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
5930             Bo Zhou  <zbo.zhou@hisilicon.com>
5932         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5933         * config/aarch64/aarch64-tune.md: Regenerated.
5934         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5935         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5936         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5938 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
5939             Julian Brown  <julian@codesourcery.com>
5941         * builtins.c (get_builtin_sync_mem): Handle address spaces.
5943 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
5945         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5946         if the call takes a static chain.
5948 2018-09-21  Martin Liska  <mliska@suse.cz>
5950         * auto-profile.c (autofdo_source_profile::read): Do not
5951         set sum_all.
5952         (read_profile): Do not add working sets.
5953         (read_autofdo_file): Remove sum_all.
5954         (afdo_callsite_hot_enough_for_early_inline): Remove const
5955         qualifier.
5956         * coverage.c (struct counts_entry): Remove gcov_summary.
5957         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
5958         do not support GCOV_TAG_PROGRAM_SUMMARY.
5959         (get_coverage_counts): Remove summary and expected
5960         arguments.
5961         * coverage.h (get_coverage_counts): Likewise.
5962         * doc/gcov-dump.texi: Remove -w option.
5963         * gcov-dump.c (dump_working_sets): Remove.
5964         (main): Do not support '-w' option.
5965         (print_usage): Likewise.
5966         (tag_summary): Likewise.
5967         * gcov-io.c (gcov_write_summary): Do not dump
5968         histogram.
5969         (gcov_read_summary): Likewise.
5970         (gcov_histo_index): Remove.
5971         (gcov_histogram_merge): Likewise.
5972         (compute_working_sets): Likewise.
5973         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
5974         it not obsolete.
5975         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
5976         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
5977         (GCOV_HISTOGRAM_SIZE): Remove.
5978         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
5979         (struct gcov_summary): Simplify rapidly just
5980         to runs and sum_max fields.
5981         (gcov_histo_index): Remove.
5982         (NUM_GCOV_WORKING_SETS): Likewise.
5983         (compute_working_sets): Likewise.
5984         * gcov-tool.c (print_overlap_usage_message): Remove
5985         trailing empty line.
5986         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
5987         (output_lines): Remove program related line.
5988         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
5989         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
5990         histogram.
5991         (input_profile_summary): Do not read it.
5992         (merge_profile_summaries): And do not merge it.
5993         (input_symtab): Do not call removed function.
5994         * modulo-sched.c (sms_schedule): Do not print sum_max.
5995         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
5996         removed when histogram method was invented.
5997         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
5998         mode.
5999         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6000         GCOV coding style.
6001         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6002         and dump selected value.
6003         * profile.c (add_working_set): Remove.
6004         (get_working_sets): Likewise.
6005         (find_working_set): Likewise.
6006         (get_exec_counts): Do not work with working sets.
6007         (read_profile_edge_counts): Do not inform as sum_max is removed.
6008         (compute_branch_probabilities): Likewise.
6009         (compute_value_histograms): Remove argument for call of
6010         get_coverage_counts.
6011         * profile.h: Do not make gcov_summary const.
6013 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
6015         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6017 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
6019         PR tree-optimization/86990
6020         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6021         Check that the entire merged store group is made of constants only for
6022         overlapping stores.
6024 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
6026         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6027         (VTABLE_VERIFICATION_SPEC): Likewise.
6028         (SANITIZER_EARLY_SPEC): Likewise.
6029         (SANITIZER_SPEC): Likewise.
6030         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6031         * doc/invoke.texi (Link Options): Document -r.
6033 2018-09-20  Richard Biener <rguenther@suse.de>
6035         PR middle-end/87054
6036         * gimplify.c (gimplify_expr): Retain alignment of
6037         addressable lvalue in dereference.
6039 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
6041         PR bootstrap/87013
6042         * configure.ac: Check for .loc is_stmt support.
6043         * configure, config.in: Rebuilt.
6044         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6045         if not supported.
6047 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6049         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6050         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6051         -misel=no.
6053 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6055         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6056         VECTOR_OTHER.
6057         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6058         case VECTOR_OTHER.
6060 2018-09-20  Marek Polacek  <polacek@redhat.com>
6062         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6064 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6066         PR tree-optimization/87288
6067         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6068         into account when determining PEELING_FOR_NITERS.
6070 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6072         PR tree-optimization/86877
6073         * tree-vect-loop.c (vect_analyze_loop_2): Call
6074         vect_verify_datarefs_alignment.
6076 2018-09-19  Marek Polacek  <polacek@redhat.com>
6078         * doc/invoke.texi: Document -Wclass-conversion.
6080 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
6082         * config/pa/pa.c (pa_adjust_priority): Delete.
6083         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6085         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6086         (atomic_storehi): Likewise.
6087         (atomic_storesi): Likewise.
6088         (atomic_loaddi): Restore compare and swap exchange loop code.
6090 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
6092         PR rtl-optimization/86902
6093         * combine.c (try_combine): When changing the CC mode used, don't change
6094         an unrelated mode in other_insn to that new CC mode.
6096 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
6098         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6099         with %T in place of calls to dump_generic_expr.
6100         (prune_runtime_alias_test_list): Likewise.
6101         (create_runtime_alias_checks): Likewise.
6102         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6103         (vect_analyze_data_ref_dependence): Likewise.
6104         (vect_slp_analyze_data_ref_dependence): Likewise.
6105         (vect_record_base_alignment): Likewise.  Use %G in place of call
6106         to dump_gimple_stmt.
6107         (vect_compute_data_ref_alignment): Likewise.
6108         (verify_data_ref_alignment): Likewise.
6109         (vect_find_same_alignment_drs): Likewise.
6110         (vect_analyze_group_access_1): Likewise.
6111         (vect_analyze_data_ref_accesses): Likewise.
6112         (dependence_distance_ge_vf): Likewise.
6113         (dump_lower_bound): Likewise.
6114         (vect_prune_runtime_alias_test_list): Likewise.
6115         (vect_find_stmt_data_reference): Likewise.
6116         (vect_analyze_data_refs): Likewise.
6117         (vect_create_addr_base_for_vector_ref): Likewise.
6118         (vect_create_data_ref_ptr): Likewise.
6119         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6120         (vect_can_advance_ivs_p): Likewise.
6121         (vect_update_ivs_after_vectorizer): Likewise.
6122         (vect_gen_prolog_loop_niters): Likewise.
6123         (vect_prepare_for_masked_peels): Likewise.
6124         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6125         (vect_determine_vectorization_factor): Likewise.
6126         (vect_is_simple_iv_evolution): Likewise.
6127         (vect_analyze_scalar_cycles_1): Likewise.
6128         (vect_analyze_loop_operations): Likewise.
6129         (report_vect_op): Likewise.
6130         (vect_is_slp_reduction): Likewise.
6131         (check_reduction_path): Likewise.
6132         (vect_is_simple_reduction): Likewise.
6133         (vect_create_epilog_for_reduction): Likewise.
6134         (vect_finalize_reduction:): Likewise.
6135         (vectorizable_induction): Likewise.
6136         (vect_transform_loop_stmt): Likewise.
6137         (vect_transform_loop): Likewise.
6138         (optimize_mask_stores): Likewise.
6139         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6140         (vect_split_statement): Likewise.
6141         (vect_recog_over_widening_pattern): Likewise.
6142         (vect_recog_average_pattern): Likewise.
6143         (vect_determine_min_output_precision_1): Likewise.
6144         (vect_determine_precisions_from_range): Likewise.
6145         (vect_determine_precisions_from_users): Likewise.
6146         (vect_mark_pattern_stmts): Likewise.
6147         (vect_pattern_recog_1): Likewise.
6148         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6149         (vect_record_max_nunits): Likewise.
6150         (vect_build_slp_tree_1): Likewise.
6151         (vect_build_slp_tree_2): Likewise.
6152         (vect_print_slp_tree): Likewise.
6153         (vect_analyze_slp_instance): Likewise.
6154         (vect_detect_hybrid_slp_stmts): Likewise.
6155         (vect_detect_hybrid_slp_1): Likewise.
6156         (vect_slp_analyze_operations): Likewise.
6157         (vect_slp_analyze_bb_1): Likewise.
6158         (vect_transform_slp_perm_load): Likewise.
6159         (vect_schedule_slp_instance): Likewise.
6160         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6161         (vect_mark_stmts_to_be_vectorized): Likewise.
6162         (vect_init_vector_1): Likewise.
6163         (vect_get_vec_def_for_operand): Likewise.
6164         (vect_finish_stmt_generation_1): Likewise.
6165         (vect_check_load_store_mask): Likewise.
6166         (vectorizable_call): Likewise.
6167         (vectorizable_conversion): Likewise.
6168         (vectorizable_operation): Likewise.
6169         (vectorizable_load): Likewise.
6170         (vect_analyze_stmt): Likewise.
6171         (vect_is_simple_use): Likewise.
6172         (vect_get_vector_types_for_stmt): Likewise.
6173         (vect_get_mask_type_for_stmt): Likewise.
6174         * tree-vectorizer.c (increase_alignment): Likewise.
6176 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
6178         * doc/rtl.texi: Adjust vec_select description.
6179         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6180         non-constant selectors.
6182 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
6184         * config/aarch64/aarch64-protos.h
6185         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6186         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6187         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6188         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6189         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6190         (AARCH64_FL_PROFILE): Move index so flags are ordered.
6191         (AARCH64_ISA_RCPC8_4): New flag.
6192         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6193         to aarch64_offset_9bit_signed_unscaled_p.
6194         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6195         and use stlur.
6196         * config/aarch64/constraints.md (Ust): New constraint.
6197         * config/aarch64/predicates.md.
6198         (aarch64_9bit_offset_memory_operand): New predicate.
6199         (aarch64_rcpc_memory_operand): New predicate.
6201 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
6203         PR rtl-optimization/87361
6204         * rtlanal.c (nonzero_bits1): Revert accidental change.
6206 2018-09-19  Richard Biener  <rguenther@suse.de>
6208         PR tree-optimization/87349
6209         PR tree-optimization/87342
6210         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6212 2018-09-18  Marek Polacek  <polacek@redhat.com>
6214         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6215         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6217 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6219         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6221 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6223         PR rtl-optimization/86882
6224         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6226 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
6228         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6229         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6231 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
6233         PR other/87353
6234         * doc/invoke.texi (Link Options): Fix formatting and grammar.
6236 2018-09-18  Richard Biener  <rguenther@suse.de>
6238         PR middle-end/63155
6239         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6240         (compute_samebase_partition_bases): Likewise.
6241         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6242         (gimple_can_coalesce_p): Simplify.
6244 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
6246         Handle a library implementation of ffs calling __builtin_ffs.
6247         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6248         (mmix_init_libfuncs): New function: make __builtin_ffs expand
6249         to __ffsdi2.
6251 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6253         * diagnostic-show-locus.c (class layout_range): Add field
6254         "m_original_idx".
6255         (layout_range::layout_range): Add "original_idx" param and use it
6256         to initialize new field.
6257         (make_range): Use 0 for original_idx.
6258         (layout::layout): Pass in index to calls to
6259         maybe_add_location_range.
6260         (layout::maybe_add_location_range): Add param "original_idx" and
6261         pass it on to layout_range.
6262         (layout::print_any_labels): Pass on range->m_original_idx to
6263         get_text call.
6264         (gcc_rich_location::add_location_if_nearby): Use 0 for
6265         original_idx.
6266         * gcc-rich-location.h (text_range_label::get_text): Update for new
6267         param.
6268         (range_label_for_type_mismatch::get_text): Likewise.
6270 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6272         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6274 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6276         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6277         format_string_diagnostic_t.
6278         (fmtwarn_n): Likewise.
6279         * substring-locations.c
6280         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6281         (format_warning_n_va): Convert to...
6282         (format_string_diagnostic_t::emit_warning_n_va): ...this.
6283         (format_warning_va): Convert to...
6284         (format_string_diagnostic_t::emit_warning_va): ...this.
6285         (format_warning_at_substring): Convert to...
6286         (format_string_diagnostic_t::emit_warning): ...this.
6287         (format_warning_at_substring_n): Convert to...
6288         (format_string_diagnostic_t::emit_warning_n): ...this.
6289         * substring-locations.h (class format_string_diagnostic_t): New
6290         class.
6291         (format_warning_va): Convert to
6292         format_string_diagnostic_t::emit_warning_va.
6293         (format_warning_n_va): Convert to
6294         format_string_diagnostic_t::emit_warning_n_va.
6295         (format_warning_at_substring): Convert to
6296         format_string_diagnostic_t::emit_warning.
6297         (format_warning_at_substring_n): Convert to
6298         format_string_diagnostic_t::emit_warning_n.
6300 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
6301             Bernd Schmidt <bernds_cb1@t-online.de>
6303         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6304         SImode args.
6306 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6308         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6309         operand 0 predicate to nonimmediate operand.
6310         (rint<mode>2_frndint): Remove insn pattern.
6311         (rint<mode>2): Change operand 1 predicate to general_operand.
6312         Extend operand 1 to XFmode and generate rintxf2 insn.
6313         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6314         Do not use X87MODEF mode macro.
6315         (frndintxf2_<rounding>_i387): Rename from
6316         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
6317         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6318         to XFmode and generate significandxf3 insn.
6320 2018-09-17  Richard Biener  <rguenther@suse.de>
6322         PR tree-optimization/87328
6323         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6324         visiting unexecutable backedges when not iterating.
6325         (do_rpo_vn): Mark all edges not executable even when not
6326         iterating.
6328 2018-09-17  Martin Jambor  <mjambor@suse.cz>
6330         PR c/63886
6331         * doc/invoke.texi (Warning Options): Likewise.
6333 2018-09-17  Richard Biener  <rguenther@suse.de>
6335         PR tree-optimization/87301
6336         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6337         clean EH info from leftover copy assignments.
6339 2018-09-17  Martin Liska  <mliska@suse.cz>
6341         PR gcov-profile/85871
6342         * gcov.c (output_intermediate_file): Fix out of bounds
6343         access.
6345 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
6347         * config/arc/arc.c: Object attributes for core4 not reflected
6348         correctly.
6349         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6350         core3).
6352 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
6354         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6356 2018-09-17  Martin Liska  <mliska@suse.cz>
6358         * doc/gcov.texi: Document new option --use-hotness-colors.
6359         * gcov.c (struct source_info): Declare new field.
6360         (source_info::source_info): Set default for maximum_count.
6361         (print_usage): Add new -q option.
6362         (process_args): Process it.
6363         (accumulate_line_info): Save src->maximum_count.
6364         (output_line_beginning): Make color line number if
6365         flag_use_hotness_colors is set.
6366         (output_line_details): Pass default argument value.
6367         (output_lines): Pass src->maximum_count.
6369 2018-09-17  Martin Liska  <mliska@suse.cz>
6371         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6372         Use processor_names table.
6373         * config/i386/i386.c (ix86_default_align): Use
6374         processor_cost_table for alignment values.
6375         (ix86_option_override_internal): Use processor_names.
6376         (ix86_function_specific_print): Likewise.
6377         * config/i386/i386.h (struct processor_costs):
6378         Add alignment values.
6379         (struct ptt): Remove and replace with const char *.
6380         * config/i386/x86-tune-costs.h (struct processor_costs):
6381         Declare default alignments for all costs.
6383 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
6385         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6386         symbolics or VR_VARYING ranges for ABS_EXPR.
6387         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6388         when range will wrap.
6390 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
6392         PR middle-end/86864
6393         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6394         before and after a JUMP_TABLE_DATA.
6396 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
6398         PR middle-end/87188
6399         * dojump.c (do_compare_and_jump): Canonicalize function pointers
6400         when one operand is a function pointer.  Use POINTER_TYPE_P and
6401         FUNC_OR_METHOD_TYPE_P.
6402         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6403         * fold-const.c (build_range_check): Likewise.
6404         * match.pd (simple_comparison): Likewise.
6406 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
6408         PR c/82967
6409         * spellcheck.c (get_edit_distance_cutoff): New function.
6410         (selftest::test_edit_distance_unit_test_oneway): Rename to...
6411         (selftest::test_get_edit_distance_one_way): ...this.
6412         (selftest::test_get_edit_distance_unit): Rename to...
6413         (selftest::test_get_edit_distance_both_ways): ...this.
6414         (selftest::test_edit_distances): Move tests to this new function,
6415         and test some more pairs of strings.  Update for above renaming.
6416         (selftest::get_old_cutoff): New function.
6417         (selftest::test_get_edit_distance_cutoff): New function.
6418         (selftest::assert_suggested_for): New function.
6419         (ASSERT_SUGGESTED_FOR): New macro.
6420         (selftest::assert_not_suggested_for): New function.
6421         (ASSERT_NOT_SUGGESTED_FOR): New macro.
6422         (selftest::test_suggestions): New function.
6423         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6424         tests to selftest::test_edit_distances and call it.  Add calls to
6425         selftest::test_get_edit_distance_cutoff and
6426         selftest::test_suggestions.
6427         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6428         (best_match::consider): Replace hard-coded cutoff calculation with
6429         a call to...
6430         (best_match::get_cutoff): New declaration.
6431         (best_match::get_best_meaningful_candidate): Likewise.
6433 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6435         * builtins.c (fold_builtin_strlen): Remove TODO comment.
6437 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6439         revert:
6440         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6442         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6443         terminated string literal.
6445 2018-09-14  Martin Sebor  <msebor@redhat.com>
6447         * builtins.c (unterminated_array): Handle ARRAY_REF.
6448         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6449         * builtins.h (unterminated_array): Declare extern.
6450         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6451         arrays.
6452         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6453         calls.
6455 2018-09-14  Martin Sebor  <msebor@redhat.com>
6456             Jeff Law  <law@redhat.com>
6458         * builtins.c (unterminated_array): New.
6459         (expand_builtin_strcpy): Adjust.
6460         (expand_builtin_strcpy_args): Detect unterminated arrays.
6461         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
6462         unterminated arrays.
6463         * gimple-fold.h (get_maxval_strlen): Add argument.
6464         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6466         * gimple-fold.c (get_range_strlen): Add argument.
6467         (get_maxval_strlen): Adjust.
6468         * gimple-fold.h (get_range_strlen): Add argument.
6470 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
6472         * config/i386/movdirintrin.h: Fix copyright year.
6474 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
6476         * reg-stack.c: Include regs.h.
6477         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6478         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6479         FIRST_STACK_REG, not DFmode.
6480         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6481         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
6482         (change stack): Default register mode to the reg_raw_mode of
6483         FIRST_STACK_REG, not DFmode.
6484         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6485         (*swapxf): Rename from swapxf.
6487 2018-09-14  Carl Love  <cel@us.ibm.com>
6489         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6490         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6492 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
6494         PR target/87224
6495         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6496         alternatives.
6498 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
6500         PR target/85628
6501         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6503 2018-09-14  Jason Merrill  <jason@redhat.com>
6505         Fix --enable-gather-detailed-mem-stats.
6506         * hash-table.c (hash_table_usage): Change from variable to function.
6507         * hash-table.h: Adjust.
6508         * Makefile.in: Add missing dependencies on hash-table.h.
6510 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6512         PR tree-optimization/87259
6513         PR lto/87283
6514         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6515         execute_cse_reciprocals_1 has tried transforming.
6517 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
6519         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6520         VR_VARYING for PLUS/MINUS_EXPR.
6522 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
6524         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6525         formatting.
6527 2018-09-14  Richard Biener  <rguenther@suse.de>
6529         PR middle-end/63155
6530         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6531         bits for the merged partition.
6533 2018-09-13  Martin Sebor  <msebor@redhat.com>
6534             Bernd Edlinger  <bernd.edlinger@hotmail.de>
6536         * builtins.h (c_srlen): Add argument.
6537         * builtins.c (warn_string_no_nul): New function.
6538         (c_strlen): Add argument and use it.  Update recursive calls.
6539         Pass DECL argument to string_constant to get info on non
6540         terminated strings.  Update *NONSTR as needed.
6541         (fold_builtin_strlen): Add argument to calls to c_strlen.
6542         Warn for unterminated arrays.
6543         (warn_string_no_null): Add prototype.
6544         * expr.c (string_constant): Update arguments.  Update recursive
6545         calls appropriately.  Detect missing NUL terminator and outermost
6546         declaration its missing in.
6547         Improve checks for arrays with nonzero lower bound or elements
6548         that are not a single byte.  Simplify offset computation.
6549         Simplify checks for non-NUL terminated strings.
6550         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6551         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6553 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6555         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6556         correctly.
6557         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
6558         argument.  Fix range checks.
6559         * fold-const.h (c_getstr): Adjust protoype.
6560         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6561         string is constant but contains no NUL byte.
6563         * expr.c (string_constant): Adjust function comment.
6564         Remove bogus check for zero termination.
6566         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6568         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6569         (get_constant_size): Don't make STRING_CSTs larger than they are.
6570         (check_string_literal): New check function for STRING_CSTs.
6571         (output_constant): Use it.
6573 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
6575         PR target/86812
6576         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6578 2018-09-13  Richard Biener  <rguenther@suse.de>
6580         PR tree-optimization/87263
6581         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6582         (struct unwind_state): Add max_rpo field.
6583         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6584         Compute max_rpo, the max RPO number a block can be backwards reached
6585         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
6586         separating it from the iterating mode.
6588 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6590         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6591         (rfs_decision): New scheduling decision.
6593 2018-09-13  Richard Biener  <rguenther@suse.de>
6595         PR bootstrap/87134
6596         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6597         (vn_nary_op_insert_pieces_predicated): Do not write useless
6598         valid_dominated_by_p entry outside of the allocated storage.
6600 2018-09-13  Omar Sandoval  <osandov@osandov.com>
6601             Tom de Vries  <tdevries@suse.de>
6603         PR debug/86985
6604         * dwarf2out.c (is_c): New function.
6605         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6607 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
6609         PR target/85628
6610         * config/aarch64/aarch64.md (*aarch64_bfxil):
6611         Define.
6612         * config/aarch64/constraints.md (Ulc): Define.
6613         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6614         Define.
6615         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6616         New function.
6618 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6620         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6621         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6622         aarch64_layout_frame call.
6623         (aarch64_expand_epilogue): Likewise.
6624         (aarch64_initial_elimination_offset): Likewise.
6625         (aarch64_get_separate_components): Likewise.
6626         (aarch64_use_return_insn_p): Likewise.
6627         (aarch64_layout_frame): Remove unneeded check.
6629 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6631         * configure.ac: Only append
6632         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6633         gcc_config_arguments if it was never reconfigured or last reconfigure
6634         was with different arguments.
6635         * configure: Regenerated.
6637 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6638             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6640         PR middle-end/87290
6641         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6642         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6644 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6646         PR tree-optimization/87287
6647         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6648         X % C == 0 to X % (unsigned) C == 0 optimization to ...
6649         * match.pd (X % C == 0): ... here.  New optimization.
6651 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6653         PR middle-end/82853
6654         * expr.h (maybe_optimize_mod_cmp): Declare.
6655         * expr.c (mod_inv): New function.
6656         (maybe_optimize_mod_cmp): New function.
6657         (do_store_flag): Use it.
6658         * cfgexpand.c (expand_gimple_cond): Likewise.
6660 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
6661             Julian Brown  <julian@codesourcery.com>
6663         PR middle-end/86336
6664         * gimplify.c (gimplify_scan_omp_clauses): Set
6665         target_firstprivatize_array_bases in OpenACC parallel and kernels
6666         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6667         OpenACC data regions.
6669 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
6671         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6672         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6674 2018-09-12  Richard Biener  <rguenther@suse.de>
6676         PR tree-optimization/87280
6677         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6678         edge but unreachable target.
6679         (do_rpo_vn): For conservatively handling a PHI only mark
6680         the backedge executable but not the block reachable.
6682 2018-09-12  Richard Biener  <rguenther@suse.de>
6684         PR tree-optimization/87266
6685         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6686         visited blocks.
6688 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
6690         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6691         constants.
6692         ("trunc<BFP:mode><DFP_ALL:mode>2")
6693         ("trunc<DFP_ALL:mode><BFP:mode>2")
6694         ("extend<BFP:mode><DFP_ALL:mode>2")
6695         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6696         according to the target operand type.
6698 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6699             Andreas Krebbel  <krebbel@linux.ibm.com>
6701         PR tree-optimization/86844
6702         * gimple-ssa-store-merging.c
6703         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6704         there are any overlapping stores in between them, make sure they are
6705         also coalesced or we give up completely.
6707 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6709         PR middle-end/87248
6710         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6711         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
6713 2018-09-12  Tom de Vries  <tdevries@suse.de>
6715         * common.opt (gdescribe-dies): Add option.
6716         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6717         attribute for artifical and nameless decls.
6718         (dwarf2out_register_external_die): Add description attribute to
6719         external reference die.
6720         (add_desc_attribute): New functions.
6721         (gen_subprogram_die): Add description attribute to
6722         DW_TAG_call_site_parameter.
6723         * tree-pretty-print.c (print_generic_expr_to_str): New function.
6724         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6725         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6726         -gno-describe-dies.
6727         (@item -gdescribe-dies): Add.
6729 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
6731         * tree-vrp.c (vrp_shift_undefined_p): Remove.
6732         (extract_range_from_binary_expr_1: Call
6733         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6734         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6735         depend on sign.
6737 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
6739         * gimple-ssa-warn-alloca.c
6740         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6741         field for ALLOCA_BOUND_*_LARGE.
6743 2018-09-11  Nathan Sidwell  <nathan@acm.org>
6745         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6747 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6749         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6750         for clobbers.  Remove obsolete comment.
6752 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6754         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6755         mpxchk, mpxld and mpxst types.
6756         (define_attr length_immediate): Remove all processing of mpx types.
6757         (define_attr prefix_0f): Ditto.
6758         (define_attr memory): Ditto.
6760 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6762         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6763         (log<mode>2): Change operand 1 predicate to general_operand.
6764         Extend operand 1 to XFmode and generate logxf3 insn.
6765         (log10<mode>2): Change operand 1 predicate to general_operand.
6766         Extend operand 1 to XFmode and generate log10xf3 insn.
6767         (log2<mode>2): Change operand 1 predicate to general_operand.
6768         Extend operand 1 to XFmode and generate log2xf3 insn.
6769         (fyl2xp1_extend<mode>xf3_i387): Remove.
6770         (log1p<mode>2): Change operand 1 predicate to general_operand.
6771         Extend operand 1 to XFmode and generate log1pxf3 insn.
6772         (fxtract_extend<mode>xf3_i387): Remove.
6773         (logb<mode>2): Change operand 1 predicate to general_operand.
6774         Extend operand 1 to XFmode and generate logbxf3 insn.
6775         (ilogb<mode>2): Change operand 1 predicate to general_operand.
6776         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6777         (significand<mode>2): Change operand 1 predicate to general_operand.
6778         Extend operand 1 to XFmode and generate significandxf3 insn.
6780 2018-09-11  Nathan Sidwell  <nathan@acm.org>
6782         * gcc.c (perror_with_name, pfatal_with_name): Delete.
6783         (load_specs): Use fatal_error.
6784         (DELETE_IF_ORDINARY, process_command): Use error.
6785         (execute, run_attempt): Use fatal_error.
6787 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
6789         * diagnostic-core.h (sorry_at): New prototype.
6790         * diagnostic.c (sorry_at): New function.
6792 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
6794         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6795         by zero as VR_UNDEFINED.
6797 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6799         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6800         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6801         (<sincos>mode2): New expander.
6802         (sincos_extend<mode>xf3_i387): Remove insn pattern.
6803         (sincos -> sin, cos splitters): Remove splitter patterns.
6804         (sincos<mode>3): Change operand 2 predicate to general_operand.
6805         Extend operand 2 to XFmode and generate sincosxf3 insn.
6806         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6807         Change operand 3 predicate to const1_operand.
6808         (fptan_extend<mode>xf4_i387): Remove insn pattern.
6809         (tanxf2): Update operands in the call to fptanxf4_i387.
6810         (tan<mode>2): Change operand 1 predicate to general_operand.
6811         Extend operand 1 to XFmode and generate tanxf3 insn.
6812         (atan2xf3): Rename from *fpatanxf3_i387.
6813         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6814         (atan2xf3): Remove expander.
6815         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
6816         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6817         (atan<mode>2): Change operand 1 predicate to general_operand.
6818         Extend operand 1 to XFmode and generate atanxf3 insn.
6820 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6822         * config/i386/i386.md (x87/SSE constant load splitter): Use
6823         memory_operand instead of nonimmediate_operand for input operand
6824         predicate.
6826 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
6828         * config/i386/i386.md (float partial SSE register stall splitter): Move
6829         splitter near its instruction pattern.
6830         (float_extend partial SSE register stall splitter): Ditto.
6831         (float_truncate partial SSE register stall splitter): Ditto.
6833 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
6835         PR target/86794
6836         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6837         to speculation_safe_value_not_needed.
6839         PR target/85666
6840         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6841         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6842         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6843         leaf_function_p, instead use has_hard_reg_initial_val.
6845 2018-09-09  Nathan Sidwell  <nathan@acm.org>
6847         * gcc.h (pfatal_with_name): Don't declare here.
6848         * gcc.c (pfatal_with_name): Make static.
6850 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
6852         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6853         earlyclobber.
6855 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
6857         PR rtl-optimization/85458
6858         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6859         priority hook to reduce the priority of EXPR.
6861 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
6863         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6864         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
6865         with X87_ENABLE_FLOAT.  Remove preparation code.
6866         (*float<SWI48:mode><MODEF:mode>2): Rename from
6867         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
6868         math using "enabled" attribute.
6869         (*floatdi<MODEF:mode>2_i387): Rename from
6870         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
6871         enable for 32bit targets only.
6872         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6873         splitter.
6874         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6875         as operand 1 predicate.  Rewrite as define_insn_and_split.
6876         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6878 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
6880         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6881         to fallthru to FLOAT case.
6883 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6885         PR target/86731
6886         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6887         around folding of vec_sl to handle out of range shift values.
6889 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
6891         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6892         Update callers to gen_fix_trunc<mode>_i387_fisttp
6893         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6894         nonimmediate_operand.
6895         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6896         and corresponding splitters.
6897         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6898         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6899         (fix_truncdi_i387_with_temp): Remove insn pattern
6900         and corresponding splitters.
6901         (fix_trunc<mode>_i387): Change operand 0 predicate to
6902         nonimmediate_operand.
6903         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6904         and corresponding splitters.
6905         (*fistdi2_1): Remove.
6906         (fistdi2): Ditto.
6907         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6908         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
6909         (*fist<mode>2_1): Remove.
6910         (fist<mode>2): Ditto.
6911         (fist<mode>2_with_temp): Remove insn pattern and corresponding
6912         splitters.
6913         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
6914         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6915         (fistdi2_<rounding>): Change operand 0 predicate to
6916         nonimmediate_operand.
6917         (fistdi2_<rounding>_with_temp): Remove insn pattern
6918         and corresponding splitters.
6919         (fist<mode>2_<rounding>): Change operand 0 predicate to
6920         nonimmediate_operand.
6921         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6922         and corresponding splitters.
6924         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6926 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6928         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6929         the init value.
6931 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6933         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6934         early gimple folding of vec_splat().
6935         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6936         * gimple-fold.h: Add an extern define for tree_vec_extract().
6938 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6940         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6941         wrappers around TREE_TYPE comparisons.
6943 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6945         PR target/80080
6946         * config/s390/predicates.md: Add nonsym_memory_operand.
6947         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6948         contains a SYMBOL_REF, load it into an intermediate pseudo.
6949         (s390_emit_compare_and_swap): Legitimize operand.
6950         * config/s390/s390.md: Use the new nonsym_memory_operand
6951         with UNSPECV_CAS patterns.
6953 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6955         PR target/80080
6956         * config/s390/s390-passes.def: New file.
6957         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
6958         declaration.
6959         (make_pass_s390_early_mach): Add declaration.
6960         * config/s390/s390.c (make_pass_s390_early_mach):
6961         (s390_option_override): Remove dynamic registration.
6962         * config/s390/t-s390: Add s390-passes.def.
6964 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6966         * config/s390/s390.c (s390_decompose_constant_pool_ref):
6967         Remove UNSPEC_LTREL_BASE check.
6968         (annotate_constant_pool_refs): Likewise.
6969         (find_constant_pool_ref): Likewise.
6970         (find_ltrel_base): Removed.
6971         (replace_ltrel_base): Removed.
6972         (s390_mainpool_finish): Remove replace_ltrel_base call.
6973         (s390_chunkify_start): Remove pending LTREL_BASE logic.
6974         (s390_chunkify_finish): Remove replace_ltrel_base call.
6975         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
6977 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
6979         PR target/86779
6980         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6981         to speculation_safe_value_not_needed.
6983 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
6984             Bernd Schmidt  <bernds_cb1@t-online.de>
6986         * config/nvptx/nvptx-opts.h: New file.
6987         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
6988         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
6989         (ASM_SPEC): Define.
6990         (TARGET_SM35): New macro.
6991         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
6992         correct predicate.
6993         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
6994         values.
6995         (misa=): New option.
6996         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
6998 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
7000         * config/i386/i386.md (truncdfsf2): Remove expander.
7001         (truncdfsf2_with_temp): Ditto.
7002         (truncxf<mode>2): Ditto.
7003         (*truncdfsf_fast_mixed): Remove insn pattern.
7004         (*truncdfsf_fast_i387): Ditto.
7005         (*truncdfsf_mixed): Ditto.
7006         (*truncdfsf_i387): Ditto.
7007         (*truncdfsf2_i387_1): Ditto.
7008         (*truncxfsf2_mixed): Ditto.
7009         (*truncxfdf2_mixed): Ditto.
7010         (*truncxf<mode>2_i387_noop): Ditto. Update callers
7011         to call gen_truncxf<mode>2 instead.
7012         (*truncxf<mode>2_i387): Remove.
7013         (reg->reg splitters): Remove splitter pattern.
7014         (reg->mem splitters): Ditto.
7016         (truncdfsf2): New insn pattern.
7017         (truncxf<mode>2): Ditto.
7019 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7021         * tree-ssa-math-opts.c (is_mult_by): New function.
7022         (is_square_of): Use the above.
7023         (optimize_recip_sqrt): New function.
7024         (pass_cse_reciprocals::execute): Use the above.
7026 2018-09-05  Richard Biener  <rguenther@suse.de>
7028         PR bootstrap/87134
7029         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7030         to zero-init the emplaced vec.
7032 2018-09-05  Martin Liska  <mliska@suse.cz>
7034         PR tree-optimization/87205
7035         * tree-switch-conversion.c (pass_lower_switch::execute):
7036         Group cases for switch statements.
7038 2018-09-05  Richard Biener  <rguenther@suse.de>
7040         PR tree-optimization/87217
7041         * tree-ssa-sccvn.c (vuse_valueize): New.
7042         (vn_reference_lookup_pieces): Use it.
7043         (vn_reference_lookup): Likewise.
7045 2018-09-05  Nathan Sidwell  <nathan@acm.org>
7047         PR c++/87137
7048         * stor-layout.c (place_field): Scan forwards to check last
7049         bitfield when ms_bitfield_placement is in effect.
7051 2018-09-05  Richard Biener  <rguenther@suse.de>
7053         PR bootstrap/87225
7054         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7055         return.
7057 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7058             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
7060         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7061         * config.gcc (extra_objs): Build it.
7062         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7063         Likewise.
7064         * config/aarch64/aarch64-passes.def
7065         (pass_tag_collision_avoidance): New pass.
7066         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7067         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7068         (aarch64_classify_address): Remove static qualifier.
7069         (aarch64_address_info, aarch64_address_type): Move to...
7070         * config/aarch64/aarch64-protos.h: ... here.
7071         (make_pass_tag_collision_avoidance): New function.
7072         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7073         New tuning flag.
7075 2018-09-05  Martin Liska  <mliska@suse.cz>
7077         * doc/gcov.texi: Update documentation of humar
7078         readable mode.
7079         * gcov.c (format_count): Print one decimal place, it provides
7080         more fine number of situations like '1G' vs. '1.4G'.
7082 2018-09-05  Martin Liska  <mliska@suse.cz>
7084         PR target/87164
7085         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7086         * optc-gen.awk: Allow 'Var' for Deprecated options in order
7087         to generate a MASK value.
7089 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
7091         PR debug/86593
7092         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7093         if frame pointer isn't used.
7094         (compute_frame_pointer_to_fb_displacement): Likewise.
7096 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
7098         PR target/87198
7099         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7100         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7101         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7102         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7103         and OPTION_MASK_ISA_XSAVEC_UNSET.
7105 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
7107         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7108         XOR operations in NAND case.
7110 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7112         * wide-int-range.cc (wide_int_range_convert): New.
7113         * wide-int-range.h (wide_int_range_convert): New.
7114         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7115         code into wide_int_range_convert.
7116         (extract_range_into_wide_ints): Do not munge anti range constants
7117         into the entire domain.  Just return the range back.
7119 2018-09-04  Martin Liska  <mliska@suse.cz>
7121         * genmatch.c (output_line_directive): Add new argument
7122         fnargs.
7123         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7125 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7127         * doc/invoke.texi (Option Summary): Add whitespace.
7129         * doc/invoke.texi (Option Summary): Add -Waligned-new.
7131 2018-09-04  Richard Biener  <rguenther@suse.de>
7133         PR tree-optimization/87211
7134         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7135         backedge value we're supposed to treat as VARYING also number
7136         the PHI to VARYING in case it got a different value-number already.
7138 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7140         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7141         (extract_range_from_binary_expr_1): Do not call
7142         vrp_can_optimize_bit_op.
7143         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7144         static.
7145         (wide_int_range_get_mask_and_bounds): New.
7146         (wide_int_range_optimize_bit_op): New.
7147         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7148         (wide_int_range_bit_and): Same.
7149         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7150         (wide_int_range_optimize_bit_op): New.
7151         (wide_int_range_get_mask_and_bounds): New.
7153 2018-09-04  Richard Biener  <rguenther@suse.de>
7155         PR tree-optimization/87176
7156         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7157         variable.  When value-numbering a virtual PHI node make sure
7158         to not value-number to the backedge value.
7160 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7162         * doc/extend.texi (Long Long, Hex Floats): Document support for
7163         long long and hex floats in more recent versions of ISO C++.
7165 2018-09-03  Richard Biener  <rguenther@suse.de>
7167         PR tree-optimization/87177
7168         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7169         cleanup.
7171 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7173         * bb-reorder.c (edge_order): Convert to C-qsort-style
7174         tri-state comparator.
7175         (reorder_basic_blocks_simple): Change std::stable_sort to
7176         gcc_stablesort.
7178 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7180         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7181         tri-state comparator.
7182         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7184 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7186         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
7187         (mergesort): ... here as maximum count for using netsort.
7188         (gcc_qsort): Set nlim to 3 if stable sort is requested.
7189         (gcc_stablesort): New.
7190         * system.h (gcc_stablesort): Declare.
7192 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7194         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7195         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
7196         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
7198 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
7200         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7201         lxsdx and stxsdx alternatives.
7202         (*mov<mode>_hardfloat64): Ditto.
7203         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7205 2018-09-03  Richard Biener  <rguenther@suse.de>
7207         PR tree-optimization/87200
7208         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7209         simplify result.
7211 2018-09-03  Martin Liska  <mliska@suse.cz>
7213         PR tree-optimization/87201
7214         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7215         Fix parenthesis in an expression.
7217 2018-09-03  Richard Biener  <rguenther@suse.de>
7219         PR tree-optimization/87197
7220         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7221         visited.  CSE the VN_INFO hashtable lookup.
7223         PR tree-optimization/87169
7224         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7225         iterating make sure there's no extra backedges from irreducible
7226         regions feeding the header.  Mark the destination block
7227         executable.
7229 2018-09-03  Martin Liska  <mliska@suse.cz>
7231         PR driver/83193
7232         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7233         * common/common-targhooks.c (default_get_valid_option_values):
7234         New function.
7235         * common/common-targhooks.h (default_get_valid_option_values):
7236         Likewise.
7237         * common/config/i386/i386-common.c: Move processor_target_table
7238         from i386.c.
7239         (ix86_get_valid_option_values): New function.
7240         (TARGET_GET_VALID_OPTION_VALUES): New macro.
7241         * config/i386/i386.c (struct ptt): Move to i386-common.c.
7242         (PTA_*): Move all defined masks into i386-common.c.
7243         (ix86_function_specific_restore): Use new processor_cost_table.
7244         * config/i386/i386.h (struct ptt): Moved from i386.c.
7245         (struct pta): Likewise.
7246         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7247         * doc/tm.texi.in: Likewise.
7248         * opt-suggestions.c (option_proposer::suggest_option):
7249         Pass prefix to build_option_suggestions.
7250         (option_proposer::get_completions): Likewise.
7251         (option_proposer::build_option_suggestions): Use the new target
7252         hook.
7253         * opts.c (struct option_help_tuple): New struct.
7254         (print_filtered_help): Use the new target hook.
7256 2018-09-03  Martin Liska  <mliska@suse.cz>
7258         PR middle-end/59521
7259         * predict.c (set_even_probabilities): Add likely_edges
7260         argument and handle cases where we have precisely one
7261         likely edge.
7262         (combine_predictions_for_bb): Catch also likely_edges.
7263         (tree_predict_by_opcode): Handle gswitch statements.
7264         * tree-cfg.h (find_case_label_for_value): New declaration.
7265         (find_taken_edge_switch_expr): Likewise.
7266         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7267         Find pivot in decision tree based on probabily, not by number of
7268         nodes.
7270 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
7272         * doc/standards.texi (Standards): Update Objective-C reference.
7274 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7276         * doc/install.texi (Prerequisites): Update link for MPC.
7278 2018-09-01  Michael Matz  <matz@suse.de>
7280         PR tree-optimization/87074
7281         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7282         PHIs for outer-loop uses.
7284 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7286         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7287         * doc/invoke.texi (C Dialect Options): Ditto.
7289 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7291         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7293 2018-08-31  Richard Biener  <rguenther@suse.de>
7295         PR tree-optimization/87168
7296         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7297         (rpo_elim::eliminate_avail): When OP was not visited it must
7298         be available.
7300 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
7302         * tree-vrp.c (copy_value_range): Convert param "from" from
7303         "value_range *" to "const value_range *".
7304         (range_is_null): Likewise for param "vr".
7305         (range_int_cst_p): Likewise.
7306         (range_int_cst_singleton_p): Likewise.
7307         (symbolic_range_p): Likewise.
7308         (value_ranges_intersect_p): Likewise for both params.
7309         (value_range_nonnegative_p): Likewise for param "vr".
7310         (value_range_constant_singleton): Likewise.
7311         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7312         (extract_range_into_wide_ints): Likewise for param "vr".
7313         (extract_range_from_multiplicative_op): Likewise for params "vr0"
7314         and "vr1".
7315         (vrp_can_optimize_bit_op): Likewise.
7316         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7317         "vr1_".
7318         (extract_range_from_unary_expr): Likewise.
7319         (debug_value_range): Likewise for param "vr".
7320         (value_range::dump): Add "const" qualifier.
7321         (vrp_prop::check_array_ref): Convert local "vr" from
7322         "value_range *" to "const value_range *".
7323         (vrp_prop::check_mem_ref): Likewise.
7324         (vrp_prop::visit_stmt): Likewise for local "old_vr".
7325         (vrp_intersect_ranges_1): Likewise for param "vr_1".
7326         (vrp_intersect_ranges): Likewise.
7327         (simplify_stmt_for_jump_threading): Likewise for local "vr".
7328         (vrp_prop::vrp_finalize): Likewise.
7329         * tree-vrp.h (value_range::dump): Add "const" qualifier.
7330         (vrp_intersect_ranges): Add "const" qualifier to params as above.
7331         (extract_range_from_unary_expr): Likewise.
7332         (value_range_constant_singleton): Likewise.
7333         (symbolic_range_p): Likewise.
7334         (copy_value_range): Likewise.
7335         (extract_range_from_binary_expr_1): Likewise.
7336         (range_int_cst_p): Likewise.
7337         (vrp_set_zero_nonzero_bits): Likewise.
7338         (range_int_cst_singleton_p): Likewise.
7340 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
7342         * config/aarch64/arm_neon.h (vabsd_s64): New.
7343         (vnegd_s64): Likewise.
7345 2018-08-31  Martin Jambor  <mjambor@suse.cz>
7347         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7349 2018-08-31  Martin Liska  <mliska@suse.cz>
7351         * ipa-icf.c (sem_item::add_type): Use
7352         sem_item::m_type_hash_cache.
7353         * ipa-icf.h: Move the cache from sem_item_optimizer
7354         to sem_item.
7356 2018-08-31  Nathan Sidwell  <nathan@acm.org>
7358         * doc/extend.texi (Backwards Compatibility): Remove implicit
7359         extern C leeway of () being (...).
7361 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7363         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7365 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
7367         PR target/86684
7368         PR target/87149
7369         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7371 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
7373         PR middle-end/87138
7374         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7375         gen_int_mode.  Formatting fixes.
7377 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
7379         * target.def (custom_function_descriptors): Improve documentation.
7380         * doc/tm.texi.in (Trampolines): Expand discussion of function
7381         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7382         beginning of the section.
7383         * doc/tm.texi: Regenerated.
7385 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
7387         * cfg.h (class auto_edge_flag): Spell out the template-id of the
7388         base class in the initializer list.  This is a workaround for
7389         building with older GCC.
7390         (class auto_bb_flag): Likewise.
7392 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
7394         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7395         (altivec_vcmpequ<VI_char>_p): Remove star.
7396         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7397         vector load modes.
7398         (expand_strncmp_vec_sequence): New function.
7399         (emit_final_str_compare_vec): New function.
7400         (expand_strn_compare): Add support for vector strncmp.
7401         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7402         length specification to bytes.
7403         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7404         (vcmpnezb_p): New pattern.
7405         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7406         for option -mstring-compare-inline-limit.
7408 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
7410         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7411         (PTA_SKYLAKE): Add PTA_AES.
7412         (PTA_GOLDMONT): Likewise.
7414 2018-08-29  Jan Hubicka  <jh@suse.cz>
7416         PR lto/86517
7417         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7418         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7420 2018-08-29  Jan Hubicka  <jh@suse.cz>
7422         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7423         TYPE_STUB_DECL.
7424         (hash_tree): Do not visit TYPE_STUB_DECL.
7425         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7426         stream TYPE_STUB_DECL.
7427         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7428         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7429         after free_lang_data.
7430         (type_in_anonymous_namespace_p): Likewise.
7432 2018-08-29  Jan Hubicka  <jh@suse.cz>
7434         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7435         comment that it has to be even number.
7436         (class sreal): Change m_sig type to int32_t.
7437         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7438         int64_t for temporary calculations.
7439         (sreal_verify_basics): Drop one bit from minimum and maximum.
7441 2018-08-30  Richard Biener  <rguenther@suse.de>
7443         PR tree-optimization/87147
7444         * tree-ssa-sccvn.c (SSA_VISITED): New function.
7445         (visit_phi): When the degenerate result is from the backedge and
7446         we didn't visit its definition yet drop to VARYING.
7447         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7449 2018-08-29  Jan Hubicka  <jh@suse.cz>
7451         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7452         DECL_VINDEX.
7453         (hash_tree): Likewise.
7455 2018-08-29  Jan Hubicka  <jh@suse.cz>
7457         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7458         and TYPE_NEXT_REF_TO.
7460 2018-08-29  Jan Hubicka  <jh@suse.cz>
7462         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7463         comment that it has to be even number.
7464         (class sreal): Change m_sig type to int32_t.
7465         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7466         int64_t for temporary calculations.
7467         (sreal_verify_basics): Drop one bit from minimum and maximum.
7469 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
7471         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7473 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
7475         PR middle-end/86995
7476         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7477         if to_add is negative.
7479 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7481         PR middle-end/87053
7482         * builtins.c (c_strlen): Improve range checks.
7484 2018-08-29  Martin Sebor  <msebor@redhat.com>
7485             Jeff Law  <law@redhat.com>
7487         PR tree-optimization/86714
7488         PR tree-optimization/86711
7489         * builtins.c (c_strlen): Add arguments to call to string_constant.
7490         * expr.c (string_constant): Add argument.  Detect missing nul
7491         terminator and outermost declaration it's missing in.
7492         * expr.h (string_constant): Add argument.
7493         * fold-const.c (read_from_constant_string): Add arguments to call to
7494         string_constant.
7495         (c_getstr): Likewise.
7496         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7497         to string_constant.
7498         * tree-ssa-strlen.c (get_stridx): Likewise.
7500 2018-08-29  Jan Hubicka  <jh@suse.cz>
7502         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7503         Do not stream DECL_VINDEX.
7504         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7505         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7506         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7508 2018-08-29  Richard Biener  <rguenther@suse.de>
7510         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7511         virtual operands that are not default defs to honor region
7512         boundaries.
7513         (rpo_vn_valueize): Remove ineffective code here.
7515 2018-08-29  Richard Biener  <rguenther@suse.de>
7517         PR tree-optimization/87132
7518         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7519         when skipping defs reachable over backedges.
7521 2018-08-29  Richard Biener  <rguenther@suse.de>
7523         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7524         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7525         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7526         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7527         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7528         (vn_reference_lookup_3): Remove use of const_parms.
7529         (free_rpo_vn): Do not free const_parms.
7530         (do_rpo_vn): Do not call init_const_parms.
7531         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7532         SSA_NAME_POINTS_TO_READONLY_MEMORY.
7533         (call_may_clobber_ref_p_1): Likewise.
7535 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
7537         PR other/86726
7538         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7539         (-O): Ditto.
7540         (-ftree-scev-cprop): Document.
7542 2018-08-29  Jan Hubicka  <jh@suse.cz>
7544         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7545         parameters.
7546         (sreal constructor): Update.
7547         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7548         sreal:operator/): Update.
7550 2018-08-29  Martin Liska  <mliska@suse.cz>
7552         * tree-switch-conversion.c (switch_conversion::expand):
7553         Strenghten assumption about gswitch statements.
7555 2018-08-29  Richard Biener  <rguenther@suse.de>
7557         PR tree-optimization/87117
7558         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7559         re-value-number released SSA VDEFs.
7561 2018-08-29  Richard Biener  <rguenther@suse.de>
7563         PR tree-optimization/87126
7564         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7566 2018-08-28  Jim Wilson  <jimw@sifive.com>
7568         * config/riscv/pic.md: Rewrite.
7569         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7570         invalid address.
7571         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7572         (SOFTF, default_load, softload, softstore): New.
7574 2018-08-28  Jeff Law  <law@redhat.com>
7576         * fold-const.c (fold_binary_loc): Remove recently added assert.
7578 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
7580         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7581         to OP parmeter of generated function.
7583 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
7585         PR tree-optimization/87009
7586         * match.pd: Add boolean optimizations.
7588 2018-08-28  Martin Sebor  <msebor@redhat.com>
7590         PR middle-end/86631
7591         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7592         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7593         (pass_walloca::gate): Use it.
7594         (alloca_call_type): Same.
7595         (pass_walloca::execute): Same.
7596         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7598 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
7600         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7601         GCC_VERSION for usage of "__gcc_dump_printf__" format from
7602         >= 3005 to >= 9000.
7604 2018-08-28  Richard Biener  <rguenther@suse.de>
7606         PR tree-optimization/87124
7607         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7608         constants before looking up avail.
7610 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
7612         PR middle-end/87099
7613         * calls.c (maybe_warn_nonstring_arg): Punt early if
7614         warn_stringop_overflow is zero.  Don't call get_range_strlen
7615         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7616         Swap comparison operands to have constants on rhs.  Only use
7617         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
7618         increment lenrng[0].
7620 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
7622         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7623         use of tree_to_shwi.  Remove duplicated test for the size being
7624         a whole number of bytes.
7626 2018-08-28  Richard Biener  <rguenther@suse.de>
7628         PR tree-optimization/87117
7629         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7630         Handle removed stmt without LHS (GIMPLE_NOP).
7632 2018-08-28  Richard Biener  <rguenther@suse.de>
7634         PR tree-optimization/87117
7635         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7636         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7638 2018-08-28  Richard Biener  <rguenther@suse.de>
7640         PR tree-optimization/87117
7641         * tree-ssa-pre.c (compute_avail): Do not make expressions
7642         with predicated values available.
7643         (get_expr_value_id): Assert we do not run into predicated value
7644         expressions.
7646 2018-08-28  Richard Biener  <rguenther@suse.de>
7648         PR tree-optimization/87117
7649         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7650         get virtual operands.
7651         (get_expr_operands): Handle STRING_CST like other decls.
7653 2018-08-28  Martin Liska  <mliska@suse.cz>
7655         * tree.h: Update documentation of fndecl_built_in_p
7656         functions.
7659 2018-08-27  Jeff Law  <law@redhat.com>
7660         PR tree-optimization/87110
7661         * tree-ssa-dse.c (compute_trims): Handle non-constant
7662         TYPE_SIZE_UNIT.
7664 2018-08-27  Martin Sebor  <msebor@redhat.com>
7666         PR tree-optimization/86914
7667         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7669 2018-08-27  Martin Sebor  <msebor@redhat.com>
7671         PR tree-optimization/87112
7672         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7673         the type of the bound argument.
7675 2018-08-27  Jeff Law  <law@redhat.com>
7677         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7678         type does not have a TYPE_SIZE_UNIT.
7680 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
7682         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7683         with include of backend.h.
7685 2018-08-27  Richard Biener  <rguenther@suse.de>
7687         PR tree-optimization/86927
7688         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7689         use const cond reduction code.
7691 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
7693         PR tree-optimization/85758
7694         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7696 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
7698         PR c++/87091
7699         * diagnostic-show-locus.c (class layout_range): Update for
7700         conversion of show_caret_p to a tri-state.
7701         (layout_range::layout_range): Likewise.
7702         (make_range): Likewise.
7703         (layout::maybe_add_location_range): Likewise.
7704         (layout::should_print_annotation_line_p): Don't show annotation
7705         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7706         (layout::get_state_at_point): Update for conversion of
7707         show_caret_p to a tri-state.  Bail out early for
7708         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7709         underlining or source colorization.
7710         (gcc_rich_location::add_location_if_nearby): Update for conversion
7711         of show_caret_p to a tri-state.
7712         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7713         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7714         Likewise.
7715         (selftest::test_one_liner_labels): Likewise.
7716         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7717         conversion of show_caret_p to a tri-state.
7718         * pretty-print.c (text_info::set_location): Likewise.
7719         * pretty-print.h (text_info::set_location): Likewise.
7720         * substring-locations.c (format_warning_n_va): Likewise.
7721         * tree-diagnostic.c (default_tree_printer): Likewise.
7722         * tree-pretty-print.c (newline_and_indent): Likewise.
7724 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
7726         PR c++/87091
7727         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7728         line above for line-insertion fix-it hints.
7729         (selftest::test_fixit_insert_containing_newline): Update the
7730         expected results, and add a test with line-numbering enabled.
7732 2018-08-27  Martin Liska  <mliska@suse.cz>
7734         PR sanitizer/86962
7735         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7736         params with DECL_HAS_VALUE_EXPR_P.
7738 2018-08-27  Martin Liska  <mliska@suse.cz>
7740         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7741         selected expansion strategy.
7743 2018-08-27  Martin Liska  <mliska@suse.cz>
7745         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7746         * builtins.c (is_builtin_fn): Likewise.
7747         * attribs.c (diag_attr_exclusions): Use new function
7748         fndecl_built_in_p and remove check for FUNCTION_DECL if
7749         possible.
7750         (builtin_mathfn_code): Likewise.
7751         (fold_builtin_expect): Likewise.
7752         (fold_call_expr): Likewise.
7753         (fold_builtin_call_array): Likewise.
7754         (fold_call_stmt): Likewise.
7755         (set_builtin_user_assembler_name): Likewise.
7756         (is_simple_builtin): Likewise.
7757         * calls.c (gimple_alloca_call_p): Likewise.
7758         (maybe_warn_nonstring_arg): Likewise.
7759         * cfgexpand.c (expand_call_stmt): Likewise.
7760         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7761         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7762         (cgraph_node::verify_node): Likewise.
7763         * cgraphclones.c (build_function_decl_skip_args): Likewise.
7764         (cgraph_node::create_clone): Likewise.
7765         * config/arm/arm.c (arm_insert_attributes): Likewise.
7766         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7767         * dse.c (scan_insn): Likewise.
7768         * expr.c (expand_expr_real_1): Likewise.
7769         * fold-const.c (operand_equal_p): Likewise.
7770         (fold_binary_loc): Likewise.
7771         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7772         * gimple-low.c (lower_stmt): Likewise.
7773         * gimple-pretty-print.c (dump_gimple_call): Likewise.
7774         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7775         Likewise.
7776         * gimple.c (gimple_build_call_from_tree): Likewise.
7777         (gimple_call_builtin_p): Likewise.
7778         (gimple_call_combined_fn): Likewise.
7779         * gimplify.c (gimplify_call_expr): Likewise.
7780         (gimple_boolify): Likewise.
7781         (gimplify_modify_expr): Likewise.
7782         (gimplify_addr_expr): Likewise.
7783         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7784         * ipa-cp.c (determine_versionability): Likewise.
7785         * ipa-fnsummary.c (compute_fn_summary): Likewise.
7786         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7787         * ipa-split.c (visit_bb): Likewise.
7788         (split_function): Likewise.
7789         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7790         * lto-cgraph.c (input_node): Likewise.
7791         * lto-streamer-out.c (write_symbol): Likewise.
7792         * omp-low.c (setjmp_or_longjmp_p): Likewise.
7793         (lower_omp_1): Likewise.
7794         * predict.c (strip_predict_hints): Likewise.
7795         * print-tree.c (print_node): Likewise.
7796         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7797         * trans-mem.c (is_tm_irrevocable): Likewise.
7798         (is_tm_load): Likewise.
7799         (is_tm_simple_load): Likewise.
7800         (is_tm_store): Likewise.
7801         (is_tm_simple_store): Likewise.
7802         (is_tm_abort): Likewise.
7803         (tm_region_init_1): Likewise.
7804         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7805         * tree-cfg.c (verify_gimple_call): Likewise.
7806         (move_stmt_r): Likewise.
7807         (stmt_can_terminate_bb_p): Likewise.
7808         * tree-eh.c (lower_eh_constructs_2): Likewise.
7809         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7810         * tree-inline.c (remap_gimple_stmt): Likewise.
7811         (copy_bb): Likewise.
7812         (estimate_num_insns): Likewise.
7813         (fold_marked_statements): Likewise.
7814         * tree-sra.c (scan_function): Likewise.
7815         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7816         (optimize_stack_restore): Likewise.
7817         (pass_fold_builtins::execute): Likewise.
7818         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7819         (mark_all_reaching_defs_necessary_1): Likewise.
7820         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7821         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7822         (pass_forwprop::execute): Likewise.
7823         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7824         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7825         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7826         * tree-ssa-strlen.c (get_string_length): Likewise.
7827         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7828         (find_func_aliases_for_call): Likewise.
7829         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7830         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7831         * tree-tailcall.c (find_tail_calls): Likewise.
7832         * tree.c (need_assembler_name_p): Likewise.
7833         (free_lang_data_in_decl): Likewise.
7834         (get_call_combined_fn): Likewise.
7835         * ubsan.c (is_ubsan_builtin_p): Likewise.
7836         * varasm.c (incorporeal_function_p): Likewise.
7837         * tree.h (DECL_BUILT_IN): Remove and replace with
7838         fndecl_built_in_p.
7839         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7840         (fndecl_built_in_p): New.
7842 2018-08-27  Martin Liska  <mliska@suse.cz>
7844         PR tree-optimization/86847
7845         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7846         Dump also subtree probability.
7847         (switch_decision_tree::do_jump_if_equal): New function.
7848         (switch_decision_tree::emit_case_nodes): Handle special
7849         situations in balanced tree that can be emitted much simpler.
7850         Fix calculation of probabilities that happen in tree expansion.
7851         * tree-switch-conversion.h (struct cluster): Add
7852         is_single_value_p.
7853         (struct simple_cluster): Likewise.
7854         (struct case_tree_node): Add new function has_child.
7855         (do_jump_if_equal): New.
7857 2018-08-27  Martin Liska  <mliska@suse.cz>
7859         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7860         Add new argument to bit_test_cluster constructor.
7861         (bit_test_cluster::emit): Set bits really number of values
7862         handlel by a test.
7863         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7864         probability argument.
7865         * tree-switch-conversion.h (struct bit_test_cluster):
7866         Add m_handles_entire_switch.
7868 2018-08-27  Martin Liska  <mliska@suse.cz>
7870         PR tree-optimization/86702
7871         * tree-switch-conversion.c (jump_table_cluster::emit):
7872         Make probabilities even for values in jump table
7873         according to number of cases handled.
7874         (switch_decision_tree::compute_cases_per_edge): Pass
7875         argument to reset_out_edges_aux function.
7876         (switch_decision_tree::analyze_switch_statement): Likewise.
7877         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7878         Make it static.
7880 2018-08-27  Martin Liska  <mliska@suse.cz>
7882         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7883         cfun argument explicitly.
7884         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7885         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7886         function gimple_switch_default_bb.
7887         (convert_switch_statements):
7888         (expand_builtins):
7889         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7890         * stmt.c (label_to_block_fn): Use label_to_block and pass
7891         cfun argument explicitly and use gimple_switch_label_bb.
7892         (expand_case): Likewise.
7893         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7894         cfun argument explicitly. Likewise.
7895         (make_edges_bb): Likewise.
7896         (make_cond_expr_edges): Likewise.
7897         (get_cases_for_edge): Likewise.
7898         (make_gimple_switch_edges): Likewise.
7899         (label_to_block_fn): Likewise.
7900         (label_to_block): Likewise.
7901         (make_goto_expr_edges): Likewise.
7902         (make_gimple_asm_edges): Likewise.
7903         (main_block_label): Likewise.
7904         (group_case_labels_stmt): Likewise.
7905         (find_taken_edge_computed_goto): Likewise.
7906         (find_taken_edge_switch_expr): Likewise.
7907         (gimple_verify_flow_info): Likewise.
7908         (gimple_redirect_edge_and_branch): Likewise.
7909         (gimple_switch_label_bb): New function.
7910         (gimple_switch_default_bb): Likewise.
7911         (gimple_switch_edge): Likewise.
7912         (gimple_switch_default_edge): Likewise.
7913         * tree-cfg.h (label_to_block_fn): Remove and replace ...
7914         (label_to_block): ... with this.
7915         (gimple_switch_label_bb): New.
7916         (gimple_switch_default_bb): Likewise.
7917         (gimple_switch_edge): Likewise.
7918         (gimple_switch_default_edge): Likewise.
7919         * tree-cfgcleanup.c (convert_single_case_switch): Use
7920         new gimple functions and pass new argument to label_to_block.
7921         (cleanup_control_flow_bb):
7922         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7923         cfun argument explicitly.
7924         (make_eh_edges): Likewise.
7925         (redirect_eh_dispatch_edge): Likewise.
7926         (lower_resx): Likewise.
7927         (lower_eh_dispatch): Likewise.
7928         (maybe_remove_unreachable_handlers): Likewise.
7929         (unsplit_eh): Likewise.
7930         (cleanup_empty_eh): Likewise.
7931         (verify_eh_edges): Likewise.
7932         (verify_eh_dispatch_edge): Likewise.
7933         * tree-ssa-dom.c (record_edge_info): Likewise.
7934         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7935         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7936         (thread_through_normal_block): Likewise.
7937         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7938         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7939         * tree-switch-conversion.c (switch_conversion::collect): Use new
7940         gimple functions.
7941         (switch_conversion::check_final_bb): Likewise.
7942         (switch_conversion::gather_default_values): Pass new argument
7943         to label_to_block.
7944         (switch_conversion::build_constructors): Likewise.
7945         (switch_decision_tree::compute_cases_per_edge): Use new
7946         gimple_switch_edge function.
7947         (switch_decision_tree::analyze_switch_statement): Pass new argument
7948         to label_to_block.
7949         (switch_decision_tree::try_switch_expansion): Use
7950         gimple_switch_default_edge.
7951         * tree-vrp.c (find_switch_asserts): Pass new argument
7952         to label_to_block.
7953         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7954         (vr_values::simplify_switch_using_ranges): Likewise.
7956 2018-08-27  Richard Biener  <rguenther@suse.de>
7958         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
7959         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
7961         * tree-ssa-sccvn.h (struct vn_pval): New structure.
7962         (struct vn_nary_op_s): Add unwind_to member.  Add
7963         predicated_values flag and put result into a union together
7964         with a linked list of vn_pval.
7965         (struct vn_ssa_aux): Add name member to make maintaining
7966         a map of SSA name to vn_ssa_aux possible.  Remove no longer
7967         needed info, dfsnum, low, visited, on_sccstack, use_processed
7968         and range_info_anti_range_p members.
7969         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
7970         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
7971         New functions.
7972         (vn_valueize): New global.
7973         (vn_context_bb): Likewise.
7974         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
7975         VN_INFO_PTR_INFO): Remove.
7976         * tree-ssa-sccvn.c: ... (rewrite)
7977         (pass_fre::execute): For -O2+ initialize loops and run
7978         RPO VN in optimistic mode (iterating).  For -O1 and -Og
7979         run RPO VN in non-optimistic mode.
7980         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
7981         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
7982         * doc/invoke.texi (sccvn-max-scc-size): Remove.
7983         (rpo-vn-max-loop-depth): Document.
7984         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
7985         when valuezing the VUSE signals we walked out of the region.
7986         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
7987         (phi_translate): Set VN context block to use for availability
7988         lookup.
7989         (compute_avail): Likewise.
7990         (pre_valueize): New function.
7991         (pass_pre::execute): Adjust to the RPO VN API.
7993         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
7994         (propagate_constants_for_unrolling): Remove.
7995         (tree_unroll_loops_completely): Perform value-numbering
7996         on the unrolled bodies loop parent.
7998 2018-08-27  Richard Biener  <rguenther@suse.de>
8000         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8001         for partial antic compute.
8003 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
8005         PR rtl-optimization/87065
8006         * combine.c (simplify_if_then_else): Formatting fix.
8007         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8008         check.
8009         (known_cond): Don't return const_true_rtx for vector modes.  Use
8010         CONST0_RTX instead of const0_rtx.  Formatting fixes.
8012 2018-08-27  Martin Liska  <mliska@suse.cz>
8014         PR gcov-profile/87069
8015         * gcov.c (process_file): Record files already processed
8016         and warn about a file being processed multiple times.
8018 2018-08-27  Martin Liska  <mliska@suse.cz>
8020         PR driver/83193
8021         * config/aarch64/aarch64.c (aarch64_override_options_internal):
8022         Set default values for x_aarch64_*_string strings.
8023         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8024         prefix.  For -mabi do not print '=ABI' in help and use
8025         <option_value> format for -msve-vector-bits and -moverride
8026         options.
8028 2018-08-26  Jeff Law  <law@redhat.com>
8030         * config/mips/frame-header-opt.c: Include "backend.h" rather than
8031         "cfg.h"
8033 2018-08-26  Marek Polacek  <polacek@redhat.com>
8035         PR c++/87029, Implement -Wredundant-move.
8036         * doc/invoke.texi: Document -Wredundant-move.
8038 2018-08-25  Martin Sebor  <msebor@redhat.com>
8040         PR tree-optimization/87059
8041         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8042         to the same type as the other.
8043         * fold-const.c (fold_binary_loc): Assert expectation.
8045 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
8047         * config/darwin.c (machopic_legitimize_pic_address): Clean up
8048         extraneous parentheses, dead code section and formatting.
8050 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
8052         PR c++/87091
8053         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8054         wide enough for jumps in the line-numbering to be visible.
8055         (layout::print_gap_in_line_numbering): New member function.
8056         (layout::calculate_line_spans): When using line numbering, merge
8057         line spans that are only 1 line apart.
8058         (diagnostic_show_locus): When printing line numbers, show gaps in
8059         line numbering directly, rather than printing headers.
8060         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8061         line-numbering with multiple line spans.
8062         (selftest::test_fixit_insert_containing_newline_2): Add test of
8063         line-numbering, in which the spans are close enough to be merged.
8065 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8067         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8068         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
8069         * tree-vrp.c (range_is_nonnull): Remove.
8070         (range_includes_zero_p): Accept value_range instead of min/max.
8071         (extract_range_from_binary_expr_1): Do not early bail on
8072         POINTER_PLUS_EXPR.
8073         Use range_includes_zero_p instead of range_is_nonnull.
8074         (extract_range_from_unary_expr): Use range_includes_zero_p instead
8075         of range_is_nonnull.
8076         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
8077         special case VR_ANTI_RANGE.
8078         (vrp_finalize): Same.
8079         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8080         instead of min/max.
8081         (range_is_nonnull): Remove.
8082         * vr-values.c (vrp_stmt_computes_nonzero): Use
8083         range_includes_zero_p instead of range_is_nonnull.
8084         (extract_range_basic): Pass value_range to range_includes_zero_p
8085         instead of range_is_nonnull.
8087 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
8089         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8090         * emit-rtl.h (rtl_data): Remove return_bnd.
8091         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8092         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8093         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8094         (POINTER_BOUNDS_MODE): Remove definition.
8095         (make_pointer_bounds_mode): Remove.
8096         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8097         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8098         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8099         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8100         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8101         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8102         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8104         * config/i386/i386-modes.def (BND32, BND64): Remove.
8105         * config/i386/i386.c (dbx_register_map): Remove bound registers.
8106         (dbx64_register_map): Ditto.
8107         (svr4_dbx_register_map): Ditto.
8108         (indirect_thunk_bnd_needed): Remove.
8109         (indirect_thunks_bnd_used): Ditto.
8110         (indirect_return_bnd_needed): Ditto.
8111         (indirect_return_via_cx_bnd): Ditto.
8112         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8113         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8114         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
8115         (output_indirect_thunk_function): Remove handling of
8116         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8117         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8118         (ix86_save_reg): Remove handling of crtl->return_bnd.
8119         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8120         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8121         and UNSPEC_BNDLX_ADDR.
8122         (ix86_output_indirect_branch_via_reg): Remove handling of
8123         indirect_thunk_prefix_bnd.
8124         (ix86_output_indirect_branch_via_push): Ditto.
8125         (ix86_output_function_return): Ditto.
8126         (ix86_output_indirect_function_return): Ditto.
8127         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8128         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8129         (CALL_USED_REGISTERS): Ditto.
8130         (REG_ALLOC_ORDER): Update for removal of bound registers.
8131         (HI_REGISTER_NAMES): Ditto.
8132         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8133         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8134         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8135         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8136         (FIRST_PSEUDO_REG): Update.
8137         (BND): Remove mode iterator.
8138         * config/i386/predicates.md (bnd_mem_operator): Remove.
8140 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8142         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8143         vectors.
8145 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8147         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8148         the case in which the permute needs only a single element and
8149         repeats for every vector of the result.  Extend that case to
8150         handle variable-length vectors.
8151         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8153 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
8155         PR debug/79342
8156         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8157         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8159 2018-08-24  Richard Biener  <rguenther@suse.de>
8161         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8162         bb_flags_allocated members.
8163         (auto_flag): New RAII class for allocating flags.
8164         (auto_edge_flag): New RAII class for allocating edge flags.
8165         (auto_bb_flag): New RAII class for allocating bb flags.
8166         * cfgloop.c (verify_loop_structure): Allocate temporary edge
8167         flag dynamically.
8168         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8169         in favor of temporarily allocated BB flag.
8170         * hsa-brig.c: Re-order includes.
8171         * hsa-dump.c: Likewise.
8172         * hsa-regalloc.c: Likewise.
8173         * print-rtl.c: Likewise.
8174         * profile-count.c: Likewise.
8176 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
8178         PR target/86989
8179         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8180         the TOC register.
8182 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8184         PR 87073/bootstrap
8185         * wide-int-range.cc (wide_int_range_div): Do not ignore result
8186         from wide_int_range_multiplicative_op.
8188 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8190         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8191         "permutaion".
8193 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
8195         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8196         to 'expanded'.
8198 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
8200         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8201         full GENERIC expression used for replacement.
8203 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
8205         * tree-vrp.c (abs_extent_range): Remove.
8206         (extract_range_into_wide_ints): Pass wide ints by reference.
8207         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8208         Pass wide ints by reference in all calls to
8209         extract_range_into_wide_ints.
8210         * wide-int-range.cc (wide_int_range_div): New.
8211         * wide-int-range.h (wide_int_range_div): New.
8212         (wide_int_range_includes_zero_p): New.
8213         (wide_int_range_zero_p): New.
8215 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
8217         * config/aarch64/aarch64.md (arches): New enum.
8218         (arch): New enum attr.
8219         (arch_enabled): New attr.
8220         (enabled): Now uses arch_enabled only.
8221         (simd, sve, fp16): Removed attribute.
8222         (fp): Attr now defined in terms of 'arch'.
8223         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8224         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8225         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8226         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8227         attributes into 'arch'.
8228         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8229         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8230         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8231         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8232         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8233         'simd' attribute into 'arch'.
8234         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8235         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8236         Convert use of 'fp' attribute to 'arch'.
8237         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8238         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8239         into 'arch'.
8240         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8241         (different modes) Merge 'fp' and 'simd' into 'arch'.
8242         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8243         'simd' into 'arch'.
8245 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
8247         PR rtl-optimization/87026
8248         * expmed.c (canonicalize_comparison): If we can no longer create
8249         pseudoregisters, don't.
8251 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
8253         PR target/86951
8254         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8255         prototype.
8256         * config/arm/arm.c (speculation_barrier_libfunc): New static
8257         variable.
8258         (arm_init_libfuncs): Initialize it.
8259         (arm_emit_speculation_barrier): New function.
8260         * config/arm/arm.md (speculation_barrier): Call
8261         arm_emit_speculation_barrier for architectures that do not have
8262         DSB or ISB.
8263         (speculation_barrier_insn): Only match on Armv7 or later.
8265 2018-08-23  Richard Biener  <rguenther@suse.de>
8267         PR middle-end/87024
8268         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8269         calls.
8271 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8273         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8274         of single-vector TBLs.
8275         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8276         one input is given.
8278 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8280         PR target/85910
8281         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8282         aarch64_evpc_tbl guard.
8284 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8286         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8287         behaviour.
8289 2018-08-22  Martin Sebor  <msebor@redhat.com>
8291         PR middle-end/87052
8292         * tree-pretty-print.c (pretty_print_string): Add argument.
8293         (dump_generic_node): Call to pretty_print_string with string size.
8295 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
8297         PR rtl-optimization/86771
8298         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8299         of two SETs into those two SETs, one to be placed at i2, if that SETs
8300         destination is modified between i2 and i3.
8302 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8304         PR tree-optimization/86725
8305         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8306         function.
8307         (vect_analyze_scalar_cycles_1): Check it.
8309 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8311         PR tree-optimization/86725
8312         * tree-vect-loop.c (vect_is_simple_reduction): When treating
8313         an outer loop phi as a double reduction, make sure that the
8314         single user of the phi result is an inner loop phi.
8316 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8318         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8319         grouped stores with gaps to a strided group.
8321 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8323         * tree-vect-stmts.c (get_group_load_store_type)
8324         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8325         first statement in a group.
8327 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8329         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8330         the sequence used in gcc/gcc.c.
8332 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8334         PR other/704
8335         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8336         building it.
8338 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8340         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8341         Darwin10-specific unwinder-shim.
8342         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8343         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8344         New to cater for Darwin10 Rosetta.
8346 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8348         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8349         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8351 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8353         PR bootstrap/81033
8354         PR target/81733
8355         PR target/52795
8356         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8357         (dwarf2out_switch_text_section): Generate a local label for the
8358         second function sub-section and apply it as the second FDE start
8359         label.
8360         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8361         second sub-section start.
8363 2018-08-22  Richard Biener  <rguenther@suse.de>
8365         PR tree-optimization/86988
8366         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8368 2018-08-22  Richard Biener  <rguenther@suse.de>
8370         PR tree-optimization/86945
8371         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8373 2018-08-22  Alexandre Oliva <oliva@adacore.com>
8375         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8376         a comment about how uses of r2 for .sdata2 come about.
8378 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
8380         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8382 2018-08-21  Marek Polacek  <polacek@redhat.com>
8384         PR c++/86981, Implement -Wpessimizing-move.
8385         * doc/invoke.texi: Document -Wpessimizing-move.
8387 2018-08-21  Jan Hubicka  <jh@suse.cz>
8389         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8390         * tree.h (is_redundant_typedef): Remove.
8391         * dwarf2out.c (is_redundant_typedef): Turn into static function.
8393 2018-08-21  Jan Hubicka  <jh@suse.cz>
8395         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8396         when possible.
8398 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
8400         * expmed.c (extract_low_bits): Reject invalid subregs early.
8402 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8404         PR middle-end/86121
8405         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8406         behaviour.
8408 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8410         * config/vxworks.h: Guard vxworks_asm_out_constructor and
8411         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8412         * config/vxworks.c: Likewise.
8414 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8416         * config/vxworks.c: Set targetm.have_ctors_dtors
8417         if HAVE_INITFINI_ARRAY_SUPPORT.
8418         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8419         if HAVE_INITFINI_ARRAY_SUPPORT.
8421 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
8423         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8424         default search path for VxWorks < 7.
8426 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8428         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8429         (get_format_string): Refer to c_getstr.
8431 2018-08-21  Tom de Vries  <tdevries@suse.de>
8433         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8434         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8435         (debuginfo_early_stop): Declare.
8436         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8437         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8438         (debuginfo_early_stop): New function.
8439         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8440         and debuginfo_early_stop.
8441         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8442         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8443         (general_init): Call debuginfo_early_init.
8444         (finalize): Call debuginfo_fini.
8445         (do_compile): Call debuginfo_init.
8446         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8447         -fdump-early-debug.
8448         (@item -fdump-debug, @item -fdump-earlydebug): Add.
8450 2018-08-21  Tom de Vries  <tdevries@suse.de>
8452         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8453         flag_dump_noaddr and flag_dump_unnumbered.
8455 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
8457         * wide-int-range.cc (wide_int_range_abs): New.
8458         (wide_int_range_order_set): Rename from wide_int_range_min_max.
8459         * wide-int-range.h (wide_int_range_abs): New.
8460         (wide_int_range_min_max): New.
8461         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8462         case to call wide_int_range_abs.
8463         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8464         (extract_range_from_abs_expr): Delete.
8466 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
8468         PR target/87033
8469         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8470         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8471         for indexed loads.
8473 2018-08-20  Nathan Sidwell  <nathan@acm.org>
8474             Jeff Law <law@redhat.com>
8476         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8477         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8479 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
8481         PR other/84889
8482         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8483         (decl_attributes): Likewise.
8484         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8485         instance.
8486         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8487         * diagnostic-core.h (class auto_diagnostic_group): New class.
8488         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8489         (diagnostic_report_diagnostic): Handle the first diagnostics within
8490         a group.
8491         (emit_diagnostic): Add auto_diagnostic_group instance.
8492         (inform): Likewise.
8493         (inform_n): Likewise.
8494         (warning): Likewise.
8495         (warning_at): Likewise.
8496         (warning_n): Likewise.
8497         (pedwarn): Likewise.
8498         (permerror): Likewise.
8499         (error): Likewise.
8500         (error_n): Likewise.
8501         (error_at): Likewise.
8502         (sorry): Likewise.
8503         (fatal_error): Likewise.
8504         (internal_error): Likewise.
8505         (internal_error_no_backtrace): Likewise.
8506         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8507         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8508         * diagnostic.h (struct diagnostic_context): Add fields
8509         "diagnostic_group_nesting_depth",
8510         "diagnostic_group_emission_count", "begin_group_cb",
8511         "end_group_cb".
8512         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8513         Add auto_diagnostic_group instance(s).
8514         (find_explicit_erroneous_behavior): Likewise.
8515         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8516         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8517         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8518         (gimplify_va_arg_expr): Likewise.
8519         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8520         (HSA_SORRY_AT): Likewise.
8521         * ipa-devirt.c (compare_virtual_tables): Likewise.
8522         (warn_odr): Likewise.
8523         * multiple_target.c (expand_target_clones): Likewise.
8524         * opts-common.c (cmdline_handle_error): Likewise.
8525         * reginfo.c (globalize_reg): Likewise.
8526         * substring-locations.c (format_warning_n_va): Likewise.
8527         * tree-inline.c (expand_call_inline): Likewise.
8528         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8529         * tree-ssa-loop-niter.c
8530         (do_warn_aggressive_loop_optimizations): Likewise.
8531         * tree-ssa-uninit.c (warn_uninit): Likewise.
8532         * tree.c (warn_deprecated_use): Likewise.
8534 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
8536         PR target/87014
8537         * config/i386/i386.md (eh_return): Always update EH return
8538         address in word_mode.
8540 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
8542         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8543         TARGET_SPLIT_COMPLEX_ARG is defined.
8545 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8547         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8549 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8551         PR target/86984
8552         * expr.c (expand_assignment): Assert that bitpos is positive.
8553         (store_field): Likewise
8554         (expand_expr_real_1): Make sure that bitpos is positive.
8555         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8556         integer overflow.
8558 2018-08-20  Nathan Sidwell  <nathan@acm.org>
8560         * Makefile.in (CPP_ID_DATA_H): Delete.
8561         (CPP_INTERNAL_H): Don't add it.
8562         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8563         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8565 2018-08-20  Richard Biener  <rguenther@suse.de>
8567         PR tree-optimization/78655
8568         * tree-vrp.c (extract_range_from_binary_expr_1): Make
8569         pointer + offset nonnull if either operand is nonnull work.
8571 2018-08-20  Tom de Vries  <tdevries@suse.de>
8573         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8574         unless the referenced die describes the added property using
8575         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
8576         Otherwise, add a DW_AT_location to the referenced die.
8578 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
8580         PR target/86994
8581         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8582         register_operand when calling ix86_set_reg_reg_cost.
8583         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8584         Set *total to 0 for operands that satisfy x86_64_immediate_operand
8585         predicate and to 1 otherwise.
8587 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
8589         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8590         emit a diagnostic that it is not supported and reset the option.
8591         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8592         supported and consume the option.  (ASM_FINAL_SPEC): New.
8594 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
8596         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8597         a sentence.
8599 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
8601         C-SKY port: Documentation
8603         * doc/extend.texi (C-SKY Function Attributes): New section.
8604         * doc/invoke.texi (Option Summary): Add C-SKY options.
8605         (C-SKY Options): New section.
8606         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8608 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8609             Huibin Wang  <huibin_wang@c-sky.com>
8610             Sandra Loosemore  <sandra@codesourcery.com>
8611             Chung-Lin Tang  <cltang@codesourcery.com>
8613         C-SKY port: Backend implementation
8615         * config/csky/*: New.
8616         * common/config/csky/*: New.
8618 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8619             Huibin Wang  <huibin_wang@c-sky.com>
8620             Sandra Loosemore  <sandra@codesourcery.com>
8621             Chung-Lin Tang  <cltang@codesourcery.com>
8622             Andrew Jenner  <andrew@codesourcery.com>
8624         C-SKY port: Configury
8626         * config.gcc (csky-*-*): New.
8627         * configure.ac: Add csky to targets for dwarf2 debug_line support.
8628         * configure: Regenerated.
8630 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
8632         * dump-context.h: Include "dumpfile.h".
8633         (dump_context::dump_printf_va): Convert final param from va_list
8634         to va_list *.  Convert from ATTRIBUTE_PRINTF to
8635         ATTRIBUTE_GCC_DUMP_PRINTF.
8636         (dump_context::dump_printf_loc_va): Likewise.
8637         * dumpfile.c: Include "stringpool.h".
8638         (make_item_for_dump_printf_va): Delete.
8639         (make_item_for_dump_printf): Delete.
8640         (class dump_pretty_printer): New class.
8641         (dump_pretty_printer::dump_pretty_printer): New ctor.
8642         (dump_pretty_printer::emit_items): New member function.
8643         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8644         function.
8645         (dump_pretty_printer::emit_item): New member function.
8646         (dump_pretty_printer::stash_item): New member function.
8647         (dump_pretty_printer::format_decoder_cb): New member function.
8648         (dump_pretty_printer::decode_format): New member function.
8649         (dump_context::dump_printf_va): Reimplement in terms of
8650         dump_pretty_printer.
8651         (dump_context::dump_printf_loc_va): Convert final param from va_list
8652         to va_list *.
8653         (dump_context::begin_scope): Reimplement call to
8654         make_item_for_dump_printf.
8655         (dump_printf): Update for change to dump_printf_va.
8656         (dump_printf_loc): Likewise.
8657         (selftest::test_capture_of_dump_calls): Convert "stmt" from
8658         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
8659         with %T, %E, and %G.
8660         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8661         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8662         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8663         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8664         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8665         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8666         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8667         within a dump_printf_loc call to "%wu".
8668         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8669         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
8670         missing space after "=".
8671         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8672         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8673         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8674         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8675         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
8676         duplicate "vectorized" from message.
8678 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
8680         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8681         polyNxK_t element's TYPE_STRING_FLAG.
8683 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
8685         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8686         (they were unnamed before).  Fix comments.
8688 2018-08-17  Nathan Sidwell  <nathan@acm.org>
8690         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8692 2018-08-17  Richard Biener  <rguenther@suse.de>
8694         PR tree-optimization/86841
8695         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8697 2018-08-17  Martin Liska  <mliska@suse.cz>
8699         * common.opt: Remove Warn, Init and Report for options with
8700         Ignore/Deprecated flag. Warning is done automatically for
8701         Deprecated flags.
8702         * config/i386/i386.opt: Likewise.
8703         * config/ia64/ia64.opt: Likewise.
8704         * config/rs6000/rs6000.opt: Likewise.
8705         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8706         Remove usage of flag_check_pointer_bounds.
8707         * lto-wrapper.c (merge_and_complain): Do not handle
8708         OPT_fcheck_pointer_bounds.
8709         (append_compiler_options): Likewise.
8710         * opt-functions.awk: Do not handle Deprecated.
8711         * optc-gen.awk: Check that Var, Report and Init are not
8712         used for an option with Ignore/Deprecated flag.
8713         * opts-common.c (decode_cmdline_option): Do not report
8714         CL_ERR_DEPRECATED.
8715         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8716         options.
8717         * opts.h (struct cl_option): Remove cl_deprecated flag.
8718         (CL_ERR_DEPRECATED): Remove error enum value.
8720 2018-08-17  Richard Biener  <rguenther@suse.de>
8722         PR middle-end/86505
8723         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8724         across a va-arg-pack using call adjust its return value accordingly.
8726 2018-08-16  Martin Sebor  <msebor@redhat.com>
8728         PR tree-optimization/86853
8729         * gimple-ssa-sprintf.c (struct format_result): Rename member.
8730         (struct fmtresult): Add member and initialize it in ctors.
8731         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
8732         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
8733         (format_directive): Set POSUNDER4K when MAYFAIL is set.
8734         (parse_directive): Handle %C same as %c.
8735         (sprintf_dom_walker::compute_format_length): Adjust.
8736         (is_call_safe): Adjust.
8738 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8740         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
8741         for determining how to count the elements.
8742         * builtins.h (c_strlen): Adjust prototype.
8743         * expr.c (string_constant): Add new parameter mem_size.
8744         Set *mem_size appropriately.
8745         * expr.h (string_constant): Adjust protoype.
8746         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8747         * gimple-fold.h (get_range_strlen): Adjust prototype.
8748         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8749         (format_string): Call get_string_length with eltsize.
8751 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
8753         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8754         to emit the span, rather than setting it as the prefix.
8756 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
8758         * diagnostic-show-locus.c (layout::start_annotation_line): Add
8759         "margin_char" parameter, defaulting to space.  Use it in place
8760         of pp_space for the initial part of the margin.
8761         (layout::print_leading_fixits): Use '+' when filling the margin
8762         of line-insertion fix-it hints.
8764 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8766         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8767         Delete.
8769 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8771         * config/rs6000/altivec.md: Don't set length attribute to the default
8772         value.
8773         * config/rs6000/darwin.md: Ditto.
8774         * config/rs6000/dfp.md: Ditto.
8775         * config/rs6000/htm.md: Ditto.
8776         * config/rs6000/rs6000.md: Ditto.
8777         * config/rs6000/sync.md: Ditto.
8778         * config/rs6000/vsx.md: Ditto.
8780 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8782         * config/rs6000/altivec.md: Don't set length attribute to the default
8783         value, for branch instructions.
8784         * config/rs6000/darwin.md: Ditto.
8785         * config/rs6000/rs6000.md: Ditto.
8787 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8789         * config/rs6000/rs6000.md (length): Always define as const_int 4.
8790         (unnamed conditional branch define_insn): Set length to 4 or 8
8791         depending on offset.
8792         (<bd>_<mode>): Similar, for alternative 0.
8793         (<bd>tf_<mode>): Ditto.
8795 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8797         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8799 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
8801         * doc/rtl.texi: Replace old RTX class names with new names.
8804 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
8806         * expmed.h (canonicalize_comparison): New declaration.
8807         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8808         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8809         * optabs.c (prepare_cmp_insn): Likewise.
8810         * rtl.h (unsigned_condition_p): New function which checks if a
8811         comparison operator is unsigned.
8813 2018-08-16  Nathan Sidwell  <nathan@acm.org>
8815         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8816         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8818 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8820         PR target/84711
8821         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8822         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8823         (mov<mov>): ..this and enable unconditionally.
8825 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8827         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8829 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
8831         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8832         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8833         "Common" with "Target".
8835 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8837         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8838         * doc/invoke.texi (mmitigate-rop): Remove.
8839         * config/i386/i386.c: Do not include "regrename.h".
8840         (ix86_rop_should_change_byte_p, reg_encoded_number)
8841         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8842         Remove.
8843         (ix86_reorg): Remove call to ix86_mitigate_rop.
8844         * config/i386/i386.md (attr "modrm_class"): Remove.
8845         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8846         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8847         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8849 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
8851         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8852         allow folding of mergeh() and mergel() for the float and double types.
8853         (fold_mergehl_helper): Rework to handle building a permute tree
8854         for float vectors.
8856 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8858         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8859         for TARGET_SSE.
8861 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
8863         * common.opt (fdiagnostics-show-labels): New option.
8864         * diagnostic-show-locus.c (class layout_range): Add field
8865         "m_label".
8866         (class layout): Add field "m_show_labels_p".
8867         (layout_range::layout_range): Add param "label" and use it to
8868         initialize m_label.
8869         (make_range): Pass in NULL for new "label" param of layout_range's
8870         ctor.
8871         (layout::layout): Initialize m_show_labels_p.
8872         (layout::maybe_add_location_range): Pass in loc_range->m_label
8873         when constructing layout_range instances.
8874         (struct line_label): New struct.
8875         (layout::print_any_labels): New member function.
8876         (layout::print_line): Call it if label-printing is enabled.
8877         (selftest::test_one_liner_labels): New test.
8878         (selftest::test_diagnostic_show_locus_one_liner): Call it.
8879         * diagnostic.c (diagnostic_initialize): Initialize
8880         context->show_labels_p.
8881         * diagnostic.h (struct diagnostic_context): Add field
8882         "show_labels_p".
8883         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8884         -fno-diagnostics-show-labels.
8885         * dwarf2out.c (gen_producer_string): Add
8886         OPT_fdiagnostics_show_labels to the ignored options.
8887         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8888         param.
8889         (gcc_rich_location::maybe_add_expr): Likewise.
8890         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8891         label" param, defaulting to NULL.
8892         (gcc_rich_location::add_expr): Add "label" param.
8893         (gcc_rich_location::maybe_add_expr): Likewise.
8894         (class text_range_label): New class.
8895         (class range_label_for_type_mismatch): New class.
8896         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8897         of format_warning_va.
8898         (fmtwarn_n): Likewise for new params of format_warning_n_va.
8899         * lto-wrapper.c (merge_and_complain): Add
8900         OPT_fdiagnostics_show_labels to the "pick one setting" options.
8901         (append_compiler_options): Likewise to the dropped options.
8902         (append_diag_options): Likewise to the passed-on options.
8903         * opts.c (common_handle_option): Handle the new option.
8904         * selftest-diagnostic.c
8905         (test_diagnostic_context::test_diagnostic_context): Enable
8906         show_labels_p.
8907         * substring-locations.c: Include "gcc-rich-location.h".
8908         (format_warning_n_va): Add "fmt_label" and "param_label" params
8909         and use them as appropriate.
8910         (format_warning_va): Add "fmt_label" and "param_label" params,
8911         passing them on to format_warning_n_va.
8912         (format_warning_at_substring): Likewise.
8913         (format_warning_at_substring_n): Likewise.
8914         * substring-locations.h (format_warning_va): Add "fmt_label" and
8915         "param_label" params.
8916         (format_warning_n_va): Likewise.
8917         (format_warning_at_substring): Likewise.
8918         (format_warning_at_substring_n): Likewise.
8919         * toplev.c (general_init): Initialize global_dc->show_labels_p.
8921 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
8923         PR testsuite/86519
8924         * builtins.c (expand_builtin_memcmp): Do not expand the call
8925         when overflow is detected.
8927 2018-08-15  Martin Sebor  <msebor@redhat.com>
8929         PR tree-optimization/71625
8930         * config/aarch64/aarch64-builtins.c
8931         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8933 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
8935         * config/s390/s390.c (s390_reorg): Remove loop.
8937 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
8939         * config/darwin.c
8940          (darwin_function_switched_text_sections): Delete.
8941         * gcc/config/darwin.h
8942          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8944 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
8946         PR target/81685
8947         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8948         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
8949         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8951 2018-08-15  Martin Liska  <mliska@suse.cz>
8953         PR tree-optimization/86925
8954         * predict.c (expr_expected_value_1): When taking
8955         later predictor, assign also probability.
8956         Use fold_build2_initializer_loc in order to fold
8957         the expression in -frounding-math.
8959 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
8961         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
8962         patterns.
8963         (expand_vec_perm_1): Try the new method.
8965 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
8967         PR target/86547
8968         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
8969         Check whether lra_live_max_point is 0 before dividing.
8971 2018-08-14  Martin Sebor  <msebor@redhat.com>
8973         PR tree-optimization/86650
8974         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
8975         (vrp_prop::check_mem_ref): Same.
8977 2018-08-13  Liu Hao <lh_mouse@126.com>
8979         * pretty-print.c (eat_esc_sequence): Swap the foreground and
8980         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
8981         and clear it thereafter, as it only works for DBCS.
8983 2018-08-13  Liu Hao <lh_mouse@126.com>
8985         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
8986         handle returned by _get_osf_handle().
8988 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
8990         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
8991         for folding vec_perm.
8993 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
8995         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
8996         Add support for gimple-folding of vec_pack() and vec_unpack()
8997         intrinsics.
8999 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
9001         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9002         vec_xst variants to the list.
9003         (rs6000_gimple_fold_builtin): Add support for folding unaligned
9004         vector loads and stores.
9006 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
9008         * config.gcc (rs6000-ibm-aix4.x): Delete.
9009         (rs6000-ibm-aix5.1): Delete.
9010         (rs6000-ibm-aix5.2): Delete.
9011         (rs6000-ibm-aix5.3): Delete.
9012         * config/rs6000/aix43.h: Delete.
9013         * config/rs6000/aix51.h: Delete.
9014         * config/rs6000/aix52.h: Delete.
9015         * config/rs6000/t-aix43: Delete.
9017 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
9019         * config/s390/s390.c (s390_decompose_constant_pool_ref):
9020         New function.
9021         (s390_decompose_address): Factor out constant pool ref
9022         decomposition.
9024 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9026         * config/nds32/nds32-predicates.c
9027         (nds32_can_use_bclr_p): Change return type as bool.
9028         (nds32_can_use_bset_p): Ditto.
9029         (nds32_can_use_btgl_p): Ditto.
9030         (nds32_can_use_bitci_p): Ditto.
9031         * config/nds32/nds32-protos.h
9032         (nds32_can_use_bclr_p): Change declaration.
9033         (nds32_can_use_bset_p): Ditto.
9034         (nds32_can_use_btgl_p): Ditto.
9035         (nds32_can_use_bitci_p): Ditto.
9037 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9039         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9040         Support -msched-prolog-epilog option.
9041         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9043 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9045         * common/config/nds32/nds32-common.c
9046         (nds32_option_optimization_table): Enalbe -malways-align.
9048 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9050         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9051         extra_headers.
9052         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9053         OPT_misr_secure_ case.
9054         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9055         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9056         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9057         secure attribute.
9058         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9059         (nds32_isr_info): New field security_level.
9060         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9061         * config/nds32/nds32.md (return_internal): Consider critical attribute.
9062         * config/nds32/nds32.opt (misr-secure): New option.
9063         * config/nds32/nds32_init.inc: New file.
9064         * config/nds32/nds32_isr.h: New file.
9066 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
9068         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9069         Update comment for atomic instructions.
9070         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9071         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9072         Remove.
9073         (atomic_loaddi): Revise fence expansion to only emit fence prior to
9074         load for __ATOMIC_SEQ_CST model.
9075         (atomic_loaddi_1): Remove float register target.
9076         (atomic_storedi): Handle CONST_INT values.
9077         (atomic_storedi_1): Remove float register source.  Add special case
9078         for zero value.
9079         (memory_barrier): New expander and insn.
9081 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
9083         PR tree-optimization/86835
9084         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9085         new_stmt after def_gsi, make sure to insert new_square_stmt after
9086         that stmt, not 2 stmts before it.
9088 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
9090         PR target/82418
9091         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9092         instead of SWI48.
9094 2018-08-10  Martin Liska  <mliska@suse.cz>
9096         PR target/83610
9097         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9098         function type.
9099         * builtins.c (expand_builtin_expect_with_probability):
9100         New function.
9101         (expand_builtin_expect_with_probability): New function.
9102         (build_builtin_expect_predicate): Add new argumnet probability
9103         for BUILT_IN_EXPECT_WITH_PROBABILITY.
9104         (fold_builtin_expect):
9105         (fold_builtin_2):
9106         (fold_builtin_3):
9107         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9108         * builtins.h (fold_builtin_expect): Set new argument.
9109         * doc/extend.texi: Document __builtin_expect_with_probability.
9110         * doc/invoke.texi: Likewise.
9111         * gimple-fold.c (gimple_fold_call): Pass new argument.
9112         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9113         also BUILT_IN_EXPECT_WITH_PROBABILITY.
9114         * predict.c (get_predictor_value): New function.
9115         (expr_expected_value): Add new argument probability. Assume
9116         that predictor and probability are always non-null.
9117         (expr_expected_value_1): Likewise.  For __builtin_expect and
9118         __builtin_expect_with_probability set probability.  Handle
9119         combination in binary expressions.
9120         (tree_predict_by_opcode): Simplify code by simply calling
9121         get_predictor_value.
9122         (pass_strip_predict_hints::execute): Add handling of
9123         BUILT_IN_EXPECT_WITH_PROBABILITY.
9124         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9125         new predictor.
9126         * tree.h (DECL_BUILT_IN_P): New function.
9128 2018-08-10  Martin Liska  <mliska@suse.cz>
9130         PR tree-optimization/85799
9131         * passes.def: Add argument for pass_strip_predict_hints.
9132         * predict.c (class pass_strip_predict_hints): Add new argument
9133         early_p.
9134         (strip_predictor_early): New function.
9135         (pass_strip_predict_hints::execute): Call the function to
9136         strip predictors.
9137         (strip_predict_hints): New function.
9138         * predict.def: Fix comment.
9140 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
9142         * Makefile.in: Clarify which tm.texi to copy over to assert the
9143         right to grant a GFDL license for all.
9145 2018-08-09  Jeff Law  <law@redhat.com>
9147         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9148         unused variable.
9150 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
9152         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9153         prototype.
9155 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9157         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9158         reductions for variable-length vectors.
9160 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
9162         PR other/84889
9163         * common.opt (fdiagnostics-show-line-numbers): New option.
9164         * diagnostic-show-locus.c (class layout): Add fields
9165         "m_show_line_numbers_p" and "m_linenum_width";
9166         (num_digits): New function.
9167         (test_num_digits): New function.
9168         (layout::layout): Initialize new fields.  Update m_x_offset
9169         logic to handle any left margin.
9170         (layout::print_source_line): Print line number when requested.
9171         (layout::start_annotation_line): New member function.
9172         (layout::print_annotation_line): Call it.
9173         (layout::print_leading_fixits): Likewise.
9174         (layout::print_trailing_fixits): Likewise.  Update calls to
9175         move_to_column for new parameter.
9176         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9177         it to potentially call start_annotation_line.
9178         (layout::show_ruler): Call start_annotation_line.
9179         (selftest::test_line_numbers_multiline_range): New selftest.
9180         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9181         and selftest::test_line_numbers_multiline_range.
9182         * diagnostic.c (diagnostic_initialize): Initialize
9183         show_line_numbers_p.
9184         * diagnostic.h (struct diagnostic_context): Add field
9185         "show_line_numbers_p".
9186         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9187         -fno-diagnostics-show-line-numbers.
9188         * dwarf2out.c (gen_producer_string): Add
9189         OPT_fdiagnostics_show_line_numbers to the ignored options.
9190         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9191         one setting" options.
9192         (append_compiler_options): Likewise to the dropped options.
9193         (append_diag_options): Likewise to the passed-on options.
9194         * opts.c (common_handle_option): Handle the new option.
9195         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9197 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9199         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9200         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
9201         third argument of type "const signed char" to descriptions of
9202         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9203         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9204         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9205         __builtin_bcdsub_ov functions.
9207 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9209         PR tree-optimization/86858
9210         * tree-vect-loop.c (vect_is_simple_reduction): Restore
9211         flow_bb_inside_loop_p calls.
9213 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9215         PR tree-optimization/86871
9216         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9217         instead of gimple_assign_lhs.
9219 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
9221         PR target/86887
9222         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9223         register constraint to operand 0.
9224         (add<mode>3_carryinC): Likewise.
9225         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9227 2018-08-09  Martin Liska  <mliska@suse.cz>
9229         PR c/86895
9230         * common.opt: Remove extra line.
9232 2018-08-09  Martin Liska  <mliska@suse.cz>
9234         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9235         at the end of a line, make first letter capital and end up
9236         a sentence with a dot.
9237         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9238         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9239         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9240         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9241         (PARAM_MAX_ISL_OPERATIONS): Likewise.
9242         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9243         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9244         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9245         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9246         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9247         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9248         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9249         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9250         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9251         (PARAM_TREE_REASSOC_WIDTH): Likewise.
9252         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9253         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9254         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9256 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
9258         PR target/84332
9259         * config/s390/s390.c (s390_option_override_internal): Reduce the
9260         stack-clash-protection-probe-interval param if it would be too big
9261         for z900.
9263 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
9265         PR target/46179
9266         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9267         * config/m68k/m68k.c (handle_move_double): Don't call
9268         m68k_final_prescan_insn.
9269         (m68k_adjust_decorated_operand): Renamed from
9270         m68k_final_prescan_insn, remove first and third operand and
9271         simplify.
9272         (print_operand): Call it.
9273         (print_operand_address): Call it.
9275 2018-08-08  Nathan Sidwell  <nathan@acm.org>
9277         * diagnostic.c (diagnostic_report_current_module): Use
9278         linemap_included_from & linemap_included_from_linemap.
9280 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
9282         * config/aarch64/aarch64-cores.def: Add phecda core.
9283         * config/aarch64/aarch64-tune.md: Regenerate.
9284         * doc/invoke.texi: Add phecda core.
9286 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9288         PR target/85295
9289         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9290         definitions.
9291         * config/s390/s390.md ("movti"): Add more alternatives for
9292         constant to GPR copies.
9294 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9296         * config/s390/s390.c: Fix whitespace damage throughout the file.
9297         * config/s390/s390.h: Likewise.
9298         * config/s390/tpf.h: Likewise.
9300 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9302         * config/s390/s390.c (s390_loadrelative_operand_p):
9303         Remove TARGET_CPU_ZARCH usages.
9304         (s390_rtx_costs): Likewise.
9305         (s390_legitimate_constant_p): Likewise.
9306         (s390_cannot_force_const_mem): Likewise.
9307         (legitimate_reload_constant_p): Likewise.
9308         (s390_preferred_reload_class): Likewise.
9309         (legitimize_pic_address): Likewise.
9310         (legitimize_tls_address): Likewise.
9311         (s390_split_branches): Removed.
9312         (s390_add_execute): Removed.
9313         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9314         (s390_mainpool_start): Likewise.
9315         (s390_mainpool_finish): Likewise.
9316         (s390_mainpool_cancel): Removed.
9317         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9318         (s390_chunkify_cancel): Likewise.
9319         (s390_return_addr_rtx): Likewise.
9320         (s390_register_info): Remove split_branches_pending_p uages.
9321         (s390_optimize_register_info): Likewise.
9322         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9323         split_branches_pending_p usages.
9324         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9325         (s390_load_got): Likewise.
9326         (s390_expand_split_stack_prologue): Likewise.
9327         (output_asm_nops): Likewise.
9328         (s390_function_profiler): Likewise.
9329         (s390_emit_call): Likewise.
9330         (s390_conditional_register_usage): Likewise.
9331         (s390_optimize_prologue): Likewise.
9332         (s390_reorg): Remove TARGET_CPU_ZARCH and
9333         split_branches_pending_p usages.
9334         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9335         usages.
9336         (s390_output_indirect_thunk_function): Likewise.
9337         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9338         (TARGET_CPU_ZARCH_P): Removed.
9339         (struct machine_function): Remove split_branches_pending_p.
9340         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9342 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9344         * common/config/s390/s390-common.c (processor_flags_table):
9345         Remove flags.
9346         * config.gcc: Remove with_arch/with_tune support.
9347         * config/s390/2064.md: Remove cpu attribute comparisons.
9348         * config/s390/driver-native.c (s390_host_detect_local_cpu):
9349         Remove MTN.
9350         * config/s390/linux.h (ASM_SPEC):
9351         Remove -march support.
9352         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9353         Use a table to get an arch level.
9354         * config/s390/s390-opts.h (enum processor_type):
9355         Remove enum values.
9356         * config/s390/s390.c
9357         (processor_table): Remove entries, add arch_level values.
9358         (s390_issue_rate): Remove cases.
9359         (s390_option_override): Adjust
9360         s390_option_override_internal() call.
9361         (s390_option_override_internal): Remove deprecation warning.
9362         (s390_valid_target_attribute_tree): Adjust
9363         s390_option_override_internal() call.
9364         * config/s390/s390.h (struct s390_processor):
9365         Share with s390-c.c, add arch_level field.
9366         * config/s390/s390.md:
9367         Remove occurrences in cpu attribute.
9368         * config/s390/s390.opt: Remove -march/-mtune support.
9369         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9370         * doc/invoke.texi: Remove deprecation warning.
9372 2018-08-08  Luis Machado  <luis.machado@linaro.org>
9374         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9375         global.
9376         (qdf24xx_tunings): Set vector cost structure to
9377         qdf24xx_vector_cost.
9379         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9380         <register_sextend>: Set to 3.
9382 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
9384         PR target/86838
9385         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9386         * config/aarch64/aarch64-simd.md
9387         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9388         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9389         (aarch64_frecpx<mode>): ...this new pattern.
9390         * config/aarch64/aarch64-simd-builtins.def: Remove comment
9391         about aarch64_frecp<FRECP:frecp_suffix><mode>.
9393 2018-08-07  Martin Liska  <mliska@suse.cz>
9395         PR middle-end/83023
9396         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9397         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9398         * predict.def (PRED_MALLOC_NONNULL): New predictor.
9399         * doc/extend.texi: Document that malloc attribute adds
9400         hit to compiler.
9402 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
9404         PR target/86785
9405         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9406         Define to speculation_safe_value_not_needed.
9408 2018-08-06  Jeff Law  <law@redhat.com>
9410         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9411         the vr_values instance to cprop_into_stmt.
9412         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9413         (cprop_operand): Also query EVRP to determine if OP is a constant.
9415 2018-08-06  Nathan Sidwell  <nathan@acm.org>
9417         * diagnostic.c (diagnostic_report_current_module): Reroll
9418         included-at loop.  Translate text.
9420 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
9422         * function-tests.c (selftest::test_expansion_to_rtl): Call
9423         free_after_compilation.
9425 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9427         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9429 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
9431         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9432         loops with memory block operations from getting unrolled.
9434 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
9436         PR target/86807
9437         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9438         Define to speculation_safe_value_not_needed.
9440 2018-08-06  Jeff Law  <law@redhat.com>
9442         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9443         assert.
9445 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9447         PR target/86662
9448         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9449         with all enabled __intN types.
9451         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9453 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9455         * alias.c (record_set): Check for clobber high.
9456         * cfgexpand.c (expand_gimple_stmt): Likewise.
9457         * combine-stack-adj.c (single_set_for_csa): Likewise.
9458         * combine.c (find_single_use_1): Likewise.
9459         (set_nonzero_bits_and_sign_copies): Likewise.
9460         (get_combine_src_dest): Likewise.
9461         (is_parallel_of_n_reg_sets): Likewise.
9462         (try_combine): Likewise.
9463         (record_dead_and_set_regs_1): Likewise.
9464         (reg_dead_at_p_1): Likewise.
9465         (reg_dead_at_p): Likewise.
9466         * dce.c (deletable_insn_p): Likewise.
9467         (mark_nonreg_stores_1): Likewise.
9468         (mark_nonreg_stores_2): Likewise.
9469         * df-scan.c (df_find_hard_reg_defs): Likewise.
9470         (df_uses_record): Likewise.
9471         (df_get_call_refs): Likewise.
9472         * dwarf2out.c (mem_loc_descriptor): Likewise.
9473         * haifa-sched.c (haifa_classify_rtx): Likewise.
9474         * ira-build.c (create_insn_allocnos): Likewise.
9475         * ira-costs.c (scan_one_insn): Likewise.
9476         * ira.c (equiv_init_movable_p): Likewise.
9477         (rtx_moveable_p): Likewise.
9478         (interesting_dest_for_shprep): Likewise.
9479         * jump.c (mark_jump_label_1): Likewise.
9480         * postreload-gcse.c (record_opr_changes): Likewise.
9481         * postreload.c (reload_cse_simplify): Likewise.
9482         (struct reg_use): Add source expr.
9483         (reload_combine): Check for clobber high.
9484         (reload_combine_note_use): Likewise.
9485         (reload_cse_move2add): Likewise.
9486         (move2add_note_store): Likewise.
9487         * print-rtl.c (print_pattern): Likewise.
9488         * recog.c (decode_asm_operands): Likewise.
9489         (store_data_bypass_p): Likewise.
9490         (if_test_bypass_p): Likewise.
9491         * regcprop.c (kill_clobbered_value): Likewise.
9492         (kill_set_value): Likewise.
9493         * reginfo.c (reg_scan_mark_refs): Likewise.
9494         * reload1.c (maybe_fix_stack_asms): Likewise.
9495         (eliminate_regs_1): Likewise.
9496         (elimination_effects): Likewise.
9497         (mark_not_eliminable): Likewise.
9498         (scan_paradoxical_subregs): Likewise.
9499         (forget_old_reloads_1): Likewise.
9500         * reorg.c (find_end_label): Likewise.
9501         (try_merge_delay_insns): Likewise.
9502         (redundant_insn): Likewise.
9503         (own_thread_p): Likewise.
9504         (fill_simple_delay_slots): Likewise.
9505         (fill_slots_from_thread): Likewise.
9506         (dbr_schedule): Likewise.
9507         * resource.c (update_live_status): Likewise.
9508         (mark_referenced_resources): Likewise.
9509         (mark_set_resources): Likewise.
9510         * rtl.c (copy_rtx): Likewise.
9511         * rtlanal.c (reg_referenced_p): Likewise.
9512         (single_set_2): Likewise.
9513         (noop_move_p): Likewise.
9514         (note_stores): Likewise.
9515         * sched-deps.c (sched_analyze_reg): Likewise.
9516         (sched_analyze_insn): Likewise.
9518 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9520         * cse.c (invalidate_reg): New function extracted from...
9521         (invalidate): ...here.
9522         (canonicalize_insn): Check for clobber high.
9523         (invalidate_from_clobbers): invalidate clobber highs.
9524         (invalidate_from_sets_and_clobbers): Likewise.
9525         (count_reg_usage): Check for clobber high.
9526         (insn_live_p): Likewise.
9527         * cselib.c (cselib_expand_value_rtx_1):Likewise.
9528         (cselib_invalidate_regno): Check for clobber in setter.
9529         (cselib_invalidate_rtx): Pass through setter.
9530         (cselib_invalidate_rtx_note_stores):
9531         (cselib_process_insn): Check for clobber high.
9532         * cselib.h (cselib_invalidate_rtx): Add operand.
9534 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9536         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9537         (mark_not_eliminable): Likewise.
9538         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9539         * lra-lives.c (process_bb_lives): Check for clobber high.
9540         * lra.c (new_insn_reg): Remember clobber highs.
9541         (collect_non_operand_hard_regs): Check for clobber high.
9542         (lra_set_insn_recog_data): Likewise.
9543         (add_regs_to_insn_regno_info): Likewise.
9544         (lra_update_insn_regno_info): Likewise.
9546 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9548         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9549         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9551 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9553         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9554         (copy_insn_1): Likewise.
9555         (gen_hard_reg_clobber_high): New gen function.
9556         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9557         * genemit.c (gen_exp): Likewise.
9558         (gen_emit_seq): Pass through info.
9559         (gen_insn): Check for CLOBBER_HIGH.
9560         (gen_expand): Pass through info.
9561         (gen_split): Likewise.
9562         (output_add_clobbers): Likewise.
9563         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9564         (remove_clobbers): Likewise.
9565         * rtl.h (gen_hard_reg_clobber_high): New declaration.
9567 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9569         * doc/rtl.texi (clobber_high): Add.
9570         (parallel): Add in clobber high
9571         * rtl.c (rtl_check_failed_code3): Add function.
9572         * rtl.def (CLOBBER_HIGH): Add expression.
9573         * rtl.h (RTL_CHECKC3): Add macro.
9574         (rtl_check_failed_code3): Add declaration.
9575         (XC3EXP): Add macro.
9577 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
9579         PR target/86386
9580         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9581         cfun->machine->max_used_stack_alignment if needed.
9583 2018-08-04  Martin Sebor  <msebor@redhat.com>
9585         PR tree-optimization/86571
9586         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9587         NaN output to 4.
9589 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
9591         PR target/86799
9592         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9593         Define.
9595 2018-08-03  Jeff Law  <law@redhat.com>
9597         PR target/86795
9598         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9599         Define to speculation_safe_value_not_needed.
9601 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
9603         * doc/gcov.texi (-x): Remove duplicate "to".
9604         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9605         (-Wif-not-aligned): Remove duplicate "is".
9606         (-flto): Remove duplicate "the".
9607         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9608         duplicate "v5.00.b".
9609         (MSP430 Options): Remove duplicate "and" from the description
9610         of "-mgprel-sec=regexp".
9611         (x86 Options): Remove duplicate copies of "vmldLog102" and
9612         vmlsLog104 from description of "-mveclibabi=type".
9614 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
9616         * internal-fn.h (first_commutative_argument): Declare.
9617         * internal-fn.c (first_commutative_argument): New function.
9618         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9619         restrictions for pattern statements.  Use first_commutative_argument
9620         to look for commutative operands in calls to internal functions.
9622 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
9624         * Makefile.in (wide-int-range.o): New.
9625         * tree-vrp.c: Move all the wide_int_* functions to...
9626         * wide-int-range.cc: ...here.
9627         * tree-vrp.h: Move all the wide_int_* prototypes to...
9628         * wide-int-range.h: ...here.
9630 2018-08-03  Tom de Vries  <tdevries@suse.de>
9632         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9633         UI_NONE.
9634         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9635         * except.c (output_function_exception_table): Do early exit if
9636         targetm_common.except_unwind_info (&global_options) == UI_NONE.
9638 2018-08-03  Martin Liska  <mliska@suse.cz>
9640         * predict.c (dump_prediction): Change to 2 digits
9641         in fraction part.
9643 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9645         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9646         neon_dup_q to...
9647         (falkor_am_1_gtov_gtov): ... a new insn reservation.
9649 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
9651         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9652         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9653         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9654         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9655         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9657 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
9659         * diagnostic-show-locus.c (diagnostic_show_locus): Use
9660         pp_take_prefix when saving the existing prefix.
9661         * diagnostic.c (diagnostic_append_note): Likewise.
9662         * langhooks.c (lhd_print_error_function): Likewise.
9663         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9664         param's type.  Free the existing prefix.
9665         (pp_take_prefix): New function.
9666         (pretty_printer::pretty_printer): Drop the prefix parameter.
9667         Rename the length parameter to match the comment.
9668         (pretty_printer::~pretty_printer): Free the prefix.
9669         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9670         parameter.
9671         (struct pretty_printer): Drop the "const" from "prefix" field's
9672         type and clarify memory management.
9673         (pp_set_prefix): Drop the "const" from the 2nd param.
9674         (pp_take_prefix): New decl.
9676 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
9678         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9679         for word_mode_ok here instead of passing as argument.
9680         (expand_block_compare): Change select_block_compare_mode() call.
9681         (expand_strncmp_gpr_sequence): New function.
9682         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9684 2018-08-02  Jeff Law  <law@redhat.com>
9686         PR target/86790
9687         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9688         Define to speculation_safe_value_not_needed.
9690         PR target/86784
9691         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9692         Define to speculation_safe_value_not_needed.
9694 2018-08-02  Tom de Vries  <tdevries@suse.de>
9696         PR target/86660
9697         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9698         function.  Return UI_TARGET unconditionally.
9699         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9700         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9702 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9704         * genemit.c (print_overload_test): Fix typo.
9706 2018-08-02  Richard Biener  <rguenther@suse.de>
9708         PR tree-optimization/86816
9709         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9710         which checks for value availability before querying it.
9711         (gvn_uses_equal): Use it.
9712         (same_succ_hash): Likewise.
9713         (gimple_equal_p): Likewise.
9715 2018-08-02  Nick Clifton  <nickc@redhat.com>
9717         PR target/86813
9718         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9719         Define to speculation_safe_value_not_needed.
9721         PR target/86810
9722         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9723         Define to speculation_safe_value_not_needed.
9725         PR target/86810
9726         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9727         Define to speculation_safe_value_not_needed.
9729         PR target/86803
9730         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9731         Define to speculation_safe_value_not_needed.
9733         PR target/86797
9734         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9735         Define to speculation_safe_value_not_needed.
9737         PR target/86791
9738         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9739         Define to speculation_safe_value_not_needed.
9741         PR target/86789
9742         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9743         Define to speculation_safe_value_not_needed.
9745         PR target/86787
9746         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9747         Define to speculation_safe_value_not_needed.
9749         PR target/86782
9750         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9751         speculation_safe_value_not_needed.
9753         PR target/86781
9754         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9755         to speculation_safe_value_not_needed.
9757 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9759         * doc/md.texi: Expand the documentation of instruction names
9760         to mention port-local uses.  Document '@' in pattern names.
9761         * read-md.h (overloaded_instance, overloaded_name): New structs.
9762         (mapping): Declare.
9763         (md_reader::handle_overloaded_name): New member function.
9764         (md_reader::get_overloads): Likewise.
9765         (md_reader::m_first_overload): New member variable.
9766         (md_reader::m_next_overload_ptr): Likewise.
9767         (md_reader::m_overloads_htab): Likewise.
9768         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9769         m_next_overload_ptr and m_overloads_htab.
9770         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9771         (get_mode_token, get_code_token, get_int_token): New functions.
9772         (map_attr_string): Add an optional argument that passes back
9773         the associated iterator.
9774         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9775         (md_reader::handle_overloaded_name, add_overload_instance): New
9776         functions.
9777         (apply_iterators): Handle '@' names.  Report an error if '@'
9778         is used without iterators.
9779         (initialize_iterators): Initialize the new iterator_group fields.
9780         * genopinit.c (handle_overloaded_code_for)
9781         (handle_overloaded_gen): New functions.
9782         (main): Use them to print declarations of maybe_code_for_* and
9783         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9784         * genemit.c (print_overload_arguments, print_overload_test)
9785         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9786         (main): Use it to print definitions of maybe_code_for_* and
9787         maybe_gen_* functions.
9788         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9789         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9790         instead of explicit mode checks.
9791         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9792         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9793         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9794         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9795         (aarch64_expand_compare_and_swap): Likewise
9796         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9797         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9798         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9799         (aarch64_constant_pool_reload_icode): Delete.
9800         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9801         instead of aarch64_constant_pool_reload_icode.  Use
9802         code_for_aarch64_reload_mov instead of explicit mode checks.
9803         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9804         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9805         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9806         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9807         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9808         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9809         (aarch64_atomic_load_op_code): Delete.
9810         (aarch64_emit_atomic_load_op): Likewise.
9811         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9812         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
9813         instead of aarch64_emit_atomic_load_op.
9814         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9815         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9816         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9817         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9818         character before the pattern name.
9819         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9820         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9821         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9822         (aarch64_frecps<mode>): Likewise.
9823         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9824         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9825         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9826         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9827         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9829 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9831         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9832         Allow HFmode constants if TARGET_FP_F16INST.
9834 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
9836         PR target/86014
9837         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9838         No longer check last store for clobber of address register.
9840 2018-08-02  Martin Liska  <mliska@suse.cz>
9842         PR gcov-profile/86817
9843         * gcov.c (process_all_functions): New function.
9844         (main): Call it.
9845         (process_file): Move functions processing to
9846         process_all_functions.
9848 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
9850         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9851         "const" to the "gimple *" and "rtx_insn *" parameters.
9852         * dumpfile.h (dump_user_location_t::dump_user_location_t):
9853         Likewise.
9854         (dump_location_t::dump_location_t): Likewise.
9856 2018-08-01  Martin Sebor  <msebor@redhat.com>
9858         PR tree-optimization/86650
9859         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9860         rather than a "gcall *".  Directly pass the data of interest
9861         to percent_K_format, rather than building a temporary CALL_EXPR
9862         to hold it.
9863         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9864         (gimple_fold_builtin_strncat): Adjust.
9865         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9866         gcall* argument with gimple*.
9867         * gimple-ssa-warn-restrict.c (check_call): Same.
9868         (wrestrict_dom_walker::before_dom_children): Same.
9869         (builtin_access::builtin_access): Same.
9870         (check_bounds_or_overlap): Same
9871         (maybe_diag_overlap): Same.
9872         (maybe_diag_offset_bounds): Same.
9873         * tree-diagnostic.c (default_tree_printer): Move usage of
9874         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9875         to this callsite.
9876         * tree-pretty-print.c (percent_K_format): Add argument.
9877         * tree-pretty-print.h: Add argument.
9878         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9879         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9880         (maybe_diag_stxncpy_trunc): Same.
9881         (handle_builtin_stxncpy): Same.
9882         (handle_builtin_strcat): Same.
9884 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9886         * match.pd: Optimise pointer range checks.
9888 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9890         PR tree-optimization/86758
9891         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9892         to remove pattern statements.
9894 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9896         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9897         result of dfs_enumerate_from when constructing stmt_vec_infos,
9898         instead of additionally calling get_loop_body.
9900 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9902         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9903         parameter.
9904         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9905         When creating an iv, assert that the step is not known to be zero.
9906         (vect_setup_realignment): Update call accordingly.
9907         * tree-vect-stmts.c (vectorizable_store): Likewise.
9908         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
9910 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9912         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9913         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9914         (vectorizable_reduction): Likewise.
9915         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9916         (vect_detect_hybrid_slp_stmts): Likewise.
9917         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9919 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
9921         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9922         (wide_int_set_zero_nonzero_bits): ...this.
9923         (zero_nonzero_bits_from_vr): Rename to...
9924         (vrp_set_zero_nonzero_bits): ...this.
9925         (extract_range_from_multiplicative_op_1): Abstract wide int
9926         code...
9927         (wide_int_range_multiplicative_op): ...here.
9928         (extract_range_from_binary_expr_1): Extract wide int binary
9929         operations into their own functions.
9930         (wide_int_range_lshift): New.
9931         (wide_int_range_can_optimize_bit_op): New.
9932         (wide_int_range_shift_undefined_p): New.
9933         (wide_int_range_bit_xor): New.
9934         (wide_int_range_bit_ior): New.
9935         (wide_int_range_bit_and): New.
9936         (wide_int_range_trunc_mod): New.
9937         (extract_range_into_wide_ints): New.
9938         (vrp_shift_undefined_p): New.
9939         (extract_range_from_multiplicative_op): New.
9940         (vrp_can_optimize_bit_op): New.
9941         * tree-vrp.h (value_range::dump): New.
9942         (wide_int_range_multiplicative_op): New.
9943         (wide_int_range_lshift):New.
9944         (wide_int_range_shift_undefined_p): New.
9945         (wide_int_range_bit_xor): New.
9946         (wide_int_range_bit_ior): New.
9947         (wide_int_range_bit_and): New.
9948         (wide_int_range_trunc_mod): New.
9949         (zero_nonzero_bits_from_bounds): Rename to...
9950         (wide_int_set_zero_nonzero_bits): ...this.
9951         (zero_nonzero_bits_from_vr): Rename to...
9952         (vrp_set_zero_nonzero_bits): ...this.
9953         (range_easy_mask_min_max): Rename to...
9954         (wide_int_range_can_optimize_bit_op): this.
9955         * vr-values.c (simplify_bit_ops_using_ranges): Rename
9956         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
9958 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9960         * tree-vectorizer.h (vect_orig_stmt): New function.
9961         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
9962         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
9963         (vect_create_epilog_for_reduction): Likewise.
9964         (vectorizable_live_operation): Likewise.
9965         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9966         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
9967         * tree-vect-stmts.c (vectorizable_call): Likewise.
9968         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
9970 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9972         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
9973         argument.
9974         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
9975         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
9976         (vect_transform_loop): Likewise.
9977         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9979 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9981         * tree-vectorizer.h (vect_schedule_slp): Return void.
9982         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9983         (vect_schedule_slp): Likewise.
9985 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9987         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
9988         argument.
9989         (vect_transform_loop): Update calls accordingly.  Schedule SLP
9990         instances before the main loop, if any exist.
9992 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9994         PR tree-optimization/86749
9995         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
9996         If the lhs is used in a COND_EXPR, check that it is being used
9997         as the "then" or "else" value.
9999 2018-08-01  Tom de Vries  <tdevries@suse.de>
10001         PR target/86800
10002         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10003         speculation_safe_value_not_needed.
10005 2018-08-01  Richard Biener  <rguenther@suse.de>
10007         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10008         as base and offset.
10010 2018-08-01  Martin Liska  <mliska@suse.cz>
10012         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10013         format how successful transformation is dumped.
10014         (gimple_mod_pow2_value_transform): Likewise.
10015         (gimple_mod_subtract_transform): Likewise.
10016         (gimple_stringops_transform): Likewise.
10018 2018-08-01  Martin Liska  <mliska@suse.cz>
10020         PR value-prof/35543
10021         * value-prof.c (interesting_stringop_to_profile_p):
10022         Simplify the code and add BUILT_IN_MEMMOVE.
10023         (gimple_stringops_transform): Likewise.
10025 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
10027         * config/aarch64/aarch64-simd.md
10028         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10029         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10030         use GPI iterator instead of SI mode.
10032 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10034         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10035         rs6000_speculation_barrier.
10036         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10037         new barrier pattern name.
10039 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10041         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10042         (speculation_barrier): New insn.
10044 2018-08-01  Richard Biener  <rguenther@suse.de>
10046         PR bootstrap/86724
10047         * graphite.h: Include isl/id.h and isl/space.h to allow build
10048         with ISL 0.20.
10050 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
10052         PR target/86651
10053         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10054         mode for COFF targets.
10055         * defaults.h (TARGET_COFF): Define.
10056         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10057         TARGET_COFF): Define.
10058         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10059         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10060         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10062 2018-07-31  Alexandre Oliva <oliva@adacore.com>
10064         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10065         * gimple-streamer-out.c (output_bb): Save it.
10066         * lto-streamer-in.c (input_struct_function_base): Restore
10067         instance discriminator if available.  Create map on demand.
10068         * lto-streamer-out.c (output_struct_function_base): Save it if
10069         available.
10070         * final.c (decl_to_instance_map): Document LTO strategy.
10072 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
10073             Olivier Hainque  <hainque@adacore.com>
10075         * debug.h (decl_to_instance_map_t): New type.
10076         (decl_to_instance_map): Declare.
10077         (maybe_create_decl_to_instance_map): New inline function.
10078         * final.c (bb_discriminator, last_bb_discriminator): New statics,
10079         to track basic block discriminators.
10080         (final_start_function_1): Initialize them.
10081         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10082         bb_discriminator.
10083         (decl_to_instance_map): New variable.
10084         (map_decl_to_instance, maybe_set_discriminator): New functions.
10085         (notice_source_line): Set discriminator.
10087 2018-07-31  Ian Lance Taylor  <iant@golang.org>
10089         * targhooks.c (default_have_speculation_safe_value): Add
10090         ATTRIBUTE_UNUSED.
10092 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10094         * dump-context.h: Include "pretty-print.h".
10095         (dump_context::refresh_dumps_are_enabled): New decl.
10096         (dump_context::emit_item): New decl.
10097         (class dump_context): Add fields "m_test_pp" and
10098         "m_test_pp_flags".
10099         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10100         (temp_dump_context::get_dumped_text): New decl.
10101         (class temp_dump_context): Add field "m_pp".
10102         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10103         (dump_context::refresh_dumps_are_enabled): ...and add a test for
10104         m_test_pp.
10105         (set_dump_file): Update for above change.
10106         (set_alt_dump_file): Likewise.
10107         (dump_loc): New overload, taking a pretty_printer *.
10108         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
10109         to any test pretty-printer.
10110         (make_item_for_dump_gimple_stmt): New function, adapted from
10111         optinfo::add_gimple_stmt.
10112         (dump_context::dump_gimple_stmt): Call it, and use the result,
10113         eliminating the direct usage of dump_file and alt_dump_file in
10114         favor of indirectly using them via emit_item.
10115         (make_item_for_dump_gimple_expr): New function, adapted from
10116         optinfo::add_gimple_expr.
10117         (dump_context::dump_gimple_expr): Call it, and use the result,
10118         eliminating the direct usage of dump_file and alt_dump_file in
10119         favor of indirectly using them via emit_item.
10120         (make_item_for_dump_generic_expr): New function, adapted from
10121         optinfo::add_tree.
10122         (dump_context::dump_generic_expr): Call it, and use the result,
10123         eliminating the direct usage of dump_file and alt_dump_file in
10124         favor of indirectly using them via emit_item.
10125         (make_item_for_dump_printf_va): New function, adapted from
10126         optinfo::add_printf_va.
10127         (make_item_for_dump_printf): New function.
10128         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10129         and use the result, eliminating the direct usage of dump_file and
10130         alt_dump_file in favor of indirectly using them via emit_item.
10131         (make_item_for_dump_dec): New function.
10132         (dump_context::dump_dec): Call it, and use the result,
10133         eliminating the direct usage of dump_file and alt_dump_file in
10134         favor of indirectly using them via emit_item.
10135         (make_item_for_dump_symtab_node): New function, adapted from
10136         optinfo::add_symtab_node.
10137         (dump_context::dump_symtab_node): Call it, and use the result,
10138         eliminating the direct usage of dump_file and alt_dump_file in
10139         favor of indirectly using them via emit_item.
10140         (dump_context::begin_scope): Reimplement, avoiding direct usage
10141         of dump_file and alt_dump_file in favor of indirectly using them
10142         via emit_item.
10143         (dump_context::emit_item): New member function.
10144         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10145         Set up test pretty-printer on the underlying context.  Call
10146         refresh_dumps_are_enabled.
10147         (temp_dump_context::~temp_dump_context): Call
10148         refresh_dumps_are_enabled.
10149         (temp_dump_context::get_dumped_text): New member function.
10150         (selftest::verify_dumped_text): New function.
10151         (ASSERT_DUMPED_TEXT_EQ): New macro.
10152         (selftest::test_capture_of_dump_calls): Run all tests twice, with
10153         and then without optinfo enabled.  Add uses of
10154         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
10155         * dumpfile.h: Update comment for the dump_* API.
10156         * optinfo-emit-json.cc
10157         (selftest::test_building_json_from_dump_calls): Update for new
10158         param for temp_dump_context ctor.
10159         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10160         and "m_owned" field.
10161         (optinfo_item::~optinfo_item): Likewise.
10162         (optinfo::add_item): New member function.
10163         (optinfo::emit): Update comment.
10164         (optinfo::add_string): Delete.
10165         (optinfo::add_printf): Delete.
10166         (optinfo::add_printf_va): Delete.
10167         (optinfo::add_gimple_stmt): Delete.
10168         (optinfo::add_gimple_expr): Delete.
10169         (optinfo::add_tree): Delete.
10170         (optinfo::add_symtab_node): Delete.
10171         (optinfo::add_dec): Delete.
10172         * optinfo.h (class dump_context): New forward decl.
10173         (optinfo::add_item): New decl.
10174         (optinfo::add_string): Delete.
10175         (optinfo::add_printf): Delete.
10176         (optinfo::add_printf_va): Delete.
10177         (optinfo::add_gimple_stmt): Delete.
10178         (optinfo::add_gimple_expr): Delete.
10179         (optinfo::add_tree): Delete.
10180         (optinfo::add_symtab_node): Delete.
10181         (optinfo::add_dec): Delete.
10182         (optinfo::add_poly_int): Delete.
10183         (optinfo_item::optinfo_item): Remove "owned" param.
10184         (class optinfo_item): Remove field "m_owned".
10186 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10188         PR middle-end/86705
10189         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10190         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10191         requested variable alignment.
10192         (expand_one_ssa_partition): Likewise.
10193         (expand_one_var): Likewise.
10195 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10197         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10198         to speculation_safe_value_not_needed.
10200 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10202         * targhooks.h (speculation_safe_value_not_needed): New prototype.
10203         * targhooks.c (speculation_safe_value_not_needed): New function.
10204         * target.def (have_speculation_safe_value): Update documentation.
10205         * doc/tm.texi: Regenerated.
10207 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10209         * config/aarch64/iterators.md (ALLI_TI): New iterator.
10210         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10211         expand.
10212         (despeculate_copy<ALLI:mode>_insn): New insn.
10213         (despeculate_copyti_insn): New insn.
10214         (despeculate_simple<ALLI:mode>): New insn
10215         (despeculate_simpleti): New insn.
10216         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10217         function.
10218         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10219         aarch64_speculation_safe_value.
10220         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10222 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10224         * config/aarch64/aarch64-speculation.cc: New file.
10225         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10226         before pass_reorder_blocks.
10227         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10228         prototype.
10229         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10230         X14 and X15 when tracking speculation.
10231         * config/aarch64/aarch64.md (register name constants): Add
10232         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10233         (unspec): Add UNSPEC_SPECULATION_TRACKER.
10234         (speculation_barrier): New insn attribute.
10235         (cmp<mode>): Allow SP in comparisons.
10236         (speculation_tracker): New insn.
10237         (speculation_barrier): Add speculation_barrier attribute.
10238         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10239         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10240         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10242 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10244         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10245         aarch64_track_speculation is true.
10246         (tb<optab><mode>1): Likewise.
10247         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10248         generate CB[N]Z when tracking speculation.
10249         (aarch64_split_compare_and_swap): Likewise.
10250         (aarch64_split_atomic_op): Likewise.
10252 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10254         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10256 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10258         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10259         (speculation_barrier): New insn.
10261 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10263         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10264         * config/arm/arm.md (speculation_barrier): New expand.
10265         (speculation_barrier_insn): New pattern.
10267 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10269         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10270         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10271         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10272         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10273         list.
10274         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10275         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10276         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10277         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10278         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10279         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10280         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10281         * builtins.c (expand_speculation_safe_value): New function.
10282         (expand_builtin): Call it.
10283         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10284         * doc/extend.texi: Document __builtin_speculation_safe_value.
10285         * doc/md.texi: Document "speculation_barrier" pattern.
10286         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10287         TARGET_HAVE_SPECULATION_SAFE_VALUE.
10288         * doc/tm.texi: Regenerated.
10289         * target.def (have_speculation_safe_value, speculation_safe_value): New
10290         hooks.
10291         * targhooks.c (default_have_speculation_safe_value): New function.
10292         (default_speculation_safe_value): New function.
10293         * targhooks.h (default_have_speculation_safe_value): Add prototype.
10294         (default_speculation_safe_value): Add prototype.
10296 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10298         * dump-context.h (dump_context::dump_loc): New decl.
10299         * dumpfile.c (dump_context::dump_loc): New member function.
10300         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10301         and dump_gimple_stmt.
10302         (dump_context::dump_gimple_expr_loc): Likewise, using
10303         dump_gimple_expr.
10304         (dump_context::dump_generic_expr_loc): Likewise, using
10305         dump_generic_expr.
10306         (dump_context::dump_printf_loc_va): Likewise, using
10307         dump_printf_va.
10308         (dump_context::begin_scope): Explicitly using the global function
10309         "dump_loc", rather than the member function.
10311 2018-07-31  Martin Sebor  <msebor@redhat.com>
10313         PR tree-optimization/86741
10314         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10316 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
10318         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10319         depend on whether prefetch instructions will be emitted or not.
10320         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10321         will be emitted or not.
10322         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10323         (TARGET_SETMEM_PFD): New macros.
10325 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10327         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10328         (NULL_STMT_VEC_INFO): Delete.
10329         (stmt_vec_info::operator*): Likewise.
10330         (stmt_vec_info::operator gimple *): Likewise.
10331         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10332         of NULL_STMT_VEC_INFO.
10333         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10334         (vect_reassociating_reduction_p): Likewise.
10335         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10336         (vectorizable_store): Likewise.
10337         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10338         (vec_info::free_stmt_vec_infos): Likewise.
10340 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10342         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10343         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10345 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10347         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10348         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10349         (vec_info::free_stmt_vec_info): New private member functions.
10350         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10351         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10352         * tree-parloops.c (gather_scalar_reductions): Remove calls to
10353         set_stmt_vec_info_vec and free_stmt_vec_infos.
10354         * tree-vect-loop.c (_loop_vec_info): Remove call to
10355         set_stmt_vec_info_vec.
10356         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10357         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10358         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10359         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10360         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
10361         assignments in {vec_info::,}new_stmt_vec_info that are redundant
10362         with the clearing in the xcalloc.
10363         (stmt_vec_info_vec): Delete.
10364         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10365         (vectorize_loops): Likewise.
10366         (vec_info::~vec_info): Remove argument from call to
10367         free_stmt_vec_infos.
10368         (vec_info::add_stmt): Remove vinfo argument from call to
10369         new_stmt_vec_info.
10371 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10373         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10374         rather than a gimple stmt.
10375         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
10376         information for pattern statements when passed the original
10377         statement; instead wait to be passed the pattern statement itself.
10378         Don't call set_vinfo_for_stmt here.
10379         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10380         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10381         stmt_vec_infos here.
10382         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10383         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10384         stmt_vec_infos entry.
10386 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10388         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10389         * tree-vectorizer.c (vec_info::replace_stmt): New function.
10390         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10391         * tree-vect-stmts.c (vectorizable_call): Likewise.
10392         (vectorizable_simd_clone_call): Likewise.
10394 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10396         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10397         * tree-vectorizer.c (vec_info::remove_stmt): New function.
10398         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10399         * tree-vect-loop.c (vect_transform_loop): Likewise.
10400         * tree-vect-slp.c (vect_schedule_slp): Likewise.
10401         * tree-vect-stmts.c (vect_remove_stores): Likewise.
10403 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10405         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10406         (vect_dr_stmt): Delete.
10407         * tree-vectorizer.c (vec_info::lookup_dr): New function.
10408         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10409         of DR_VECT_AUX.
10410         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10411         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10412         (vect_verify_datarefs_alignment, vect_peeling_supportable)
10413         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10414         (vect_analyze_data_refs): Likewise.
10415         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
10416         argument.
10417         (vect_find_same_alignment_drs): Likewise.
10418         (vect_slp_analyze_node_dependences): Update calls accordingly.
10419         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
10420         instead of DR_VECT_AUX.
10421         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10422         of a vector data references.  Use vec_info::lookup_dr instead of
10423         DR_VECT_AUX.
10424         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10425         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
10426         instead of DR_VECT_AUX.
10428 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10430         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10431         dr_vec_info.
10432         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10433         accordingly.
10434         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10435         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10436         (vect_gen_prolog_loop_niters): Likewise.
10438 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10440         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10441         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10442         (vect_known_alignment_in_bytes, vect_dr_behavior)
10443         (vect_get_scalar_dr_size): Take references as dr_vec_infos
10444         instead of data_references.  Update calls to other routines for
10445         which the same change has been made.
10446         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10447         dr_vec_infos instead of stmt_vec_infos.
10448         (vect_analyze_data_ref_dependence): Update call accordingly.
10449         (vect_slp_analyze_data_ref_dependence)
10450         (vect_record_base_alignments): Use DR_VECT_AUX.
10451         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10452         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10453         (vector_alignment_reachable_p, vect_get_data_access_cost)
10454         (vect_peeling_supportable, vect_analyze_group_access_1)
10455         (vect_analyze_group_access, vect_analyze_data_ref_access)
10456         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10457         (vect_compile_time_alias, vect_small_gap_p)
10458         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10459         (vect_supportable_dr_alignment): Take references as dr_vec_infos
10460         instead of data_references.  Update calls to other routines for
10461         which the same change has been made.
10462         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10463         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10464         (vect_slp_analyze_and_verify_node_alignment)
10465         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10466         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10467         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
10468         above changes.
10469         (_vect_peel_info::dr): Replace with...
10470         (_vect_peel_info::dr_info): ...this new field.
10471         (vect_peeling_hash_get_most_frequent)
10472         (vect_peeling_hash_choose_best_peeling): Update accordingly.
10473         (vect_peeling_hash_get_lowest_cost):
10474         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
10475         routines for which the same change has been made.
10476         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
10477         data_reference.
10478         * tree-vect-loop-manip.c (get_misalign_in_elems)
10479         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
10480         above changes.
10481         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10482         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10483         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10484         (get_group_load_store_type, get_negative_load_store_type)
10485         (vect_get_data_ptr_increment, vectorizable_store)
10486         (vectorizable_load): Likewise.
10487         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10488         Update calls to other routines for which the same change has been made.
10490 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10492         * tree-vectorizer.h (vec_info::move_dr): New member function.
10493         (dataref_aux): Rename to...
10494         (dr_vec_info): ...this and add "dr" and "stmt" fields.
10495         (_stmt_vec_info::dr_aux): Update accordingly.
10496         (_stmt_vec_info::data_ref_info): Delete.
10497         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10498         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10499         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10500         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10501         of data_ref.
10502         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
10503         (STMT_VINFO_DR_INFO): New macro.
10504         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10505         (set_dr_misalignment): Update after rename of dataref_aux.
10506         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
10507         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10508         initialization of STMT_VINFO_DATA_REF.
10509         * tree-vectorizer.c (vec_info::move_dr): New function.
10510         * tree-vect-patterns.c (vect_recog_bool_pattern)
10511         (vect_recog_mask_conversion_pattern)
10512         (vect_recog_gather_scatter_pattern): Use it.
10513         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10514         the "dr" and "stmt" fields of dr_vec_info instead of
10515         STMT_VINFO_DATA_REF.
10517 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10519         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10520         (is_pattern_stmt_p): Use it.
10521         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10522         on pattern statements.
10524 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10526         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10527         original stmt as a stmt_vec_info rather than a gimple stmt.
10528         (vect_pattern_recog_1): Take the statement directly as a
10529         stmt_vec_info, rather than via a gimple_stmt_iterator.
10530         Update call to vect_mark_pattern_stmts.
10531         (vect_pattern_recog): Update calls accordingly.
10533 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10535         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10536         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10537         a vect_def_type for the first argument.
10538         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10539         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
10540         operand if it isn't defined by a vectorized statement.
10541         (vect_build_gather_load_calls): Remove the mask_dt argument and
10542         update calls to vect_get_vec_def_for_stmt_copy.
10543         (vectorizable_bswap): Likewise the dt argument.
10544         (vectorizable_call): Update calls to vectorizable_bswap and
10545         vect_get_vec_def_for_stmt_copy.
10546         (vectorizable_simd_clone_call, vectorizable_assignment)
10547         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10548         (vectorizable_comparison): Update calls to
10549         vect_get_vec_def_for_stmt_copy.
10550         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
10551         vect_is_simple_use.
10552         (vect_get_loop_based_defs): Remove dt argument and update call
10553         to vect_get_vec_def_for_stmt_copy.
10554         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10555         and vect_get_vec_def_for_stmt_copy.
10556         (vectorizable_load): Update calls to vect_build_gather_load_calls
10557         and vect_get_vec_def_for_stmt_copy.
10558         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10559         (vectorizable_reduction, vectorizable_live_operation): Update calls
10560         to vect_get_vec_def_for_stmt_copy.
10562 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10564         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10565         and gimple stmt arguments with a stmt_vec_info.
10566         (vect_record_base_alignments): Update calls accordingly.
10567         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10568         and gimple stmt arguments with a stmt_vec_info.
10569         (vect_build_slp_tree_1): Remove vinfo argument and update call
10570         to vect_record_max_nunits.
10571         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10572         and vect_record_max_nunits.
10574 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10576         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10577         file and take a stmt_vec_info instead of a gimple stmt.
10578         (supportable_widening_operation, vect_finish_replace_stmt)
10579         (vect_finish_stmt_generation, vect_get_store_rhs)
10580         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10581         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10582         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10583         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10584         (vect_create_data_ref_ptr, bump_vector_ptr)
10585         (vect_permute_store_chain, vect_setup_realignment)
10586         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10587         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10588         (vectorizable_reduction, vectorizable_induction)
10589         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10590         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10591         than gimple stmts as arguments.
10592         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10593         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10594         (can_group_stmts_p, vect_check_gather_scatter)
10595         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10596         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10597         (vect_permute_load_chain, vect_shift_permute_load_chain)
10598         (vect_transform_grouped_load)
10599         (vect_record_grouped_load_vectors): Likewise.
10600         * tree-vect-loop.c (vect_fixup_reduc_chain)
10601         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10602         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10603         (vectorizable_reduction, vectorizable_induction)
10604         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10605         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10606         (vect_get_load_store_mask): Likewise.
10607         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10608         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10609         * tree-vect-stmts.c (vect_mark_relevant)
10610         (is_simple_and_all_uses_invariant)
10611         (exist_non_indexing_operands_for_use_p, process_use)
10612         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10613         (vect_get_vec_def_for_operand, vect_get_vec_defs)
10614         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10615         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10616         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10617         (get_negative_load_store_type, get_load_store_type)
10618         (vect_check_load_store_mask, vect_check_store_rhs)
10619         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10620         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10621         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10622         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10623         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10624         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10625         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10626         (supportable_widening_operation): Likewise.
10628 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10630         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10631         a stmt_vec_info instead of a gcall.
10632         (vect_check_gather_scatter): Update call accordingly.
10633         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10634         of a gphi.
10635         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10636         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10637         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10638         instead of a gimple stmt.
10639         (vect_transform_loop): Update calls accordingly.
10640         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10641         stmt_vec_infos instead of gimple stmts.
10642         (vect_analyze_slp_instance): Update use accordingly.
10643         * tree-vect-stmts.c (read_vector_array, write_vector_array)
10644         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10645         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10646         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10647         (vect_gen_widened_results_half, vect_get_loop_based_defs)
10648         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10649         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10650         down to subroutines.
10652 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10654         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10655         of the worklist from a vector of gimple stmts to a vector of
10656         stmt_vec_infos.
10657         * tree-vect-stmts.c (vect_mark_relevant, process_use)
10658         (vect_mark_stmts_to_be_vectorized): Likewise
10660 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10662         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10663         statement before passing it to vect_analyze_stmt.
10664         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10665         the chain of phi vector definitions.  Track the exit phi via its
10666         stmt_vec_info.
10667         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10668         STMT_VINFO_REDUC_DEF.
10669         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10670         stmt_vec_infos to handle the statement chains.
10671         (vect_get_slp_defs): Record the first statement in the node
10672         using a stmt_vec_info.
10673         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10674         statements here and pass their stmt_vec_info down to subroutines.
10675         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10676         down to vect_finish_stmt_generation.
10677         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10678         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10679         stmt_vec_infos to subroutines.
10680         (vect_remove_stores): Use stmt_vec_infos to handle the statement
10681         chains.
10683 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10685         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10686         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10687         (vect_permute_store_chain, vect_setup_realignment)
10688         (vect_permute_load_chain, vect_shift_permute_load_chain)
10689         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10690         stmts internally, and when passing values to other vectorizer routines.
10691         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10692         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10693         (vect_analyze_loop_operations, get_initial_def_for_reduction)
10694         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10695         (vectorizable_reduction, vectorizable_induction)
10696         (vectorizable_live_operation, vect_transform_loop_stmt)
10697         (vect_transform_loop): Likewise.
10698         * tree-vect-patterns.c (vect_reassociating_reduction_p)
10699         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10700         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10701         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10702         (vect_slp_analyze_node_operations_1): Likewise.
10703         * tree-vect-stmts.c (vect_mark_relevant, process_use)
10704         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10705         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10706         (vect_finish_stmt_generation_1, get_group_load_store_type)
10707         (get_load_store_type, vect_build_gather_load_calls)
10708         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10709         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10710         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10711         (vectorizable_store, vectorizable_load, vectorizable_condition)
10712         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10713         (supportable_widening_operation): Likewise.
10714         (vect_get_vector_types_for_stmt): Likewise.
10715         * tree-vectorizer.h (vect_dr_behavior): Likewise.
10717 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10719         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10720         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10721         (vect_permute_store_chain, vect_permute_load_chain)
10722         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10723         repeated stmt_vec_info lookups.
10724         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10725         (vect_update_ivs_after_vectorizer): Likewise.
10726         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10727         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10728         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10729         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10730         (vect_bb_slp_scalar_cost): Likewise.
10731         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10733 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10735         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10736         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10737         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10738         to get gassigns and gcalls, rather than operating on generc gimple
10739         stmts.
10740         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10741         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10742         (vectorizable_load, vect_analyze_stmt): Likewise.
10743         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10745 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10747         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10748         return stmt_vec_infos rather than gimple stmts.  Do not accept
10749         null arguments.
10750         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10751         of a gimple stmt.
10752         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10753         Update use of get_later_stmt.
10754         (vect_get_constant_vectors): Update call accordingly.
10755         (vect_schedule_slp_instance): Likewise
10756         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10757         (vect_slp_analyze_instance_dependence): Likewise.
10758         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10760 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10762         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10763         (stmt_info_for_cost::stmt_info): ...this new field.
10764         (add_stmt_costs): Update accordingly.
10765         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10766         (vect_get_known_peeling_cost): Likewise.
10767         (vect_estimate_min_profitable_iters): Likewise.
10768         * tree-vect-stmts.c (record_stmt_cost): Likewise.
10770 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10772         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10773         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10774         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10775         accordingly.
10776         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10780         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10781         a gimple stmt to a stmt_vec_info.
10782         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10784 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10786         * tree-vectorizer.h (vec_info::grouped_stores): Change from
10787         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10788         (_loop_vec_info::reduction_chains): Likewise.
10789         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10790         accordingly.
10791         * tree-vect-slp.c (vect_analyze_slp): Likewise.
10793 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10795         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10796         a gimple stmt to a stmt_vec_info.
10797         (_stmt_vec_info::next_element): Likewise.
10798         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10799         (vect_slp_analyze_and_verify_node_alignment)
10800         (vect_analyze_group_access_1, vect_analyze_group_access)
10801         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10802         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10803         (vect_supportable_dr_alignment): Update accordingly.
10804         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10805         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10806         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10807         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10808         * tree-vect-slp.c (vect_build_slp_tree_1)
10809         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10810         (vect_split_slp_store_group, vect_analyze_slp_instance)
10811         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10812         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10813         (get_group_load_store_type, get_load_store_type)
10814         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10815         (vect_transform_stmt, vect_remove_stores): Likewise.
10817 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10819         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10820         than a gimple stmt.
10821         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10822         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10823         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10824         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10825         (vector_alignment_reachable_p, vect_get_data_access_cost)
10826         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10827         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10828         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10829         (vect_analyze_group_access_1, vect_analyze_group_access)
10830         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10831         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10832         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10833         result of vect_dr_stmt and use the stmt_vec_info instead of
10834         the associated gimple stmt.
10835         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10836         (vect_gen_prolog_loop_niters): Likewise.
10837         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10839 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10841         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10842         to a vec<stmt_vec_info>.
10843         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10844         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10845         vec<stmt_vec_info>.
10846         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10847         to a vec<stmt_vec_info>.
10848         (bst_traits::value_type, bst_traits::value_type): Likewise.
10849         (bst_traits::hash): Update accordingly.
10850         (vect_get_and_check_slp_defs): Change the stmts parameter from
10851         a vec<gimple *> to a vec<stmt_vec_info>.
10852         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10853         (vect_build_slp_tree): Likewise.
10854         (vect_build_slp_tree_2): Likewise.  Update uses of
10855         SLP_TREE_SCALAR_STMTS.
10856         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10857         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10858         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10859         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10860         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10861         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10862         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10863         (vect_get_constant_vectors, vect_get_slp_defs)
10864         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10865         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10866         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10867         instead of gimple stmts.
10868         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10869         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10870         (vect_slp_analyze_instance_dependence): Update uses of
10871         SLP_TREE_SCALAR_STMTS.
10872         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10873         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10874         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10875         (get_initial_defs_for_reduction): Likewise.
10876         (vect_create_epilog_for_reduction): Likewise.
10877         (vectorize_fold_left_reduction): Likewise.
10878         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10879         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10880         (can_vectorize_live_stmts): Likewise.
10882 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10884         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10885         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10886         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10887         than gimple stmts.
10888         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10889         of a gimple stmt.
10890         (gather_scalar_reductions): Update after above interface changes.
10891         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10892         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10893         than gimple stmts.
10894         (vect_force_simple_reduction): Likewise.
10895         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10896         LOOP_VINFO_REDUCTIONS.
10897         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10899 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10901         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10902         a gimple stmt to a stmt_vec_info.
10903         * tree-vect-loop.c (vect_active_double_reduction_p)
10904         (vect_force_simple_reduction, vectorizable_reduction): Update
10905         accordingly.
10907 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10909         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10910         vec<gimple *> to a vec<stmt_vec_info>.
10911         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10912         the reduction_phis argument from a vec<gimple *> to a
10913         vec<stmt_vec_info>.
10914         (vectorizable_reduction): Likewise the phis local variable that
10915         is passed to vect_create_epilog_for_reduction.  Update for new type
10916         of SLP_TREE_VEC_STMTS.
10917         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10918         (vectorizable_live_operation): Likewise.
10919         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10920         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10922 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10924         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10925         a gimple stmt to a stmt_vec_info.
10926         (vectorizable_condition, vectorizable_live_operation)
10927         (vectorizable_reduction, vectorizable_induction): Pass back the
10928         vectorized statement as a stmt_vec_info.
10929         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10930         use of STMT_VINFO_VEC_STMT.
10931         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10932         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10933         as stmt_vec_infos rather than gimple stmts.
10934         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10935         to a stmt_vec_info.
10936         (vectorizable_live_operation): Likewise.
10937         (vectorizable_reduction, vectorizable_induction): Likewise,
10938         updating use of STMT_VINFO_VEC_STMT.
10939         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10940         of STMT_VINFO_VEC_STMT.
10941         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10942         (vectorizable_simd_clone_call, vectorizable_conversion)
10943         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10944         (vectorizable_store, vectorizable_load, vectorizable_condition)
10945         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10946         from a gimple stmt to a stmt_vec_info.
10947         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
10948         pointer to a stmt_vec_info to the vectorizable_* routines.
10950 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10952         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10953         a gimple stmt to a stmt_vec_info.
10954         (is_pattern_stmt_p): Update accordingly.
10955         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10956         (vect_record_grouped_load_vectors): Likewise.
10957         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10958         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
10959         (vect_model_reduction_cost): Likewise.
10960         (vect_create_epilog_for_reduction): Likewise.
10961         (vectorizable_reduction, vectorizable_induction): Likewise.
10962         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10963         Return the stmt_vec_info for the pattern statement.
10964         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
10965         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
10966         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10967         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
10968         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10969         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
10970         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
10971         (free_stmt_vec_info, vect_is_simple_use): Likewise.
10973 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10975         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
10976         (vect_finish_stmt_generation): Likewise.
10977         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10978         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
10979         (vect_build_gather_load_calls): Use the return value of the above
10980         functions instead of a separate call to vinfo_for_stmt.  Use narrow
10981         scopes for the input gimple stmt and wider scopes for the associated
10982         stmt_vec_info.  Use vec_info::lookup_def when setting these
10983         stmt_vec_infos from an SSA_NAME definition.
10984         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10985         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10986         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10987         (vectorizable_store, vectorizable_load, vectorizable_condition)
10988         (vectorizable_comparison): Likewise.
10989         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
10990         (vectorizable_reduction): Likewise.
10992 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10994         * tree-vectorizer.h (vect_is_simple_use): Add an optional
10995         stmt_vec_info * parameter before the optional gimple **.
10996         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10997         (process_use, vect_get_vec_def_for_operand_1): Update callers.
10998         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
10999         * tree-vect-loop.c (vectorizable_reduction): Likewise.
11000         (vectorizable_live_operation): Likewise.
11001         * tree-vect-patterns.c (type_conversion_p): Likewise.
11002         (vect_look_through_possible_promotion): Likewise.
11003         (vect_recog_rotate_pattern): Likewise.
11004         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11006 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11008         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11009         a typedef to a wrapper class.
11010         (NULL_STMT_VEC_INFO): New macro.
11011         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11012         (stmt_vec_info::operator*): New function.
11013         (stmt_vec_info::operator gimple *): Likewise.
11014         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11015         (add_stmt_costs): Likewise.
11016         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11017         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11018         (vect_get_known_peeling_cost): Likewise.
11019         (vect_estimate_min_profitable_iters): Likewise.
11020         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11021         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11022         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11023         (vectorizable_store, free_stmt_vec_infos): Likewise.
11024         (new_stmt_vec_info): Change return type of xcalloc to
11025         _stmt_vec_info *.
11027 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11029         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11030         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11031         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11032         a single_imm_use-based sequence.
11033         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11035 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11037         * tree-vectorizer.h (vec_info::lookup_def): Declare.
11038         * tree-vectorizer.c (vec_info::lookup_def): New function.
11039         * tree-vect-patterns.c (vect_get_internal_def): Use it.
11040         (vect_widened_op_tree): Likewise.
11041         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11042         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11043         (vectorizable_reduction): Likewise.
11044         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11045         of a gimple *.
11046         (vect_is_slp_reduction): Update calls accordingly.  Use
11047         vec_info::lookup_def.
11048         (vect_is_simple_reduction): Likewise
11049         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11051 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11053         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11054         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11055         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11056         of vinfo_for_stmt.
11057         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11058         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11059         (vect_update_vf_for_slp, vect_analyze_loop_operations)
11060         (vect_is_slp_reduction, vectorizable_induction)
11061         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11062         * tree-vect-patterns.c (vect_init_pattern_stmt):
11063         (vect_determine_min_output_precision_1, vect_determine_precisions)
11064         (vect_pattern_recog): Likewise.
11065         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11066         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11067         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11068         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11069         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11070         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
11071         info field from a loop to a loop_vec_info.
11073 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11075         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11076         (vec_info::add_stmt): Declare.
11077         * tree-vectorizer.c (vec_info::add_stmt): New function.
11078         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11079         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11080         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11081         (vectorizable_induction): Likewise.
11082         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11083         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11084         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11085         (vectorizable_load): Likewise.
11086         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11087         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11088         (vect_recog_gather_scatter_pattern): Likewise.
11089         (append_pattern_def_seq): Likewise.  Remove a check that is
11090         performed by add_stmt itself.
11092 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11094         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11095         which make_ssa_name was called with new_stmt before new_stmt
11096         had been created.
11098 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11100         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11101         split out from...
11102         (vect_is_slp_reduction): ...here...
11103         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
11104         that are already known to be false.
11106 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11108         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11109         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
11110         STMT_VINFO_NUM_SLP_USES when it's true.
11111         (vect_free_slp_instance): Add a final_p parameter and pass it to
11112         vect_free_slp_tree.
11113         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11114         (vect_analyze_slp_instance): Likewise.
11115         (vect_slp_analyze_operations): Likewise.
11116         (vect_slp_analyze_bb_1): Likewise.
11117         * tree-vectorizer.c (vec_info): Likewise.
11118         * tree-vect-loop.c (vect_transform_loop): Likewise.
11120 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11122         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11123         function is not called for second and subsequent members of
11124         a reduction group.
11126 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11128         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11129         cases for nested loops from here to ...
11130         (vect_create_epilog_for_reduction): ...here.  Only call
11131         vect_is_simple_use for inner-loop reductions.
11133 2018-07-31  Martin Liska  <mliska@suse.cz>
11135         PR gcov-profile/85338
11136         PR gcov-profile/85350
11137         PR gcov-profile/85372
11138         * profile.c (struct location_triplet): New.
11139         (struct location_triplet_hash): Likewise.
11140         (output_location): Do not output a BB that
11141         is already recorded for a line.
11142         (branch_prob): Use streamed_locations.
11144 2018-07-31  Martin Liska  <mliska@suse.cz>
11146         PR gcov-profile/85370
11147         * coverage.c (coverage_begin_function): Do not mark target
11148         clones as artificial functions.
11150 2018-07-31  Martin Liska  <mliska@suse.cz>
11152         PR gcov-profile/83813
11153         PR gcov-profile/84758
11154         PR gcov-profile/85217
11155         PR gcov-profile/85332
11156         * profile.c (branch_prob): Do not record GOTO expressions
11157         for GIMPLE statements which locations are already streamed.
11159 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11161         * gcc.c (handle_spec_function): Accept a soft_matched_part
11162         argument, as do_spec_1.  Pass it down to ...
11163         (eval_spec_function): Accept a soft_matched_part argument,
11164         and pass it down to ...
11165         (do_spec_2): Accept a soft_matched_part argument, and pass
11166         it down to do_spec_1.
11167         (do_spec_1): Pass soft_matched_part to handle_spec_function.
11168         (handle_braces): Update call to handle_spec_function.
11169         (driver::set_up_specs): Update calls to do_spec_2.
11170         (compare_debug_dump_opt_spec_function): Likewise.
11171         (compare_debug_self_opt_spec_function): Likewise.
11173 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11175         * common.opt (nolibc): New option.
11176         * doc/invoke.texi (Link Options): Document it.
11177         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11178         * config/alpha/linux.h: Likewise.
11179         * config/arc/elf.h: Likewise.
11180         * config/arm/uclinux-elf.h: Likewise.
11181         * config/arm/unknown-elf.h: Likewise.
11182         * config/avr/avrlibc.h: Likewise.
11183         * config/bfin/bfin.h: Likewise.
11184         * config/bfin/linux.h: Likewise.
11185         * config/bfin/uclinux.h: Likewise.
11186         * config/darwin.h: Likewise.
11187         * config/darwin10.h: Likewise.
11188         * config/darwin12.h: Likewise.
11189         * config/gnu-user.h: Likewise.
11190         * config/lm32/uclinux-elf.h: Likewise.
11191         * config/pa/pa-hpux11.h: Likewise.
11192         * config/pa/pa64-hpux.h: Likewise.
11193         * config/sparc/sparc.h: Likewise.
11195 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11197         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11198         undefined variables.
11200 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11202         PR target/86640
11203         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11204         instead of GEN_INT.
11206 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11208         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11209         terminated string literal.
11211 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11213         PR rtl-optimization/85160
11214         * combine.c (is_just_move): New function.
11215         (try_combine): Allow combining two instructions into two if neither of
11216         the original instructions was a move.
11218 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
11220         PR target/86673
11221         * doc/extend.texi (Global Register Variables): Discourage use of type
11222         qualifiers.
11223         (Local Register Variables): Likewise.
11225 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
11227         PR tree-optimization/86506
11228         * hwint.h (ceil_log2): Resync with hwint.c implementation.
11230 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
11232         PR target/86547
11233         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11234         hard_regno, make sure no insn between `from` and `to` clobbers it.
11236 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
11237             Tom de Vries  <tdevries@suse.de>
11239         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11240         (PTX_DEFAULT_RUNTIME_DIM): ... this.
11241         (nvptx_goacc_validate_dims): Set default worker and gang dims to
11242         PTX_DEFAULT_RUNTIME_DIM.
11243         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11245 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
11247         * config/pa/pa.c (pa_output_addr_vec): Align address table.
11248         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11249         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11251 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
11253         * config/rs6000/constraints.md (wG constraint): Delete, no longer
11254         used.
11255         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11256         predicate to reflect toc fusion has been deleted.
11257         (toc_fusion_mem_raw): Delete, no longer used.
11258         (toc_fusion_mem_wrapped): Likewise.
11259         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11260         fusion mask bit.
11261         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11262         Delete, no longer used.
11263         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11264         meant to be used for toc fusion.
11265         (rs6000_debug_print_mode): Delete toc fusion debugging.
11266         (rs6000_debug_reg_global): Likewise.
11267         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11268         fusion and secondary reload support that were never used.
11269         (rs6000_option_override_internal): Delete TOC fusion, that was only
11270         partially defined, and it did not work unless you also used the
11271         -mcmodel= switch.
11272         (rs6000_legitimate_address_p): Delete TOC fusion support.
11273         (rs6000_opt_masks): Likewise.
11274         (fusion_wrap_memory_address): Delete function, no longer used.
11275         (fusion_split_address); Delete TOC fusion support.
11276         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11277         longer used with toc fusion being deleted.
11278         (TARGET_TOC_FUSION_FP): Likewise.
11279         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11280         UNSPEC.
11281         (toc fusion spliter): Delete TOC fusion support.
11282         (toc_fusionload_<mode>): Likewise.
11283         (toc_fusionload_di): Likewise.
11284         (fusion_gpr_load_<mode>): Delete generator function, this insn no
11285         longer needs to be named.  Rename predicate to delete TOC fusion.
11286         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11287         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11288         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11289         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11290         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11292 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11294         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11295         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
11296         __int128 in built-in function prototypes.
11297         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11298         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11300 2018-07-27  Martin Sebor  <msebor@redhat.com>
11302         PR tree-optimization/86696
11303         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11304         types, including enums.
11305         (handle_char_store): Be prepared for the above function to fail.
11307 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
11309         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11310         when optimization level is lower than 2 or optimize for size.
11312 2018-07-26  Martin Sebor  <msebor@redhat.com>
11314         PR tree-optimization/86043
11315         PR tree-optimization/86042
11316         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11317         (get_string_cst_length): Rename...
11318         (get_min_string_length): ...to this.  Add argument.
11319         (handle_char_store): Extend to handle multi-character stores by
11320         MEM_REF.
11321         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
11322         * tree.h (initializer_zerop): Add argument.
11324 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
11326         PR middle-end/86660
11327         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11328         declare target to variables if they have always,{to,from,tofrom} map
11329         kinds.
11331 2018-07-26  Martin Liska  <mliska@suse.cz>
11333         PR lto/86548
11334         * lto-wrapper.c: Add linker_output as prefix
11335         for ltrans_output_file.
11337 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
11339         PR rtl-optimization/85805
11340         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11341         value for hard registers if that was written in the same mode.
11343 2018-07-26  Martin Liska  <mliska@suse.cz>
11345         PR gcov-profile/86536
11346         * gcov.c (format_gcov): Use printf format %.*f directly
11347         and do not handle special values.
11349 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11351         * common/config/arc/arc-common.c (arc_option_optimization_table):
11352         Update default optimizations for size.
11354 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11356         * config/arc/arc.md (movsf_insn): Add short instruction selection.
11357         * config/arc/constraints.md (CfZ): New constraint.
11358         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11359         (subsf3_fpu): Likewise.
11360         (cmpsf_fpu): Likewise.
11361         (cmpsf_fpu_uneq): Likewise.
11363 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11365         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11366         accesses as well.
11367         (arc_is_uncached_mem_p): uncached applies to both the variable and
11368         the pointer.
11370 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11372         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11373         register names.
11375 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
11377         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11378         field "m_scopes" from vec to auto_vec.
11380 2018-07-25  Martin Liska  <mliska@suse.cz>
11382         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11383         return type.
11385 2018-07-25  Richard Biener  <rguenther@suse.de>
11387         PR debug/86654
11388         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11389         special wrt context_die late.
11390         (gen_subprogram_die): Re-use DIEs in local scope.
11392 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
11394         PR tree-optimization/86644
11395         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
11397 2018-07-25  Martin Liska  <mliska@suse.cz>
11399         PR middle-end/86645
11400         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11401         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11403 2018-07-25  Martin Liska  <mliska@suse.cz>
11405         PR sanitizer/79635
11406         * params.def: Explain ASan abbreviation and provide
11407         a documentation link.
11409 2018-07-24  Martin Sebor  <msebor@redhat.com>
11411         PR tree-optimization/86622
11412         PR tree-optimization/86532
11413         * builtins.h (string_length): Declare.
11414         * builtins.c (c_strlen): Correct handling of non-constant offsets.
11415         (check_access): Be prepared for non-constant length ranges.
11416         (string_length): Make extern.
11417         * expr.c (string_constant): Only handle the minor non-constant
11418         array index.  Use string_constant to compute the length of
11419         a generic string constant.
11421 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
11423         PR tree-optimization/86618
11424         * tree-vect-stmts.c (vectorizable_call): Don't take the address
11425         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11427 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
11429         PR tree-optimization/86636
11430         * json.cc (json::object::set): Fix comment.  Add assertions.
11431         (json::array::append): Move here from json.h.  Add comment and an
11432         assertion.
11433         (json::string::string): Likewise.
11434         * json.h (json::array::append): Move to json.cc.
11435         (json::string::string): Likewise.
11436         * optinfo-emit-json.cc
11437         (optrecord_json_writer::impl_location_to_json): Assert that we
11438         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11439         wrapper around it.  Expand the location once, rather than three
11440         times.
11441         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11442         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11443         wrappers.
11444         (optrecord_json_writer::optinfo_to_json): Likewise, in four
11445         places.  Fix some overlong lines.
11447 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
11449         * config/aarch64/aarch64-simd.md
11450         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11451         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11452         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11453         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11454         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11455         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11456         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11457         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11458         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11460 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
11462         PR middle-end/86627
11463         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11464         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
11465         and abs_d == d, do the power of two handling if profitable.
11467 2018-07-24  Richard Biener  <rguenther@suse.de>
11469         * match.pd: Add BIT_FIELD_REF canonicalizations.
11471 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11473         PR c/86617
11474         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11476 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11478         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11479         terminated STRING_CST object.
11481 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11483         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11485 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11487         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11488         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11489         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11490         the elements into a register.
11491         (rs6000_split_v4si_init_di_reg): Delete.
11492         (rs6000_split_v4si_init): Delete.
11493         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11494         (vsx_init_v4si): Rewrite as a define_expand.
11496 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11498         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11499         zero_extend argument from memory): New.
11501 2018-07-22  Martin Sebor  <msebor@redhat.com>
11503         PR bootstrap/86621
11504         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11505         diagnosing calls with unknown arguments unless -Walloca-larger-than
11506         is restricted to less than PTRDIFF_MAX bytes.
11508 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
11510         * doc/gcov.texi (Invoking Gcov): Editorial changes.
11512 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11514         * pretty-print.c (text_info::set_location): Remove redundant
11515         "line_table" parameter from call to rich_location::set_range.
11517 2018-07-20  Martin Sebor  <msebor@redhat.com>
11519         PR middle-end/82063
11520         * builtins.c (expand_builtin_alloca): Adjust.
11521         * calls.c (alloc_max_size): Simplify.
11522         * cgraphunit.c (cgraph_node::expand): Adjust.
11523         * common.opt (larger_than_size, warn_frame_larger_than): Remove
11524         variables.
11525         (frame_larger_than_size): Same.
11526         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11527         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11528         Initialize.
11529         * doc/invoke.texi (GCC Command Options): Document option arguments.
11530         Explain byte-size arguments and suffixes.
11531         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11532         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11533         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11534         * doc/options.texi (UInteger): Expand.
11535         (Host_Wide_Int, ByteSize): Document new properties.
11536         * final.c (final_start_function_1): Include sizes in an error message.
11537         * function.c (frame_offset_overflow): Same.
11538         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11539         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11540         Diagnose unbounded alloca calls only for limits of less than
11541         PTRDIFF_MAX.
11542         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
11543         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
11544         for alloca(0).
11545         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
11546         only for limits of less than PTRDIFF_MAX.
11547         * langhooks-def.h (lhd_handle_option): Change function argument
11548         to HOST_WIDE_INT.
11549         * langhooks.c (lhd_handle_option): Same.
11550         * langhooks.h (handle_option): Same.
11551         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11552         ByteSize flags.
11553         (var_type, var_type_struct): Same.
11554         (var_set): Handle ByteSize flag.
11555         * optc-gen.awk: Add comments to output to ease debugging.  Make
11556         use of HOST_WIDE_INT where appropriate.
11557         * opts-gen-save.awk:  Use %lx to format unsigned long.
11558         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11559         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11560         arguments.  Parse bytes-size suffixes.
11561         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11562         (enum_value_to_arg): Same.
11563         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
11564         (handle_option): Adjust.
11565         (generate_option): Change function argument to HOST_WIDE_INT.
11566         (cmdline_handle_error): Adjust.
11567         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11568         (set_option): Change function argument to HOST_WIDE_INT.
11569         (option_enabled): Handle cl_host_wide_int.
11570         (get_option_state): Handle CLVC_SIZE.
11571         (control_warning_option): Same.
11572         * opts.c (common_handle_option): Change function argument to
11573         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
11574         OPT_Wvla_larger_than_.
11575         * opts.h (enum cl_var_type): Add an enumerator.
11576         * stor-layout.c (layout_decl): Print a more meaningful warning.
11577         * toplev.c (output_stack_usage): Adjust.
11579 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
11581         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11582         call to inline_expand_builtin_string_cmp.
11583         (expand_builtin_strcmp): Likewise.
11584         (expand_builtin_strncmp): Likewise.
11585         (inline_string_cmp): Delete the last parameter, change char_type_node
11586         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11587         two operands.
11588         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11589         the inlining expansion on target where the type of the call has same or
11590         narrower precision than unsigned char.
11592 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11594         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11595         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11596         * common.opt (fsave-optimization-record): New option.
11597         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11598         * doc/invoke.texi (-fsave-optimization-record): New option.
11599         * dumpfile.c: Include "optinfo-emit-json.h".
11600         (struct kv_pair): Move to coretypes.h.
11601         (optgroup_options): Make non-static.
11602         (dump_context::end_scope): Call
11603         optimization_records_maybe_pop_dump_scope.
11604         * dumpfile.h (optgroup_options): New decl.
11605         * json.cc: New file.
11606         * json.h: New file.
11607         * optinfo-emit-json.cc: New file.
11608         * optinfo-emit-json.h: New file.
11609         * optinfo.cc: Include "optinfo-emit-json.h".
11610         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11611         (optinfo_enabled_p): Check optimization_records_enabled_p.
11612         (optinfo_wants_inlining_info_p): Likewise.
11613         * optinfo.h: Update comment.
11614         * profile-count.c (profile_quality_as_string): New function.
11615         * profile-count.h (profile_quality_as_string): New decl.
11616         (profile_count::quality): New accessor.
11617         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11618         and optinfo_emit_json_cc_tests.
11619         * selftest.h (selftest::json_cc_tests): New decl.
11620         (selftest::optinfo_emit_json_cc_tests): New decl.
11621         * toplev.c: Include "optinfo-emit-json.h".
11622         (compile_file): Call optimization_records_finish.
11623         (do_compile): Call optimization_records_start.
11624         * tree-ssa-live.c: Include optinfo.h.
11625         (remove_unused_scope_block_p): Retain inlining information if
11626         optinfo_wants_inlining_info_p returns true.
11628 2018-07-20  Richard Biener  <rguenther@suse.de>
11630         PR debug/86585
11631         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11632         to cover -flto-partition=none.
11634 2018-07-20  Martin Liska  <mliska@suse.cz>
11636         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11637         (get_decl_source_range): Remove unused function.
11639 2018-07-20  Richard Biener  <rguenther@suse.de>
11641         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11642         (struct vn_phi_s): Likewise.
11643         (struct vn_reference_s): Likewise.
11644         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11645         for searching the slot of an entry known to be in the hash itself.
11646         (vn_phi_hasher::equal): Likewise.
11647         (vn_reference_hasher::equal): Likewise.
11648         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11649         globals.
11650         (optimistic_info, current_info): Remove, keeping only valid_info.
11651         (vn_reference_lookup_1): Remove fallback lookup.
11652         (vn_reference_lookup_2): Likewise.
11653         (vn_nary_op_lookup_1): Likewise.
11654         (vn_phi_lookup): Likewise.
11655         (vn_nary_build_or_lookup_1): Make sure to not chain the built
11656         hash element.
11657         (vn_reference_insert): Adjust, chain the inserted hash element
11658         at last_inserted_ref.
11659         (vn_reference_insert_pieces): Likewise.
11660         (visit_reference_op_call): Likewise.
11661         (vn_nary_op_insert_into): Chain the inserted hash element at
11662         last_inserted_nary.
11663         (vn_nary_op_insert_pieces): Adjust.
11664         (vn_nary_op_insert): Likewise.
11665         (vn_nary_op_insert_stmt): Likewise.
11666         (vn_phi_insert): Adjust, chain the inserted hash element at
11667         last_inserted_phi.
11668         (process_scc): Remove clearing and copying the optimistic
11669         table.  Instead remove elements inserted during an optimistic
11670         iteration from the single table we maintain.
11671         (init_scc_vn): Adjust.
11672         (free_scc_vn): Likewise.
11673         (sccvn_dom_walker::record_cond): Likewise.
11674         (sccvn_dom_walker::after_dom_children): Likewise.
11676 2018-07-19  Martin Sebor  <msebor@redhat.com>
11678         PR tree-optimization/84047
11679         PR tree-optimization/83776
11680         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11681         (check_array_bounds): Call it.
11683 2018-07-19  Martin Sebor  <msebor@redhat.com>
11685         * align.h (align_flags): Use member initialization.
11687 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
11689         * Makefile.in (OBJS): Add optinfo.o.
11690         * coretypes.h (class symtab_node): New forward decl.
11691         (struct cgraph_node): New forward decl.
11692         (class varpool_node): New forward decl.
11693         * dump-context.h: New file.
11694         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11695         "tree-pass.h".
11696         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11697         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11698         (set_alt_dump_file): Likewise.
11699         (dump_context::~dump_context): New dtor.
11700         (dump_gimple_stmt): Move implementation to...
11701         (dump_context::dump_gimple_stmt): ...this new member function.
11702         Add the stmt to any pending optinfo, creating one if need be.
11703         (dump_gimple_stmt_loc): Move implementation to...
11704         (dump_context::dump_gimple_stmt_loc): ...this new member function.
11705         Start a new optinfo and add the stmt to it.
11706         (dump_gimple_expr): Move implementation to...
11707         (dump_context::dump_gimple_expr): ...this new member function.
11708         Add the stmt to any pending optinfo, creating one if need be.
11709         (dump_gimple_expr_loc): Move implementation to...
11710         (dump_context::dump_gimple_expr_loc): ...this new member function.
11711         Start a new optinfo and add the stmt to it.
11712         (dump_generic_expr): Move implementation to...
11713         (dump_context::dump_generic_expr): ...this new member function.
11714         Add the tree to any pending optinfo, creating one if need be.
11715         (dump_generic_expr_loc): Move implementation to...
11716         (dump_context::dump_generic_expr_loc): ...this new member
11717         function.  Add the tree to any pending optinfo, creating one if
11718         need be.
11719         (dump_printf): Move implementation to...
11720         (dump_context::dump_printf_va): ...this new member function.  Add
11721         the text to any pending optinfo, creating one if need be.
11722         (dump_printf_loc): Move implementation to...
11723         (dump_context::dump_printf_loc_va): ...this new member function.
11724         Start a new optinfo and add the stmt to it.
11725         (dump_dec): Move implementation to...
11726         (dump_context::dump_dec): ...this new member function.  Add the
11727         value to any pending optinfo, creating one if need be.
11728         (dump_context::dump_symtab_node): New member function.
11729         (dump_context::get_scope_depth): New member function.
11730         (dump_context::begin_scope): New member function.
11731         (dump_context::end_scope): New member function.
11732         (dump_context::ensure_pending_optinfo): New member function.
11733         (dump_context::begin_next_optinfo): New member function.
11734         (dump_context::end_any_optinfo): New member function.
11735         (dump_context::s_current): New global.
11736         (dump_context::s_default): New global.
11737         (dump_scope_depth): Delete global.
11738         (dumpfile_ensure_any_optinfo_are_flushed): New function.
11739         (dump_symtab_node): New function.
11740         (get_dump_scope_depth): Reimplement in terms of dump_context.
11741         (dump_begin_scope): Likewise.
11742         (dump_end_scope): Likewise.
11743         (selftest::temp_dump_context::temp_dump_context): New ctor.
11744         (selftest::temp_dump_context::~temp_dump_context): New dtor.
11745         (selftest::verify_item): New function.
11746         (ASSERT_IS_TEXT): New macro.
11747         (ASSERT_IS_TREE): New macro.
11748         (ASSERT_IS_GIMPLE): New macro.
11749         (selftest::test_capture_of_dump_calls): New test.
11750         (selftest::dumpfile_c_tests): Call it.
11751         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11752         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11753         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11754         descriptive comment.
11755         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11756         (dump_node, dump_bb): Move these unrelated decls.
11757         (class dump_manager): Add leading comment.
11758         * optinfo.cc: New file.
11759         * optinfo.h: New file.
11761 2018-07-19  Michael Collison  <michael.collison@arm.com>
11762             Richard Henderson <rth@redhat.com>
11764         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11765         (subti): Handle op1 zero.
11766         (subvti4, usub4ti4): New.
11767         (*sub<GPI>3_compare1_imm): New.
11768         (sub<GPI>3_carryinCV): New.
11769         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11770         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11772 2018-07-19  Michael Collison  <michael.collison@arm.com>
11773             Richard Henderson <rth@redhat.com>
11775         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11776         (addti3): Create simpler code if low part is already known to be 0.
11777         (addvti4, uaddvti4): New.
11778         (*add<GPI>3_compareC_cconly_imm): New.
11779         (*add<GPI>3_compareC_cconly): New.
11780         (*add<GPI>3_compareC_imm): New.
11781         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11782         handle constants within this pattern..
11783         (*add<GPI>3_compareV_cconly_imm): New.
11784         (*add<GPI>3_compareV_cconly): New.
11785         (*add<GPI>3_compareV_imm): New.
11786         (add<GPI>3_compareV): New.
11787         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11788         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11789         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11790         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11791         with 'comparison' operator.
11792         (*add<GPI>3_compareV_cconly_imm): Ditto.
11793         (*add<GPI>3_compareV_cconly): Ditto.
11794         (*add<GPI>3_compareV_imm): Ditto.
11795         (add<GPI>3_compareV): Ditto.
11796         (add<mode>3_carryinC): Ditto.
11797         (*add<mode>3_carryinC_zero): Ditto.
11798         (*add<mode>3_carryinC): Ditto.
11799         (add<mode>3_carryinV): Ditto.
11800         (*add<mode>3_carryinV_zero): Ditto.
11801         (*add<mode>3_carryinV): Ditto.
11803 2018-07-19  Michael Collison  <michael.collison@arm.com>
11804             Richard Henderson <rth@redhat.com>
11806         * config/aarch64/aarch64-modes.def (CC_V): New.
11807         * config/aarch64/aarch64-protos.h
11808         (aarch64_addti_scratch_regs): Declare
11809         (aarch64_subvti_scratch_regs): Declare.
11810         (aarch64_expand_subvti): Declare.
11811         (aarch64_gen_unlikely_cbranch): Declare
11812         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11813         for signed overflow using CC_Vmode.
11814         (aarch64_get_condition_code_1): Handle CC_Vmode.
11815         (aarch64_gen_unlikely_cbranch): New function.
11816         (aarch64_addti_scratch_regs): New function.
11817         (aarch64_subvti_scratch_regs): New function.
11818         (aarch64_expand_subvti): New function.
11820 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11822         * config/aarch64/aarch64-option-extensions.def: New entry for profile
11823         extension.
11824         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11825         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11826         extension.
11828 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11830         PR target/83009
11831         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11832         address check not strict.
11834 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11836         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11837         Umq with Umn.
11838         (store_pair_lanes<mode>): Likewise.
11839         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11840         enum value 'ADDR_QUERY_LDP_STP_N'.
11841         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11842         (aarch64_print_address_internal): Add declaration.
11843         (aarch64_print_ldpstp_address): Remove.
11844         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11845         (aarch64_print_operand): Change printing of 'y'.
11846         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11847         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11848         'true' rather than '1'.
11849         * config/aarch64/constraints.md (Uml): Likewise.
11850         (Uml): Rename to Umn.
11851         (Umq): Remove.
11853 2018-07-19  Richard Biener  <rguenther@suse.de>
11855         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11856         a trailing array.
11857         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11858         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11859         (vn_reference_hasher): Likewise.
11860         (struct vn_tables_s): Remove obstack and alloc-pool members.
11861         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11862         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11863         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11864         (vn_reference_insert_pieces): Likewise.
11865         (alloc_vn_nary_op_noinit): Adjust.
11866         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11867         (vn_phi_eq): Adjust.
11868         (shared_lookup_phiargs): Remove.
11869         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11870         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11871         (visit_reference_op_call): Likewise.
11872         (copy_nary, copy_phi, copy_reference): Remove.
11873         (process_scc): Rewind the obstack when iterating.  Do not
11874         copy the elements to valid_info but just move them from one
11875         hashtable to the other.
11876         (allocate_vn_table): Adjust.
11877         (free_vn_table): Likewise.
11878         (init_scc_vn): Likewise.
11879         (free_scc_vn): Likewise.
11881 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
11883         PR target/86560
11884         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11885         indirect_return as function type attribute.
11886         (ix86_attribute_table): Change indirect_return to function
11887         type attribute.
11888         * doc/extend.texi: Update indirect_return attribute.
11890 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
11892         * wide-int.h (widest2_int): New.
11893         * gimple-fold.c (arith_overflowed_p): Use it.
11894         * tree.h (widest2_int_cst): New.
11895         * tree-vrp.c (wide_int_binop_overflow): Rename from
11896         vrp_int_const_binop.
11897         Rewrite to work on trees.
11898         (extract_range_from_multiplicative_op_1): Abstract code to...
11899         (wide_int_range_min_max): ...here.
11900         (wide_int_range_cross_product): ...and here.
11901         (extract_range_from_binary_expr_1): Abstract overflow code to...
11902         (wide_int_range_mult_wrapping): ...here.
11903         * tree-vrp.h (wide_int_range_cross_product): New.
11904         (wide_int_range_mult_wrapping): New.
11906 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
11907             Julia Koval  <julia.koval@intel.com>
11909         * config/i386/x86-tune-costs.h (skylake_memcpy,
11910         skylake_memset): Replace rep_prefix with unrolling for size 512.
11912 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
11914         PR middle-end/86544
11915         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11916         comparision with EQ_EXPR in last stmt.
11918 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11920         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11921         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11922         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11923         previously known as "PowerPC AltiVec Built-in Functions".  Move
11924         some material to new subsubsections "PowerPC AltiVec Built-in
11925         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11926         ISA 2.07".
11927         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11928         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11929         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11930         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11932 2018-07-18  Richard Biener  <rguenther@suse.de>
11934         PR tree-optimization/86557
11935         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11936         EXACT_DIV_EXPR.
11938 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
11940         * config/s390/s390.c (s390_function_profiler): Generate CFI.
11942 2018-07-17  Jeff Law  <law@redhat.com>
11944         * config/arm/arm.c (get_label_padding): Update for recent
11945         changes to label_to_alignment.
11947         PR tree-optimization/86010
11948         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11950         * config/mips/mips.c (vr4130_align_insns): Update for recent
11951         changes to label_to_alignment.
11953         * config/frv/frv.c (frv_label_align): Update for recent changes
11954         to label_to_alignment.
11956         * config/nios2/nios2.c (nios2_label_align): Update for recent
11957         changes which dropped ALIGN_LABELS_LOG.
11959 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
11961         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
11962         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
11964 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
11966         * config/arc/arc.c (arc_label_align): Use align_labels instead of
11967         deprecated align_labels_log.
11969 2018-07-17  Richard Biener  <rguenther@suse.de>
11971         PR lto/86456
11972         * dwarf2out.c (init_sections_and_labels): Always generate
11973         a debug_line_str_section for early LTO debug.
11974         (dwarf2out_finish): Reset debug_line_str_hash output early.
11975         Bump counter for extra dwarf5 .debug_loc labels to not conflict
11976         with fat LTO part.
11977         (dwarf2out_early_finish): Output debug_line_str.
11979 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
11981         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
11982         index register on z196 or later.
11984 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
11986         * config/s390/s390.c (s390_default_align): Set default function
11987         alignment to 16.
11988         (s390_override_options_after_change): Call s390_default align.
11989         (s390_option_override_internal): Call s390_default_align.
11990         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
11992 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
11994         PR middle-end/86542
11995         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
11996         to _looptemp_ clauses, other than the first two.
11998 2018-07-17  Martin Liska  <mliska@suse.cz>
12000         * opts.c: Do not enable OPT_falign_* for -Os.
12002 2018-07-17  Martin Liska  <mliska@suse.cz>
12004         * align.h (MAX_CODE_ALIGN): New.
12005         (MAX_CODE_ALIGN_VALUE): New.
12006         * common/config/i386/i386-common.c (ix86_handle_option):
12007         (MAX_CODE_ALIGN): Moved to align.h.
12008         * final.c (MAX_CODE_ALIGN): Likewise.
12009         * opts.c (parse_and_check_align_values):
12010         (MAX_CODE_ALIGN): Likewise.
12011         (MAX_CODE_ALIGN_VALUE): Likewise.
12013 2018-07-17  Martin Liska  <mliska@suse.cz>
12015         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12016         in order to fulfil coding style.
12017         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12018         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12019         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12020         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12021         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12022         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12023         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12024         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12025         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12027 2018-07-17  Martin Liska  <mliska@suse.cz>
12029         * align.h: New file.
12030         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12031         directly.
12032         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12033         align_flags of label_to_alignment.
12034         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12035         align_flags class.
12036         * config/m68k/m68k.c: Do not use removed align_labels_value and
12037         align_loops_value.
12038         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12039         (LOOP_ALIGN): Likewise.
12040         (LABEL_ALIGN): Likewise.
12041         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12042         Remove not used macro.
12043         (rs6000_loop_align): Change return type to align_flags.
12044         (rs6000_loop_align_max_skip): Remove.
12045         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12046         Change return type to align_flags.
12047         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12048         Remove not used macro.
12049         (rs6000_loop_align):  Change return type to align_flags.
12050         (rs6000_loop_align_max_skip): Remove.
12051         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12052         * config/rx/rx-protos.h (rx_align_for_label): Make it
12053         static function.
12054         * config/rx/rx.c (rx_align_for_label): Change return type
12055         to align_flags.
12056         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12057         macro definitions.
12058         into align_flags class.
12059         (LABEL_ALIGN): Likewise.
12060         (LOOP_ALIGN): Likewise.
12061         * config/s390/s390.c (s390_label_align): Use align_flags
12062         class member.
12063         (s390_asm_output_function_label): Likewise.
12064         * config/sh/sh.c (sh_override_options_after_change):
12065         Use align_flags class directly without macros.
12066         (find_barrier): Likewise.
12067         (barrier_align): Likewise.
12068         (sh_loop_align): Likewise.
12069         * config/spu/spu.c (spu_option_override):
12070         Use align_flags_tuple::get_value instead of removed macros.
12071         (spu_sched_init): Likewise.
12072         * config/spu/spu.h (GTY): Likewise.
12073         * config/visium/visium.c (visium_option_override):
12074         Set "8" as default secondary alignment.
12075         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12076         in order to guarantee secondary alignment of 8.
12077         * coretypes.h: Include align.h header file.
12078         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12079         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12080         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12081         * doc/tm.texi.in: Likewise.
12082         * final.c (struct label_alignment): Remove not used structure.
12083         (LABEL_ALIGN): Change type to align_flags.
12084         (LOOP_ALIGN): Likewise.
12085         (JUMP_ALIGN): Likewise.
12086         (default_loop_align_max_skip): Remove.
12087         (default_label_align_max_skip): Likewise.
12088         (default_jump_align_max_skip): Likewise.
12089         (default_label_align_after_barrier_max_skip):
12090         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12091         (LABEL_TO_MAX_SKIP): Remove.
12092         (label_to_alignment): Return align_flags type instead of integer.
12093         (label_to_max_skip): Remove.
12094         (align_fuzz): Use align_flags type.
12095         (compute_alignments): Use align_flags type and use align_flags::max
12096         to combine multiple alignments.
12097         (grow_label_align): Grow vec instead of C array.
12098         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12099         (shorten_branches):  Use align_flags type and use align_flags::max
12100         to combine multiple alignments.
12101         (final_scan_insn_1): Remove usage of secondary alignment that comes
12102         from label alignment, but instead use proper secondary alignment
12103         which is computed in grow_label_align.
12104         * flags.h (struct align_flags_tuple): Move to align.h.
12105         (struct align_flags): Likewise.
12106         (state_align_loops): Rename to align_loops.
12107         (state_align_jumps): Rename to align_jumps.
12108         (state_align_labels): Rename to align_labels.
12109         (state_align_functions): Rename to align_functions.
12110         (align_loops_log): Remove.
12111         (align_jumps_log): Remove.
12112         (align_labels_log): Remove.
12113         (align_functions_log): Remove.
12114         (align_loops_max_skip): Remove.
12115         (align_jumps_max_skip): Remove.
12116         (align_labels_max_skip): Remove.
12117         (align_functions_max_skip): Remove.
12118         (align_loops_value): Remove.
12119         (align_jumps_value): Remove.
12120         (align_labels_value): Remove.
12121         (align_functions_value): Remove.
12122         * output.h (label_to_alignment): Change return type to align_flags.
12123         (label_to_max_skip): Remove.
12124         * target.def: Remove loop_align_max_skip, label_align_max_skip,
12125         jump_align_max_skip macros.
12126         * targhooks.h (default_loop_align_max_skip): Remove.
12127         (default_label_align_max_skip): Likewise.
12128         (default_jump_align_max_skip): Likewise.
12129         (default_label_align_after_barrier_max_skip): Remove.
12130         * toplev.c (read_log_maxskip): Use ::normalize function.
12131         (parse_N_M): Remove not used argument and also call ::normalize.
12132         (parse_alignment_opts): Do not pass unused arguments.
12133         * varasm.c (assemble_start_function): Use directly align_functions
12134         instead of removed macros.
12135         * system.h: Do not poison removed macros.
12137 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
12139         PR middle-end/86539
12140         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12141         and cond temporaries don't have reference type if iterator has
12142         pointer type.  For init use &for_pre_body instead of pre_p if
12143         for_pre_body is non-empty.
12145 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12147         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12148         double-double modes to SFmode directly directly.
12149         (trunc<mode>sf2_fprs): Delete.
12151 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12153         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12154         for conversions between IFmode and the decimal floating point modes.
12155         (init_float128_ieee): Use the correct names for conversions between
12156         KFmode and the decimal floating point modes.
12158 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12160         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12161         for the conversions between TDmode and IFmode.
12162         (init_float128_ieee): Use more correct names for the conversions
12163         between TDmode and KFmode.
12165 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
12167         PR tree-optimization/86526
12168         * builtins.c (expand_builtin_memcmp): Formatting fixes.
12169         (inline_expand_builtin_string_cmp): Likewise.
12170         (inline_string_cmp): Likewise.  Use c_readstr instead of
12171         builtin_memcpy_read_str.  Add unit_mode temporary.
12173 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12175         PR middle-end/86528
12176         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12177         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12179 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12181         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12182         Alphabetize prototypes of built-in functions, separating out
12183         built-in functions that are listed in this section but should be
12184         described elsewhere.
12186 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
12188         PR target/86511
12189         * expmed.c (emit_store_flag): Do not emit setcc followed by a
12190         conditional move when trapping comparison was split to a
12191         non-trapping one (and vice versa).
12193 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12195         * config/s390/s390.c (s390_function_profiler): Generate nops
12196         instead of profiler call sequences.
12197         * config/s390/s390.opt: Add the new option.
12199 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12201         * config/s390/s390.c (s390_function_profiler): Generate
12202         __mcount_loc section.
12203         * config/s390/s390.opt: Add the new option.
12205 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12207         * common.opt: Add the new warning.
12208         * config/s390/s390.c (s390_function_profiler): Emit "brasl
12209         %r0,__fentry__" when -mfentry is specified.
12210         (s390_option_override_internal): Disallow -mfentry for 31-bit
12211         CPUs.
12212         * config/s390/s390.opt: Add the new option.
12214 2018-07-16  Richard Biener  <rguenther@suse.de>
12216         PR lto/86523
12217         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12218         for function-local FUNCTION_DECL and RESULT_DECL immediately.
12220 2018-07-16  Martin Liska  <mliska@suse.cz>
12222         PR ipa/86529
12223         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12224         to ::get_create.
12226 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12228         * config/arc/arcHS.md: Update ARCHS scheduling rules.
12230 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12232         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12233         for ARCHS4x.
12234         * config/arc/arc-cpus.def (hs4x): New cpu.
12235         (hs4xd): Likewise.
12236         * config/arc/arc-tables.opt: Regenerate.
12237         * config/arc/arc.c (arc_sched_issue_rate): New function.
12238         (TARGET_SCHED_ISSUE_RATE): Define.
12239         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12240         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12241         fpu_cvt.
12242         (attr tune): Add ARCHS4x tune values.
12243         (attr tune_dspmpy): Define.
12244         (*tst): Correct instruction type.
12245         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12246         * config/arc/arcHS4x.md: New file.
12247         * config/arc/fpu.md: Update instruction type attributes.
12248         * config/arc/t-multilib: Regenerate.
12250 2018-07-16  Tom de Vries  <tdevries@suse.de>
12252         PR debug/86455
12253         * var-tracking.c (vt_initialize): Fix pre_dec handling.
12255 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12257         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12258         early clobber.
12260 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12262         PR tree-optimization/86514
12263         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12264         conversion to a boolean type from a type with greater precision.
12266 2018-07-16  Tom de Vries  <tdevries@suse.de>
12268         * var-tracking.c (vt_initialize): Print adjusted insn slim if
12269         dump_flags request TDF_SLIM.
12271 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
12273         * fold-const.c (int_const_binop_1): Abstract...
12274         (wide_int_binop): ...wide int code here.
12275         (poly_int_binop): ...poly int code here.
12276         Abstract the rest of int_const_binop_1 into int_const_binop.
12277         * fold-const.h (wide_int_binop): New.
12278         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12279         Remove useless PLUS/MINUS_EXPR case.
12280         (zero_nonzero_bits_from_vr): Move wide int code...
12281         (zero_nonzero_bits_from_bounds): ...here.
12282         (extract_range_from_binary_expr_1): Move mask optimization code...
12283         (range_easy_mask_min_max): ...here.
12284         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12285         (range_easy_mask_min_max): New.
12287 2018-07-15  Jeff Law  <law@redhat.com>
12289         PR target/85993
12290         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12291         block.
12293 2018-07-14  Jim Wilson  <jimw@sifive.com>
12295         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12297 2018-07-14  Paul Koning  <ni1d@arrl.net>
12299         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12301 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
12303         * lto-streamer-out.c (copy_function_or_variable): Dump info about
12304         copying section.
12306 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
12307             Steve Munroe  <munroesj52@gmail.com>
12309         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12310         (_mm_andnot_si128): Likewise.
12311         (_mm_or_si128): Likewise.
12312         (_mm_xor_si128): Likewise.
12314 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
12316         PR middle-end/78809
12317         * builtins.c (expand_builtin_memcmp): Inline the calls first
12318         when result_eq is false.
12319         (expand_builtin_strcmp): Inline the calls first.
12320         (expand_builtin_strncmp): Likewise.
12321         (inline_string_cmp): New routine. Expand a string compare
12322         call by using a sequence of char comparison.
12323         (inline_expand_builtin_string_cmp): New routine. Inline expansion
12324         a call to str(n)cmp/memcmp.
12325         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12326         New option.
12327         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12329 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
12331         * config/arm/driver-arm.c: Include arm-native.h.
12332         (host_detect_local_cpu): Use auto-generated data tables.
12333         (vendors, arm_cpu_table): Delete.  Move part information to ...
12334         * config/arm/arm-cpus.in: ... here.
12335         * config/arm/parsecpu.awk (gen_native): New function.
12336         (vendor, part): New CPU fields.
12337         (END): Add support for building the native CPU detection tables.
12338         * config/arm/t-arm (arm-native.h): Add build rule.
12339         (driver-arm.o): Add dependency on arm-native.h.
12341 2018-07-13  Richard Biener  <rguenther@suse.de>
12343         PR middle-end/85974
12344         * match.pd (addr1 - addr2): Allow either of the operand to
12345         have a conversion.
12347 2018-07-13  Tom de Vries  <tdevries@suse.de>
12349         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12350         in remap_ssa_name.
12352 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
12354         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12355         arrays instead of numbered variables.
12357 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12359         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12360         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12362 2018-07-13  Richard Biener  <rguenther@suse.de>
12364         PR debug/86452
12365         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12366         instead of get_context_die.
12368 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
12369             Richard Biener  <rguenther@suse.de>
12371         PR middle-end/86489
12372         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12373         that the loop latch destination where phi is defined.
12375 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
12377         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12378         (riscv_expand_epilogue): Add assertion to check interrupt mode.
12379         (riscv_set_current_function): Extract getting interrupt type to new
12380         function.
12381         (riscv_get_interrupt_type): New function.
12382         (riscv_merge_decl_attributes): New function, checking interrupt type is
12383         same.
12384         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12386 2018-07-12  Paul Koning  <ni1d@arrl.net>
12388         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12389         directive.
12391 2018-07-12  Paul Koning  <ni1d@arrl.net>
12393         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12394         zero reference, add doloop_end instead.
12395         * doc/md.texi (decrement_and_branch_until_zero): Remove.
12396         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
12397         detail for doloop_end.
12399 2018-07-12  Martin Sebor  <msebor@redhat.com>
12401         PR c/86453
12402         * attribs.c (decl_attributes): Reject conflicting attributes before
12403         calling attribute handlers.
12405 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
12407         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12408          parameter.
12409         (gcc::dump_manager::get_dump_file_name): likewise.
12410         (dump_begin): Likewise.
12411         * dumpfile.h (dump_begin): Update prototype.
12412         (gcc::dump_manager::get_dump_file_name,
12413         gcc::dump_manager::get_dump_file_name): Update prototype.
12415 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12417         * internal-fn.h (vectorizable_internal_fn_p): New function.
12418         * tree-vect-slp.c (compatible_calls_p): Likewise.
12419         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
12420         to internal functions.
12421         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12423 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12425         * fold-const.h (inverse_conditions_p): Declare.
12426         * fold-const.c (inverse_conditions_p): New function.
12427         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
12428         that test the inverse condition of a conditional internal function.
12429         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12430         * internal-fn.c (internal_fn_mask_index): Handle conditional
12431         internal functions.
12432         (vectorized_internal_fn_supported_p): New function.
12433         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12434         (any_pred_load_store): Replace with...
12435         (need_to_predicate): ...this new variable.
12436         (redundant_ssa_names): New variable.
12437         (ifcvt_can_use_mask_load_store): Move initial checks to...
12438         (ifcvt_can_predicate): ...this new function.  Handle tree codes
12439         for which a conditional internal function exists.
12440         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12441         instead of ifcvt_can_use_mask_load_store.  Update after variable
12442         name change.
12443         (predicate_load_or_store): New function, split out from
12444         predicate_mem_writes.
12445         (check_redundant_cond_expr): New function.
12446         (value_available_p): Likewise.
12447         (predicate_rhs_code): Likewise.
12448         (predicate_mem_writes): Rename to...
12449         (predicate_statements): ...this.  Use predicate_load_or_store
12450         and predicate_rhs_code.
12451         (combine_blocks, tree_if_conversion): Update after above name changes.
12452         (ifcvt_local_dce): Handle redundant_ssa_names.
12453         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12454         general conditional functions.
12455         * tree-vect-stmts.c (vectorizable_call): Likewise.
12457 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12458             Alan Hayward  <alan.hayward@arm.com>
12459             David Sherwood  <david.sherwood@arm.com>
12461         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12462         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12463         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12464         plus and minus and convert them into IFN_COND_FMA-based sequences.
12465         (convert_mult_to_fma): Handle conditional plus and minus.
12467 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12469         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12470         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12471         (cond_fnms_optab): New optabs.
12472         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12473         internal functions.
12474         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12475         * internal-fn.h (get_conditional_internal_fn): Declare.
12476         (get_unconditional_internal_fn): Likewise.
12477         * internal-fn.c (cond_ternary_direct): New macro.
12478         (expand_cond_ternary_optab_fn): Likewise.
12479         (direct_cond_ternary_optab_supported_p): Likewise.
12480         (FOR_EACH_COND_FN_PAIR): Likewise.
12481         (get_conditional_internal_fn): New function.
12482         (get_unconditional_internal_fn): Likewise.
12483         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12484         (gimple_match_op::gimple_match_op): Add a new overload for 5
12485         operands.
12486         (gimple_match_op::set_op): Likewise.
12487         (gimple_resimplify5): Declare.
12488         * genmatch.c (decision_tree::gen): Generate simplifications for
12489         5 operands.
12490         * gimple-match-head.c (gimple_simplify): Define an overload for
12491         5 operands.  Handle calls with 5 arguments in the top-level overload.
12492         (convert_conditional_op): Handle conversions from unconditional
12493         internal functions to conditional ones.
12494         (gimple_resimplify5): New function.
12495         (build_call_internal): Pass a fifth operand.
12496         (maybe_push_res_to_seq): Likewise.
12497         (try_conditional_simplification): Try converting conditional
12498         internal functions to unconditional internal functions.
12499         Handle 3-operand unconditional forms.
12500         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12501         Define ternary equivalents of the current rules for binary conditional
12502         internal functions.
12503         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12504         ternary operations.
12505         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12506         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12507         (optab): Handle them.
12508         (SVE_COND_FP_TERNARY): New int iterator.
12509         (sve_fmla_op, sve_fmad_op): New int attributes.
12510         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12511         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12512         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12514 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12516         * target.def (preferred_else_value): New target hook.
12517         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12518         * doc/tm.texi: Regenerate.
12519         * targhooks.h (default_preferred_else_value): Declare.
12520         * targhooks.c (default_preferred_else_value): New function.
12521         * internal-fn.h (conditional_internal_fn_code): Declare.
12522         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12523         (get_conditional_internal_fn): Use it.
12524         (conditional_internal_fn_code): New function.
12525         * gimple-match.h (gimple_match_cond): New struct.
12526         (gimple_match_op): Add a cond member function.
12527         (gimple_match_op::gimple_match_op): Update all forms to take a
12528         gimple_match_cond.
12529         * genmatch.c (expr::gen_transform): Use the same condition as res_op
12530         for the suboperation, but don't specify a particular else_value.
12531         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12532         (visit_nary_op, visit_reference_op_load): Pass
12533         gimple_match_cond::UNCOND to the gimple_match_op constructor.
12534         * gimple-match-head.c: Include tree-eh.h
12535         (convert_conditional_op): New function.
12536         (maybe_resimplify_conditional_op): Likewise.
12537         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12538         (gimple_resimplify2): Likewise.
12539         (gimple_resimplify3): Likewise.
12540         (gimple_resimplify4): Likewise.
12541         (maybe_push_res_to_seq): Return null for conditional operations.
12542         (try_conditional_simplification): New function.
12543         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
12544         constructor.
12545         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12546         IFN_COND_* call.
12547         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12548         function.
12549         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12551 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
12553         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12554         DECL_FCONTEXT
12555         (hash_tree): Do not hash DECL_FCONTEXT
12556         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12557         Do not stream DECL_FCONTEXT.
12558         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12559         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12561 2018-07-12  Richard Biener  <rguenther@suse.de>
12563         PR debug/86462
12564         * dwarf2out.c (gen_block_die): Only output blocks when they have
12565         at least one !DECL_IGNORED_P variable.
12567 2018-07-12  Richard Biener  <rguenther@suse.de>
12569         PR target/84829
12570         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12571         Remove -mieee-fp handling.
12573 2018-07-12  Richard Biener  <rguenther@suse.de>
12575         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12576         left-over from last patch.
12578 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
12580         PR tree-optimization/86492
12581         * gimple-ssa-store-merging.c
12582         (imm_store_chain_info::coalesce_immediate_stores): Call
12583         check_no_overlap even for the merge_overlapping case.  Formatting fix.
12585 2018-07-12  Richard Biener  <rguenther@suse.de>
12587         PR middle-end/86479
12588         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12589         move possibly trapping operations into the conditional.
12591 2018-07-12  Richard Biener  <rguenther@suse.de>
12593         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12594         (vn_lookup_simplify_result): Remove recursion limit applied
12595         here.
12596         (vn_nary_build_or_lookup_1): Adjust.
12597         (try_to_simplify): Likewise.
12598         * gimple-match-head.c (gimple_resimplify1): Instead apply one
12599         here.
12600         (gimple_resimplify2): Likewise.
12601         (gimple_resimplify3): Likewise.
12602         (gimple_resimplify4): Likewise.
12604 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
12606         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12607         Use __mmask64 type instead of __mmask8 for __M argument.
12608         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12609         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12610         __U argument.
12611         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12612         __mmask16 for __M argument.
12613         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12614         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12615         to __mmask16 instead of __mmask8.
12616         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12617         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12618         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12619         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12620         instead of __mmask16 for __U argument.
12621         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12622         __mmask16 instead of __mmask8 for __U argument.
12623         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12624         __U argument.
12625         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12626         __mmask16.
12627         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12628         argument.
12629         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12630         __U argument.
12631         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12632         __mmask16.
12633         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12634         of __mmask16.
12635         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12636         __U argument.
12637         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12638         __U argument.
12639         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12640         __U argument.
12641         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12642         __U argument.
12643         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12644         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12645         return type as well as __M argument type and all casts from __mmask8
12646         to __mmask32.
12647         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12648         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12649         return type as well as __M argument type and all casts from __mmask8
12650         to __mmask16.
12651         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12652         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12653         return type as well as __M argument type and all casts from __mmask8
12654         to __mmask32.
12655         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12656         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12657         return type as well as __M argument type and all casts from __mmask8
12658         to __mmask16.
12659         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12660         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12661         __mmask16.
12663 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
12665         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12666         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12667         for __U argument.
12669 2018-07-11  Paul Koning  <ni1d@arrl.net>
12671         * doc/md.texi (define_subst): Document how multiple occurrences of
12672         the same argument in the replacement pattern are handled.
12674 2018-07-11  Paul Koning  <ni1d@arrl.net>
12676         * doc/extend.texi (Common Variable Attributes): Move "mode" into
12677         alphabetical order.
12678         (Common Type Attributes): Add "mode" attribute.
12680 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
12682         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12683         stream DECL_ORIGINAL_TYPE.
12684         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12685         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12686         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12687         Do not walk original type.
12688         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12689         external decls.
12690         (write_ts_decl_non_common_tree_pointers): Do not stream
12691         DECL_ORIGINAL_TYPE
12692         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12693         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12695 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
12697         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12698         thread twice from the same starting edge.
12700 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
12702         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12703         * gimple.c (gimple_call_nonnull_result_p): ...here...
12704         (gimple_call_nonnull_arg): ...and here.
12705         * gimple.h (gimple_call_nonnull_result_p): New.
12706         (gimple_call_nonnull_arg): New.
12708 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
12710         * config/arm/arm-cpus.in: Move information from fpu field of each
12711         cpu definition to the isa field.
12712         * config/arm/parsecpu.awk (fpu): Delete match rule.
12713         (gen_comm_data): Don't add bits from the CPU's FPU entry.
12715 2018-07-11  Richard Biener  <rguenther@suse.de>
12717         PR debug/86457
12718         * dwarf2out.c (init_sections_and_labels): Use
12719         output_asm_line_debug_info consistently.
12720         (dwarf2out_early_finish): Likewise.
12721         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12722         type units.
12724 2018-07-11  Richard Biener  <rguenther@suse.de>
12726         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12727         Rework father_bb setting in a way to avoid propagating constants
12728         multiple times on a loop body.
12730 2018-07-10  Mark Wielaard  <mark@klomp.org>
12732         PR debug/86459
12733         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12735 2018-07-10  Richard Biener  <rguenther@suse.de>
12737         * hash-map.h (hash_map::iterator::operator*): Return
12738         references to key and value.
12740 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
12742         PR c++/86443
12743         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12744         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12745         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12746         (gimplify_omp_for): For composite loops, move outer
12747         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12748         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
12749         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
12750         TREE_LIST for both the original class iterator and the "last" helper
12751         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
12752         loop, remember has_decl_expr from outer composite loops for the
12753         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12755 2018-07-09  Martin Sebor  <msebor@redhat.com>
12757         PR middle-end/77357
12758         PR middle-end/86428
12759         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12760         accessing implicitly initialized array elements.
12761         * expr.c (string_constant): Handle string initializers of
12762         character arrays within aggregates.
12763         * gimple-fold.c (fold_array_ctor_reference): Add argument.
12764         Store element offset.  As a special case, handle zero size.
12765         (fold_nonarray_ctor_reference): Same.
12766         (fold_ctor_reference): Add argument.  Store subobject offset.
12767         * gimple-fold.h (fold_ctor_reference): Add argument.
12769 2018-07-09  Paul Koning  <ni1d@arrl.net>
12771         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12772         (pdp11_insn_cost): New function.
12773         (pdp11_md_asm_adjust): New function.
12774         (TARGET_INVALID_WITHIN_DOLOOP): Define.
12775         (pdp11_rtx_costs): Update to match machine better.
12776         (output_addr_const_pdp11): Correct format mismatch warnings.
12777         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12778         * config/pdp11/pdp11.md: General change to add base_cost and/or
12779         length attributes for use by new pdp11_insn_cost function.
12780         (MIN_BRANCH): Correct definition.
12781         (MIN_SOB): Ditto.
12782         (doloop_end): Use standard pattern name for looping pattern.
12783         (doloop_end_nocc): New.
12784         (movsf): Add another constraint alternative.
12785         (zero_extendqihi2): Add constraint alternatives for not in place
12786         extend.
12787         (zero_extendhisi2): Remove.
12788         (shift patterns): Add CC handling variants.
12789         (bswaphi2): New.
12790         (bswapsi2): New.
12791         (rothi3): New.
12792         (define_peephole2): New peephole to recognize mov that sets CC for
12793         subsequent test.
12795 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12797         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12798         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12799         wi::add.
12801 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
12803         PR c/86420
12804         * real.c (real_nextafter): Return true if result is denormal.
12806 2018-07-09  Martin Liska  <mliska@suse.cz>
12808         * common.opt: Add back wrongly removed attribute.
12810 2018-07-09  Richard Biener  <rguenther@suse.de>
12812         PR debug/86413
12813         * dwarf2out.c (gen_block_die): For an early generated DIE
12814         always output high/low PC attributes.
12816 2018-07-09  Tom de Vries  <tdevries@suse.de>
12818         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12819         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12820         onto VAR_DECL with abstract origin.
12822 2018-07-07  Jim Wilson  <jimw@sifive.com>
12824         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12826 2018-07-07  Tom de Vries  <tdevries@suse.de>
12828         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12830 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
12832         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12833         overflow_type.
12834         (combine_bound): Use wide-int overflow calculation instead of
12835         rolling our own.
12836         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12837         overflow_type.
12838         * fold-const.c (int_const_binop_2): Same.
12839         (extract_muldiv_1): Same.
12840         (fold_div_compare): Same.
12841         (fold_abs_const): Same.
12842         * match.pd: Same.
12843         * poly-int.h (add): Same.
12844         (sub): Same.
12845         (neg): Same.
12846         (mul): Same.
12847         * predict.c (predict_iv_comparison): Same.
12848         * profile-count.c (slow_safe_scale_64bit): Same.
12849         * simplify-rtx.c (simplify_const_binary_operation): Same.
12850         * tree-chrec.c (tree_fold_binomial): Same.
12851         * tree-data-ref.c (split_constant_offset_1): Same.
12852         * tree-if-conv.c (idx_within_array_bound): Same.
12853         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12854         * tree-ssa-phiopt.c (minmax_replacement): Same.
12855         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12856         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12857         * vr-values.c (vr_values::adjust_range_with_scev): Same.
12858         * wide-int.cc (wi::add_large): Same.
12859         (wi::mul_internal): Same.
12860         (wi::sub_large): Same.
12861         (wi::divmod_internal): Same.
12862         * wide-int.h: Change overflow type to overflow_type for neg, add,
12863         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12864         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12865         mul_internal, divmod_internal.
12866         (overflow_type): New enum.
12867         (accumulate_overflow): New.
12869 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
12871         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12872         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12874 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
12876         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12877         argument is checked for zero before entering loop, avoid checking again.
12879 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
12881         * gimplify.h (generic_expr_could_trap_p): Set as global function.
12882         * gimplify.h (generic_expr_could_trap_p): Likwise.
12883         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12885 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
12887         PR tree-optimization/86401
12888         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12889         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12890         (fold_bit_and_mask): ... here.  New helper function for match.pd.
12891         * fold-const.h (fold_bit_and_mask): Declare.
12892         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12894 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
12896         PR target/86324
12897         * target.def (translate_mode_attribute): New hook.
12898         * targhooks.h (default_translate_mode_attribute): Declare.
12899         * targhooks.c (default_translate_mode_attribute): New function.
12900         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12901         * doc/tm.texi: Regenerate.
12902         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12903         (rs6000_translate_mode_attribute): New function.
12905 2018-07-06  Paul Koning  <ni1d@arrl.net>
12907         * doc/md.texi (define_split): Document DONE and FAIL.
12908         (define_peephole2): Ditto.
12910 2018-07-05  Jeff Law  <law@redhat.com>
12912         PR tree-optimization/86010
12913         * tree-ssa-dse.c (compute_trims): More aggressively trim at
12914         both the head and tail of mem* and str* calls.
12916 2018-07-05  Jim Wilson  <jimw@sifive.com>
12918         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12920 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
12922         * config/aarch64/aarch64-simd.md: correct flags text for
12923         MIN_EXPR replacement.
12925 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
12927         * configure: Regenerated.
12929 2018-07-05  Carl Love  <cel@us.ibm.com>
12931         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12932         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12933         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12934         VSX_BUILTIN_DOUBLEL_V4SF.
12936 2018-07-05  Martin Sebor  <msebor@redhat.com>
12938         PR c++/86400
12939         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12940         than its domain to compute its the upper bound of a char array.
12942 2018-07-05  Nathan Sidwell  <nathan@acm.org>
12944         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12945         * doc/cpp.texi: Update comment.
12946         * doc/tm.texi: Rebuilt.
12947         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12948         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12949         * doc/extend.texi (Backwards Compatibility): Clarify it is system
12950         headers affected by extern "C".
12951         * system.h: Poison NO_IMPLICIT_EXTERN_C.
12952         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12953         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12954         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12955         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12956         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
12957         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
12958         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
12959         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
12960         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
12961         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
12962         config/sparc/sp64-elf.h, config/spu/spu.h,
12963         config/stormy16/stormy16.h, config/v850/v850.h,
12964         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
12965         define NO_IMPLICIT_EXTERN_C.
12966         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
12968 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12970         PR target/84711
12971         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12972         instead of GET_MODE_SIZE when comparing Units.
12974 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12976         PR target/84711
12977         * rtlanal.c (set_noop_p): Constrain on mode change,
12978         include hard-reg-set.h
12980 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12982         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
12984 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
12986         Revert
12987         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
12989         PR sanitizer/84250
12990         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12991         libasan.
12992         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12994 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
12996         PR sanitizer/84250
12997         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12998         libasan.
12999         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13001 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
13003         PR middle-end/86380
13004         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13006 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
13008         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13009         neg_*_op* variables.
13011 2018-07-04  Martin Liska  <mliska@suse.cz>
13013         * tree-switch-conversion.c: Define
13014         max_ratio_for_speed and max_ratio_for_size constants.
13016 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13017             Martin Liska  <mliska@suse.cz>
13019         PR middle-end/66240
13020         PR target/45996
13021         PR c/84100
13022         * common.opt: Rename align options with 'str_' prefix.
13023         * common/config/i386/i386-common.c (set_malign_value): New
13024         function.
13025         (ix86_handle_option): Use it to set -falign-* options/
13026         * config/aarch64/aarch64-protos.h (struct tune_params): Change
13027         type from int to string.
13028         * config/aarch64/aarch64.c: Update default values from int
13029         to string.
13030         * config/alpha/alpha.c (alpha_override_options_after_change):
13031         Likewise.
13032         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13033         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13034         max skip conditionally.
13035         * config/i386/freebsd.h (SUBALIGN_LOG): New.
13036         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13037         max skip conditionally.
13038         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13039         max skip conditionally.
13040         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13041         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13042         max skip conditionally.
13043         * config/i386/i386.c (struct ptt): Change type from int to
13044         string.
13045         (ix86_default_align): Set default values.
13046         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13047         max skip conditionally.
13048         * config/i386/iamcu.h (SUBALIGN_LOG): New.
13049         (ASM_OUTPUT_MAX_SKIP_ALIGN):
13050         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13051         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13052         max skip conditionally.
13053         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13054         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13055         * config/i386/x86-64.h (SUBALIGN_LOG): New.
13056         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13057         max skip conditionally.
13058         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13059         * config/ia64/ia64.c (ia64_option_override): Set default values
13060         for alignment options.
13061         * config/m68k/m68k.c: Handle new str_align_* options.
13062         * config/mips/mips.c (mips_set_compression_mode): Change
13063         type of constants.
13064         (mips_option_override): Set default values for options.
13065         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13066         Likewise.
13067         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13068         Likewise.
13069         * config/rx/rx.c (rx_option_override): Likewise.
13070         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13071         (LABEL_ALIGN): Use align_labels_log.
13072         (LOOP_ALIGN): Use align_loops_align.
13073         * config/s390/s390.c (s390_asm_output_function_label): Use new
13074         macros.
13075         * config/sh/sh.c (sh_override_options_after_change):
13076         Change type of constants.
13077         * config/spu/spu.c (spu_sched_init): Likewise.
13078         * config/sparc/sparc.c (sparc_option_override): Set default
13079         values for options.
13080         * config/visium/visium.c (visium_option_override): Likewise.
13081         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13082         emit p2align format with last argument if it's not needed.
13083         * doc/invoke.texi: Document extended format of -falign-*.
13084         * final.c: Use align_labels alignment.
13085         * flags.h (struct target_flag_state): Change type to use
13086         align_flags.
13087         (struct align_flags_tuple): New.
13088         (struct align_flags): Likewise.
13089         (align_loops_log): Redefine macro to use new types.
13090         (align_loops_max_skip): Redefine macro to use new types.
13091         (align_jumps_log): Redefine macro to use new types.
13092         (align_jumps_max_skip): Redefine macro to use new types.
13093         (align_labels_log): Redefine macro to use new types.
13094         (align_labels_max_skip): Redefine macro to use new types.
13095         (align_functions_log): Redefine macro to use new types.
13096         (align_loops): Redefine macro to use new types.
13097         (align_jumps): Redefine macro to use new types.
13098         (align_labels): Redefine macro to use new types.
13099         (align_functions): Redefine macro to use new types.
13100         (align_functions_max_skip): Redefine macro to use new types.
13101         (align_loops_value): New macro.
13102         (align_jumps_value): New macro.
13103         (align_labels_value): New macro.
13104         (align_functions_value): New macro.
13105         * function.c (invoke_set_current_function_hook): Propagate
13106         alignment values from flags to global variables default in
13107         topleev.h.
13108         * ipa-icf.c (sem_function::equals_wpa): Use
13109         cl_optimization_option_eq instead of memcmp.
13110         * lto-streamer.h (cl_optimization_stream_out): Support streaming
13111         of string types.
13112         (cl_optimization_stream_in): Likewise.
13113         * optc-save-gen.awk: Support strings in cl_optimization.
13114         * opth-gen.awk: Likewise.
13115         * opts.c (finish_options): Remove error checking of invalid
13116         value ranges.
13117         (MAX_CODE_ALIGN): Remove.
13118         (MAX_CODE_ALIGN_VALUE): Likewise.
13119         (parse_and_check_align_values): New function.
13120         (check_alignment_argument): Likewise.
13121         (common_handle_option): Use check_alignment_argument.
13122         * opts.h (parse_and_check_align_values): Declare.
13123         * toplev.c (init_alignments): Remove.
13124         (read_log_maxskip): New.
13125         (parse_N_M): Likewise.
13126         (parse_alignment_opts): Likewise.
13127         (backend_init_target): Remove usage of init_alignments.
13128         * toplev.h (parse_alignment_opts): Declare.
13129         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13130         argument.
13131         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13132         * tree.c (cl_option_hasher::equal): New.
13133         * varasm.c: Use new global macros.
13135 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13137         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13138         Use a simpler align directive also if MAXSKIP = ALIGN-1.
13139         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13140         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13141         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13142         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13143         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13144         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13145         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13146         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13147         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13148         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13149         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13151 2018-07-04  Martin Liska  <mliska@suse.cz>
13152             Jonathan Wakely  <jwakely@redhat.com>
13154         * coverage.c: Use correct type.
13155         * doc/invoke.texi: Language correction.
13157 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
13159         PR target/85620
13160         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13161         ENDBRANCH for non-tail call which may return via indirect branch.
13162         * doc/extend.texi: Document indirect_return attribute.
13164 2018-07-03  Martin Sebor  <msebor@redhat.com>
13166         PR tree-optimization/86274
13167         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13168         precondition.
13169         (format_floating): Correct handling of infinities and NaNs.
13171 2018-07-03  Martin Sebor  <msebor@redhat.com>
13173         * print-tree.c (print_real_cst): New function.
13174         (print_node_brief): Call it.
13175         (print_node): Ditto.
13177 2018-07-03  Jeff Law  <law@redhat.com>
13179         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13180         into a single pattern.
13182         * config/h8300/h8300.md (ors code_iterator): New.
13183         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13184         a single pattern and single splitter.
13185         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13186         (iorqi3_1, xorqi3_1): Likewise.
13187         (iorqi3, xorqi3 expanders): Similarly.
13189         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13190         (movmd_internal) into a single pattern using the P mode iterator.
13191         (movmd splitters): Similarly.
13192         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13193         (movsd splitters): Similarly.
13195         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13196         ADDB, ADDW and ADDL into a single ADD attribute which selects the
13197         right table based on the size of the operand.
13198         * config/h8300/h8300.md (length_table): Corresponding changes. All
13199         references to "addb", "addw" and "addl" changed to "add".
13200         (btst patterns): Merge two variants into a single pattern.
13201         (tstqi, tsthi): Likewise.
13202         (addhi3_incdec, addsi3_incdec): Likewise.
13203         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13204         (mulhi3, mulsi3): Likewise.
13205         (udivhi3, udivsi3): Likewise.
13206         (divhi3, divsi3): Likewise.
13207         (andorqi3, andorhi3, andorsi3): Likewise.
13209 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
13211         PR target/85694
13212         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13213         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13215 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13217         PR tree-optimization/85694
13218         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13219         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13220         UNSPEC_URHADD.
13221         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13222         (<u>avg<mode>3_ceil): New patterns.
13224 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
13226         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13227         scan-tree-dump directive.
13228         * gcc.dg/vect/slp-perm-2.c: Likewise.
13229         * gcc.dg/vect/slp-perm-3.c: Likewise.
13230         * gcc.dg/vect/slp-perm-5.c: Likewise.
13231         * gcc.dg/vect/slp-perm-6.c: Likewise.
13232         * gcc.dg/vect/slp-perm-7.c: Likewise.
13233         * gcc.dg/vect/slp-perm-8.c: Likewise.
13235 2018-07-03  Marek Polacek  <polacek@redhat.com>
13237         PR middle-end/86202
13238         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13240 2018-07-03  Richard Biener  <rguenther@suse.de>
13242         PR ipa/86389
13243         * tree-ssa-structalias.c (find_func_clobbers): Properly
13244         handle indirect calls.
13246 2018-07-03  Jeff Law  <law@redhat.com>
13248         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13249         (shifts): New code iterator.
13250         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13251         expander.  Fix HImode handling on H8/SX.
13252         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13253         (subqi3, subhi3, subsi3 expanders): Likewise.
13254         (andqi3, andhi3, andsi3 expanders): Likewise.
13255         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13256         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13257         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13258         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13259         (zero_extendqihi2, zero_extendqisi2): Likewise.
13260         (extendqihi2, extendqisi2): Likewise.
13261         (rotlqi3, rotlhi3, rotlsi3): Likewise.
13262         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13263         (rotlqi3_1, rotlhi3_1): Likewise.
13264         (logicalhi3_sn, logicalsi3_sn): Likewise.
13265         (logicalhi3, logicalsi3): Likewise.
13267 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13269         * tree-vect-patterns.c (vect_recog_rotate_pattern)
13270         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13271         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13272         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13273         type to append_pattern_def_seq instead of creating a stmt_vec_info
13274         directly.
13275         (build_mask_conversion): Likewise.  Remove vinfo argument.
13276         (vect_add_conversion_to_patterm): Likewise, renaming to...
13277         (vect_add_conversion_to_pattern): ...this.
13278         (vect_recog_mask_conversion_pattern): Update call to
13279         build_mask_conversion.  Pass the vector type to
13280         append_pattern_def_seq here too.
13281         (vect_recog_gather_scatter_pattern): Update call to
13282         vect_add_conversion_to_pattern.
13284 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13286         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13287         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13288         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13289         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13290         STMT_VINFO_PATTERN_DEF_SEQ to null here.
13291         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13292         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13293         append_pattern_def_seq instead of new_pattern_def_seq.
13294         (vect_recog_divmod_pattern): Do both of the above.
13295         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13296         is null.
13298 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13300         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13301         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13302         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13303         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13304         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13305         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13306         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13307         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13308         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13309         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13310         parameter with a single stmt_vec_info.
13311         (vect_recog_func_ptr): Likewise.
13312         (vect_recog_gather_scatter_pattern): Likewise, folding in...
13313         (vect_try_gather_scatter_pattern): ...this.
13314         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13315         the stmt_vec_info of the statement to be matched.  Don't clear
13316         STMT_VINFO_RELATED_STMT.
13317         (vect_pattern_recog): Update call accordingly.
13319 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13321         PR tree-optimization/85694
13322         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13323         (uavgM3_ceil): Document new optabs.
13324         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13325         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13326         functions.
13327         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13328         (savg_ceil_optab): New optabs.
13329         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13330         (vect_vect_recog_func_ptrs): Add it.
13331         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13332         constant directly from the associated lhs.
13334 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13336         * tree-vect-patterns.c (vect_split_statement): New function.
13337         (vect_convert_input): Use it to try to split an existing cast.
13339 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13341         * poly-int.h (print_hex): New function.
13342         * dumpfile.h (dump_dec, dump_hex): Declare.
13343         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13344         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13345         min_input_precision, operation_precision and operation_sign.
13346         * tree-vect-patterns.c (vect_get_range_info): New function.
13347         (vect_same_loop_or_bb_p, vect_single_imm_use)
13348         (vect_operation_fits_smaller_type): Delete.
13349         (vect_look_through_possible_promotion): Add an optional
13350         single_use_p parameter.
13351         (vect_recog_over_widening_pattern): Rewrite to use new
13352         stmt_vec_info infomration.  Handle one operation at a time.
13353         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13354         (vect_truncatable_operation_p, vect_set_operation_type)
13355         (vect_set_min_input_precision): New functions.
13356         (vect_determine_min_output_precision_1): Likewise.
13357         (vect_determine_min_output_precision): Likewise.
13358         (vect_determine_precisions_from_range): Likewise.
13359         (vect_determine_precisions_from_users): Likewise.
13360         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13361         (vect_vect_recog_func_ptrs): Put over_widening first.
13362         Add cast_forwprop.
13363         (vect_pattern_recog): Call vect_determine_precisions.
13365 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13367         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13368         statements that have been replaced by further pattern statements.
13369         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13371 2018-07-03  Richard Biener  <rguenther@suse.de>
13373         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13374         always set *dt.  Dump vectype in vectype overload.
13375         * dumpfile.h (dump_gimple_expr): New function.
13376         (dump_gimple_expr_loc): Likewise.
13377         * dumpfile.c (dump_gimple_expr): New function.
13378         (dump_gimple_expr_loc): Likewise.
13380 2018-07-02  Jeff Law  <law@redhat.com>
13382         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13383         the H8/300, H8/300H and H8/S variants into a single pattern.
13384         (movhi_h8300, movqi_h8300hs): Similarly.
13385         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13386         (QHI mode iterator): New.
13388         * config/h8300/h8300.md: Remove trailing whitespace.
13390 2018-07-02  Jim Wilson  <jimw@sifive.com>
13392         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13393         instead of emit_insn for interrupt returns.
13394         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13395         (riscv_sret, riscv_uret): Likewise.
13397 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
13399         * pretty-print.c (selftest::test_pp_format): Move save and restore
13400         of quotes to class auto_fix_quotes, and add an instance.
13401         * selftest.c: Include "intl.h".
13402         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13403         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13404         * selftest.h (selftest::auto_fix_quotes): New class.
13406 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
13408         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13409         (aarch64_sve_prepare_conditional_op): Remove.
13410         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13411         Allow aarch64_simd_reg_or_zero as select operand; remove
13412         the aarch64_sve_prepare_conditional_op call.
13413         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13414         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13415         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13416         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13417         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13418         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13419         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13420         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13421         and a splitters to match all of the *_any patterns.
13422         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13424         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13425         (SVE_COND_FP_BINARY_REV): Remove.
13426         (sve_int_op_rev, sve_fp_op_rev): New.
13427         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13428         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13429         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13430         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13431         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13432         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13433         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13434         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13435         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13437         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13438         Remove match_dup 1 from the inner unspec.
13439         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13441         * config/aarch64/aarch64.md (movprfx): New attr.
13442         (length): Default movprfx to 8.
13443         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13444         (*madd<SVE_I>, *msub<SVE_I): Likewise.
13445         (*<su>mul<SVE_I>3_highpart): Likewise.
13446         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13447         (*v<ASHIFT><SVE_I>3): Likewise.
13448         (*<su><MAXMIN><SVE_I>3): Likewise.
13449         (*<su><MAXMIN><SVE_F>3): Likewise.
13450         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13451         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13452         (*div<SVE_F>4): Likewise.
13454 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
13456         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13457         in dump string.
13459 2018-07-02  Richard Biener  <rguenther@suse.de>
13461         PR tree-optimization/86363
13462         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13463         memset argument refers to a non-variable address.
13465 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
13467         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13468         {PLUS,MINUS}_EXPR code to...
13469         (adjust_symbolic_bound): ...here,
13470         (combine_bound): ...here,
13471         (set_value_range_with_overflow): ...and here.
13473 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
13475         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13476         code...
13477         (extract_range_from_abs_expr): ...here.
13479 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
13481         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13482         -fno-omit-frame-pointer when not optimizing.
13484 2018-07-02  Martin Liska  <mliska@suse.cz>
13486         PR ipa/86279
13487         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13488         (propagate_nothrow): Likewise.
13490 2018-07-02  Martin Liska  <mliska@suse.cz>
13492         PR ipa/86323
13493         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13495 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
13497         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13498         function in r262149, changing "loc" param from source_location to
13499         const dump_location_t &.
13500         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13501         declaration, as above.
13503 2018-07-01  Paul Koning  <ni1d@arrl.net>
13505         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13506         -munit-asm, -mgnu-asm, -mdec-asm.
13507         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13508         (pdp11_output_labelref): New.
13509         (pdp11_output_def): New.
13510         (pdp11_output_addr_vec_elt): New.
13511         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
13512         %# and %@ format codes.
13513         (pdp11_option_override): New.
13514         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13515         (pdp11_output_ident): New.
13516         (pdp11_asm_named_section): New.
13517         (pdp11_asm_init_sections): New.
13518         (pdp11_file_start): New.
13519         (pdp11_file_end): New.
13520         (output_ascii): Use .ascii/.asciz for -mdec-asm.
13521         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
13522         %o, like %c but octal.
13523         (pdp11_option_override): New.
13524         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13525         -mdec-asm.
13526         (DATA_SECTION_ASM_OP): Ditto.
13527         (READONLY_DATA_SECTION_ASM_OP): New.
13528         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13529         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13530         (ASM_OUTPUT_LABELREF): Ditto.
13531         (ASM_OUTPUT_DEF): Ditto.
13532         (ASM_OUTPUT_EXTERNAL): New.
13533         (ASM_OUTPUT_SOURCE_FILENAME): New.
13534         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13535         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13536         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
13537         %# and %@ format codes.
13538         * config/pdp11/pdp11.opt (mgnu-asm): New.
13539         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13540         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13541         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13543 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
13545         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13546         dereferencing path[] beyond its length.
13547         (debug_path): New.
13548         (debug_all_paths): New.
13549         (rewire_first_differing_edge): New.
13550         (adjust_paths_after_duplication): New.
13551         (duplicate_thread_path): Call adjust_paths_after_duplication.
13552         Add new argument.
13553         (thread_through_all_blocks): Add new argument to
13554         duplicate_thread_path.
13556 2018-06-30  Jim Wilson  <jimw@sifive.com>
13558         * config/riscv/predicates.md (p2m1_shift_operand): New.
13559         (high_mask_shift_operand): New.
13560         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13561         pattern using p2m1_shift_operand.
13562         (lshsi3_zero_extend_3+2): New combiner pattern using
13563         high_mask_shift_operand.
13565 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13567         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13568         split out from...
13569         (vect_recog_rotate_pattern): ...here.
13570         (vect_convert_input): Try to insert casts of invariants in the
13571         preheader.
13572         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13573         preheader to be empty.
13575 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13577         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13578         vector type.  If given, install it in the new statement's
13579         STMT_VINFO_VECTYPE.
13580         (vect_element_precision): New function.
13581         (vect_unpromoted_value): New struct.
13582         (vect_unpromoted_value::vect_unpromoted_value): New function.
13583         (vect_unpromoted_value::set_op): Likewise.
13584         (vect_look_through_possible_promotion): Likewise.
13585         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13586         (vect_widened_op_tree, vect_convert_input): Likewise.
13587         (vect_convert_inputs, vect_convert_output): Likewise.
13588         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13589         to handle the optional cast of the multiplication result and
13590         vect_widened_op_tree to detect the widened multiplication itself.
13591         Do not require the input and output of promotion casts to have
13592         the same sign, but base the signedness of the operation on the
13593         input rather than the result.  If the pattern includes two
13594         promotions, check that those promotions have the same sign.
13595         Do not restrict the MULT_EXPR handling to a double-width result;
13596         handle quadruple-width results and wider.  Use vect_convert_inputs
13597         to convert the inputs to the common type.
13598         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
13599         to handle the optional cast of the ABS result.  Also allow a sign
13600         change or a sign extension between the ABS and MINUS.
13601         Use vect_widened_op_tree to detect the widened subtraction and use
13602         vect_convert_inputs to convert the inputs to the common type.
13603         (vect_handle_widen_op_by_const): Delete.
13604         (vect_recog_widen_op_pattern): New function.
13605         (vect_recog_widen_mult_pattern): Use it.
13606         (vect_recog_widen_shift_pattern): Likewise.
13607         (vect_recog_widen_sum_pattern): Use
13608         vect_look_through_possible_promotion to handle the promoted
13609         PLUS_EXPR operand.
13611 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13613         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13614         the containing gimple_seq *.
13615         * gimple-iterator.h (gsi_for_stmt): Declare it.
13616         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13617         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13618         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13619         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13620         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13621         checks.
13622         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13623         split out from...
13624         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
13625         statement being replaced is part of an existing pattern
13626         definition sequence, inserting the new pattern statements before
13627         the original one.
13628         (vect_pattern_recog_1): Don't return a bool.  If the statement
13629         is already part of a pattern, instead apply pattern matching
13630         to the pattern definition statements.  Don't clear the
13631         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13632         (vect_pattern_recog): Don't break after the first match;
13633         continue processing the pattern definition statements instead.
13634         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13636 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13638         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13639         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13640         (vect_recog_widen_sum_pattern): Use it.
13642 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13644         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13645         phi is not a pattern statement and has not been replaced by
13646         a pattern statement.
13647         * tree-vect-patterns.c (type_conversion_p): Don't check
13648         STMT_VINFO_IN_PATTERN_P.
13649         (vect_recog_vector_vector_shift_pattern): Likewise.
13650         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13651         the pattern statement rather than the original statement; check
13652         directly for a WIDEN_MULT_EXPR here.
13653         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13654         vect_is_simple_use to return the pattern statement rather
13655         than the original statement; use is_pattern_stmt_p to check
13656         for such a pattern statement.
13657         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13658         to return the pattern statement rather than the original statement;
13659         don't do the same transformation here.
13660         (vect_is_simple_use): If the defining statement has been replaced
13661         by a pattern statement, return the pattern statement instead.
13662         Remove the corresponding (local) transformation from the vectype
13663         overload.
13665 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13667         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13668         end and default to null.
13669         * tree-vect-loop.c (vect_create_epilog_for_reduction)
13670         (vectorizable_reduction): Update calls accordingly, dropping the
13671         gimple ** argument if the passed-back statement isn't needed.
13672         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13673         (vect_recog_rotate_pattern): Likewise.
13674         (vect_recog_mask_conversion_pattern): Likewise.
13675         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13676         (vect_mask_constant_operand_p): Likewise.
13677         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13678         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13679         (get_group_load_store_type, get_load_store_type): Likewise.
13680         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13681         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13682         (vectorizable_conversion, vectorizable_assignment): Likewise.
13683         (vectorizable_shift, vectorizable_operation): Likewise.
13684         (vectorizable_store, vect_is_simple_cond): Likewise.
13685         (vectorizable_condition, vectorizable_comparison): Likewise.
13686         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13687         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13688         and move it to the end.  Cope with null def_stmt_outs.
13690 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13692         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13694 2018-06-29  Jeff Law  <law@redhat.com>
13696         * config/v850/v850.c (v850_legitimate_address_p): Handle large
13697         displacements for TARGET_V850E2V3 and newer.
13698         (TARGET_LRA_P): Remove.  Defaults to LRA now.
13699         * config/v850/v850.md (sign23byte_load): Remove.
13700         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13701         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13703 2018-06-29  Martin Liska  <mliska@suse.cz>
13705         PR lto/85759
13706         * coverage.c (coverage_init): Mangle full path name.
13707         * doc/invoke.texi: Document the change.
13708         * gcov-io.c (mangle_path): New.
13709         * gcov-io.h (mangle_path): Likewise.
13710         * gcov.c (mangle_name): Use mangle_path for path mangling.
13712 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13714         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13715         if starting source register is not even.
13717 2018-06-29  Martin Liska  <mliska@suse.cz>
13719         PR tree-optimization/86263
13720         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13721         Make edge redirection.
13723 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
13725         * dumpfile.c (dump_loc): Add indentation based on scope depth.
13726         (dump_scope_depth): New variable.
13727         (get_dump_scope_depth): New function.
13728         (dump_begin_scope): New function.
13729         (dump_end_scope): New function.
13730         * dumpfile.h (get_dump_scope_depth): New declaration.
13731         (dump_begin_scope): New declaration.
13732         (dump_end_scope): New declaration.
13733         (class auto_dump_scope): New class.
13734         (AUTO_DUMP_SCOPE): New macro.
13735         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13736         AUTO_DUMP_SCOPE.
13738 2018-06-29  Richard Biener  <rguenther@suse.de>
13740         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13741         compute_all_dependences succeeds.
13742         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13743         exceed --param loop-max-datarefs-for-datadeps.
13745 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
13747         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13749 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
13751         PR target/86348
13752         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13753         alternative 0 in preferred_for_speed attribute.
13755 2018-06-28  Paul Koning  <ni1d@arrl.net>
13757         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13758         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13759         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13760         * config/pdp11/pdp11.md: Correct "length" attribute calculation
13761         for shift insn patterns.
13763 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
13765         * cgraph.c (cgraph_node::get_body): Replace assignments to
13766         "dump_file" with calls to set_dump_file.
13767         * dumpfile.c (alt_dump_file): Make static, and group with...
13768         (alt_flags): ...this definition.
13769         (dumps_are_enabled): New variable.
13770         (refresh_dumps_are_enabled): New function.
13771         (set_dump_file): New function.
13772         (set_alt_dump_file): New function.
13773         (gcc::dump_manager::dump_start): Replace assignments to
13774         "dump_file" and "alt_dump_file" with calls to set_dump_file and
13775         set_alt_dump_file.
13776         (gcc::dump_manager::dump_finish): Likewise.
13777         * dumpfile.h (alt_dump_file): Delete decl.
13778         (dumps_are_enabled): New variable decl.
13779         (set_dump_file): New function decl.
13780         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13781         global.
13782         * tree-nested.c (lower_nested_functions): Replace assignments to
13783         "dump_file" with calls to set_dump_file.
13785 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
13787         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13788         goto_locus of each outgoing edge of each basic block.
13790 2018-06-28  Richard Biener  <rguenther@suse.de>
13792         * dwarf2out.c (decl_scope_table): Remove.
13793         (push_decl_scope): Likewise.
13794         (pop_decl_scope): Likewise.
13795         (gen_type_die_for_member): Do not call push/pop_decl_scope.
13796         (gen_struct_or_union_type_die): Likewise.
13797         (gen_tagged_type_die): Likewise.
13798         (dwarf2out_init): Do not initialize decl_scope_table.
13799         (dwarf2out_c_finalize): Do not free it.
13801 2018-06-28  Richard Biener  <rguenther@suse.de>
13803         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13804         deciding whether to not re-use a DIE.
13806 2018-06-28  Richard Biener  <rguenther@suse.de>
13808         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13809         DW_AT_abstract_origin attribute.
13811 2018-06-28  Martin Liska  <mliska@suse.cz>
13813         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13814         Use newly introduced constants.
13815         * tree-switch-conversion.h (struct jump_table_cluster):
13816         Define max_ratio_for_size and max_ratio_for_speed.
13818 2018-06-28  Martin Liska  <mliska@suse.cz>
13820         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13821         Add new checking assert to catch invalid state.
13822         (jump_table_cluster::can_be_handled): Handle single case
13823         clusters.
13824         (jump_table_cluster::is_beneficial): Bail out for such case.
13825         (bit_test_cluster::find_bit_tests):
13826         Add new checking assert to catch invalid state.
13827         (bit_test_cluster::can_be_handled): Handle single case
13828         clusters.
13829         (bit_test_cluster::is_beneficial): Bail out for such case.
13830         (switch_decision_tree::analyze_switch_statement):
13831         Fix comment.
13833 2018-06-28  Martin Liska  <mliska@suse.cz>
13835         * common.opt: Introduce -completion option.
13836         * gcc.c (driver_handle_option): Handle it.
13837         (driver::main): Print completions if completion
13838         is set.
13839         * opt-suggestions.c (option_proposer::get_completions):
13840         New function.
13841         (option_proposer::suggest_completion): Likewise.
13842         (option_proposer::find_param_completions): Likewise.
13843         (verify_autocompletions): Likewise.
13844         (test_completion_valid_options): Likewise.
13845         (test_completion_valid_params): Likewise.
13846         (in_completion_p): Likewise.
13847         (empty_completion_p): Likewise.
13848         (test_completion_partial_match): Likewise.
13849         (test_completion_garbage): Likewise.
13850         (opt_proposer_c_tests): Likewise.
13851         * opt-suggestions.h: Declare new functions.
13852         * opts.c (common_handle_option): Handle OPT__completion_.
13853         * selftest-run-tests.c (selftest::run_tests): Add
13854         opt_proposer_c_tests.
13855         * selftest.c (assert_str_startswith): New.
13856         * selftest.h (assert_str_startswith): Likewise.
13857         (opt_proposer_c_tests): New.
13858         (ASSERT_STR_STARTSWITH): Likewise.
13860 2018-06-28  Martin Liska  <mliska@suse.cz>
13862         * Makefile.in: Add opt-suggestions.o.
13863         * gcc-main.c: Include opt-suggestions.h.
13864         * gcc.c (driver::driver): Likewise.
13865         (driver::~driver): Remove m_option_suggestions.
13866         (driver::build_option_suggestions): Moved to option_proposer.
13867         (driver::suggest_option): Likewise.
13868         (driver::handle_unrecognized_options): Use option_proposer.
13869         * gcc.h (class driver): Add new memver m_option_proposer.
13870         * opt-suggestions.c: New file.
13871         * opt-suggestions.h: New file.
13873 2018-06-28  Martin Liska  <mliska@suse.cz>
13875         * vec.h (class auto_string_vec): New (moved from auto_argvec).
13876         (auto_string_vec::~auto_string_vec): Likewise.
13878 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
13880         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13881         prevent_decl_creation_for_types fields up and add reset_location field.
13882         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13883         statement if id->reset_location is true.
13884         (copy_edges_for_bb): Do not set goto_locus on the new edges if
13885         id->reset_location is true.
13886         (copy_phis_for_bb): Force input_location on the arguments if
13887         id->reset_location is true.
13888         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13889         is set on the function to be inlined.
13891 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
13893         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13895 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
13897         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13898         registers for Pmode.
13899         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13900         hard registers for the clobbered pseudo.
13902 2018-06-27  Paul Koning  <ni1d@arrl.net>
13904         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13905         mutually exclusive options.
13906         * config/pdp11/constraints.md (h): New constraint.
13907         (O): Update definition to match shift code generation.
13908         (D): New constraint.
13909         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13910         (CCFP): Remove.
13911         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13912         function.
13913         (output_jump): Change arguments.
13914         (pdp11_fixed_cc_regs): New function.
13915         (pdp11_cc_mode): Ditto.
13916         (pdp11_expand_shift): Ditto.
13917         (pdp11_assemble_shift): Ditto.
13918         (pdp11_small_shift): Ditto.
13919         (pdp11_branch_cost): Remove.
13920         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13921         from output.
13922         (pdp11_register_move_cost): Update for CC registers.
13923         (pdp11_rtx_costs): Add case for LSHIFTRT.
13924         (pdp11_output_jump): Add CCNZ mode conditional branches.
13925         (notice_update_cc_on_set): Remove.
13926         (pdp11_cc_mode): New function.
13927         (simple_memory_operand): Correct pre/post decrement case.
13928         (no_side_effect_operand): New function.
13929         (pdp11_regno_reg_class): Add CC_REGS class.
13930         (pdp11_fixed_cc_regs): New function.
13931         (pdp11_small_shift): New function.
13932         (pdp11_expand_shift): New function to expand shift insns.
13933         (pdp11_assemble_shift): New function to output shifts.
13934         (pdp11_branch_cost): Remove.
13935         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13936         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13937         (WCHAR_TYPE): Ditto.
13938         (PTRDIFF_TYPE): Ditto.
13939         (ADJUST_INSN_LENGTH): New macro.
13940         (FIXED_REGISTERS): Add CC registers.
13941         (CALL_USED_REGISTERS): Ditto.
13942         (reg_class): Ditto.
13943         (REG_CLASS_NAMES): Ditto.
13944         (REG_CLASS_CONTENTS): Ditto.
13945         (SELECT_CC_MODE): Use new function.
13946         (TARGET_FLAGS_REGNUM): New macro.
13947         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13948         (cc0_reg_rtx): Remove.
13949         (CC_STATUS_MDEP): Remove.
13950         (CC_STATUS_MDEFP_INIT): Remove.
13951         (CC_IN_FPU): Remove.
13952         (NOTICE_UPDATE_CC): Remove.
13953         (REGISTER_NAMES): Add CC registers.
13954         (BRANCH_COST): Change to constant 1.
13955         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
13956         handling.
13957         * config/pdp11/pdp11.opt (mbcopy): Remove.
13958         (mbcopy-builtin): Remove.
13959         (mbranch-cheap): Remove.
13960         (mbranch-expensive): Remove.
13961         * config/pdp11/predicates.md (expand_shift_operand): Update to
13962         match shift code generation.
13963         (ccnz_operator): New predicate.
13964         * doc/invoke.texi (PDP-11 Options): Remove deleted options
13965         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
13966         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
13967         exclusive options.
13968         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
13969         description of O constraint.
13971 2018-06-27  Jeff Law  <law@redhat.com>
13972             Austin Law  <austinklaw@gmail.com>
13974         * config/v850/v850.md (addsi3_set_flags): New pattern.
13975         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
13976         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
13977         (zero_extendhisi2_v850_set_flags): Likewise.
13978         (zero_extendqisi2_v850_set_flags): Likewise.
13979         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
13980         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
13981         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
13983         * config/v850/v850-protos.h (notice_update_cc): Remove.
13984         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
13985         (v850_print_operand): Handle 'D' and "d".
13986         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
13987         Add handling of arithmetic/logical operations compared against zero.
13988         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
13989         Do not look at v850_compare_op, instead get mode from last argument.
13990         (v850_gen_compare): Remove
13991         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
13992         after reload for prologue insns.
13993         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
13994         patterns.
13995         (construct_save_jarl): Likewise.
13996         (TARGET_FLAGS_REGNUM): Define.
13997         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
13998         (NOTICE_UPDATE_CC): Remove.
13999         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14000         than cc0.  Conditionalize on reload_completed.
14001         (cmpsi_insn, setfcc_insn): Likewise.
14002         (tst1 splitter): Turn into define_and_split which sets the flags
14003         after reload.
14004         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14005         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14006         (cstoresf4, cstoredf4): Clobber the flags.
14007         (cmpsi, cmpsf, cmpdf): Remove expanders.
14008         (setf_insn): Remove pattern.
14009         (addsi3): Turn into define_and_split which clobbers the flags after
14010         reload and a suitable pattern (addsi3_clobber_flags) for use after
14011         reload.
14012         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14013         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14014         (ashrsi3, ashrsi3_v850e2): Likewise.
14015         (bins): Clobber the flags.
14016         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14017         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14018         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14019         (call_value_internal_short, call_value_internal_long): Likewise.
14020         (callt_save_interrupt, callt_return_interrupt): Likewise.
14021         (save_interrupt, return_interrupt): Likewise.
14022         (callt_save_all_interrupt, save_all_interrupt): Likewise.
14023         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14024         (restore_all_interrupt, _restore_all_interrupt): Likewise.
14025         (All FP comparisons): Only allow after reload has completed.
14026         (trfsr): Likewise.
14027         (divh, divhu): Tweak output template.
14028         (branch_z_normal, branch_z_invert): Remove
14029         (branch_nz_normal, branch_nz_invert): Likewise.
14030         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14032         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14033         * config/v850/v850.c (notice_update_cc): Remove.
14034         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
14035         (CC_NO_CARRY): Likewise.
14036         (NOTICE_UPDATE_CC): Define to nothing.
14037         * config/v850/v850.md: Remove block comment on cc0 handling
14038         Remove "cc" attribute from all patterns.  Remove cc_status handling
14039         from all patterns.  Minor formatting fixes.
14041 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14043         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14044         (cortex-a76.cortex-a55): Likewise.
14045         * config/aarch64/aarch64-tune.md: Regenerate.
14046         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14047         cortex-a76.cortex-a55.
14049 2018-06-27  Jeff Law  <law@redhat.com>
14051         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14052         (MULTILIB_DIRNAMES): Similarly.
14054 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
14056         * gimple.h (gimple_return_retbnd): Delete.
14057         (gimple_return_set_retbnd): Likewise.
14058         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14059         gimple_return_set_retbnd.
14060         * gimple-pretty-print.c (dump_gimple_return): Remove call to
14061         gimple_return_retbnd and adjust.
14062         * tree-inline.h (struct copy_body_data): Remove retbnd field.
14063         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14064         Explicitly return NULL in a couple more cases.  Move assertion
14065         on debug statements and remove unreachable code.
14066         (reset_debug_binding): Do not test id->retbnd.
14067         (expand_call_inline): Do not set it.
14069 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
14071         * configure.ac: Add --disable-gcov option.
14072         * configure: Regenerate.
14073         * Makefile.in: Honour @enable_gcov@.
14074         * doc/install.texi: Document --disable-gcov.
14076 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14078         * config/arm/arm-cpus.in (cortex-a76): New entry.
14079         (cortex-a76.cortex-a55): Likewise.
14080         * config/arm/arm-tables.opt: Regenerate.
14081         * config/arm/arm-tune.md: Likewise.
14082         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14083         * doc/invoke.texi (ARM Options): Document cortex-a76 and
14084         cortex-a76.cortex-a55.
14086 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
14088         PR target/85769
14089         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14091 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
14093         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14094         comment.
14095         (EPILOGUE_USES): Likewise.
14097 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
14099         * tree-inline.c (remap_location): New function extracted from...
14100         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
14101         (copy_phis_for_bb): ...here.  Call remap_location.
14102         (copy_cfg_body): Adjust call to copy_edges_for_bb.
14104 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
14106         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14107         unaligned vsx for 16B memset.
14109 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
14111         PR target/86285
14112         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14113         ieee128_float_type_node to long_double_type_node unless
14114         TARGET_LONG_DOUBLE_128 is set.
14116 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
14118         * cfgloop.c (get_loop_location): Convert return type from
14119         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14120         by implicit construction from rtx_insn *, and using
14121         dump_user_location_t::from_function_decl for the fallback case.
14122         * cfgloop.h (get_loop_location): Convert return type from
14123         location_t to dump_user_location_t.
14124         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14125         dump_printf_loc to pass in a dump_location_t rather than a
14126         location_t, via the gimple stmt.
14127         * coverage.c (get_coverage_counts): Update calls to
14128         dump_printf_loc to pass in dump_location_t rather than a
14129         location_t.
14130         * doc/optinfo.texi (Dump types): Convert example of
14131         dump_printf_loc from taking "locus" to taking "insn".  Update
14132         description of the "_loc" calls to cover dump_location_t.
14133         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14134         "selftest.h".
14135         (dump_user_location_t::dump_user_location_t): New constructors,
14136         from gimple *stmt and rtx_insn *.
14137         (dump_user_location_t::from_function_decl): New function.
14138         (dump_loc): Make static.
14139         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14140         const dump_location_t &.
14141         (dump_generic_expr_loc): Delete.
14142         (dump_printf_loc): Convert param "loc" from location_t to
14143         const dump_location_t &.
14144         (selftest::test_impl_location): New function.
14145         (selftest::dumpfile_c_tests): New function.
14146         * dumpfile.h: Include "profile-count.h".
14147         (class dump_user_location_t): New class.
14148         (struct dump_impl_location_t): New struct.
14149         (class dump_location_t): New class.
14150         (dump_printf_loc): Convert 2nd param from source_location to
14151         const dump_location_t &.
14152         (dump_generic_expr_loc): Delete.
14153         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14154         const dump_location_t &.
14155         * gimple-fold.c (fold_gimple_assign): Update call to
14156         dump_printf_loc to pass in a dump_location_t rather than a
14157         location_t, via the gimple stmt.
14158         (gimple_fold_call): Likewise.
14159         * gimple-loop-interchange.cc
14160         (loop_cand::analyze_iloop_reduction_var): Update for change to
14161         check_reduction_path.
14162         (tree_loop_interchange::interchange): Update for change to
14163         find_loop_location.
14164         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14165         change in return-type of find_loop_location.
14166         (graphite_regenerate_ast_isl): Likewise.
14167         * graphite-optimize-isl.c (optimize_isl): Likewise.
14168         * graphite.c (graphite_transform_loops): Likewise.
14169         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14170         pass in a dump_location_t rather than a location_t, via the
14171         gimple stmt.
14172         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14173         * ipa.c (walk_polymorphic_call_targets): Likewise.
14174         * loop-unroll.c (report_unroll): Convert "locus" param from
14175         location_t to dump_location_t.
14176         (decide_unrolling): Update for change to get_loop_location's
14177         return type.
14178         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14179         location_t to dump_user_location_t.
14180         (grid_find_single_omp_among_assignments_1): Updates calls to
14181         dump_printf_loc to pass in a dump_location_t rather than a
14182         location_t, via the gimple stmt.
14183         (grid_parallel_clauses_gridifiable): Convert "tloc" from
14184         location_t to dump_location_t.  Updates calls to dump_printf_loc
14185         to pass in a dump_location_t rather than a location_t, via the
14186         gimple stmt.
14187         (grid_inner_loop_gridifiable_p): Likewise.
14188         (grid_dist_follows_simple_pattern): Likewise.
14189         (grid_gfor_follows_tiling_pattern): Likewise.
14190         (grid_target_follows_gridifiable_pattern): Likewise.
14191         (grid_attempt_target_gridification): Convert initialization
14192         of local "grid" from memset to zero-initialization; FIXME: does
14193         this require C++11?  Update call to dump_printf_loc to pass in a
14194         optinfo_location rather than a location_t, via the gimple stmt.
14195         * profile.c (read_profile_edge_counts): Updates call to
14196         dump_printf_loc to pass in a dump_location_t rather than a
14197         location_t
14198         (compute_branch_probabilities): Likewise.
14199         * selftest-run-tests.c (selftest::run_tests): Call
14200         dumpfile_c_tests.
14201         * selftest.h (dumpfile_c_tests): New decl.
14202         * tree-loop-distribution.c (pass_loop_distribution::execute):
14203         Update for change in return type of find_loop_location.
14204         * tree-parloops.c (parallelize_loops): Likewise.
14205         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14206         "locus" from location_t to dump_user_location_t.
14207         (canonicalize_loop_induction_variables): Likewise.
14208         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14209         for change in return type of find_loop_location.
14210         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14211         to dump_printf_loc to pass in a dump_location_t rather than a
14212         location_t, via the stmt.
14213         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14214         Likewise.
14215         * tree-vect-loop-manip.c (find_loop_location): Convert return
14216         type from source_location to dump_user_location_t.
14217         (vect_do_peeling): Update for above change.
14218         (vect_loop_versioning): Update for change in type of
14219         vect_location.
14220         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14221         from location_t to dump_user_location_t.
14222         (vect_estimate_min_profitable_iters): Update for change in type
14223         of vect_location.
14224         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14225         location_t to dump_location_t.
14226         (vect_slp_bb): Update for change in type of vect_location.
14227         * tree-vectorizer.c (vect_location): Convert from source_location
14228         to dump_user_location_t.
14229         (try_vectorize_loop_1): Update for change in vect_location's type.
14230         (vectorize_loops): Likewise.
14231         (increase_alignment): Likewise.
14232         * tree-vectorizer.h (vect_location): Convert from source_location
14233         to dump_user_location_t.
14234         (find_loop_location): Convert return type from source_location to
14235         dump_user_location_t.
14236         (check_reduction_path): Convert 1st param from location_t to
14237         dump_user_location_t.
14238         * value-prof.c (check_counter): Update call to dump_printf_loc to
14239         pass in a dump_user_location_t rather than a location_t; update
14240         call to error_at for change in type of "locus".
14241         (check_ic_target): Update call to dump_printf_loc to
14242         pass in a dump_user_location_t rather than a location_t, via the
14243         call_stmt.
14245 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
14247         * config/s390/s390.h (enum processor_flags): Do not use
14248         default tune parameter when -march was specified.
14250 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
14252         PR target/86314
14253         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14254         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14255         operands.
14257 2018-06-26  Richard Biener  <rguenther@suse.de>
14259         PR tree-optimization/86287
14260         PR bootstrap/86316
14261         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14262         (vect_analyze_loop): Initialize n_stmts.
14264 2018-06-26  Richard Biener  <rguenther@suse.de>
14266         PR middle-end/86271
14267         * fold-const.c (fold_convertible_p): Pointer extension
14268         isn't valid.
14270 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
14272         PR debug/86064
14273         * dwarf2out.c (loc_list_has_views): Adjust comments.
14274         (dw_loc_list): Split single cross-partition range with
14275         nonzero locview.
14277 2018-06-25  Jeff Law  <law@redhat.com>
14279         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14280         on -mbig-switch by default.
14282         * config/v850/predicates.md (const_float_1_operand): Fix match_code
14283         test.
14284         (const_float_0_operand): Remove unused predicate.
14285         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14286         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14287         (recipsf2): New expander.  Original pattern now called
14288         (recipsf2_insn).
14289         (recipdf2, recipdf2_insn): Similarly.
14290         (rsqrtsf2, rsqrtsf2_insn): Similarly
14291         (rsqrtdf2, rsqrtdf2_insn): Similarly
14293 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
14295         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14296         Simplify logic for FreeBSD (twice).
14298 2018-06-25  Martin Sebor  <msebor@redhat.com>
14300         PR tree-optimization/86204
14301         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14302         a strnlen result if it's less than the length of the string.
14304 2018-06-25  Martin Sebor  <msebor@redhat.com>
14306         PR tree-optimization/85700
14307         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14308         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14309         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14311 2018-06-25  Martin Sebor  <msebor@redhat.com>
14313         * doc/extend.texi (Zero-length arrays): Update and clarify.
14315 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
14317         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14318         added IEEE/IBM long double multilib support on PowerPC little
14319         endian Linux systems.
14320         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14321         (MULTILIB_DEFAULTS): Likewise.
14322         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14323         Likewise.
14324         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14325         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14326         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14328 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
14330         PR middle-end/86311
14331         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14332         (REORDER_45): Likewise.
14334 2018-06-25  Jeff Law  <law@redhat.com>
14336         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14337         dividend to 32 bits.  Adjust length.
14338         (udivmodhi4): Cleanup output template.  Fix length.
14340 2018-06-25  Carl Love  <cel@us.ibm.com>
14342         * config/rs6000/vsx.md: Change word selector to prefered location.
14344 2018-06-25  Richard Biener  <rguenther@suse.de>
14346         PR tree-optimization/86304
14347         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14348         epilogue-if-converted loops as well.
14350 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
14352         * lto-section-out.c (lto_begin_section): Do not print section
14353         name for noaddr and unnumbered dumps.
14355 2018-06-25  Richard Biener  <rguenther@suse.de>
14357         * tree-vectorizer.h (struct vec_info_shared): New structure
14358         with parts split out from struct vec_info and loop_nest from
14359         struct _loop_vec_info.
14360         (struct vec_info): Adjust accordingly.
14361         (struct _loop_vec_info): Likewise.
14362         (LOOP_VINFO_LOOP_NEST): Adjust.
14363         (LOOP_VINFO_DATAREFS): Likewise.
14364         (LOOP_VINFO_DDRS): Likewise.
14365         (struct _bb_vec_info): Likewise.
14366         (BB_VINFO_DATAREFS): Likewise.
14367         (BB_VINFO_DDRS): Likewise.
14368         (struct _stmt_vec_info): Add dr_aux member.
14369         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14370         (DR_MISALIGNMENT_UNINITIALIZED): New.
14371         (set_dr_misalignment): Adjust.
14372         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14373         (vect_analyze_loop): Adjust prototype.
14374         (vect_analyze_loop_form): Likewise.
14375         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14376         Compute dependences lazily.
14377         (vect_record_base_alignments): Use shared datarefs/ddrs.
14378         (vect_verify_datarefs_alignment): Likewise.
14379         (vect_analyze_data_refs_alignment): Likewise.
14380         (vect_analyze_data_ref_accesses): Likewise.
14381         (vect_analyze_data_refs): Likewise.
14382         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14383         constructor parameter for shared part.
14384         (vect_analyze_loop_form): Pass in shared part and adjust.
14385         (vect_analyze_loop_2): Pass in storage for the number of
14386         stmts.  Move loop nest finding to the caller.  Compute
14387         datarefs lazily.
14388         (vect_analyze_loop): Pass in shared part.
14389         (vect_transform_loop): Verify shared datarefs are unchanged.
14390         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14391         constructor parameter for shared part.
14392         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14393         (vect_slp_bb): Verify shared datarefs are unchanged before
14394         transform.
14395         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14396         change.
14397         (new_stmt_vec_info): Initialize DR_AUX misalignment to
14398         DR_MISALIGNMENT_UNINITIALIZED.
14399         * tree-vectorizer.c (vec_info::vec_info): Add constructor
14400         parameter for shared part.
14401         (vec_info::~vec_info): Adjust.
14402         (vec_info_shared::vec_info_shared): New.
14403         (vec_info_shared::~vec_info_shared): Likewise.
14404         (vec_info_shared::save_datarefs): Likewise.
14405         (vec_info_shared::check_datarefs): Likewise.
14406         (try_vectorize_loop_1): Construct shared part live for analyses
14407         of a single loop for multiple vector sizes.
14408         * tree-parloops.c (gather_scalar_reductions): Adjust.
14410 2018-06-25  Richard Biener  <rguenther@suse.de>
14412         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14413         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14414         (vect_analyze_data_refs): Remove similar code from here and
14415         simplify accordingly.
14417 2018-06-25  Richard Biener  <rguenther@suse.de>
14419         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14420         for reverse storage order accesses rather than asserting
14421         they cannot happen here.
14423 2018-06-25  Tom de Vries  <tdevries@suse.de>
14425         PR debug/86257
14426         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14427         Use data16 instead of .byte for insn prefix.
14429 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
14431         PR C++/86082
14432         * parser.c (make_char_string_pack): Pass this literal chars
14433         through cpp_interpret_string.
14434         (cp_parser_userdef_numeric_literal): Check the result of
14435         make_char_string_pack.
14437 2018-06-24  Maya Rashish  <coypu@sdf.org>
14439         * ginclude/stddef.h: Simplify conditions around avoiding
14440         re-definition of __size_t.
14442 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14444         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14445         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14447 2018-06-22  Maya Rashish  <coypu@sdf.org>
14449         * doc/invoke.texi (mno-fancy-math-387): Update for changes
14450         made to OpenBSD and NetBSD through the years.
14452 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14454         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14455         behavior of vec_pack (vector double, vector double) to match
14456         behavior of vec_float2 (vector double, vector double).
14458 2018-06-22  Olivier Hainque  <hainque@adacore.com>
14460         * gimplify.c (gimplify_function_tree): Prevent creation
14461         of a trampoline for the address of the current function
14462         passed to entry/exit instrumentation hooks.
14464 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
14466         PR target/86222
14467         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14468         correctly.
14470 2018-06-22  Martin Liska  <mliska@suse.cz>
14472         PR tree-optimization/86263
14473         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14474         Bail out if is_enabled is false.
14475         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14476         New declaration.
14477         (jump_table_cluster::is_enabled): New function.
14479 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14481         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14482         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14483         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14484         (lto_input_ts_binfo_tree_pointers): Likewise.
14485         * tree-streamer-out.c (streamer_write_tree_bitfields,
14486         write_ts_binfo_tree_pointers): Likewise.
14487         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14489 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14491         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14493 2018-06-22  Martin Liska  <mliska@suse.cz>
14495         * symbol-summary.h (get): Make it pure and inline move
14496         functionality from ::get function.
14497         (get): Remove and inline into ::get and ::get_create.
14498         (get_create): Move code from ::get function.
14500 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14502         PR target/85994
14503         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14504         -x assembler-with-cpp.
14506 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14508         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14509         _FILE_OFFSET_BITS=64 for C++.
14511 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
14513         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14514         conversion insn that shows up when pr85657-3.c is compiled using
14515         IEEE 128-bit long double.
14516         (neg<mode>2_internal): Use the correct mode to check whether the
14517         mode is IBM extended.
14518         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14519         multiply and divide external functions from being created more
14520         than once.
14522 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14524         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14525         functions.
14526         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
14527         the edge can be forwarded.
14528         (cfg_layout_merge_blocks): Likewise.
14530 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14532         * except.c (finish_eh_generation): Commit edge insertions only after
14533         the EH edges have been redirected from post-landing to landing pads.
14535 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14537         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14538         create_tmp_var_for to create the FRAME decl.
14539         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14541 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14543         * tree-inline.c (copy_edges_for_bb): Minor tweak.
14544         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14545         debug statement when resetting its value.
14546         (expand_call_inline): Copy the locus of the call onto the assignment
14547         of the return value, if any.  Use local variable in more cases.
14549 2018-06-21  Martin Liska  <mliska@suse.cz>
14551         * ipa-pure-const.c (propagate_nothrow): Use
14552         funct_state_summaries->get.
14553         (dump_malloc_lattice): Likewise.
14554         (propagate_malloc): Likewise.
14556 2018-06-21  Richard Biener  <rguenther@suse.de>
14558         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14559         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14560         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14561         comment.
14562         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14563         BLOCK_ABSTRACT_ORIGIN unconditionally.
14565 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
14567         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14568         deleting it.
14569         * ipa-reference.c (ipa_reference_c_finalize): Delete
14570         ipa_ref_opt_sum_summaries and set it to NULL.
14572 2018-06-21  Tom de Vries  <tdevries@suse.de>
14574         PR tree-optimization/85859
14575         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14576         test with comment from bb_no_side_effects_p.
14578 2018-06-21  Richard Biener  <rguenther@suse.de>
14580         PR tree-optimization/86232
14581         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14582         max for constant niter.
14584 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14586         * config/aarch64/aarch64-simd.md
14587         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14589 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14591         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14592         Make opernads of the unspec commutative.
14594 2018-06-21  Richard Biener  <rguenther@suse.de>
14596         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14597         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14598         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14599         (vect_analyze_data_ref_dependence): Re-order checks to deal with
14600         NULL DR_STEP.
14601         (vect_record_base_alignments): Do not record base alignment
14602         for gathers or scatters.
14603         (vect_compute_data_ref_alignment): Drop return value that is always
14604         true.  Bail out early for gathers or scatters.
14605         (vect_enhance_data_refs_alignment): Bail out early for gathers
14606         or scatters.
14607         (vect_find_same_alignment_drs): Likewise.
14608         (vect_analyze_data_refs_alignment): Remove dead code.
14609         (vect_slp_analyze_and_verify_node_alignment): Likewise.
14610         (vect_analyze_data_refs): For possible gathers or scatters do
14611         not create an alternate DR, just check their possible validity
14612         and mark them.  Adjust DECL_NONALIASED handling to not rely
14613         on DR_BASE_ADDRESS.
14614         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14615         update inits of gathers or scatters.
14616         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14617         Also copy gather/scatter flag to pattern vinfo.
14619 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14621         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14622         behavior of vec_packsu (vector unsigned long long, vector unsigned
14623         long long) to match behavior of vec_packs with same signature.
14625 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
14626             Thomas Schwinge <thomas@codesourcery.com>
14627             Cesar Philippidis  <cesar@codesourcery.com>
14629         * gimplify.c (gimplify_scan_omp_clauses): Add support for
14630         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14631         (gimplify_adjust_omp_clauses): Likewise.
14632         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14633         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14634         (gimplify_omp_target_update): Update handling of acc update and
14635         enter/exit data.
14636         * omp-low.c (install_var_field): Remove unused parameter
14637         base_pointers_restrict.
14638         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14639         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14640         FINALIZE}
14641         (omp_target_base_pointers_restrict_p): Delete.
14642         (scan_omp_target): Update call to scan_sharing_clauses.
14643         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14644         FINALIZE}.
14645         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14646         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14647         (convert_local_omp_clauses): Likewise.
14648         * tree-pretty-print.c (dump_omp_clause): Likewise.
14649         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
14650         FINALIZE}.
14651         (omp_clause_code_name): Likewise.
14653 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
14655         PR debug/86194
14656         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14657         be narrowed.
14659         PR tree-optimization/86231
14660         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
14661         anti-range don't overwrite *vr0min before using it to compute *vr0max.
14663 2018-06-20  Tom de Vries  <tdevries@suse.de>
14665         PR tree-optimization/86097
14666         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14667         iv type if signedness of iv type is not the same as that of *nit.
14669 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
14671         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
14672         EDGE_EH edges, verify they are all EDGE_EH.
14674 2018-06-20  Maya Rashish  <coypu@sdf.org>
14676         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14678 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14680         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14681         * config/aarch64/aarch64.c (xgene1_tunings): Add
14682         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14683         (aarch64_mode_valid_for_sched_fusion_p):
14684         Allow 16-byte modes.
14685         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14686         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14687         128-bit modes.
14688         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14689         New pattern.
14690         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14691         * config/aarch64/iterators.md (VQ2): New mode iterator.
14693 2018-06-20  Martin Liska  <mliska@suse.cz>
14695         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14696         Change default ratio from 10 to 8.
14698 2018-06-20  Martin Liska  <mliska@suse.cz>
14700         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14701         New.
14702         (bit_test_cluster::find_bit_tests): Likewise.
14703         (switch_decision_tree::analyze_switch_statement): Find clusters.
14704         * tree-switch-conversion.h (struct jump_table_cluster): Document
14705         hierarchy.
14707 2018-06-20  Martin Liska  <mliska@suse.cz>
14709         * tree-switch-conversion.c (switch_conversion::collect):
14710         Record m_uniq property.
14711         (switch_conversion::expand): Bail out for special conditions.
14712         (group_cluster::~group_cluster): New.
14713         (group_cluster::group_cluster): Likewise.
14714         (group_cluster::dump): Likewise.
14715         (jump_table_cluster::emit): New.
14716         (switch_decision_tree::fix_phi_operands_for_edges): New.
14717         (struct case_node): Remove struct.
14718         (jump_table_cluster::can_be_handled): New.
14719         (case_values_threshold): Moved to header.
14720         (reset_out_edges_aux): Likewise.
14721         (jump_table_cluster::is_beneficial): New.
14722         (bit_test_cluster::can_be_handled): Likewise.
14723         (add_case_node): Remove.
14724         (bit_test_cluster::is_beneficial): New.
14725         (case_bit_test::cmp): New.
14726         (bit_test_cluster::emit): New.
14727         (expand_switch_as_decision_tree_p): Remove.
14728         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14729         (fix_phi_operands_for_edge): Likewise.
14730         (switch_decision_tree::analyze_switch_statement): New.
14731         (compute_cases_per_edge): Move ...
14732         (switch_decision_tree::compute_cases_per_edge): ... here.
14733         (try_switch_expansion): Likewise.
14734         (switch_decision_tree::try_switch_expansion): Likewise.
14735         (record_phi_operand_mapping): Likewise.
14736         (switch_decision_tree::record_phi_operand_mapping): Likewise.
14737         (emit_case_decision_tree): Likewise.
14738         (switch_decision_tree::emit): Likewise.
14739         (balance_case_nodes): Likewise.
14740         (switch_decision_tree::balance_case_nodes): Likewise.
14741         (dump_case_nodes): Likewise.
14742         (switch_decision_tree::dump_case_nodes): Likewise.
14743         (emit_jump): Likewise.
14744         (switch_decision_tree::emit_jump): Likewise.
14745         (emit_cmp_and_jump_insns): Likewise.
14746         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14747         (emit_case_nodes): Likewise.
14748         (switch_decision_tree::emit_case_nodes): Likewise.
14749         (conditional_probability): Remove.
14750         * tree-switch-conversion.h (enum cluster_type): New.
14751         (PRINT_CASE): New.
14752         (struct cluster): Likewise.
14753         (cluster::cluster): Likewise.
14754         (struct simple_cluster): Likewise.
14755         (simple_cluster::simple_cluster): Likewise.
14756         (struct group_cluster): Likewise.
14757         (struct jump_table_cluster): Likewise.
14758         (struct bit_test_cluster): Likewise.
14759         (struct min_cluster_item): Likewise.
14760         (struct case_tree_node): Likewise.
14761         (case_tree_node::case_tree_node): Likewise.
14762         (jump_table_cluster::case_values_threshold): Likewise.
14763         (struct case_bit_test): Likewise.
14764         (struct switch_decision_tree): Likewise.
14765         (struct switch_conversion): Likewise.
14766         (switch_decision_tree::reset_out_edges_aux): Likewise.
14768 2018-06-20  Martin Liska  <mliska@suse.cz>
14770         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14771         (hoist_edge_and_branch_if_true): Likewise.
14772         (expand_switch_using_bit_tests_p): Likewise.
14773         (struct case_bit_test): Likewise.
14774         (case_bit_test_cmp): Likewise.
14775         (emit_case_bit_tests): Likewise.
14776         (switch_conversion::switch_conversion): New class.
14777         (struct switch_conv_info): Remove old struct.
14778         (collect_switch_conv_info): More to ...
14779         (switch_conversion::collect): ... this.
14780         (check_range): Likewise.
14781         (switch_conversion::check_range): Likewise.
14782         (check_all_empty_except_final): Likewise.
14783         (switch_conversion::check_all_empty_except_final): Likewise.
14784         (check_final_bb): Likewise.
14785         (switch_conversion::check_final_bb): Likewise.
14786         (create_temp_arrays): Likewise.
14787         (switch_conversion::create_temp_arrays): Likewise.
14788         (free_temp_arrays): Likewise.
14789         (gather_default_values): Likewise.
14790         (switch_conversion::gather_default_values): Likewise.
14791         (build_constructors): Likewise.
14792         (switch_conversion::build_constructors): Likewise.
14793         (constructor_contains_same_values_p): Likewise.
14794         (switch_conversion::contains_same_values_p): Likewise.
14795         (array_value_type): Likewise.
14796         (switch_conversion::array_value_type): Likewise.
14797         (build_one_array): Likewise.
14798         (switch_conversion::build_one_array): Likewise.
14799         (build_arrays): Likewise.
14800         (switch_conversion::build_arrays): Likewise.
14801         (gen_def_assigns): Likewise.
14802         (switch_conversion::gen_def_assigns): Likewise.
14803         (prune_bbs): Likewise.
14804         (switch_conversion::prune_bbs): Likewise.
14805         (fix_phi_nodes): Likewise.
14806         (switch_conversion::fix_phi_nodes): Likewise.
14807         (gen_inbound_check): Likewise.
14808         (switch_conversion::gen_inbound_check): Likewise.
14809         (process_switch): Use the newly created class.
14810         (switch_conversion::expand): New.
14811         (switch_conversion::~switch_conversion): New.
14812         * tree-switch-conversion.h: New file.
14814 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14816         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14817         tree-vect-patterns.c.
14818         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14819         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
14820         (vect_recog_sad_pattern): Likewise.
14821         (vect_recog_widen_sum_pattern): Likewise.
14822         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
14823         (vect_recog_widen_shift_pattern): Remove the type_in argument.
14824         (vect_recog_rotate_pattern): Likewise.
14825         (vect_recog_mult_pattern): Likewise.
14826         (vect_recog_vector_vector_shift_pattern): Likewise.
14827         (vect_recog_divmod_pattern): Likewise.
14828         (vect_recog_mixed_size_cond_pattern): Likewise.
14829         (vect_recog_bool_pattern): Likewise.
14830         (vect_recog_mask_conversion_pattern): Likewise.
14831         (vect_try_gather_scatter_pattern): Likewise.
14832         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
14833         (vect_recog_over_widening_pattern): Likewise.
14834         (vect_recog_gather_scatter_pattern): Likewise.
14835         (vect_recog_func_ptr): Move from tree-vectorizer.h
14836         (vect_vect_recog_func_ptrs): Move further down the file.
14837         (vect_recog_func): Likewise.  Remove the third argument.
14838         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14839         (vect_pattern_recog_1): Expect the pattern function to do any
14840         necessary target tests.  Also expect it to provide a vector type.
14841         Remove the type_in handling.
14843 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14845         * tree-vect-patterns.c (vect_pattern_detected): New function.
14846         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14847         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14848         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14849         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14850         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14851         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14852         (vect_recog_mask_conversion_pattern)
14853         (vect_try_gather_scatter_pattern): Likewise.
14855 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14857         * tree-vect-patterns.c (vect_get_internal_def): New function.
14858         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14859         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14860         (search_type_for_mask_1): Use it.
14862 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14864         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14865         redundant WIDEN_SUM_EXPR handling.
14866         (vect_recog_sad_pattern): Likewise.
14868 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14870         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14871         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14872         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14873         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14874         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14876 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14878         * tree-vect-stmts.c (vectorizable_call): Make sure that we
14879         use the stmt_vec_info of the original bb statement for the
14880         new zero assignment, even if the call is part of a pattern.
14882 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14884         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14885         that the sequence is attached to the original statement rather
14886         than the pattern statement.
14887         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14888         PATTERN_DEF_SEQ from the original statement rather than
14889         the main pattern statement.
14890         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14891         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14892         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14894 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14896         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14897         definition statements before the early exit for statements that aren't
14898         live or relevant.
14899         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14900         split out from...
14901         (vect_transform_loop): ...here.  Process pattern definition
14902         statements without first checking whether the main pattern
14903         statement is live or relevant.
14905 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
14907         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14908         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14910 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
14912         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14913         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14914         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14915         (expand_block_compare): Change select_block_compare_mode call.
14916         (expand_strncmp_align_check): Use new functions, fix comment.
14917         (emit_final_str_compare_gpr): New function.
14918         (expand_strn_compare): Refactor and clean up code.
14919         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14921 2018-06-19  Tony Reix  <tony.reix@atos.com>
14922             Damien Bergamini  <damien.bergamini@atos.com>
14923             David Edelsohn  <dje.gcc@gmail.com>
14925         * collect2.c (static_obj): New variable.
14926         (static_libs): New variable.
14927         (is_in_list): Uncomment declaration.
14928         (main): Track AIX libraries linked statically.
14929         (is_in_list): Uncomment definition.
14930         (scan_prog_file): Don't add AIX shared libraries initializer
14931         to constructor list if linking statically.
14933 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
14935         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14936         constant.
14937         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14939 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
14941         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14942         blocks.
14944 2018-06-19  Martin Liska  <mliska@suse.cz>
14946         * config/i386/i386.c (ix86_can_inline_p): Do not use
14947         ipa_fn_summaries::get_create.
14948         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14949         get.
14950         (devirtualization_time_bonus): Likewise.
14951         (ipcp_propagate_stage): Likewise.
14952         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14953         (edge_set_predicate): Likewise.
14954         (evaluate_conditions_for_known_args): Likewise.
14955         (evaluate_properties_for_edge): Likewise.
14956         (ipa_call_summary::reset): Tranform to ...
14957         (ipa_call_summary::~ipa_call_summary): ... this.
14958         (ipa_fn_summary::reset): Transform to ...
14959         (ipa_fn_summary::~ipa_fn_summary): ... this.
14960         (ipa_fn_summary_t::remove): Rename to ...
14961         (ipa_fn_summary_t::remove_callees): ... this.
14962         (ipa_fn_summary_t::duplicate): Use placement new
14963         instead of memory copy.
14964         (ipa_call_summary_t::duplicate): Likewise.
14965         (ipa_call_summary_t::remove): Remove.
14966         (dump_ipa_call_summary): Change get_create to get.
14967         (ipa_dump_fn_summary): Dump only when summary exists.
14968         (analyze_function_body): Use symbol_summary::get instead
14969         of get_create.
14970         (compute_fn_summary): Likewise.
14971         (estimate_edge_devirt_benefit): Likewise.
14972         (estimate_edge_size_and_time): Likewise.
14973         (inline_update_callee_summaries): Likewise.
14974         (remap_edge_change_prob): Likewise.
14975         (remap_edge_summaries): Likewise.
14976         (ipa_merge_fn_summary_after_inlining): Likewise.
14977         (write_ipa_call_summary): Likewise.
14978         (ipa_fn_summary_write): Likewise.
14979         (ipa_free_fn_summary): Likewise.
14980         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
14981         (struct ipa_call_summary): Likewise.
14982         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
14983         of get_create.
14984         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
14985         (estimate_size_after_inlining): Likewise.
14986         (estimate_growth): Likewise.
14987         (growth_likely_positive): Likewise.
14988         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14989         (inline_call): Likewise.
14990         * ipa-inline.c (caller_growth_limits): Likewise.
14991         (can_inline_edge_p): Likewise.
14992         (can_inline_edge_by_limits_p): Likewise.
14993         (compute_uninlined_call_time): Likewise.
14994         (compute_inlined_call_time): Likewise.
14995         (want_inline_small_function_p): Likewise.
14996         (edge_badness): Likewise.
14997         (update_caller_keys): Likewise.
14998         (update_callee_keys): Likewise.
14999         (inline_small_functions): Likewise.
15000         (inline_to_all_callers_1): Likewise.
15001         (dump_overall_stats): Likewise.
15002         (early_inline_small_functions): Likewise.
15003         (early_inliner): Likewise.
15004         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15005         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15006         * ipa-pure-const.c (malloc_candidate_p): Likewise.
15007         * ipa-split.c (execute_split_functions): Likewise.
15008         * symbol-summary.h: Likewise.
15009         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15011 2018-06-19  Richard Biener  <rguenther@suse.de>
15013         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15014         (vectorize_loops): ... here.  Fix dbgcnt handling.
15015         (try_vectorize_loop): Wrap try_vectorize_loop_1.
15017 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
15019         PR target/86197
15020         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15021         ieee128 argument takes up only one (vector) register, not two (floating
15022         point) registers.
15024 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
15026         * gimplify.c (gimplify_init_constructor): Really never clear for an
15027         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15029 2018-06-19  Richard Biener  <rguenther@suse.de>
15031         PR tree-optimization/86179
15032         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15033         after failed recognition.
15035 2018-06-18  Martin Sebor  <msebor@redhat.com>
15037         PR middle-end/85602
15038         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15039         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15040         Handle integer subtraction.
15041         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15042         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15044 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15046         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15047         param from rtx to rtx_insn *.
15048         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15049         param.
15050         (frv_ifcvt_modify_insn): Likwise.
15051         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15052         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
15053         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15054         as_a <rtx_insn *> cast to local "unprotected_region" once
15055         it's been established that it's not NULL or pc_rtx.
15056         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15057         param "sethi" from rtx to rtx_insn *.
15058         (nds32_group_float_insns): Likewise for param "insn".
15059         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15060         param.
15061         (vax_output_int_subtract): Likewise.
15062         * config/vax/vax.c (vax_output_int_add): Likewise for param
15063         "insn".
15064         (vax_output_int_subtract): Likewise.
15065         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15066         (emit_pattern_after): Likewise for param "after".
15067         (emit_insn_after): Likewise.
15068         (emit_jump_insn_after): Likewise.
15069         (emit_call_insn_after): Likewise.
15070         (emit_debug_insn_after): Likewise.
15071         (emit_pattern_before): Likewise for param "before".
15072         (emit_insn_before): Likewise.
15073         (emit_jump_insn_before): Likewise.
15074         * final.c (get_insn_template): Likewise for param "insn", removing
15075         a cast.
15076         * output.h (get_insn_template): Likewise for 2nd param.
15077         * rtl.h (emit_insn_before): Likewise.
15078         (emit_jump_insn_before): Likewise.
15079         (emit_debug_insn_before_noloc): Likewise.
15080         (emit_insn_after): Likewise.
15081         (emit_jump_insn_after): Likewise.
15082         (emit_call_insn_after): Likewise.
15083         (emit_debug_insn_after): Likewise.
15084         (set_insn_deleted): Likewise for param.
15086 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
15088         PR target/85358
15089         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15090         floating point modes, so that IFmode is numerically greater than
15091         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15092         to declare the ordering.  This prevents IFmode from being
15093         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15094         machine.  Include rs6000-modes.h to share the fractional values
15095         between genmodes* and the rest of the compiler.
15096         (IFmode): Likewise.
15097         (KFmode): Likewise.
15098         (TFmode): Likewise.
15099         * config/rs6000/rs6000-modes.h: New file.
15100         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15101         meaning of rs6000_long_double_size so that 126..128 selects an
15102         appropriate 128-bit floating point type.
15103         (rs6000_option_override_internal): Likewise.
15104         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15105         (TARGET_LONG_DOUBLE_128): Change the meaning of
15106         rs6000_long_double_size so that 126..128 selects an appropriate
15107         128-bit floating point type.
15108         (LONG_DOUBLE_TYPE_SIZE): Update comment.
15109         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15110         source and destination to match the standard usage.
15111         (truncifkf2): Likewise.
15112         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15113         ISA 2.07 to use an explicit clobber, instead of passing in a
15114         temporary.
15115         (copysign<mode>3_soft): Likewise.
15117 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15119         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15120         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15121         (vect_slp_analyze_instance_dependence): Likewise.
15122         (vect_enhance_data_refs_alignment): Likewise.
15123         (vect_analyze_data_refs_alignment): Likewise.
15124         (vect_slp_analyze_and_verify_instance_alignment
15125         (vect_analyze_data_ref_accesses): Likewise.
15126         (vect_prune_runtime_alias_test_list): Likewise.
15127         (vect_analyze_data_refs): Likewise.
15128         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15129         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15130         (vect_analyze_scalar_cycles_1): Likewise.
15131         (vect_get_loop_niters): Likewise.
15132         (vect_analyze_loop_form_1): Likewise.
15133         (vect_update_vf_for_slp): Likewise.
15134         (vect_analyze_loop_operations): Likewise.
15135         (vect_analyze_loop): Likewise.
15136         (vectorizable_induction): Likewise.
15137         (vect_transform_loop): Likewise.
15138         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15139         * tree-vect-slp.c (vect_analyze_slp): Likewise.
15140         (vect_make_slp_decision): Likewise.
15141         (vect_detect_hybrid_slp): Likewise.
15142         (vect_slp_analyze_operations): Likewise.
15143         (vect_slp_bb): Likewise.
15144         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15145         (vectorizable_bswap): Likewise.
15146         (vectorizable_call): Likewise.
15147         (vectorizable_simd_clone_call): Likewise.
15148         (vectorizable_conversion): Likewise.
15149         (vectorizable_assignment): Likewise.
15150         (vectorizable_shift): Likewise.
15151         (vectorizable_operation): Likewise.
15152         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15154 2018-06-18  Martin Sebor  <msebor@redhat.com>
15156         PR tree-optimization/81384
15157         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15158         * builtins.c (expand_builtin_strnlen): New function.
15159         (expand_builtin): Call it.
15160         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15161         * builtins.def (BUILT_IN_STRNLEN): New.
15162         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15163         Warn for bounds in excess of maximum object size.
15164         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15165         single-value ranges.  Handle strnlen.
15166         (handle_builtin_strlen): Handle strnlen.
15167         (strlen_check_and_optimize_stmt): Same.
15168         * doc/extend.texi (Other Builtins): Document strnlen.
15170 2018-06-18  Maya Rashish  <coypu@sdf.org>
15172         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15173         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15174         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15176         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15177         here to ...
15178         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15180 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15182         * tree.c (escaped_string::escape): Replace cast to char * by
15183         const_cast<char *> (unescaped).
15185 2018-06-18  Nick Clifton  <nickc@redhat.com>
15187         PR 84195
15188         * tree.c (escaped_string): New class.  Converts an unescaped
15189         string into its escaped equivalent.
15190         (warn_deprecated_use): Use the new class to convert the
15191         deprecation message, if present.
15192         (test_escaped_strings): New self test.
15193         (test_c_tests): Add test_escaped_strings.
15194         * doc/extend.texi (deprecated): Add a note that the
15195         deprecation message is affected by the -fmessage-length
15196         option, and that control characters will be escaped.
15197         (#pragma GCC error): Document this pragma.
15198         (#pragma GCC warning): Likewise.
15199         * doc/invoke.texi (-fmessage-length): Document this option's
15200         effect on the #warning and #error preprocessor directives and
15201         the deprecated attribute.
15203 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15205         * tree.c (decl_value_expr_lookup): Revert latest change.
15206         (decl_value_expr_insert): Likewise.
15208 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
15210         * gimplify.c (nonlocal_vlas): Delete.
15211         (nonlocal_vla_vars): Likewise.
15212         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15213         referenced VLAs.
15214         (gimplify_body): Do not create and destroy nonlocal_vlas.
15215         * tree-nested.c: Include diagnostic.h.
15216         (use_pointer_in_frame): Tweak.
15217         (lookup_field_for_decl): Add assertion and declare the transformation.
15218         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15219         internal error when the reference is in a wrong context.  Do not
15220         create a debug decl by default.
15221         (note_nonlocal_block_vlas): Delete.
15222         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15223         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
15224         create a debug decl by default.
15225         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15226         call is in a wrong context.
15227         (fixup_vla_decls): New function.
15228         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
15229         debug variables were created.
15230         * tree.c (decl_value_expr_lookup): Add checking assertion.
15231         (decl_value_expr_insert): Likewise.
15233 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15235         PR middle-end/82479
15236         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15237         * tree-scalar-evolution.c (interpret_expr): Likewise.
15238         (expression_expensive_p): Likewise.
15239         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15240         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15241         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15242         (ssa_defined_by_minus_one_stmt_p): New.
15244 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15246         PR middle-end/64946
15247         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15248         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15249         * dojump.c (do_jump): Likewise.
15250         * expr.c (expand_expr_real_2): Check operand type's sign.
15251         * fold-const.c (const_unop): Handle ABSU_EXPR.
15252         (fold_abs_const): Likewise.
15253         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15254         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15255         (strip_sign_op_1): Likesise.
15256         * match.pd: Add new pattern to generate ABSU_EXPR.
15257         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15258         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15259         * tree-eh.c (operation_could_trap_helper_p): Likewise.
15260         * tree-inline.c (estimate_operator_cost): Likewise.
15261         * tree-pretty-print.c (dump_generic_node): Likewise.
15262         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15263         * tree.def (ABSU_EXPR): New.
15265 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
15267         PR middle-end/86095
15268         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15269         documented as preserved for backward compatibility only.
15270         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15272         PR rtl-optimization/86108
15273         * bb-reorder.c (create_forwarder_block): Renamed to ...
15274         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
15275         jump from new landing pad to the second part.
15276         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15277         Adjust callers.
15279 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
15281         PR middle-end/85878
15282         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15283         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15284         Only call store_expr for halves if the mode is the same.
15286         PR middle-end/86123
15287         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15288         Fix up comment formatting.
15290 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15292         * typed-splay-tree.h (typed_splay_tree::remove): New function.
15293         (typed_splay_tree::closure,
15294         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15295         (typed_splay_tree::typed_splay_tree,
15296         typed_splay_tree::operator =): Declared private.
15297         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15298         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15299         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15300         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15301         typed_splay_tree::splay_tree_splay,
15302         typed_splay_tree::splay_tree_foreach_helper,
15303         typed_splay_tree::splay_tree_insert,
15304         typed_splay_tree::splay_tree_remove,
15305         typed_splay_tree::splay_tree_lookup,
15306         typed_splay_tree::splay_tree_predecessor,
15307         typed_splay_tree::splay_tree_successor,
15308         typed_splay_tree::splay_tree_min,
15309         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15310         (typed_splay_tree::root, typed_splay_tree::comp,
15311         typed_splay_tree::delete_key,
15312         typed_splay_tree::delete_value): New data members.
15313         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15314         typed_splay_tree::remove.
15316 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
15318         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15319         -mginv and -mno-ginv to the assembler.
15320         * config/mips/mips.opt (-mcrc): New option.
15321         (-mginv): Likewise.
15322         * doc/invoke.text (-mcrc): Document.
15323         (-mginv): Likewise.
15325 2018-06-15  Nick Clifton  <nickc@redhat.com>
15327         PR 84195
15328         * tree.c (escaped_string): New class.  Converts an unescaped
15329         string into its escaped equivalent.
15330         (warn_deprecated_use): Use the new class to convert the
15331         deprecation message, if present.
15332         (test_escaped_strings): New self test.
15333         (test_c_tests): Add test_escaped_strings.
15334         * doc/extend.texi (deprecated): Add a note that the
15335         deprecation message is affected by the -fmessage-length
15336         option, and that control characters will be escaped.
15337         (#pragma GCC error): Document this pragma.
15338         (#pragma GCC warning): Likewise.
15339         * doc/invoke.texi (-fmessage-length): Document this option's
15340         effect on the #warning and #error preprocessor directives and
15341         the deprecated attribute.
15343 2018-06-15  Richard Biener  <rguenther@suse.de>
15345         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15346         here, also noting vector size used.
15347         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
15348         size used in MSG_OPTIMIZED_LOCATIONS dump.
15349         (pass_slp_vectorize::execute): Adjust.
15351 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
15353         PR target/85968
15354         * config/arc/arc.c (arc_return_address_register): Fix
15355         if-condition.
15357 2018-06-15  Richard Biener  <rguenther@suse.de>
15359         PR middle-end/86159
15360         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15361         leave useless conversion stripping to force_gimple_operand_gsi.
15362         (gimplify_build2): Likewise.
15363         (gimplify_build1): Likewise.
15365 2018-06-15  Richard Biener  <rguenther@suse.de>
15367         PR middle-end/86076
15368         * tree-cfg.c (move_stmt_op): unshare invariant addresses
15369         before adjusting their block.
15371 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15373         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15374         multilibs for *-*-rtems*.
15375         * config/riscv/t-rtems: New file.
15377 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
15379         PR middle-end/86122
15380         * match.pd ((A +- CST1) +- CST2): Punt if last resort
15381         unsigned_type_for returns NULL.
15383         PR target/85945
15384         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15385         subregs of multi-word pseudos unless the float mode has word size.
15387 2018-06-14  Richard Biener  <rguenther@suse.de>
15389         PR middle-end/86139
15390         * tree-vect-generic.c (build_word_mode_vector_type): Remove
15391         duplicate and harmful type_hash_canon.
15392         * tree.c (type_hash_canon): Assert we didn't find ourselves.
15394 2018-06-14  Richard Biener  <rguenther@suse.de>
15396         PR ipa/86124
15397         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15398         NULL cgraph_node.
15400 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15402         * config/rtems.h (STDINT_LONG32): Define.
15404 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
15405             Prachi Godbole  <prachi.godbole@imgtec.com>
15407         * config/mips/mips-cpus.def: Define P6600.
15408         * config/mips/mips-tables.opt: Regenerate.
15409         * config/mips/mips.c (mips_ucbranch_type): New enum.
15410         (mips_rtx_cost_data): Add support for P6600.
15411         (mips_issue_rate): Likewise.
15412         (mips_multipass_dfa_lookahead): Likewise.
15413         (mips_avoid_hazard): Likewise.
15414         (mips_reorg_process_insns): Likewise.
15415         (mips_classify_branch_p6600): New function.
15416         * config/mips/mips.h (TUNE_P6600): New define.
15417         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15418         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15419         * config/mips/mips.md: Include p6600.md.
15420         (processor): Add p6600.
15421         * config/mips/p6600.md: New file.
15422         * doc/invoke.texi: Add p6600 to supported architectures.
15424 2018-06-13  Martin Sebor  <msebor@redhat.com>
15426         PR tree-optimization/86114
15427         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15428         of integer types.
15429         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15431 2018-06-13  Richard Biener  <rguenther@suse.de>
15433         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15434         Properly set vector type of the intermediate stmt.
15435         * tree-vect-stmts.c (vectorizable_operation): The destination
15436         var always has vectype_out type.
15438 2018-06-13  Jeff Law  <law@redhat.com>
15440         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15441         integer 0 for argument to print_rtl_with_bb.
15442         (rl78_reorg): Likewise.
15444 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
15446         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15447         from rtx to rtx_insn *.
15448         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15449         "label".
15450         (add_sched_insns_for_speculation): Likewise for local "target",
15451         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15452         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15453         from rtx_insn ** to rtx_code_label **.
15454         (reorg_emit_nops): Likewise.
15455         (c6x_reorg): Likewise for local "call_labels".
15456         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15457         rtx to rtx_insn *.
15458         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15459         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15460         the loops over LABEL_REFS.
15461         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15462         braf_label.
15463         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15464         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15465         (split_branches): Strengthen local "olabel" from rtx to
15466         rtx_insn *, adding a safe_as_a cast.
15467         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15468         to "rtx_insn *".
15469         (add_insn_after): Likewise for first two params.
15470         (add_insn_before): Likewise.
15471         (remove_insn): Likewise for param.
15472         (emit_pattern_before_noloc): Likewise for second and third params.
15473         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15474         (emit_call_insn_before_noloc): Likewise.
15475         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15476         to "rtx_insn *".
15477         (emit_barrier_before): Likewise.
15478         (emit_label_before): Strengthen "label" param from "rtx" to
15479         "rtx_code_label *".  Strengthen "before" param from "rtx" to
15480         "rtx_insn *".
15481         (emit_insn_after_1): Strengthen "after" param from "rtx" to
15482         "rtx_insn *".
15483         (emit_pattern_after_noloc): Likewise.
15484         (emit_insn_after_noloc): Likewise.
15485         (emit_jump_insn_after_noloc): Likewise.
15486         (emit_call_insn_after_noloc): Likewise.
15487         (emit_debug_insn_after_noloc): Likewise.
15488         (emit_barrier_after): Likewise.
15489         (emit_label_after): Likewise for both params.
15490         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
15491         "loc" param from "int" to "location_t".
15492         (emit_insn_after_setloc): Likewise.
15493         (emit_jump_insn_after_setloc): Likewise.
15494         (emit_call_insn_after_setloc): Likewise.
15495         (emit_debug_insn_after_setloc): Likewise.
15496         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
15497         "loc" param from "int" to "location_t".
15498         (emit_pattern_before): Convert NULL_RTX to NULL.
15499         (emit_insn_before_setloc): Convert "loc" param from "int" to
15500         "location_t".
15501         (emit_jump_insn_before_setloc): Likewise.
15502         (emit_call_insn_before_setloc): Likewise.
15503         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15504         rtx_insn *.  Convert "loc" param from "int" to "location_t".
15505         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15506         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15507         Convert 3rd param from "int" to "location_t".
15508         (emit_barrier_before, emit_barrier_after, next_real_insn):
15509         Strengthen param from rtx to rtx_insn *.
15510         (emit_label_before): Strengthen 1st param from "rtx" to
15511         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
15512         "rtx_insn *".
15513         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15514         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15515         Strengthen 2nd param from "rtx" to "rtx_insn *".
15516         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15517         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15518         Likewise. Convert 3rd param from "int" to "location_t".
15519         (emit_label_after): Strengthen 1st param from "rtx" to
15520         "rtx_code_label *".
15521         (next_real_insn, remove_insn): Strengthen param from "rtx" to
15522         "rtx_insn *".
15523         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15524         from "rtx" to "rtx_insn *".
15526 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
15528         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15529         bodies streamed in with -Q.
15530         * dumpfile.c (dump_files): Add lto-stream-out dump file.
15531         * dumpfile.h (tree_dump_index): Add lto_stream_out.
15532         * gimple-streamer-out.c: Include gimple-pretty-print.h
15533         (output_bb): Dump stmts streamed.
15534         * lto-section-out.c: Include print-tree.h
15535         (lto_begin_section): Dump sections created.
15536         (lto_output_decl_index): Dump decl encoded.
15537         * lto-streamer-out.c: Include print-tree.h
15538         (create_output_block): Dump output block created.
15539         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15540         (output_function): Dump function output.
15541         (output_constructor): Dump constructor streamed.
15542         (write_global_stream): Output indexes encoded.
15543         (produce_asm_for_decls): Dump streams encoded.
15544         * lto-streamer.c (streamer_dump_file): New global var.
15545         * lto-streamer.h (streamer_dump_file): Declare.
15546         * passes.c (ipa_write_summaries): Initialize streamer dump.
15547         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15548         in.
15550 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
15552         PR target/86048
15553         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15554         offsets for register save directives.  Emit a second batch of save
15555         directives, if need be, when the function accesses prior frames.
15557 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15559         * config/arc/fpu.md (fmasf4): Force operand to register.
15560         (fnmasf4): Likewise.
15562 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15564         * config/arc/arc-protos.h (arc_pad_return): Remove.
15565         * config/arc/arc.c (machine_function): Remove force_short_suffix
15566         and size_reason.
15567         (arc_print_operand): Adjust printing of '&'.
15568         (arc_verify_short): Remove conditional printing of short suffix.
15569         (arc_final_prescan_insn): Remove reference to size_reason.
15570         (pad_return): New function.
15571         (arc_reorg): Call pad_return.
15572         (arc_pad_return): Remove.
15573         (arc_init_machine_status): Remove reference to force_short_suffix.
15574         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15575         (attr length): When attribute iscompact is true force to 2
15576         regardless; in the case of maybe check if we want to force the
15577         instruction to have 4 bytes length.
15578         (nopv): Change it to generate 4 byte long nop as well.
15579         (blockage): New pattern.
15580         (simple_return): Remove call to arc_pad_return.
15581         (p_return_i): Likewise.
15583 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15585         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15587 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15589         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15590         ARC cores.
15592 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15594         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15595         for ARC700 and ARCv2.
15597 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
15599         PR target/86076
15600         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15601         operands[2] instead of operands[1].
15604 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15606         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15607         case, check whether the outer register overlaps an unallocatable
15608         register, not just whether it fits the required class.
15610 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15612         * poly-int.h (can_div_trunc_p): Add new overload in which all values
15613         are poly_ints.
15614         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15615         (memrefs_conflict_p): Likewise.
15616         (init_alias_analysis): Likewise.
15617         * cfgexpand.c (expand_debug_expr): Likewise.
15618         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15619         * cse.c (fold_rtx): Likewise.
15620         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15621         * expr.c (emit_block_move_hints): Likewise.
15622         (clear_storage_hints, push_block, emit_push_insn): Likewise.
15623         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15624         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15625         (emit_group_store): Likewise.
15626         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
15627         to read the PRE/POST_MODIFY increment.
15628         * calls.c (store_one_arg): Use strip_offset.
15629         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15630         poly_int_rtx_p.
15631         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15632         by a VEC_SELECT.
15633         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15634         (simplify_binary_operation_1): Extend CONST_INT handling to
15635         poly_int_rtx_p.
15636         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15637         than a HOST_WIDE_INT.
15638         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15639         poly_int64.
15640         (adjust_mems, add_stores): Update accodingly.
15641         (vt_canonicalize_addr): Track polynomial offsets.
15642         (emit_note_insn_var_location): Likewise.
15643         (vt_add_function_parameter): Likewise.
15644         (vt_initialize): Likewise.
15646 2018-06-12  Jeff Law  <law@redhat.com>
15648         * config.gcc (alpha*-*-freebsd*): Remove.
15649         * config/alpha/freebsd.h: Remove.
15651 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
15653         PR other/69968
15654         * spellcheck-tree.c (levenshtein_distance): Rename to...
15655         (get_edit_distance): ...this, and update for underlying renaming.
15656         * spellcheck-tree.h (levenshtein_distance): Rename to...
15657         (get_edit_distance): ...this.
15658         * spellcheck.c (levenshtein_distance): Rename to...
15659         (get_edit_distance): ...this.  Convert from Levenshtein distance
15660         to Damerau-Levenshtein distance by supporting transpositions of
15661         adjacent characters.  Rename "v1" to "v_next" and "v0" to
15662         "v_one_ago".
15663         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15664         (selftest::test_edit_distance_unit_test_oneway): ...this, and
15665         update for underlying renaming.
15666         (selftest::levenshtein_distance_unit_test): Rename to...
15667         (selftest::test_get_edit_distance_unit): ...this, and update for
15668         underlying renaming.
15669         (selftest::test_find_closest_string): Add example from PR 69968
15670         where transposition helps
15671         (selftest::test_metric_conditions): Update for renaming.
15672         (selftest::test_metric_conditions): Likewise.
15673         (selftest::spellcheck_c_tests): Likewise.
15674         * spellcheck.h (levenshtein_distance): Rename both overloads to...
15675         (get_edit_distance): ...this.
15676         (best_match::consider): Update for renaming.
15678 2018-06-12  Martin Sebor  <msebor@redhat.com>
15680         PR tree-optimization/85259
15681         * builtins.c (compute_objsize): Handle constant offsets.
15682         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15683         true iff a warning has been issued.
15684         * gimple.h (gimple_nonartificial_location): New function.
15685         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15686         gimple_nonartificial_location and handle -Wno-system-headers.
15687         (handle_builtin_stxncpy): Same.
15689 2018-06-12  Martin Sebor  <msebor@redhat.com>
15691         PR c/85931
15692         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15694 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
15696         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15697         BUILTIN_VEC_XST entries for pointer to double and long long.
15699 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
15701         PR target/85990
15702         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15703         Update comments.
15704         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15705         Likewise.
15707 2018-06-12  Martin Liska  <mliska@suse.cz>
15709         * doc/options.texi: Document IntegerRange.
15711 2018-06-12  Martin Liska  <mliska@suse.cz>
15713         * config/i386/i386.opt: Make MPX-related options as Deprecated.
15714         * opt-functions.awk: Handle Deprecated flag.
15715         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15716         and report error.
15717         (read_cmdline_option): Report warning for a deprecated option.
15718         * opts.h (struct cl_option): Add new field cl_deprecated.
15719         (CL_ERR_DEPRECATED): New.
15721 2018-06-12  Martin Liska  <mliska@suse.cz>
15723         * doc/options.texi: Document Deprecated option flag.
15725 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15727         * config/arc/arc-arch.h (arc_extras): New enum.
15728         (arc_cpu_t):Add field extra.
15729         (arc_cpu_types): Consider the extras.
15730         * config/arc/arc-cpus.def: Add extras info.
15731         * config/arc/arc-opts.h (processor_type): Consider extra field.
15732         * config/arc/arc.c (arc_override_options): Handle extra field.
15734 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15736         * config/arc/arc-arch.h: Update ARC_OPTX macro.
15737         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15738         field.
15739         * config/arc/arc.c (arc_init): Update pic warning.
15740         (irq_range): Update irq range parsing warnings.
15741         (arc_override_options): Update various warning messages.
15742         (arc_handle_aux_attribute): Likewise.
15744 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
15746         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15748 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15750         * doc/sourcebuild.texi: Document usage of line number 0 in verify
15751         compiler messages directives.
15753 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
15755         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15756         * config/mips/mips-tables.opt: Regenerate.
15757         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15758         mips64r6.
15759         * doc/invoke.texi: Document -march=i6500.
15761 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
15763         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15764         (i6400_gpmul): Add cpu_unit.
15765         (i6400_gpdiv): Likewise.
15766         (i6400_msa_add_d): Update reservations.
15767         (i6400_msa_int_add) Likewise.
15768         (i6400_msa_short_logic3) Likewise.
15769         (i6400_msa_short_logic2) Likewise.
15770         (i6400_msa_short_logic) Likewise.
15771         (i6400_msa_move) Likewise.
15772         (i6400_msa_cmp) Likewise.
15773         (i6400_msa_short_float2) Likewise.
15774         (i6400_msa_div_d) Likewise.
15775         (i6400_msa_long_logic1) Likewise.
15776         (i6400_msa_long_logic2) Likewise.
15777         (i6400_msa_mult) Likewise.
15778         (i6400_msa_long_float2) Likewise.
15779         (i6400_msa_long_float4) Likewise.
15780         (i6400_msa_long_float5) Likewise.
15781         (i6400_msa_long_float8) Likewise.
15782         (i6400_fpu_fadd): Include frint type.
15783         (i6400_fpu_store): New define_insn_reservation.
15784         (i6400_fpu_load): Likewise.
15785         (i6400_fpu_move): Likewise.
15786         (i6400_fpu_fcmp): Likewise.
15787         (i6400_fpu_fmadd): Likewise.
15788         (i6400_int_mult): Include imul3nc type and update reservation.
15789         (i6400_int_div): Include idiv3 type and update reservation.
15790         (i6400_int_load): Update to check type not move_type.
15791         (i6400_int_store): Likewise.
15792         (i6400_int_prefetch): Set zero latency.
15794 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
15796         * gcc.c: Document new %@{...} sequence.
15797         (LINK_COMMAND_SPEC): Use it for the -L switches.
15798         (cpp_unique_options): Use it for the -I switches.
15799         (at_file_argbuf): New global variable.
15800         (in_at_file): Likewise.
15801         (alloc_args): Create at_file_argbuf.
15802         (clear_args): Truncate at_file_argbuf.
15803         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15804         (open_at_file): New function.
15805         (close_at_file): Likewise.
15806         (create_at_file): Delete.
15807         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15808         <'o'>: Likewise.
15809         <'@'>: New case.
15810         (validate_switches_from_spec): Deal with %@{...} sequence.
15811         (validate_switches): Likewise.
15812         (driver::finalize): Call clear_args.
15814 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
15816         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15818 2018-06-11  Martin Sebor  <msebor@redhat.com>
15820         * doc/invoke.texi (-Wall): List -Wc++17-compat.
15821         (Wno-class-memaccess): Add @opindex.
15822         (Wno-templates, Wno-multiple-inheritance): Same.
15823         (Wno-virtual-inheritance, Wno-namespaces): Same.
15824         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15825         (Wno-format-overflow, Wno-format-truncation): Same.
15826         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15827         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15828         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15829         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15830         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15831         (Wno-misspelled-isr): Same.
15833 2018-06-11  Martin Sebor  <msebor@redhat.com>
15835         * PR tree-optimization/86083
15836         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15838 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
15840         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15842 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
15844         PR target/85755
15845         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15846         on the correct operand.
15847         (*movdi_internal64): Ditto.
15849 2018-06-11  Martin Liska  <mliska@suse.cz>
15851         PR tree-optimization/86089
15852         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15854 2018-06-11  Julia Koval  <julia.koval@intel.com>
15856         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15857         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15858         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15860 2018-06-11  Olivier Hainque  <hainque@adacore.com>
15862         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15863         for Ada with strict dwarf2.
15865 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
15867         PR target/85755
15868         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15869         addresses.
15871 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
15873         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15875 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
15877         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15878         TARGET_ELF.
15880 2018-06-08  Martin Liska  <mliska@suse.cz>
15882         * tree-cfg.h (debug_function): Fix argument type to match
15883         implementation.
15885 2018-06-08  Martin Liska  <mliska@suse.cz>
15887         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15888         Remove usage of MPX-related (and removed) fields.
15889         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15891 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
15893         * cfg.c (debug): Use TDF_NONE rather than 0.
15894         * cfghooks.c (debug): Likewise.
15895         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15896         (struct dump_option_value_info): Convert to...
15897         (struct kv_pair): ...this template type.
15898         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15899         rather than 0.
15900         (optinfo_verbosity_options): Likewise.
15901         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15902         OPTGROUP_NONE.
15903         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15904         than int for "optgroup_flags" param.
15905         (dump_generic_expr_loc): Use dump_flags_t rather than int for
15906         "dump_kind" param.
15907         (dump_dec): Likewise.
15908         (dump_finish): Use TDF_NONE rather than 0.
15909         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15910         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
15911         than 0.  Update for change to option_ptr.
15912         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15913         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
15914         0.  Update for changes to optinfo_verbosity_options and
15915         optgroup_options.
15916         (opt_info_switch_p): Convert optgroup_flags from int to
15917         optgroup_flags_t.
15918         (dump_basic_block): Use dump_flags_t rather than int
15919         for "dump_kind" param.
15920         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15921         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15922         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15923         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15924         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15925         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15926         TDF_NONE): Convert from macros to...
15927         (enum dump_flag): ...this new enum.
15928         (dump_flags_t): Update to use enum.
15929         (operator|, operator&, operator~, operator|=, operator&=):
15930         Implement for dump_flags_t.
15931         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15932         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15933         Convert from macros to...
15934         (enum optgroup_flag): ...this new enum.
15935         (optgroup_flags_t): New typedef.
15936         (operator|, operator|=): Implement for optgroup_flags_t.
15937         (struct dump_file_info): Convert field "alt_flags" to
15938         dump_flags_t.  Convert field "optgroup_flags" to
15939         optgroup_flags_t.
15940         (dump_basic_block): Use dump_flags_t rather than int for param.
15941         (dump_generic_expr_loc): Likewise.
15942         (dump_dec): Likewise.
15943         (dump_register): Convert param "optgroup_flags" to
15944         optgroup_flags_t.
15945         (opt_info_enable_passes): Likewise.
15946         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15947         than 0.
15948         * gimple-pretty-print.c (debug): Likewise.
15949         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15950         (merged_store_group::apply_stores): Likewise.
15951         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15952         * gimple.c (verify_gimple_pp): Likewise.
15953         * graphite-poly.c (print_pbb_body): Likewise.
15954         * passes.c (pass_manager::register_one_dump_file): Convert
15955         local "optgroup_flags" to optgroup_flags_t.
15956         * print-tree.c (print_node): Use TDF_NONE rather than 0.
15957         (debug): Likewise.
15958         (debug_body): Likewise.
15959         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
15960         to optgroup_flags_t.
15961         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
15962         than 0.
15963         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
15964         (convert_mult_to_fma): Likewise.
15965         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
15966         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
15967         * tree-vect-data-refs.c (dump_lower_bound): Convert param
15968         "dump_kind" to dump_flags_t.
15970 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
15972         * config/rs6000/rs6000.c (min, max): Delete.
15974 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
15976         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
15977         -mabi=spe and -mabi=no-spe.
15979 2018-06-08  Martin Liska  <mliska@suse.cz>
15981         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
15982         where we expect an existing summary.
15984 2018-06-08  Martin Liska  <mliska@suse.cz>
15986         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
15987         * ipa-inline.h (estimate_edge_growth): Likewise.
15989 2018-06-08  Martin Liska  <mliska@suse.cz>
15991         * cgraph.c (function_version_hasher::hash): Use
15992         cgraph_node::get_uid ().
15993         (function_version_hasher::equal):
15994         * cgraph.h (cgraph_node::get_uid): New method.
15995         * ipa-inline.c (update_caller_keys): Use
15996         cgraph_node::get_uid ().
15997         (update_callee_keys): Likewise.
15998         * ipa-utils.c (searchc): Likewise.
15999         (ipa_reduced_postorder): Likewise.
16000         * lto-cgraph.c (input_node): Likewise.
16001         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16002         * symbol-summary.h (symtab_insertion): Likewise.
16003         (symtab_removal): Likewise.
16004         (symtab_duplication): Likewise.
16005         * tree-pretty-print.c (dump_function_header): Likewise.
16006         * tree-sra.c (convert_callers_for_node): Likewise.
16008 2018-06-08  Martin Liska  <mliska@suse.cz>
16010         * cgraph.c (symbol_table::create_edge): Always assign a new
16011         unique number.
16012         (symbol_table::free_edge): Do not recycle numbers.
16013         * cgraph.h (cgraph_edge::get): New method.
16014         * symbol-summary.h (symtab_removal): Use it.
16015         (symtab_duplication): Likewise.
16016         (call_summary::hashable_uid): Remove.
16018 2018-06-08  Martin Liska  <mliska@suse.cz>
16020         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16021         (initialize_growth_caches): Remove.
16022         (free_growth_caches): Likewise.
16023         (do_estimate_edge_time): Use edge_growth_cache.
16024         (do_estimate_edge_size): Likewise.
16025         (do_estimate_edge_hints): Likewise.
16026         * ipa-inline.c (reset_edge_caches): Likewise.
16027         (recursive_inlining): Likewise.
16028         (inline_small_functions): Likewise.
16029         * ipa-inline.h (initialize_growth_caches): Remove.
16030         (estimate_edge_size): Likewise.
16031         (estimate_edge_time): Likewise.
16032         (estimate_edge_hints): Likewise.
16033         (reset_edge_growth_cache): Likewise.
16034         * symbol-summary.h (call_summary::remove): New method.
16036 2018-06-08  Martin Liska  <mliska@suse.cz>
16038         * ipa-cp.c (class edge_clone_summary): New summary.
16039         (grow_edge_clone_vectors): Remove.
16040         (ipcp_edge_duplication_hook): Remove.
16041         (class edge_clone_summary_t): New call_summary class.
16042         (ipcp_edge_removal_hook): Remove.
16043         (edge_clone_summary_t::duplicate): New function.
16044         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16045         (create_specialized_node): Likewise.
16046         (ipcp_driver): Initialize edge_clone_summaries and do not
16047         register hooks.
16049 2018-06-08  Martin Liska  <mliska@suse.cz>
16051         * symbol-summary.h (get): New function.
16052         (call_summary::m_initialize_when_cloning): New class member.
16054 2018-06-08  Martin Liska  <mliska@suse.cz>
16056         * cgraph.c (cgraph_node::remove): Do not recycle uid.
16057         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16058         (symbol_table::allocate_cgraph_symbol): Do not set uid.
16059         * passes.c (uid_hash_t): Record removed_nodes by their uids.
16060         (remove_cgraph_node_from_order): Use the removed_nodes set.
16061         (do_per_function_toporder): Likwise.
16062         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16063         instead of summary_uid.
16064         (symtab_removal): Likewise.
16065         (symtab_duplication): Likewise.
16067 2018-06-08  Martin Liska  <mliska@suse.cz>
16069         * ipa-cp.c (ipcp_store_bits_results): Use
16070         ipcp_transformation_sum.
16071         (ipcp_store_vr_results): Likewise.
16072         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16073         to ...
16074         (ipcp_transformation_initialize): ... this.
16075         (ipa_set_node_agg_value_chain):
16076         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16077         (write_ipcp_transformation_info): Likewise.
16078         (read_ipcp_transformation_info): Likewise.
16079         (ipcp_update_bits): Likewise.
16080         (ipcp_update_vr): Likewise.
16081         (ipcp_transform_function): Likewise.
16082         * ipa-prop.h: Rename ipcp_transformation_summary to
16083         ipcp_transformation.
16084         (class ipcp_transformation_t): New function summary.
16085         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16086         (ipa_get_agg_replacements_for_node): Likewise.
16088 2018-06-08  Martin Liska  <mliska@suse.cz>
16090         * ipa-pure-const.c (struct funct_state_d): Do it class instead
16091         of struct.
16092         (class funct_state_summary_t): New function_summary class.
16093         (has_function_state): Remove.
16094         (get_function_state): Likewise.
16095         (set_function_state): Likewise.
16096         (add_new_function): Likewise.
16097         (funct_state_summary_t::insert): New function.
16098         (duplicate_node_data): Remove.
16099         (remove_node_data): Remove.
16100         (funct_state_summary_t::duplicate): New function.
16101         (register_hooks): Create new funct_state_summaries.
16102         (pure_const_generate_summary): Use it.
16103         (pure_const_write_summary): Likewise.
16104         (pure_const_read_summary): Likewise.
16105         (propagate_pure_const): Likewise.
16106         (propagate_nothrow): Likewise.
16107         (dump_malloc_lattice): Likewise.
16108         (propagate_malloc): Likewise.
16109         (execute): Do not register hooks, just remove summary
16110         instead.
16111         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16112         constructor.
16114 2018-06-08  Martin Liska  <mliska@suse.cz>
16116         * ipa-reference.c (remove_node_data): Remove.
16117         (duplicate_node_data): Likewise.
16118         (class ipa_ref_var_info_summary_t): New class.
16119         (class ipa_ref_opt_summary_t): Likewise.
16120         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16121         (get_reference_optimization_summary): Use
16122         ipa_ref_opt_sum_summaries.
16123         (set_reference_vars_info): Remove.
16124         (set_reference_optimization_summary): Likewise.
16125         (ipa_init): Create summaries.
16126         (init_function_info): Use function summary.
16127         (ipa_ref_opt_summary_t::duplicate): New function.
16128         (ipa_ref_opt_summary_t::remove): New function.
16129         (get_read_write_all_from_node): Fix GNU coding style.
16130         (propagate): Use function summary.
16131         (write_node_summary_p): Fix GNU coding style.
16132         (stream_out_bitmap): Likewise.
16133         (ipa_reference_read_optimization_summary): Use function summary.
16134         (ipa_reference_c_finalize): Do not release hooks.
16136 2018-06-08  Martin Liska  <mliska@suse.cz>
16138         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16139         (analyze_function_body): Extract multiple calls of get_create.
16140         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16141         * ipa-inline.c (recursive_inlining): Use ::get method.
16142         * ipa-inline.h (estimate_edge_growth): Likewise.
16144 2018-06-08  Martin Liska  <mliska@suse.cz>
16146         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16147         HSA_INVALID.
16148         (hsa_function_summary::hsa_function_summary): Use the new enum
16149         value.
16150         (hsa_gpu_implementation_p): Use hsa_summaries::get.
16151         * hsa-gen.c (hsa_get_host_function): Likewise.
16152         (get_brig_function_name): Likewise.
16153         * ipa-hsa.c (process_hsa_functions): Likewise.
16154         (ipa_hsa_write_summary): Likewise.
16155         * symbol-summary.h (symtab_duplication): Use ::get function/
16156         (get): New function.
16158 2018-06-08  Martin Liska  <mliska@suse.cz>
16160         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16161         of get.
16162         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16163         (hsa_register_kernel): Likewise.
16164         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16165         * hsa-gen.c (hsa_get_host_function): Likewise.
16166         (get_brig_function_name): Likewise.
16167         (generate_hsa): Likewise.
16168         (pass_gen_hsail::execute): Likewise.
16169         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16170         (devirtualization_time_bonus): Likewise.
16171         (ipcp_propagate_stage): Likewise.
16172         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16173         (edge_set_predicate): Likewise.
16174         (evaluate_conditions_for_known_args): Likewise.
16175         (evaluate_properties_for_edge): Likewise.
16176         (ipa_fn_summary::reset): Likewise.
16177         (ipa_fn_summary_t::duplicate): Likewise.
16178         (dump_ipa_call_summary): Likewise.
16179         (ipa_dump_fn_summary): Likewise.
16180         (analyze_function_body): Likewise.
16181         (compute_fn_summary): Likewise.
16182         (estimate_edge_devirt_benefit): Likewise.
16183         (estimate_edge_size_and_time): Likewise.
16184         (estimate_calls_size_and_time): Likewise.
16185         (estimate_node_size_and_time): Likewise.
16186         (inline_update_callee_summaries): Likewise.
16187         (remap_edge_change_prob): Likewise.
16188         (remap_edge_summaries): Likewise.
16189         (ipa_merge_fn_summary_after_inlining): Likewise.
16190         (ipa_update_overall_fn_summary): Likewise.
16191         (read_ipa_call_summary): Likewise.
16192         (inline_read_section): Likewise.
16193         (write_ipa_call_summary): Likewise.
16194         (ipa_fn_summary_write): Likewise.
16195         (ipa_free_fn_summary): Likewise.
16196         * ipa-hsa.c (process_hsa_functions): Likewise.
16197         (ipa_hsa_write_summary): Likewise.
16198         (ipa_hsa_read_section): Likewise.
16199         * ipa-icf.c (sem_function::merge): Likewise.
16200         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16201         (do_estimate_edge_time): Likewise.
16202         (estimate_size_after_inlining): Likewise.
16203         (estimate_growth): Likewise.
16204         (growth_likely_positive): Likewise.
16205         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16206         (inline_call): Likewise.
16207         * ipa-inline.c (caller_growth_limits): Likewise.
16208         (can_inline_edge_p): Likewise.
16209         (can_inline_edge_by_limits_p): Likewise.
16210         (compute_uninlined_call_time): Likewise.
16211         (compute_inlined_call_time): Likewise.
16212         (want_inline_small_function_p): Likewise.
16213         (edge_badness): Likewise.
16214         (update_caller_keys): Likewise.
16215         (update_callee_keys): Likewise.
16216         (recursive_inlining): Likewise.
16217         (inline_small_functions): Likewise.
16218         (inline_to_all_callers_1): Likewise.
16219         (dump_overall_stats): Likewise.
16220         (early_inline_small_functions): Likewise.
16221         (early_inliner): Likewise.
16222         * ipa-inline.h (estimate_edge_growth): Likewise.
16223         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16224         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16225         * ipa-prop.h (IPA_NODE_REF): Likewise.
16226         (IPA_EDGE_REF): Likewise.
16227         * ipa-pure-const.c (malloc_candidate_p): Likewise.
16228         (propagate_malloc): Likewise.
16229         * ipa-split.c (execute_split_functions): Likewise.
16230         * symbol-summary.h: Rename get to get_create.
16231         (get): Likewise.
16232         (get_create): Likewise.
16233         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16235 2018-06-08  Martin Liska  <mliska@suse.cz>
16237         * symbol-summary.h (release): Move definition out of class
16238         declaration.
16239         (symtab_removal): Likewise.
16240         (symtab_duplication): Likewise.
16242 2018-06-08  Martin Liska  <mliska@suse.cz>
16244         * symbol-summary.h (function_summary): Move constructor
16245         implementation out of class declaration.
16246         (release): Likewise.
16247         (symtab_insertion): Likewise.
16248         (symtab_removal): Likewise.
16249         (symtab_duplication): Likewise.
16250         (get): Likewise.
16252 2018-06-08  Martin Liska  <mliska@suse.cz>
16254         * Makefile.in: Remove support for MPX (macros, related functions,
16255         fields in cgraph_node, ...).
16256         * builtin-types.def (BT_BND): Likewise.
16257         (BT_FN_BND_CONST_PTR): Likewise.
16258         (BT_FN_CONST_PTR_BND): Likewise.
16259         (BT_FN_VOID_PTR_BND): Likewise.
16260         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16261         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16262         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16263         (expand_builtin_mempcpy_with_bounds): Likewise.
16264         (expand_builtin_memset_with_bounds): Likewise.
16265         (expand_builtin_memset_args): Likewise.
16266         (std_expand_builtin_va_start): Likewise.
16267         (expand_builtin): Likewise.
16268         (expand_builtin_with_bounds): Likewise.
16269         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16270         (DEF_LIB_BUILTIN_CHKP): Likewise.
16271         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16272         (DEF_CHKP_BUILTIN): Likewise.
16273         (BUILT_IN_MEMCPY): Likewise.
16274         (BUILT_IN_MEMMOVE): Likewise.
16275         (BUILT_IN_MEMPCPY): Likewise.
16276         (BUILT_IN_MEMSET): Likewise.
16277         (BUILT_IN_STPCPY): Likewise.
16278         (BUILT_IN_STRCAT): Likewise.
16279         (BUILT_IN_STRCHR): Likewise.
16280         (BUILT_IN_STRCPY): Likewise.
16281         (BUILT_IN_STRLEN): Likewise.
16282         (BUILT_IN_MEMCPY_CHK): Likewise.
16283         (BUILT_IN_MEMMOVE_CHK): Likewise.
16284         (BUILT_IN_MEMPCPY_CHK): Likewise.
16285         (BUILT_IN_MEMSET_CHK): Likewise.
16286         (BUILT_IN_STPCPY_CHK): Likewise.
16287         (BUILT_IN_STRCAT_CHK): Likewise.
16288         (BUILT_IN_STRCPY_CHK): Likewise.
16289         * calls.c (store_bounds): Likewise.
16290         (emit_call_1): Likewise.
16291         (special_function_p): Likewise.
16292         (maybe_warn_nonstring_arg): Likewise.
16293         (initialize_argument_information): Likewise.
16294         (finalize_must_preallocate): Likewise.
16295         (compute_argument_addresses): Likewise.
16296         (expand_call): Likewise.
16297         * cfgexpand.c (expand_call_stmt): Likewise.
16298         (expand_return): Likewise.
16299         (expand_gimple_stmt_1): Likewise.
16300         (pass_expand::execute): Likewise.
16301         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16302         (cgraph_node::remove): Likewise.
16303         (cgraph_node::dump): Likewise.
16304         (cgraph_node::verify_node): Likewise.
16305         * cgraph.h (chkp_function_instrumented_p): Likewise.
16306         (symtab_node::get_alias_target): Likewise.
16307         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16308         (cgraph_local_p): Likewise.
16309         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16310         (cgraph_edge::rebuild_references): Likewise.
16311         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16312         (walk_polymorphic_call_targets): Likewise.
16313         (cgraph_node::expand_thunk): Likewise.
16314         (symbol_table::output_weakrefs): Likewise.
16315         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16316         (ix86_handle_option): Likewise.
16317         * config/i386/constraints.md: Likewise.
16318         * config/i386/i386-builtin-types.def (BND): Likewise.
16319         (VOID): Likewise.
16320         (PVOID): Likewise.
16321         (ULONG): Likewise.
16322         * config/i386/i386-builtin.def (BDESC_END): Likewise.
16323         (BDESC_FIRST): Likewise.
16324         (BDESC): Likewise.
16325         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16326         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16327         * config/i386/i386.c (enum reg_class): Likewise.
16328         (ix86_target_string): Likewise.
16329         (ix86_option_override_internal): Likewise.
16330         (ix86_conditional_register_usage): Likewise.
16331         (ix86_valid_target_attribute_inner_p): Likewise.
16332         (ix86_set_indirect_branch_type): Likewise.
16333         (ix86_set_current_function): Likewise.
16334         (ix86_function_arg_regno_p): Likewise.
16335         (init_cumulative_args): Likewise.
16336         (ix86_function_arg_advance): Likewise.
16337         (ix86_function_arg): Likewise.
16338         (ix86_pass_by_reference): Likewise.
16339         (ix86_function_value_regno_p): Likewise.
16340         (ix86_function_value_1): Likewise.
16341         (ix86_function_value_bounds): Likewise.
16342         (ix86_return_in_memory): Likewise.
16343         (ix86_setup_incoming_vararg_bounds): Likewise.
16344         (ix86_va_start): Likewise.
16345         (indirect_thunk_need_prefix): Likewise.
16346         (print_reg): Likewise.
16347         (ix86_print_operand): Likewise.
16348         (ix86_expand_call): Likewise.
16349         (ix86_output_function_return): Likewise.
16350         (reg_encoded_number): Likewise.
16351         (BDESC_VERIFYS): Likewise.
16352         (ix86_init_mpx_builtins): Likewise.
16353         (ix86_init_builtins): Likewise.
16354         (ix86_emit_cmove): Likewise.
16355         (ix86_emit_move_max): Likewise.
16356         (ix86_expand_builtin): Likewise.
16357         (ix86_builtin_mpx_function): Likewise.
16358         (ix86_get_arg_address_for_bt): Likewise.
16359         (ix86_load_bounds): Likewise.
16360         (ix86_store_bounds): Likewise.
16361         (ix86_load_returned_bounds): Likewise.
16362         (ix86_store_returned_bounds): Likewise.
16363         (ix86_class_likely_spilled_p): Likewise.
16364         (ix86_hard_regno_mode_ok): Likewise.
16365         (x86_order_regs_for_local_alloc): Likewise.
16366         (ix86_mitigate_rop): Likewise.
16367         (ix86_bnd_prefixed_insn_p): Likewise.
16368         (ix86_mpx_bound_mode): Likewise.
16369         (ix86_make_bounds_constant): Likewise.
16370         (ix86_initialize_bounds): Likewise.
16371         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16372         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16373         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16374         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16375         (TARGET_CHKP_BOUND_MODE): Likewise.
16376         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16377         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16378         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16379         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16380         * config/i386/i386.h (TARGET_MPX): Likewise.
16381         (TARGET_MPX_P): Likewise.
16382         (VALID_BND_REG_MODE): Likewise.
16383         (FIRST_BND_REG): Likewise.
16384         (LAST_BND_REG): Likewise.
16385         (enum reg_class): Likewise.
16386         (BND_REG_P): Likewise.
16387         (BND_REGNO_P): Likewise.
16388         (BNDmode): Likewise.
16389         (ADJUST_INSN_LENGTH): Likewise.
16390         * config/i386/i386.md: Likewise.
16391         * config/i386/i386.opt: Likewise.
16392         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16393         (defined): Likewise.
16394         (LINK_MPX): Likewise.
16395         (MPX_SPEC): Likewise.
16396         (LIBMPX_SPEC): Likewise.
16397         (LIBMPXWRAPPERS_SPEC): Likewise.
16398         (CHKP_SPEC): Likewise.
16399         * config/i386/predicates.md: Likewise.
16400         * dbxout.c (dbxout_type): Likewise.
16401         * doc/extend.texi: Likewise.
16402         * doc/invoke.texi: Likewise.
16403         * doc/md.texi: Likewise.
16404         * doc/tm.texi: Likewise.
16405         * doc/tm.texi.in: Likewise.
16406         * dwarf2out.c (is_base_type): Likewise.
16407         (gen_formal_types_die): Likewise.
16408         (gen_subprogram_die): Likewise.
16409         (gen_type_die_with_usage): Likewise.
16410         (gen_decl_die): Likewise.
16411         (dwarf2out_late_global_decl): Likewise.
16412         * expr.c (expand_assignment): Likewise.
16413         (emit_storent_insn): Likewise.
16414         (store_expr_with_bounds): Likewise.
16415         (store_expr): Likewise.
16416         (expand_expr_real_1): Likewise.
16417         * expr.h (store_expr_with_bounds): Likewise.
16418         * function.c (use_register_for_decl): Likewise.
16419         (struct bounds_parm_data): Likewise.
16420         (assign_parms_augmented_arg_list): Likewise.
16421         (assign_parm_find_entry_rtl): Likewise.
16422         (assign_parm_is_stack_parm): Likewise.
16423         (assign_parm_load_bounds): Likewise.
16424         (assign_bounds): Likewise.
16425         (assign_parms): Likewise.
16426         (expand_function_start): Likewise.
16427         * gcc.c (CHKP_SPEC): Likewise.
16428         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16429         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16430         (wrestrict_dom_walker::check_call): Likewise.
16431         * gimple.c (gimple_build_call_from_tree): Likewise.
16432         * gimple.h (enum gf_mask): Likewise.
16433         (gimple_call_with_bounds_p): Likewise.
16434         (gimple_call_set_with_bounds): Likewise.
16435         * gimplify.c (gimplify_init_constructor): Likewise.
16436         * ipa-cp.c (initialize_node_lattices): Likewise.
16437         (propagate_constants_across_call): Likewise.
16438         (find_more_scalar_values_for_callers_subset): Likewise.
16439         * ipa-hsa.c (process_hsa_functions): Likewise.
16440         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16441         * ipa-icf.c (sem_function::merge): Likewise.
16442         * ipa-inline.c (early_inliner): Likewise.
16443         * ipa-pure-const.c (warn_function_noreturn): Likewise.
16444         (warn_function_cold): Likewise.
16445         (propagate_pure_const): Likewise.
16446         * ipa-ref.h (enum GTY): Likewise.
16447         * ipa-split.c (find_retbnd): Likewise.
16448         (consider_split): Likewise.
16449         (split_function): Likewise.
16450         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16451         * ipa.c (walk_polymorphic_call_targets): Likewise.
16452         (symbol_table::remove_unreachable_nodes): Likewise.
16453         (process_references): Likewise.
16454         (cgraph_build_static_cdtor_1): Likewise.
16455         * lto-cgraph.c (lto_output_node): Likewise.
16456         (output_refs): Likewise.
16457         (compute_ltrans_boundary): Likewise.
16458         (input_overwrite_node): Likewise.
16459         (input_node): Likewise.
16460         (input_cgraph_1): Likewise.
16461         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16462         * passes.c (pass_manager::execute_early_local_passes): Likewise.
16463         (class pass_chkp_instrumentation_passes): Likewise.
16464         (make_pass_chkp_instrumentation_passes): Likewise.
16465         * passes.def: Likewise.
16466         * rtl.h (struct GTY): Likewise.
16467         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16468         * stor-layout.c (layout_type): Likewise.
16469         * symtab.c: Likewise.
16470         * target.def: Likewise.
16471         * targhooks.c (default_chkp_bound_type): Likewise.
16472         (default_chkp_bound_mode): Likewise.
16473         (default_builtin_chkp_function): Likewise.
16474         (default_chkp_function_value_bounds): Likewise.
16475         (default_chkp_make_bounds_constant): Likewise.
16476         (default_chkp_initialize_bounds): Likewise.
16477         * targhooks.h (default_chkp_bound_type): Likewise.
16478         (default_chkp_bound_mode): Likewise.
16479         (default_builtin_chkp_function): Likewise.
16480         (default_chkp_function_value_bounds): Likewise.
16481         (default_chkp_make_bounds_constant): Likewise.
16482         (default_chkp_initialize_bounds): Likewise.
16483         * toplev.c (compile_file): Likewise.
16484         (process_options): Likewise.
16485         * tree-core.h (DEF_BUILTIN): Likewise.
16486         (DEF_BUILTIN_CHKP): Likewise.
16487         * tree-inline.c (declare_return_variable): Likewise.
16488         (remap_gimple_stmt): Likewise.
16489         (copy_bb): Likewise.
16490         (initialize_inlined_parameters): Likewise.
16491         (expand_call_inline): Likewise.
16492         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16493         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16494         (make_pass_ipa_chkp_produce_thunks): Likewise.
16495         (make_pass_chkp): Likewise.
16496         (make_pass_chkp_opt): Likewise.
16497         (make_pass_chkp_instrumentation_passes): Likewise.
16498         * tree-pretty-print.c (dump_generic_node): Likewise.
16499         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16500         * tree-ssa-dce.c (propagate_necessity): Likewise.
16501         (eliminate_unnecessary_stmts): Likewise.
16502         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16503         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16504         * tree-ssa-sccvn.h: Likewise.
16505         * tree-ssa-strlen.c (get_string_length): Likewise.
16506         (valid_builtin_call): Likewise.
16507         (adjust_last_stmt): Likewise.
16508         (handle_builtin_strchr): Likewise.
16509         (handle_builtin_strcpy): Likewise.
16510         (handle_builtin_stxncpy): Likewise.
16511         (handle_builtin_memcpy): Likewise.
16512         (handle_builtin_strcat): Likewise.
16513         (strlen_check_and_optimize_stmt): Likewise.
16514         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16515         * tree-streamer-in.c: Likewise.
16516         * tree-streamer.c (record_common_node): Likewise.
16517         * tree.c (tree_code_size): Likewise.
16518         (wide_int_to_tree_1): Likewise.
16519         (type_contains_placeholder_1): Likewise.
16520         (build_common_tree_nodes): Likewise.
16521         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16522         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16523         (POINTER_BOUNDS_P): Likewise.
16524         (BOUNDED_TYPE_P): Likewise.
16525         (BOUNDED_P): Likewise.
16526         (CALL_WITH_BOUNDS_P): Likewise.
16527         (pointer_bounds_type_node): Likewise.
16528         * value-prof.c (gimple_ic): Likewise.
16529         * var-tracking.c (vt_add_function_parameters): Likewise.
16530         * varasm.c (make_decl_rtl): Likewise.
16531         (assemble_start_function): Likewise.
16532         (output_constant): Likewise.
16533         (maybe_assemble_visibility): Likewise.
16534         * varpool.c (ctor_for_folding): Likewise.
16535         * chkp-builtins.def: Remove.
16536         * ipa-chkp.c: Remove.
16537         * ipa-chkp.h: Remove.
16538         * rtl-chkp.c: Remove.
16539         * rtl-chkp.h: Remove.
16540         * tree-chkp-opt.c: Remove.
16541         * tree-chkp.c: Remove.
16542         * tree-chkp.h: Remove.
16544 2018-06-07  Carl Love  <cel@us.ibm.com>
16546         * config/rs6000/vsx.md (vextract_fp_from_shorth,
16547         vextract_fp_from_shortl): Add BE support.
16549 2018-06-07  Paul Koning  <ni1d@arrl.net>
16551         * compare-elim.c (try_merge_compare): Don't merge compare if
16552         address contains a side effect.
16553         (try_eliminate_compare): Likewise.
16555 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
16557         * config.gcc: Support "tremont".
16558         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16559         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16560         PROCESSOR_TREMONT.
16561         * config/i386/i386.c (m_TREMONT): Define.
16562         (processor_target_table): Add "tremont".
16563         (PTA_TREMONT): Define.
16564         (ix86_lea_outperforms): Add TARGET_TREMONT.
16565         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16566         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16567         and M_INTEL_GOLDMONT_PLUS.
16568         (fold_builtin_cpu): Add "tremont".
16569         (ix86_add_stmt_cost): Add TARGET_TREMONT.
16570         (ix86_option_override_internal): Add "tremont".
16571         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16572         (processor_type): Add PROCESSOR_TREMONT.
16573         * config/i386/x86-tune.def: Add m_TREMONT.
16574         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16576 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16578         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16579         symbol defined for msp430i* devices to be lower case.
16581 2018-06-07  Richard Biener  <rguenther@suse.de>
16583         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16584         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
16585         Properly wrap signed arithmetic if overflow wraps.
16587 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
16589         PR tree-optimization/69615
16590         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16591         of a cast from a same precision integral SSA_NAME in a bb dominated
16592         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
16593         cast to utype if rhs2 has already a compatible type.
16595 2018-06-07  Richard Biener  <rguenther@suse.de>
16597         PR tree-optimization/85935
16598         * graphite-scop-detection.c (find_params_in_bb): Analyze
16599         condition operands with respect to the correct loop.  Assert
16600         the analysis doesn't fail.
16602 2018-06-04  Carl Love  <cel@us.ibm.com>
16604         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16605         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
16606         as it is slightly cheaper.
16607         (first_match_or_eos_index_<mode>):
16608         Calculate index using natural element order.
16609         (first_match_index_<mode>):
16610         Calculate index using natural element order.
16611         (first_match_or_eos_index_<mode>):
16612         Calculate index using natural order.
16613         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16614         for BE and LE modes.
16615         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16616         P9V_BUILTIN_VCLZLSBB_V16QI.
16617         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16618         specific.
16620 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16622         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16623         indentation and line wrap for many prototypes.  Add missing
16624         @smallexample directives around block of prototypes for vec_xl and
16625         vec_xst.
16627 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
16629         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16630         track if we pass or return IEEE 128-bit floating point.
16631         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16632         C++ mangling that is compatible with GCC 8.1.
16633         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16634         (init_cumulative_args): Note if we pass or return IEEE 128-bit
16635         floating point types.
16636         (rs6000_function_arg_advance_1): Likewise.
16637         (rs6000_mangle_type): Optionally generate mangled names that match
16638         what GCC 8.1 generated for IEEE 128-bit floating point types.
16639         (rs6000_globalize_decl_name): If we have an external function that
16640         passes or returns IEEE 128-bit types, generate a weak reference
16641         from the mangled name used in GCC 8.1 to the current mangled
16642         name.
16643         (rs6000_init_builtins): Make __ibm128 use the long double type if
16644         long double is IBM extended double.  Make __float128 use the long
16645         double type if long double is IEEE 128-bit.
16647         PR target/85657
16648         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16649         macro for __ibm128 built-in functions.
16650         (PACK_IF): Add __ibm128 pack/unpack functions.
16651         (UNPACK_IF): Likewise.
16652         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16653         enable long double built-in functions if long double is IEEE
16654         128-bit floating point.
16655         (rs6000_invalid_builtin): Update long double built-in function
16656         error message.
16657         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16658         functions, adjust the built-in function to use the long double
16659         built-in function if __ibm128 and long double are the same type.
16660         * doc/extend.texi (PowerPC builtins): Update documention for
16661         __builtin_{,un}pack_longdouble.  Add documentation for
16662         __builtin_{,un}pack_ibm128.
16664 2018-06-06  Jim Wilson  <jimw@sifive.com>
16666         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16667         (struct machine_function): New field interrupt_mode.
16668         (riscv_handle_type_attribute): New function.  Add forward declaration.
16669         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16670         (riscv_expand_epilogue): Check interrupt_mode field.
16671         (riscv_set_current_function): Check interrupt attribute args and
16672         set interrupt_mode field.
16673         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16674         (riscv_sret, riscv_uret): New.
16675         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16676         new arguments to interrupt attribute.
16678 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
16680         PR target/63177
16681         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16682         Don't handle -mcpu=power8 if -mpower9-vector is also used.
16684 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16686         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16687         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16688         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16689         several redundant entries.
16691 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
16693         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16694         type from "rtx" to "rtx_insn *".
16695         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16696         for local "call_insn", removing cast.
16697         (ix86_expand_call): Likewise, introducing a "call_insn" local.
16699 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16701         PR tree-optimization/86066
16702         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16703         for BIT_INSERT_EXPR stores.
16705 2018-06-06  Richard Biener  <rguenther@suse.de>
16707         PR tree-optimization/86062
16708         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16709         component refs ontop
16710         of to be offsetted base.
16712 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16714         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16715         to be static and remove check on interrupt attribute name.
16717 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16719         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16720         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16722 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
16724         PR target/79924
16725         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16726         second argument.
16727         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16728         Remove second argument, change how error is called.
16729         (aarch64_layout_arg): Remove second argument from
16730         aarch64_err_no_fpadvsimd call.
16731         (aarch64_init_cumulative_args): Ditto.
16732         (aarch64_gimplify_va_arg_expr): Ditto.
16733         * config/aarch64/aarch64.md (mov<mode>): Ditto.
16735 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
16737         * config/i386/i386.md (simple_return_indirect_internal): New expander.
16738         (*simple_return_indirect_internal<mode>): Rename from
16739         simple_return_indirect_internal.  Use W mode iterator.
16740         (rstorssp): New expander.
16741         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
16742         (clrssbsy): New expander.
16743         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
16745 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16747         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16748         __typeof__.
16749         (cmse_check_pointed_object): Likewise.
16751 2018-06-05  Martin Liska  <mliska@suse.cz>
16753         PR gcov-profile/47618
16754         * doc/invoke.texi: Document how -fprofile-dir format
16755         is extended.
16757 2018-06-05  Richard Biener  <rguenther@suse.de>
16759         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16760         removal pretend DOM info isn't available so we do not update
16761         it and only remove edges, not dominated blocks.  Actually free
16762         DOM info in case we removed something.  Remove unreachable blocks.
16763         (mfb_keep_latches): Work with either DOM info or marked backedges.
16764         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16765         first.  Mark backedges if DOM info isn't available.
16766         (Re-)compute DOM info after cleanup_control_flow_pre.
16768 2018-06-05  Richard Biener  <rguenther@suse.de>
16770         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16771         (locus_discrim_hasher::hash): Adjust.
16772         (locus_discrim_hasher::equal): Likewise.
16773         (next_discriminator_for_locus): Work on line directly.
16774         (same_line_p): Pass in expanded locus1 as well.
16775         (assign_discriminators): Avoid redundant location expansions.
16777 2018-06-05  Richard Biener  <rguenther@suse.de>
16779         PR tree-optimization/86046
16780         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16781         if required after clearing TREE_ADDRESSABLE.
16783 2018-06-05  Richard Biener  <rguenther@suse.de>
16785         PR tree-optimization/86047
16786         * tree-ssa-loop.c (for_each_index): Glob handling of all
16787         decls and constants and really handle all of them.
16789 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16791         PR target/81497
16792         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16793         qualifier_void_pointer and qualifier_const_void_pointer.
16794         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16795         (arm_init_builtins): Handle the above.
16796         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16797         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16798         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16799         void intrinsics.
16801 2018-06-05  Martin Liska  <mliska@suse.cz>
16803         * auto-profile.c (read_autofdo_file): Do not use
16804         gcov_ctr_summary struct.
16805         (afdo_callsite_hot_enough_for_early_inline): Likewise.
16806         * coverage.c (struct counts_entry): Likewise.
16807         (read_counts_file): Read just single summary entry.
16808         (get_coverage_counts): Use gcov_summary struct.
16809         * coverage.h (get_coverage_counts): Likewise.
16810         * gcov-dump.c (dump_working_sets): Likewise.
16811         (tag_summary): Dump just single summary.
16812         * gcov-io.c (gcov_write_summary): Write just histogram
16813         summary.
16814         (gcov_read_summary): Read just single summary.
16815         (compute_working_sets): Use gcov_summary struct.
16816         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16817         of GCOV_COUNTERS_SUMMABLE.
16818         (GCOV_COUNTERS_SUMMABLE): Remove.
16819         (GCOV_FIRST_VALUE_COUNTER): Replace with
16820         GCOV_COUNTER_V_INTERVAL.
16821         (struct gcov_ctr_summary): Remove.
16822         (struct gcov_summary): Directly use fields of former
16823         gcov_ctr_summary.
16824         (compute_working_sets): Use gcov_summary struct.
16825         * gcov.c (read_count_file): Do not use ctrs fields.
16826         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16827         struct.
16828         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16829         struct.
16830         * profile.c: Likewise.
16831         * profile.h: Likewise.
16833 2018-06-05  Martin Liska  <mliska@suse.cz>
16835         PR gcov-profile/84846
16836         * gcov.c (output_lines): Print working directory only
16837         in intermediate format.
16839 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
16841         * config/s390/s390-builtin-types.def: Add void function type.
16842         * config/s390/s390-builtins.def: Use the function type for the
16843         tbeginc builtin.
16845 2018-06-04  Jim Wilson  <jimw@sifive.com>
16847         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16848         to int.
16849         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16850         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
16851         handle EH_RETURN_DATA_REGNO registers properly.
16852         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16853         (riscv_expand_epilogue): Update comment.  Change argument name and
16854         type.  Update code to use new name and type.  Pass new args to
16855         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
16856         EXCEPTION_RETURN.
16857         * config/riscv/riscv.md (NORMAL_RETURN): New.
16858         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16859         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16860         (eh_return): Call gen_eh_return_internal and emit barrier.
16861         (eh_return_internal): Call riscv_expand_epilogue.
16863 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
16865         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16866         bit_insertion field and declare can_be_merged_into method.
16867         (merged_store_group::can_be_merged_into): New method.
16868         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16869         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
16870         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16872 2018-06-04  Richard Biener  <rguenther@suse.de>
16874         PR tree-optimization/85955
16875         * builtins.c (fold_builtin_sincos): Convert pointers to
16876         destination to appropriate type before dereferencing.
16878 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
16880         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16882 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
16884         * expr.c (expand_expr_real_1): Force the operand into memory if
16885         its TYPE_MODE is BLKmode and if there is no integer mode for
16886         the number of bits being extracted.
16888 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
16890         PR target/85832
16891         PR target/86036
16892         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16893         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16895 2018-06-04  Richard Biener  <rguenther@suse.de>
16897         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16898         (cleanup_tree_cfg_noloop): ... single caller.  Do
16899         start_recording_case_labels later.
16901 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
16903         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16904         to _IMMINTRIN_H_INCLUDED.
16905         * config/i386/pconfigintrin.h: Ditto.
16906         * config/i386/waitpkgintrin.h: Ditto.
16907         * config/i386/immintrin.h: Add includes for sgxintrin.h,
16908         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16909         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16910         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16911         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16912         waitpkgintrin.h and cldemoteintrin.h.
16914 2018-06-04  Richard Biener  <rguenther@suse.de>
16916         PR tree-optimization/86038
16917         * tracer.c (find_best_successor): Check probability for
16918         being initialized, bail out if not.
16920 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
16922         PR target/86003
16923         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16924         of bits to ignore when comparing architectures.
16926 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
16928         PR tree-optimization/69615
16929         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16930         maximum or minimum of the type, try to merge it also as if
16931         range1 is + [-, x - 1] or + [x + 1, -].
16933         PR c++/86025
16934         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16936 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
16938         PR tree-optimization/86034
16939         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16940         the unsigned bitfield type in a bit insertion sequence if it does not
16941         have a larger precision than the bitfield size.
16942         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16944 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
16946         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16948 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16950         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16951         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16952         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16953         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16955 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16957         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
16958         Disable -fdelete-null-pointer-checks for ELF toolchain.
16960 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16961             Kito Cheng  <kito.cheng@gmail.com>
16963         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
16964         (nds32le-*-*, nds32be-*-*): Integrate checking process.
16965         (nds32*-*-*): Add glibc and uclibc conditions.
16966         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
16967         (TARGET_EXCEPT_UNWIND_INFO): Define.
16968         * config/nds32/elf.h: New file.
16969         * config/nds32/linux.h: New file.
16970         * config/nds32/nds32-elf.opt: New file.
16971         * config/nds32/nds32-linux.opt: New file.
16972         * config/nds32/nds32-fp-as-gp.c
16973         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
16974         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
16975         TARGET_LINUX_ABI.
16976         (nds32_asm_file_end): Ditto.
16977         (nds32_print_operand): Ditto.
16978         (nds32_insert_attributes): Ditto.
16979         (nds32_init_libfuncs): New function.
16980         (TARGET_HAVE_TLS): Define.
16981         (TARGET_INIT_LIBFUNCS): Define.
16982         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
16983         spec content.
16984         (TARGET_ELF): Apply different mcmodel setting.
16985         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
16986         been migrated into elf.h and linux.h files.
16987         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
16988         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
16989         (mcmodel): The content has been migrated into nds32-elf.opt and
16990         nds32-linux.opt files.
16991         * config/nds32/t-elf: New file.
16992         * config/nds32/t-linux: New file.
16994 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16995             Shiva Chen  <shiva0217@gmail.com>
16997         * config/nds32/constants.md (unspec_volatile_element): Add
16998         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
16999         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17000         optimization.
17001         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17002         (make_pass_nds32_fp_as_gp): Declare.
17003         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17004         optmization pass.
17005         (nds32_asm_function_end_prologue): Remove unused asm output.
17006         (nds32_asm_function_begin_epilogue): Remove unused asm output.
17007         (nds32_asm_file_start): Output necessary fp_as_gp information.
17008         (nds32_option_override): Adjust register usage.
17009         (nds32_expand_prologue): Consider fp_as_gp situation.
17010         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17011         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17012         (epilogue): Ditto.
17013         (return): Ditto.
17014         (simple_return): Ditto.
17015         (omit_fp_begin): Output special directive for fp_as_gp.
17016         (omit_fp_end): Output special directive for fp_as_gp.
17017         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17018         mforbid-fp-as-gp): New options.
17020 2018-06-01  Mark Wielaard  <mark@klomp.org>
17022         * dwarf2out.c (dwarf2out_finish): Remove generation of
17023         DW_AT_loclists_base.
17025 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
17027         * gimple-ssa-store-merging.c: Include gimple-fold.h.
17028         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17029         (struct merged_store_group): Add bit_insertion field.
17030         (dump_char_array): Use standard hexadecimal format.
17031         (merged_store_group::merged_store_group): Set bit_insertion to false.
17032         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
17033         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
17034         also print the mask in the dump file.
17035         (pass_store_merging::gate): Minor tweak.
17036         (imm_store_chain_info::coalesce_immediate): Fix wrong association
17037         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
17038         stores with INTEGER_CST stores.
17039         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17040         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17041         and use it throughout.  Generate bit insertion sequences if need be.
17042         (pass_store_merging::process_store): Remove redundant condition.
17043         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17045 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
17047         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17048         the 128-bit floating point types.  Fix function comment.
17050 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17052         * config/aarch64/aarch64-simd.md
17053         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17054         mnemonics.
17055         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17056         mnemonics.
17058 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17060         PR tree-optimization/85989
17061         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17062         variable.
17063         (backprop::intersect_uses): Check it when deciding whether this
17064         is a backedge reference.
17065         (backprop::process_block): Add each phi to m_visited_phis
17066         after visiting it, then clear it at the end.
17068 2018-06-01  Richard Biener  <rguenther@suse.de>
17070         * tree-vectorizer.h (vect_dr_stmt): New function.
17071         (vect_get_load_cost): Adjust.
17072         (vect_get_store_cost): Likewise.
17073         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17074         Use vect_dr_stmt instead of DR_SMTT.
17075         (vect_record_base_alignments): Likewise.
17076         (vect_calculate_target_alignment): Likewise.
17077         (vect_compute_data_ref_alignment): Likewise and make static.
17078         (vect_update_misalignment_for_peel): Likewise.
17079         (vect_verify_datarefs_alignment): Likewise.
17080         (vector_alignment_reachable_p): Likewise.
17081         (vect_get_data_access_cost): Likewise.  Pass down
17082         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17083         (vect_get_peeling_costs_all_drs): Likewise.
17084         (vect_peeling_hash_get_lowest_cost): Likewise.
17085         (vect_enhance_data_refs_alignment): Likewise.
17086         (vect_find_same_alignment_drs): Likewise.
17087         (vect_analyze_data_refs_alignment): Likewise.
17088         (vect_analyze_group_access_1): Likewise.
17089         (vect_analyze_group_access): Likewise.
17090         (vect_analyze_data_ref_access): Likewise.
17091         (vect_analyze_data_ref_accesses): Likewise.
17092         (vect_vfa_segment_size): Likewise.
17093         (vect_small_gap_p): Likewise.
17094         (vectorizable_with_step_bound_p): Likewise.
17095         (vect_prune_runtime_alias_test_list): Likewise.
17096         (vect_analyze_data_refs): Likewise.
17097         (vect_supportable_dr_alignment): Likewise.
17098         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17099         (vect_gen_prolog_loop_niters): Likewise.
17100         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17101         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17102         modify DR_STMT.
17103         (vect_recog_mask_conversion_pattern): Likewise.
17104         (vect_try_gather_scatter_pattern): Likewise.
17105         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17106         to vect_get_store_cost.
17107         (vect_get_store_cost): Get stmt_info instead of DR.
17108         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17109         (vect_get_load_cost): Get stmt_info instead of DR.
17111 2018-06-01  Richard Biener  <rguenther@suse.de>
17113         PR middle-end/86017
17114         * gimple-fold.c (var_decl_component_p): Also allow offsetted
17115         vars wrapped in MEM_REFs.
17117 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17119         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17120         Fix subreg tests so that we only return a choice between
17121         GENERAL_REGS and FP_REGS if the original classes included both.
17123 2018-06-01  Richard Biener  <rguenther@suse.de>
17125         PR ipa/85960
17126         * tree-ssa-structalias.c (get_function_part_constraint):
17127         Handle NULL fi->decl.
17128         (find_func_aliases_for_call): Properly handle indirect
17129         fi from direct call.
17130         (find_func_clobbers): Likewise.
17131         (ipa_pta_execute): Likewise.
17132         (create_variable_info_for): For functions that are ifunc_resolver
17133         resolve to a varinfo that contains the result of the resolver call.
17134         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17135         aliases.
17137 2018-05-31  Michael Collison  <michael.collison@arm.com>
17139         * config/aarch64/aarch64.md:
17140         (*fix_to_zero_extenddfdi2): New pattern.
17141         * gcc.target/aarch64/fix_extend1.c: New testcase.
17143 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
17145         PR middle-end/78809
17146         PR middle-end/83026
17147         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17148         and BUILT_IN_STRNCMP_EQ.
17149         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17150         BUILT_IN_STRNCMP_EQ.
17151         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17152         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17153         (gimple_fold_builtin): Likewise.
17154         * tree-ssa-strlen.c (compute_string_length): New function.
17155         (determine_min_obsize): New function.
17156         (handle_builtin_string_cmp): New function to handle calls to
17157         string compare functions.
17158         (strlen_optimize_stmt): Add handling to builtin string compare
17159         calls.
17160         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17161         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17162         * tree.c (build_common_builtin_nodes): Add new defines of
17163         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17165 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
17167         PR target/85984
17168         * bb-reorder.c (pass_partition_blocks::gate): Return false for
17169         functions with naked attribute.
17171 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
17173         * config/i386/sse.md (avx_vec_concat<mode>):
17174         Substitute concat_tg_mode mode attribute with xtg_mode.
17175         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17176         (concat_tg_mode): Remove mode attribute.
17178 2018-05-31  Martin Sebor  <msebor@redhat.com>
17180         PR c/82063
17181         * calls.c (alloc_max_size): Correct a logic error/typo.
17182         Treat excessive arguments as infinite.  Warn for invalid arguments.
17183         * doc/invoke.texi (-Walloc-size-larger-than): Update.
17185 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
17187         PR target/85829
17188         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17189         and movx for Haswell.
17191 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
17192             Cesar Philippidis  <cesar@codesourcery.com>
17194         PR middle-end/85879
17195         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17196         when emitting error on private/firstprivate reductions.
17197         * omp-low.c (lower_omp_target): Avoid reference-type processing
17198         on pointers for firstprivate clause.
17200 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17202         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17203         (st1x2): Likewise.
17204         (st1x3): Likewise.
17205         * config/aarch64/aarch64-simd.md
17206         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17207         (aarch64_ld1_x3_<mode>): Likewise
17208         (aarch64_st1x2<VALLDIF:mode>): Likewise
17209         (aarch64_st1_x2_<mode>): Likewise
17210         (aarch64_st1x3<VALLDIF:mode>): Likewise
17211         (aarch64_st1_x3_<mode>): Likewise
17212         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17213         (vld1_s8_x3): Likewise.
17214         (vld1_u16_x3): Likewise.
17215         (vld1_s16_x3): Likewise.
17216         (vld1_u32_x3): Likewise.
17217         (vld1_s32_x3): Likewise.
17218         (vld1_u64_x3): Likewise.
17219         (vld1_s64_x3): Likewise.
17220         (vld1_f16_x3): Likewise.
17221         (vld1_f32_x3): Likewise.
17222         (vld1_f64_x3): Likewise.
17223         (vld1_p8_x3): Likewise.
17224         (vld1_p16_x3): Likewise.
17225         (vld1_p64_x3): Likewise.
17226         (vld1q_u8_x3): Likewise.
17227         (vld1q_s8_x3): Likewise.
17228         (vld1q_u16_x3): Likewise.
17229         (vld1q_s16_x3): Likewise.
17230         (vld1q_u32_x3): Likewise.
17231         (vld1q_s32_x3): Likewise.
17232         (vld1q_u64_x3): Likewise.
17233         (vld1q_s64_x3): Likewise.
17234         (vld1q_f16_x3): Likewise.
17235         (vld1q_f32_x3): Likewise.
17236         (vld1q_f64_x3): Likewise.
17237         (vld1q_p8_x3): Likewise.
17238         (vld1q_p16_x3): Likewise.
17239         (vld1q_p64_x3): Likewise.
17240         (vst1_s64_x2): Likewise.
17241         (vst1_u64_x2): Likewise.
17242         (vst1_f64_x2): Likewise.
17243         (vst1_s8_x2): Likewise.
17244         (vst1_p8_x2): Likewise.
17245         (vst1_s16_x2): Likewise.
17246         (vst1_p16_x2): Likewise.
17247         (vst1_s32_x2): Likewise.
17248         (vst1_u8_x2): Likewise.
17249         (vst1_u16_x2): Likewise.
17250         (vst1_u32_x2): Likewise.
17251         (vst1_f16_x2): Likewise.
17252         (vst1_f32_x2): Likewise.
17253         (vst1_p64_x2): Likewise.
17254         (vst1q_s8_x2): Likewise.
17255         (vst1q_p8_x2): Likewise.
17256         (vst1q_s16_x2): Likewise.
17257         (vst1q_p16_x2): Likewise.
17258         (vst1q_s32_x2): Likewise.
17259         (vst1q_s64_x2): Likewise.
17260         (vst1q_u8_x2): Likewise.
17261         (vst1q_u16_x2): Likewise.
17262         (vst1q_u32_x2): Likewise.
17263         (vst1q_u64_x2): Likewise.
17264         (vst1q_f16_x2): Likewise.
17265         (vst1q_f32_x2): Likewise.
17266         (vst1q_f64_x2): Likewise.
17267         (vst1q_p64_x2): Likewise.
17268         (vst1_s64_x3): Likewise.
17269         (vst1_u64_x3): Likewise.
17270         (vst1_f64_x3): Likewise.
17271         (vst1_s8_x3): Likewise.
17272         (vst1_p8_x3): Likewise.
17273         (vst1_s16_x3): Likewise.
17274         (vst1_p16_x3): Likewise.
17275         (vst1_s32_x3): Likewise.
17276         (vst1_u8_x3): Likewise.
17277         (vst1_u16_x3): Likewise.
17278         (vst1_u32_x3): Likewise.
17279         (vst1_f16_x3): Likewise.
17280         (vst1_f32_x3): Likewise.
17281         (vst1_p64_x3): Likewise.
17282         (vst1q_s8_x3): Likewise.
17283         (vst1q_p8_x3): Likewise.
17284         (vst1q_s16_x3): Likewise.
17285         (vst1q_p16_x3): Likewise.
17286         (vst1q_s32_x3): Likewise.
17287         (vst1q_s64_x3): Likewise.
17288         (vst1q_u8_x3): Likewise.
17289         (vst1q_u16_x3): Likewise.
17290         (vst1q_u32_x3): Likewise.
17291         (vst1q_u64_x3): Likewise.
17292         (vst1q_f16_x3): Likewise.
17293         (vst1q_f32_x3): Likewise.
17294         (vst1q_f64_x3): Likewise.
17295         (vst1q_p64_x3): Likewise.
17297 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17299         * config/msp430/msp430.c (msp430_output_labelref): Prepend
17300         user_label_prefix to name.
17302         * tree-core.h: Update comment about the format of NAME string
17303         passed to handler in attribute_spec.
17305         * config/msp430/msp430.md: Remove erroneous subreg expression from
17306         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17307         zero_extend{q,h}isi2.
17309 2018-05-30  Borislav Petkov  <bp@suse.de>
17311         * doc/extend.texi: Document some architecture specific
17312         constraints and sort entries.
17314 2018-05-30  Martin Sebor  <msebor@redhat.com>
17316         PR middle-end/85369
17317         * builtins.c (expand_builtin_stpcpy_1): New function.
17318         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17319         only if the former succeeds.
17321 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17323         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17324         in saphira.
17326 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17328         * doc/invoke.texi (-flinker-output): Document
17330 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17332         * passes.c (ipa_write_summaries): Only modify statements if body
17333         is in memory.
17334         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17335         incrementally linking.
17336         (ipa_passes): Likewise.
17337         * lto-cgraph.c (lto_output_node): When incrementally linking do not
17338         pass down resolution info.
17339         * common.opt (flag_incremental_link): Update info.
17340         * gcc.c (plugin specs): Turn flinker-output=* to
17341         -plugin-opt=-linker-output-known
17342         * toplev.c (compile_file): Also cut compilation when doing incremental
17343         link.
17344         * flag-types. (enum lto_partition_model): Add
17345         LTO_LINKER_OUTPUT_NOLTOREL.
17346         (invoke.texi): Add -flinker-output docs.
17347         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17348         link same way as WPA; do not stream in dead initializers.
17350         * dwarf2out.c (dwarf2out_die_ref_for_decl,
17351         darf2out_register_external_decl): Support incremental link.
17353 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17355         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17357 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17359         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17360         it down to simple_object_copy_lto_debug_sections.
17361         (run_gcc): Determine incremental LTO link time and configure
17362         lto1 into non-wpa mode, disable renaming of debug sections.
17364 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17366         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17367         descriptions of various incorrectly documented functions.
17369 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17371         Revert:
17372         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17373         address check not strict.
17375 2018-05-30  Richard Biener  <rguenther@suse.de>
17377         PR tree-optimization/85964
17378         * tracer.c (better_p): Drop initialized count check, we only
17379         call the function with initialized counts now.
17380         (find_best_successor): Do find a best edge if one
17381         has uninitialized count.
17382         (find_best_predecessor): Likewise.  Do BB frequency check only
17383         if count is initialized.
17385 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
17387         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17388         (aarch64_ldrstr_offset_compare): New.
17389         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17390         load/store orderings.
17391         (aarch64_gen_adjusted_ldpstp): Likewise.
17393 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
17395         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17396         Check for subset of GENERAL_REGS and FP_REGS.
17397         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17398         r=w alternative.
17400 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
17402         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17403         and wi::to_poly_offset.  Add the current offset and then check
17404         whether the sum fits, rather than using an unchecked addition of
17405         a checked term.  Check for a shwi rather than a uhwi.
17406         * expr.c (get_bit_range): Use tree_to_poly_uint64.
17407         (store_constructor): Use poly_int_tree_p.
17408         (expand_expr_real_1): Likewise.
17409         * function.c (assign_temp): Likewise.
17410         * fold-const.c (const_binop): Use poly_int_tree_p and
17411         wi::to_poly_offset.
17412         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
17413         division.
17414         * ipa-icf-gimple.c (func_checker::compare_operand): Use
17415         to_poly_offset for MEM offsets.
17416         * ipa-icf.c (sem_variable::equals): Likewise.
17417         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17418         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17419         wi::to_poly_offset for BIT_FIELD_REF offsets.
17420         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17421         wi::to_poly_offset.
17422         * var-tracking.c (emit_note_insn_var_location): Use
17423         tree_to_poly_uint64.
17425 2018-05-29  Jim Wilson  <jimw@sifive.com>
17427         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17429 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
17431         PR target/85950
17432         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17433         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17434         sequence.
17435         (sse4_1_round<mode>2): Use nonimmediate_operand
17436         for operand 1 predicate.
17438 2018-05-29  Martin Sebor  <msebor@redhat.com>
17439             Richard Biener  <rguenther@suse.de>
17441         PR testsuite/85888
17442         * calls.c (get_size_range): Call determine_value_range instead
17443         of get_value_range..
17444         * tree-vrp.h (determine_value_range): Declared new function.
17445         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17447 2018-05-29  Richard Biener  <rguenther@suse.de>
17449         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17450         sure to use non-pattern stmts for get_earlier_stmt arguments.
17451         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17452         called on pattern stmts.
17453         (get_later_stmt): Likewise.
17455 2018-05-29  Martin Liska  <mliska@suse.cz>
17457         PR gcov-profile/85759
17458         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17459         env variables.
17461 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
17463         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17464         VEC_UNPACK_*_EXPR.
17465         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17466         VEC_PACK_*_EXPR.
17468         PR target/85918
17469         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17470         VEC_PACK_FLOAT_EXPR): New tree codes.
17471         * tree-pretty-print.c (op_code_prio): Handle
17472         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17473         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17474         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17475         * tree-inline.c (estimate_operator_cost): Likewise.
17476         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17477         * fold-const.c (const_binop): Likewise.
17478         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17479         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17480         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17481         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17482         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17483         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17484         * expr.c (expand_expr_real_2): Likewise.
17485         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17486         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17487         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17488         optabs.
17489         * optabs.c (expand_widen_pattern_expr): For
17490         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17491         sign from result type rather than operand's type.
17492         (expand_binop_directly): For vec_packu_float_optab and
17493         vec_packs_float_optab allow result type to be different from operand's
17494         type.
17495         * optabs-tree.c (optab_for_tree_code): Handle
17496         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17497         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
17498         * tree-vect-generic.c (expand_vector_operations_1):  Handle
17499         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17500         VEC_PACK_FLOAT_EXPR.
17501         * tree-vect-stmts.c (supportable_widening_operation): Handle
17502         FIX_TRUNC_EXPR.
17503         (supportable_narrowing_operation): Handle FLOAT_EXPR.
17504         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17505         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17506         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
17507         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17508         mode attributes.
17509         (vec_pack<floatprefix>_float_<mode>): New expander.
17510         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17511         attributes.
17512         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17513         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17514         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17515         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17516         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17517         Document.
17518         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17519         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17520         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17521         VEC_PACK_FLOAT_EXPR): Document.
17523 2018-05-29  Richard Biener  <rguenther@suse.de>
17525         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17526         member.
17527         (stmt_vec_info_vec): Make pointer.
17528         (init_stmt_vec_info_vec): Remove.
17529         (free_stmt_vec_info_vec): Likewise.
17530         (set_stmt_vec_info_vec): New function.
17531         (free_stmt_vec_infos): Likewise.
17532         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17533         (set_vinfo_for_stmt): Likewise.
17534         (get_earlier_stmt): Likewise.
17535         (get_later_stmt): Likewise.
17536         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17537         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17538         (vec_info::~vec_info): Free stmt_vec_infos.
17539         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17540         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17541         (pass_slp_vectorize::execute): Likewise.
17542         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17543         (free_stmt_vec_info_vec): Likewise.
17544         (set_stmt_vec_info_vec): New function.
17545         (free_stmt_vec_infos): Likewise.
17546         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17547         the global stmt_vec_info_vec.
17548         * tree-parloops.c (gather_scalar_reductions): Use
17549         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17550         vector.
17552 2018-05-29  Richard Biener  <rguenther@suse.de>
17554         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17556 2018-05-29  Martin Liska  <mliska@suse.cz>
17557             David Malcolm  <dmalcolm@redhat.com>
17559         * vec.c (test_reverse): New.
17560         (vec_c_tests): Add new test.
17561         * vec.h (vl_ptr>::reverse): New function.
17563 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
17565         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17567         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17568         and later.
17570 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17572         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17574 2018-05-28  Richard Biener  <rguenther@suse.de>
17576         PR tree-optimization/85933
17577         * tree-vect-data-refs.c (vect_record_base_alignments): Only
17578         look at stmts marked as vectorizable.
17580 2018-05-28  Richard Biener  <rguenther@suse.de>
17582         PR tree-optimization/85934
17583         * tree-vect-generic.c (expand_vector_operations_1): Hoist
17584         vector boolean check before scalar optimization.
17586 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
17588         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17589         for armv5te.
17591 2018-05-28  Mark Wielaard  <mark@klomp.org>
17593         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17594         if it is an expression containing a minus sign.
17596 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
17598         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17600 2018-05-27  Paul Koning  <ni1d@arrl.net>
17602         * config/pdp11/pdp11.md (truncsihi2): Remove.
17604 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
17605             Chung-Ju Wu  <jasonwucj@gmail.com>
17607         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17608         implementation.
17609         (unaligned_store_dw): Ditto.
17610         * config/nds32/nds32-memory-manipulation.c
17611         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17612         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17613         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17614         (emit_setmem_word_loop): Rename to ...
17615         (emit_setmem_doubleword_loop): ... this.
17616         (nds32_gen_dup_4_byte_to_word_value): New function.
17617         (nds32_gen_dup_8_byte_to_double_word_value): New function.
17618         (nds32_expand_setmem_loop): Refine implementation.
17619         (nds32_expand_setmem_loop_v3m): Ditto.
17620         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17621         pattern.
17623 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17625         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17627 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17629         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17630         (nds32_init_machine_status): Initialize machine->attr_naked_p and
17631         machine->attr_no_prologue_p.
17632         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17633         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17634         (nds32_expand_epilogue): Consider attr_naked_p.
17635         (nds32_expand_epilogue_v3pop): Likewise.
17636         (nds32_can_use_return_insn): Likewise.
17637         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17638         attr_no_prologue_p fields.
17639         * config/nds32/nds32.opt (mret-in-naked-func): New option.
17641 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
17643         PR target/85918
17644         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17645         attributes.
17646         * config/i386/sse.md
17647         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17648         Rename to ...
17649         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17650         ... this.
17651         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17652         Rename to ...
17653         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17654         ... this.
17655         (*<floatsuffix>floatv2div2sf2): Rename to ...
17656         (*float<floatunssuffix>v2div2sf2): ... this.
17657         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17658         (float<floatunssuffix>v2div2sf2_mask): ... this.
17659         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17660         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17661         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17662         to ...
17663         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17664         ... this.
17665         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17666         Rename to ...
17667         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17668         ... this.
17669         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17670         Rename to ...
17671         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17672         ... this.
17673         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17674         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17675         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17676         gen_ufix_truncv8dfv8si2.
17677         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17678         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17679         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17680         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17681         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17682         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17683         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17684         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17686 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
17688         PR target/85900
17689         PR target/85345
17690         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17692 2018-05-25  Jim Wilson  <jimw@sifive.com>
17694         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17695         * config/riscv/riscv.c (struct machine_function): Add
17696         interrupt_handler_p and attribute_checked_p fields.
17697         (riscv_attribute_table): Add interrupt.
17698         (riscv_interrupt_type_p): New.
17699         (riscv_save_reg_p): Save extra regs for interrupt handler.
17700         (riscv_use_save_libcall): Return false  for interrupt handler.
17701         (riscv_first_stack_step): Add forward declaration.
17702         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
17703         for interrupt handler with large frame.  Use it for saved reg list.
17704         (riscv_expand_prologue): Move flag_stack_usage_info support to
17705         eliminate duplication.
17706         (riscv_expand_epilogue): Generate mret for interrupt handler.
17707         (riscv_epilogue_uses): New.
17708         (riscv_can_use_return_insn): Return false for interrupt handler.
17709         (riscv_function_ok_for_sibcall): Likewise.
17710         (riscv_set_current_function): Add interrupt handler support.
17711         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17712         * config/riscv/riscv.md (UNSPECV_MRET): New.
17713         (GP_REGNUM): New.
17714         (riscv_frflags, riscv_fsflags): Use tab after opcode.
17715         (riscv_mret): New.
17716         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17718 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
17720         PR tree-optimization/85712
17721         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17722         this candidate has already been replaced in-situ by a copy.
17724 2018-05-25  Jason Merrill  <jason@redhat.com>
17726         PR c++/80485 - inline function non-zero address.
17727         * symtab.c (nonzero_address): Check DECL_COMDAT.
17729 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
17731         PR target/83628
17732         * config/alpha/alpha.md (ashlsi3): New insn pattern.
17733         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
17734         extension of SImode operation.  Use const123_operand predicate.
17735         (*saddsi_1): Remove.
17736         (*saddl_se_1): Ditto.
17737         (*ssubsi_1): Ditto.
17738         (*ssubl_se_1): Ditto.
17739         * config/alpha/predicates.md (const123_operand): New predicate.
17740         * config/alpha/constraints.md (P): Use IN_RANGE.
17742 2018-05-25  Richard Biener  <rguenther@suse.de>
17744         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17745         defaulted to true.
17746         (ref_maybe_used_by_stmt_p): Likewise.
17747         (stmt_may_clobber_ref_p): Likewise.
17748         (stmt_may_clobber_ref_p_1): Likewise.
17749         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17750         and pass it along.
17751         (ref_maybe_used_by_stmt_p): Likewise.
17752         (stmt_may_clobber_ref_p): Likewise.
17753         (stmt_may_clobber_ref_p_1): Likewise.
17754         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17755         the alias oracle to disambiguate DRs with stmts DR analysis
17756         couldn't handle.
17757         (vect_analyze_data_refs): Do not give up on not analyzable
17758         DRs for BB vectorization.  Remove code truncating the dataref
17759         vector.
17761 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
17763         PR target/85832
17764         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17765         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
17766         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17768 2018-05-25  Richard Biener  <rguenther@suse.de>
17770         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17771         function, combining stmt data ref gathering and fatal analysis
17772         parts.
17773         (vect_analyze_data_refs): Remove now redudnant code and simplify.
17774         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17775         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17776         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17777         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17779 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17781         PR tree-optimization/85720
17782         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17783         SCC if all partitions are builtins.
17784         (version_loop_by_alias_check): New parameter.  Generate cancelable
17785         runtime alias check if all partitions are builtins.
17786         (distribute_loop): Update call to above function.
17788 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17790         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17791         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17792         (parm_default_def_partition_arg): Ditto.
17793         (set_parm_default_def_partition): Ditto.
17794         (get_parm_default_def_partitions): Ditto and make it static.
17795         (get_undefined_value_partitions): Ditto and make it static.
17796         (remove_ssa_form): Refactor call to init_var_map here.
17797         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17798         computation for loop region.
17799         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17800         (register_default_def): Delete.
17801         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17802         (parm_default_def_partition_arg): Ditto.
17803         (set_parm_default_def_partition): Ditto.
17804         (get_parm_default_def_partitions): Ditto and make it static.
17805         (get_undefined_value_partitions): Ditto and make it static.
17806         (coalesce_with_default, coalesce_with_default): Update comment.
17807         (create_coalesce_list_for_region): New func factored out from
17808         create_outofssa_var_map.
17809         (populate_coalesce_list_for_outofssa): New func factored out from
17810         create_outofssa_var_map and coalesce_ssa_name.
17811         (create_outofssa_var_map): Delete.
17812         (coalesce_ssa_name): Refactor to support live range computation.
17813         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17814         (get_parm_default_def_partitions): Delete.
17815         (get_undefined_value_partitions): Ditto.
17816         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17817         computation for loop region.
17818         (new_tree_live_info, loe_visit_block): Ditto.
17819         (live_worklist, set_var_live_on_entry): Ditto.
17820         (calculate_live_on_exit, verify_live_on_entry): Ditto.
17821         * tree-ssa-live.h (struct _var_map): New fields.
17822         (init_var_map): Change decl.
17823         (region_contains_p): New.
17825 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17827         * tree-ssa-live.h (live_merge_and_clear): Delete.
17829 2018-05-25  Richard Biener  <rguenther@suse.de>
17831         PR c++/85912
17832         * tree-dump.c (dequeue_and_dump): Remove access to removed
17833         operand 2 of a SWITCH_EXPR.
17835 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17837         * doc/sourcebuild.texi (vect_double_cond_arith): Include
17838         multiplication and division.
17839         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17840         (cond_udiv@var{m}, cond_umod@var{m}): Document.
17841         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17842         (cond_udiv_optab, cond_umod_optab): New optabs.
17843         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17844         (IFN_COND_RDIV): New internal functions.
17845         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17846         TRUNC_MOD_EXPR and RDIV_EXPR.
17847         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17848         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17849         New unspecs.
17850         (SVE_INT_BINARY): Include mult.
17851         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17852         (optab, sve_int_op): Handle mult.
17853         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17854         UNSPEC_COND_DIV.
17855         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17856         for SVE_INT_BINARY_SD.
17858 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17860         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17861         (optab, sve_int_op): Handle div and udiv.
17862         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17863         for SVE_INT_BINARY_SD.
17864         (*<optab><mode>3): New insn for the same.
17866 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17868         * tree-vect-patterns.c: Include predict.h.
17869         (vect_recog_divmod_pattern): Restrict check for division support
17870         to when optimizing for size.
17872 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17874         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17875         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17876         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17877         (gimple_match_op::set_op): Likewise.
17878         (gimple_resimplify4): Declare.
17879         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17880         (expr::gen_transform): Likewise.
17881         (decision_tree::gen): Generate a simplification routine for 4 operands.
17882         * gimple-match-head.c (gimple_simplify): Add an overload for
17883         4 operands.  In the top-level function, handle up to 4 call
17884         arguments and call gimple_resimplify4.
17885         (gimple_resimplify4): New function.
17886         (build_call_internal): Pass a fourth operand.
17887         (maybe_push_to_seq): Likewise.
17888         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17889         Fold VEC_COND_EXPRs of an operation and a default value into
17890         an IFN_COND_* function if possible.
17891         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17892         New unspecs.
17893         (SVE_COND_FP_BINARY): Include them.
17894         (optab, sve_fp_op): Handle them.
17895         (SVE_INT_BINARY_REV): New code iterator.
17896         (SVE_COND_FP_BINARY_REV): New int iterator.
17897         (commutative): New int attribute.
17898         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17899         Declare.
17900         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17901         function.
17902         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17903         (*cond_<optab><mode>): New patterns for reversed operands.
17905 2018-05-25  Richard Biener  <rguenther@suse.de>
17907         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17908         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17909         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17910         (STMT_VINFO_GROUPED_ACCESS): Adjust.
17911         * tree-vect-data-refs.c (everywhere): Adjust users.
17912         * tree-vect-loop.c (everywhere): Likewise.
17913         * tree-vect-slp.c (everywhere): Likewise.
17914         * tree-vect-stmts.c (everywhere): Likewise.
17915         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17917 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17919         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17920         Rename to...
17921         (gcc_cv_as_section_exclude): ... this.
17922         Try Solaris as #exclude syntax.
17923         * configure: Regenerate.
17924         * config.in: Regenerate.
17925         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17926         SECTION_EXCLUDE.
17927         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17928         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17930         * varasm.c (default_elf_asm_named_section): Don't check if
17931         HAVE_GAS_SECTION_EXCLUDE is defined.
17933 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17935         * doc/md.texi: Update the documentation of the cond_* optabs
17936         to mention the new final operand.  Fix GET_MODE_NUNITS call.
17937         Describe the scalar case too.
17938         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17939         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17940         instead of 2.
17941         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17942         (get_conditional_internal_fn): Update comment.
17943         * tree-vect-loop.c (vectorizable_reduction): Pass the original
17944         accumulator value as a final argument to conditional functions.
17945         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17946         a define_expand and add an "else" operand.  Assert for now that
17947         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
17948         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17949         (*cond_<optab><mode>): New patterns.
17950         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17951         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17952         (UNSPEC_COND_EOR): Delete.
17953         (optab): Remove associated mappings.
17954         (SVE_INT_BINARY): New code iterator.
17955         (sve_int_op): Remove int attribute and add "minus" to the code
17956         attribute.
17957         (SVE_COND_INT_OP): Delete.
17958         (SVE_COND_FP_OP): Rename to...
17959         (SVE_COND_FP_BINARY): ...this.
17961 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17963         * optabs.c (can_reuse_operands_p): New function.
17964         (maybe_legitimize_operands): Try to reuse the results for
17965         earlier operands.
17967 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
17969         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
17970         Add {q} suffix to insn mnemonic.
17972 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17974         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
17975         (msp430_warn_func_return): New.
17977 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
17979         * fold-const.c (tree_nonzero_bits): New function.
17980         * fold-const.h (tree_nonzero_bits): Likewise.
17981         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
17982         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
17984 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
17986         PR target/85900
17987         PR target/85345
17988         * varasm.c (assemble_alias): Check ifunc_resolver only on
17989         FUNCTION_DECL.
17991 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
17993         PR target/85903
17994         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
17995         when memory input operand is handled.
17997 2018-05-24  Luis Machado  <luis.machado@linaro.org>
17999         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18000         global.
18001         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18003 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18005         * match.pd: Delay FMA folds until after vectorization.
18007 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18009         PR target/83009
18010         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18011         address check not strict.
18013 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18015         * gimple-match.h (gimple_match_op): New class.
18016         (mprts_hook): Replace parameters with a gimple_match_op *.
18017         (maybe_build_generic_op): Likewise.
18018         (gimple_simplified_result_is_gimple_val): Replace parameters with
18019         a const gimple_match_op *.
18020         (gimple_simplify): Replace code_helper * and tree * parameters with
18021         a gimple_match_op * parameter.
18022         (gimple_resimplify1): Replace code_helper *, tree and tree *
18023         parameters with a gimple_match_op * parameter.
18024         (gimple_resimplify2): Likewise.
18025         (gimple_resimplify3): Likewise.
18026         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18027         parameters with a gimple_match_op * parameter.
18028         * gimple-match-head.c (gimple_simplify): Change prototypes of
18029         auto-generated functions to take a gimple_match_op * instead of
18030         separate code_helper * and tree * parameters.  Make the same
18031         change in the top-level overload and update calls to the
18032         gimple_resimplify routines.  Update calls to the auto-generated
18033         functions and to maybe_push_res_to_seq in the publicly-facing
18034         operation-specific gimple_simplify overloads.
18035         (gimple_match_op::MAX_NUM_OPS): Define.
18036         (gimple_resimplify1): Replace rcode and ops with a single res_op
18037         parameter.  Update call to gimple_simplify.
18038         (gimple_resimplify2): Likewise.
18039         (gimple_resimplify3): Likewise.
18040         (mprts_hook): Replace parameters with a gimple_match_op *.
18041         (maybe_build_generic_op): Likewise.
18042         (build_call_internal): Replace type, nargs and ops with
18043         a gimple_match_op *.
18044         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18045         with a single gimple_match_op *.  Update calls to mprts_hook,
18046         build_call_internal and gimple_simplified_result_is_gimple_val.
18047         Factor out code that is common to the tree_code and combined_fn cases.
18048         * genmatch.c (expr::gen_transform): Replace tem_code and
18049         tem_ops with a gimple_match_op called tem_op.  Update calls
18050         to the gimple_resimplify functions and maybe_push_res_to_seq.
18051         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18052         res_ops.  Update call to the gimple_resimplify functions.
18053         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18054         (decision_tree::gen): Make the functions take a gimple_match_op *
18055         called res_op instead of separate res_code and res_ops parameters.
18056         Update call accordingly.
18057         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18058         and ops with a single res_op parameter.  Update calls to
18059         maybe_build_generic_op and maybe_push_res_to_seq.
18060         (fold_stmt_1): Update calls to gimple_simplify and
18061         replace_stmt_with_simplification.
18062         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18063         and gimple_simplified_result_is_gimple_val.
18064         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18065         gimple_simplify.
18066         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18067         with a gimple_match_op *.
18068         (vn_nary_build_or_lookup): Likewise.  Update call to
18069         vn_nary_build_or_lookup_1.
18070         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18071         gimple_match_op *.  Update calls to the gimple_resimplify routines
18072         and to gimple_simplified_result_is_gimple_val.
18073         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18074         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18075         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18076         (visit_nary_op): Likewise.
18077         (visit_reference_op_load): Likewise.
18079 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18081         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18082         modifier for printing the step amount.
18084 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18086         PR target/78849
18087         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18088         types.
18090 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
18092         * doc/sourcebuild.texi (Endianness): New subsubsection.
18094 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18096         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18097         <prefetch_dynamic_strides>: New const bool field.
18098         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18099         prefetch_dynamic_strides.
18100         (exynosm1_prefetch_tune): Likewise.
18101         (thunderxt88_prefetch_tune): Likewise.
18102         (thunderx_prefetch_tune): Likewise.
18103         (thunderx2t99_prefetch_tune): Likewise.
18104         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18105         false.
18106         (aarch64_override_options_internal): Update to set
18107         PARAM_PREFETCH_DYNAMIC_STRIDES.
18108         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18109         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18110         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18111         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18112         prefetch-dynamic-strides setting.
18114 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18116         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18117         <minimum_stride>: New const int field.
18118         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18119         minimum_stride field defaulting to -1.
18120         (exynosm1_prefetch_tune): Likewise.
18121         (thunderxt88_prefetch_tune): Likewise.
18122         (thunderx_prefetch_tune): Likewise.
18123         (thunderx2t99_prefetch_tune): Likewise.
18124         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18125         <default_opt_level>: Set to 3.
18126         (aarch64_override_options_internal): Update to set
18127         PARAM_PREFETCH_MINIMUM_STRIDE.
18128         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18129         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18130         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18131         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18132         stride is constant and is below the minimum stride threshold.
18134 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18136         * config/arm/arm-cpus.in (mode26): Delete.
18137         (armv4): Delete mode26 reference.
18138         * config/arm/arm.c (arm_configure_build_target): Delete use of
18139         isa_bit_mode26.
18141 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18143         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18144         New insn pattern.
18145         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18146         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
18147         for non-SSE modes.
18148         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
18149         (floatunsdidf2): Ditto.
18151 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18153         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18154         (fixuns_trunc<mode>si2_avx512f): Ditto.
18155         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18156         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18157         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18159 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18161         PR rtl-optimization/79985
18162         * df-scan.c (df_insn_refs_collect): Remove special case for
18163         global registers and asm statements.
18165 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18167         * extend.texi (Global Register Variables): Rewrite the bullet list.
18168         Note that the register is available for allocation. Note that access
18169         via inline asm must use constraints. Add note about async-signal
18170         handlers. Remove paragraph about automagic register selection.
18172 2018-05-23  Richard Biener  <rguenther@suse.de>
18174         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18175         of fixed offset from memset VN.
18177 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
18179         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18180         first_interp field.
18181         (alloc_cand_and_find_basis): Initialize first_interp field.
18182         (slsr_process_mul): Modify first_interp field.
18183         (slsr_process_add): Likewise.
18184         (slsr_process_cast): Modify first_interp field for each new
18185         interpretation.
18186         (slsr_process_copy): Likewise.
18187         (dump_candidate): Dump first_interp field.
18188         (replace_mult_candidate): Process all interpretations, not just
18189         subsequent ones.
18190         (replace_rhs_if_not_dup): Likewise.
18191         (replace_one_candidate): Likewise.
18193 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
18195         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18196         Add new boolean.
18197         (aarch64_needs_frame_chain): New function.
18198         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18200 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
18202         PR target/84882
18203         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18204         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18205         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18206         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18207         as true for strict-align.
18208         (aarch64_can_inline_p): Perform checks even when callee has no
18209         attributes to check for strict alignment.
18210         * doc/extend.texi (AArch64 Function Attributes): Document
18211         no-strict-align.
18212         * doc/invoke.texi: (AArch64 Options): Likewise.
18214 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
18216         PR tree-optimization/85853
18217         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18218         the handling of the root of the node to...
18219         (vect_slp_analyze_node_operations_1): ...this new function,
18220         and run the whole thing with the child nodes' def types
18221         set according to their SLP node's def type.
18223 2018-05-23  Richard Biener  <rguenther@suse.de>
18225         PR middle-end/85874
18226         * tree-data-ref.c (create_runtime_alias_checks): Defer
18227         and ignore overflow warnings.
18229 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
18231         PR tree-optimization/85822
18232         * tree-vrp.c (is_masked_range_test): Fix handling of negative
18233         constants.
18235 2018-05-23  Richard Biener  <rguenther@suse.de>
18237         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18238         memset constants via native_interpret_expr.
18240 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
18242         PR target/85345
18243         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18244         attribute.
18245         (cgraph_node::create_alias): Likewise.
18246         (cgraph_node::get_availability): Check ifunc_resolver instead
18247         of looking up ifunc attribute.
18248         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18249         * varasm.c (do_assemble_alias): Likewise.
18250         (assemble_alias): Likewise.
18251         (default_binds_local_p_3): Likewise.
18252         * cgraph.h (cgraph_node): Add ifunc_resolver.
18253         (cgraph_node::only_called_directly_or_aliased_p): Return false
18254         for IFUNC resolver.
18255         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18256         attribute.
18257         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18258         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18259         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18260         instead of looking up ifunc attribute.
18262 2018-05-22  Luis Machado  <luis.machado@linaro.org>
18264         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18266 2018-05-22  Martin Sebor  <msebor@redhat.com>
18268         PR middle-end/85359
18269         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18270         only when expasion succeeds.
18271         (expand_builtin_strcmp): Same.
18272         (expand_builtin_strncmp): Same.
18274 2018-05-22  Martin Sebor  <msebor@redhat.com>
18276         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18278 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18279             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18281         * config/aarch64/aarch64-ldpstp.md: Replace uses of
18282         aarch64_mem_pair_operand with memory_operand and delete operand swapping
18283         code.
18284         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18285         Add check for legitimate_address.
18286         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18287         (aarch64_swap_ldrstr_operands): New.
18288         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18289         Define prototype.
18291 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18292             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18294         * config/aarch64/aarch64.md: New patterns to generate stp
18295         and ldp.
18296         (store_pair_sw, store_pair_dw): New patterns to generate stp for
18297         single words and double words.
18298         (load_pair_sw, load_pair_dw): Likewise.
18299         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18300         Delete.
18301         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18302         Delete.
18303         * config/aarch64/aarch64-ldpstp.md: Modify peephole
18304         for different mode ldpstp and add peephole for merged zero stores.
18305         Likewise for loads.
18306         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18307         Add size check.
18308         (aarch64_gen_store_pair): Rename calls to match new patterns.
18309         (aarch64_gen_load_pair): Rename calls to match new patterns.
18310         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18311         (load_pair<DREG:mode><DREG2:mode>): ... This.
18312         (store_pair<mode>): Rename to...
18313         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18314         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18315         New mode iterators.
18316         (V_INT_EQUIV): Handle SImode.
18317         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18318         New predicate.
18320 2018-05-22  Martin Sebor  <msebor@redhat.com>
18322         PR c/85623
18323         * calls.c (maybe_warn_nonstring_arg): Use string length to set
18324         or ajust the presumed bound on an operation to avoid unnecessary
18325         warnings.
18327 2018-05-22  Martin Sebor  <msebor@redhat.com>
18329         PR tree-optimization/85826
18330         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18331         assuming that a DECL necesarily has a constant size.
18333 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
18335         PR middle-end/85862
18336         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18338 2018-05-22  Richard Biener  <rguenther@suse.de>
18340         PR tree-optimization/85834
18341         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18342         non-constant and non-zero memset arguments.
18344 2018-05-22  Martin Liska  <mliska@suse.cz>
18346         PR ipa/85607
18347         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18349 2018-05-22  Richard Biener  <rguenther@suse.de>
18351         PR tree-optimization/85863
18352         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18353         comparisons when vectype is specified.
18354         (vectorizable_condition): Do not specify vectype for
18355         vect_is_simple_cond when SLP vectorizing.
18357 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
18359         PR target/85657
18360         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18361         define __ibm128 as long double.
18362         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18363         as a distinct type when IEEE 128-bit support is enabled.
18364         (init_float128_ieee): Fix up conversions between IFmode and IEEE
18365         128-bit types to use the correct functions.
18366         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18367         convert between 128-bit floating point types that have different
18368         modes but the same representation, instead of using gen_lowpart to
18369         makean alias.
18370         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18371         KFmode.
18372         (IFKF_reg): New attributes to give the register constraints for
18373         IFmode and KFmode.
18374         (extend<mode>tf2_internal): New insns to mark an explicit
18375         conversion between 128-bit floating point types that have a
18376         different mode but share the same representation.
18378 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
18380         PR tree-optimization/85814
18381         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18382         a null return from get_strinfo when unsharing the next
18383         strinfo in the chain.
18385 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
18387         PR gcc/84923
18388         * varasm.c (weak_finish): Clean up weak_decls.
18390 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18392         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18393         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18394         UNSPEC_UADALP values.
18395         * config/aarch64/iterators.md (ABAL): New int iterator.
18396         (ABDL2): Likewise.
18397         (ADALP): Likewise.
18398         (sur): Add mappings for the above.
18399         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18400         New define_insn.
18401         (aarch64_<sur>abal<mode>_4): Likewise.
18402         (aarch64_<sur>adalp<mode>_3): Likewise.
18403         (<sur>sadv16qi): New define_expand.
18405 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
18407         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18408         (*movdf_internal): Ditto.
18409         (*rcpsf2_sse): Ditto.
18410         (*rsqrtsf2_sse): Ditto.
18411         (*sqrt<mode>2_sse): Ditto.
18413 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
18415         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18416         eor3q<mode>4.
18417         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18418         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18419         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18420         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18421         vbcaxq_s64): New.
18422         * config/aarch64/arm_neon.h: Likewise.
18423         * config/aarch64/iterators.md (VQ_I): New.
18425 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
18427         * config.gcc: Add arc/t-multilib-linux to tmake_file for
18428         arc*-*-linux*.
18429         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18430         MULTILIB_DIRNAMES
18432 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
18434         * config/nds32/constraints.md (S): New constraint.
18435         * config/nds32/nds32.md (call_internal): Use constraint S.
18436         (call_value_internal): Likewise.
18437         (sibcall_internal): Likewise.
18438         (sibcall_value_internal): Likewise.
18440 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
18441             Chung-Ju Wu  <jasonwucj@gmail.com>
18443         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18444         into consideration.
18446 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
18447             Chung-Ju Wu  <jasonwucj@gmail.com>
18449         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18450         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18451         (nds32_rtx_costs_impl): Simplify.
18452         (nds32_address_cost_impl): Simplify.
18453         (nds32_init_rtx_costs): New function.
18454         (nds32_rtx_costs_speed_prefer): Likewise.
18455         (nds32_rtx_costs_size_prefer): Likewise.
18456         (nds32_address_cost_speed_prefer): Likewise.
18457         (nds32_address_cost_speed_fwprop): Likewise.
18458         (nds32_address_cost_size_prefer): Likewise.
18459         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18460         * config/nds32/nds32.c (nds32_option_override): Use
18461         nds32_init_rtx_costs function.
18463 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
18465         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18466         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18467         (TARGET_PIPELINE_N8): Likewise.
18468         (TARGET_PIPELINE_N10): Likewise.
18469         (TARGET_PIPELINE_N13): Likewise.
18470         (TARGET_PIPELINE_GRAYWOLF): Likewise.
18472 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
18474         * config/nds32/nds32-fpu.md: Update copyright year.
18476 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18478         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18480 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18482         * config/nds32/nds32.c
18483         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18484         * config/nds32/nds32.opt (minline-asm-r15): New option.
18486 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18488         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18489         MASK_HW_ABS.
18490         * config/nds32/nds32.md (abssi2): New pattern.
18492 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
18494         * config/i386/i386.md (rex64namesuffix): New mode attribute.
18495         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18496         Merge insn pattern from sse_cvtsi2ss<round_name> and
18497         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18498         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18499         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18500         using SWI48 mode iterator.
18501         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18502         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18503         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18504         pattern from sse_cvttss2si<round_saeonly_name>
18505         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18506         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18507         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18508         using SWI48 mode iterator.
18509         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18510         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18511         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18512         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18513         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18514         using SWI48 mode iterator.
18515         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18516         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18517         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18518         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18519         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18520         SWI48 mode iterator.
18521         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18522         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18523         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18524         pattern from sse_cvttsd2si<round_saeonly_name>
18525         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18527 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18529         * config/nds32/nds32-md-auxiliary.c
18530         (nds32_valid_smw_lwm_base_p): Refine.
18531         (nds32_output_smw_single_word): Refine.
18532         (nds32_output_smw_double_word): New.
18533         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18535 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18537         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18538         (nds32_output_stack_pop): Refine.
18539         (nds32_expand_unaligned_load): Refine.
18540         (nds32_expand_unaligned_store): Refine.
18542 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18543             Chung-Ju Wu  <jasonwucj@gmail.com>
18545         * config/nds32/constants.md: Add TP_REGNUM constant.
18546         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18547         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18548         UNSPEC_ADD32.
18549         * config/nds32/nds32-doubleword.md: Consider flag_pic.
18550         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18551         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18552         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18553         and PIC code generation.
18554         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18555         code generation.
18556         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18557         optimization.
18558         * config/nds32/nds32.md: Support TLS and PIC.
18559         * config/nds32/nds32.c: Support TLS and PIC.
18560         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18561         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18562         predicate.
18564 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18566         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18567         mode with E_ prefix.
18569 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18570             Chung-Ju Wu  <jasonwucj@gmail.com>
18572         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18573         * config/nds32/nds32-md-auxiliary.c
18574         (symbolic_reference_mentioned_p): New.
18575         (nds32_legitimize_ict_address): New.
18576         (nds32_expand_ict_move): New.
18577         (nds32_indirect_call_referenced_p): New.
18578         (nds32_symbol_binds_local_p): Delete.
18579         (nds32_long_call_p): Modify.
18580         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18581         * config/nds32/nds32-protos.h
18582         (symbolic_reference_mentioned_p): Declare.
18583         (nds32_legitimize_ict_address): Declare.
18584         (nds32_expand_ict_move): Declare.
18585         (nds32_indirect_call_referenced_p): Declare.
18586         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18587         (nds32_relax_group): Use nds32_ict_const_p as condition.
18588         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18589         (nds32_asm_file_start): Output ict_model directive in asm code.
18590         (nds32_legitimate_address_p): Consider indirect call.
18591         (nds32_print_operand): Consider indirect call.
18592         (nds32_print_operand_address): Consider indirect call.
18593         (nds32_insert_attributes): Handle "indirect_call" attribute.
18594         (TARGET_LEGITIMATE_ADDRESS_P): Define.
18595         (TARGET_LEGITIMATE_CONSTANT_P): Define.
18596         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18597         (TARGET_DELEGITIMIZE_ADDRESS): Define.
18598         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18599         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18600         (TARGET_ICT_MODEL_SMALL): Define.
18601         (TARGET_ICT_MODEL_LARGE): Define.
18602         * config/nds32/nds32.md (movsi): Consider ict model.
18603         (call, call_value): Consider ict model.
18604         (sibcall, sibcall_value): Consider ict model.
18605         * config/nds32/nds32.opt (mict-model): New option.
18606         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18607         model.
18609 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
18610             Monk Chiang  <sh.chiang04@gmail.com>
18611             Jim Wilson <jimw@sifive.com>
18613         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18614         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
18615         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18616         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18617         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
18618         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18619         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18620         compute save_libcall_adjustment properly.
18621         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18622         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18623         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18624         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18625         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18626         (ABI_SPEC): Handle mabi=ilp32e.
18627         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18628         (RVE): Add RVE mask.
18629         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18630         <-march>: Add rv32e as an example.
18632 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
18634         PR c++/82899
18635         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18636         (intra_create_variable_infos): Handle C++ constructors.
18638 2018-05-18  Martin Liska  <mliska@suse.cz>
18640         * passes.def: Remove a redundant pass.
18642 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
18644         PR bootstrap/85838
18645         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18647 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18649         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18650         (ARMv4): Update.
18651         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18652         (ARMv6m): Update.
18653         (armv2, armv2a, armv3, armv3m): Delete architectures.
18654         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18655         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18656         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18657         Delete cpus.
18658         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18659         (*mulsidi3adddi): Likewise.
18660         (mulsidi3): Likewise.
18661         (*mulsidi3_nov6): Likewise.
18662         (umulsidi3): Likewise.
18663         (umulsidi3_nov6): Likewise.
18664         (umaddsidi4): Likewise.
18665         (*umulsidi3adddi): Likewise.
18666         (smulsi3_highpart): Likewise.
18667         (*smulsi3_highpart_nov6): Likewise.
18668         (umulsi3_highpart): Likewise.
18669         (*umulsi3_highpart_nov6): Likewise.
18670         * config/arm/arm.h (arm_arch3m): Delete.
18671         * config/arm/arm.c (arm_arch3m): Delete.
18672         (arm_option_override_internal): Update armv3-related comment.
18673         (arm_configure_build_target): Delete use of isa_bit_mode32.
18674         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18675         (arm_rtx_costs_internal): Delete check of arm_arch3m.
18676         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18677         (mulsa3): Likewise.
18678         (mulusa3): Likewise.
18679         * config/arm/arm-protos.h (arm_arch3m): Delete.
18680         * config/arm/arm-tables.opt: Regenerate.
18681         * config/arm/arm-tune.md: Likewise.
18682         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18683         deleted architectures.
18685 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18687         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18688         (armv5t, armv5te): New features.
18689         (ARMv5, ARMv5e): Delete fgroups.
18690         (ARMv5t, ARMv5te): Adjust for above changes.
18691         (ARMv6m): Likewise.
18692         (armv5, armv5e): Delete arches.
18693         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18694         arm_arch5.
18695         (*call_reg_arm): Likewise.
18696         (*call_value_reg_armv5): Likewise.
18697         (*call_value_reg_arm): Likewise.
18698         (*call_symbol): Likewise.
18699         (*call_value_symbol): Likewise.
18700         (*sibcall_insn): Likewise.
18701         (*sibcall_value_insn): Likewise.
18702         (clzsi2): Likewise.
18703         (prefetch): Likewise.
18704         (define_split and define_peephole2 dependent on arm_arch5):
18705         Likewise.
18706         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18707         arm_arch5e.
18708         (TARGET_ARM_QBIT): Likewise.
18709         (TARGET_DSP_MULTIPLY): Likewise.
18710         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18711         (arm_arch5, arm_arch5e): Delete.
18712         (arm_arch5t, arm_arch5te): Declare.
18713         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18714         (arm_arch5t): Declare.
18715         (arm_option_reconfigure_globals): Update for the above.
18716         (arm_options_perform_arch_sanity_checks): Update comment, replace
18717         use of arm_arch5 with arm_arch5t.
18718         (use_return_insn): Likewise.
18719         (arm_emit_call_insn): Likewise.
18720         (output_return_instruction): Likewise.
18721         (arm_final_prescan_insn): Likewise.
18722         (arm_coproc_builtin_available): Likewise.
18723         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18724         arm_arch5e with arm_arch5t and arm_arch5te.
18725         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18726         (arm_arch5t, arm_arch5te): Declare.
18727         * config/arm/arm-tables.opt: Regenerate.
18728         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18729         * config/arm/t-multilib: Likewise.
18730         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18731         instead of arm_arch5.
18732         (*call_reg_thumb1): Likewise.
18733         (*call_value_reg_thumb1_v5): Likewise.
18734         (*call_value_reg_thumb1): Likewise.
18735         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18736         unreachable path.
18737         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18739 2018-05-18  Martin Liska  <mliska@suse.cz>
18741         PR gcov-profile/84846
18742         * doc/gcov.texi: Document -t option of gcov tool.
18744 2018-05-18  Martin Liska  <mliska@suse.cz>
18746         PR gcov-profile/84846
18747         * gcov.c (print_usage): Add new -t option.
18748         (process_args): Handle the option.
18749         (generate_results): Use stdout as output when requested by
18750         the option.
18752 2018-05-18  Martin Liska  <mliska@suse.cz>
18754         PR gcov-profile/84846
18755         * coverage.c (coverage_init): Write PWD to .gcno file.
18756         * doc/gcov.texi: Document how working directory is printed.
18757         * gcov-dump.c (dump_gcov_file): Print PWD.
18758         * gcov.c (output_intermediate_file): Likewise.
18759         (read_graph_file): Read PWD string.
18760         (output_lines): Print PWD.
18762 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18764         PR middle-end/85817
18765         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18766         for retval and return false if all args to phi are zero.
18768 2018-05-18  Richard Biener  <rguenther@suse.de>
18770         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18771         method.
18772         (evrp_dom_walker::before_dom_children): Call it.
18774 2018-05-18  Richard Biener  <rguenther@suse.de>
18776         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18777         results when processing array refs with variable index.
18779 2018-05-18  Toon Moene  <toon@moene.org>
18781         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18782         directly after that of -floop-interchange. Indicate that both
18783         options are enabled by default when specifying -O3.
18785 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18787         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18788         iterator.  Delete separate integer-mode vec_set<mode> expander.
18789         (aarch64_simd_vec_setv2di): Delete.
18790         (vec_setv2di): Delete.
18791         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18792         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
18793         the "w, r" alternative.
18795 2018-05-18  Martin Liska  <mliska@suse.cz>
18797         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18798         * tree-pass.h (make_pass_lower_switch_O0): New function.
18799         * tree-switch-conversion.c (node_has_low_bound): Remove.
18800         (node_has_high_bound): Likewise.
18801         (node_is_bounded): Likewise.
18802         (class pass_lower_switch): Make it a template type and create
18803         two instances.
18804         (pass_lower_switch::execute): Add template argument.
18805         (make_pass_lower_switch): New function.
18806         (make_pass_lower_switch_O0): New function.
18807         (do_jump_if_equal): Remove.
18808         (emit_case_nodes): Simplify to just handle all 3 cases and leave
18809         all the hard work to tree optimization passes.
18811 2018-05-18  Martin Liska  <mliska@suse.cz>
18813         * dbgcnt.c (limit_low): Renamed from limit.
18814         (limit_high): New variable.
18815         (dbg_cnt_is_enabled): Check for upper limit.
18816         (dbg_cnt): Adjust dumping.
18817         (dbg_cnt_set_limit_by_index): Add new argument for high
18818         value.
18819         (dbg_cnt_set_limit_by_name): Likewise.
18820         (dbg_cnt_process_single_pair): Parse new format.
18821         (dbg_cnt_process_opt): Use strtok.
18822         (dbg_cnt_list_all_counters): Remove 'value' and add
18823         'limit_high'.
18824         * doc/invoke.texi: Document changes.
18826 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
18828         * doc/sourcebuild.texi (scalar_all_fma): Document.
18829         * tree.def (FMA_EXPR): Delete.
18830         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18831         * internal-fn.c (ternary_direct): New macro.
18832         (expand_ternary_optab_fn): Likewise.
18833         (direct_ternary_optab_supported_p): Likewise.
18834         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18835         * builtins.c (fold_builtin_fma): Delete.
18836         (fold_builtin_3): Don't call it.
18837         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18838         * expr.c (expand_expr_real_2): Likewise.
18839         * fold-const.c (operand_equal_p): Likewise.
18840         (fold_ternary_loc): Likewise.
18841         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18842         * gimple.c (DEFTREECODE): Likewise.
18843         * gimplify.c (gimplify_expr): Likewise.
18844         * optabs-tree.c (optab_for_tree_code): Likewise.
18845         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18846         * tree-eh.c (operation_could_trap_p): Likewise.
18847         (stmt_could_throw_1_p): Likewise.
18848         * tree-inline.c (estimate_operator_cost): Likewise.
18849         * tree-pretty-print.c (dump_generic_node): Likewise.
18850         (op_code_prio): Likewise.
18851         * tree-ssa-loop-im.c (stmt_cost): Likewise.
18852         * tree-ssa-operands.c (get_expr_operands): Likewise.
18853         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18854         * fold-const-call.h (fold_fma): Delete.
18855         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18856         CFN_FNMA and CFN_FNMS.
18857         (fold_fma): Delete.
18858         * genmatch.c (combined_fn): New enum.
18859         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18860         (commutative_op): New function.
18861         (commutate): Use it.  Handle more than 2 operands.
18862         (dt_operand::gen_gimple_expr): Use commutative_op.
18863         (parser::parse_expr): Allow :c to be used with non-binary
18864         operators if the commutative operand is known.
18865         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18866         CFN_FMS, CFN_FNMA and CFN_FNMS.
18867         (backprop::process_assign_use): Remove FMA_EXPR handling.
18868         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18869         (gen_hsa_fma): New function.
18870         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18871         IFN_FNMA and IFN_FNMS.
18872         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18873         * gimple-fold.h (follow_all_ssa_edges): Declare.
18874         * gimple-fold.c (follow_all_ssa_edges): New function.
18875         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18876         gimple_build interface and use follow_all_ssa_edges to fold the result.
18877         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18878         instead of checking for optabs directly.
18879         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18880         rather than FMA_EXPRs.
18881         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18882         call to IFN_FMA instead of an FMA_EXPR.
18884 2018-05-17  Jim Wilson  <jimw@sifive.com>
18886         * expr.c (do_tablejump): When converting index to Pmode, if we have a
18887         sign extended promoted subreg, and the range does not have the sign bit
18888         set, then do a sign extend.
18890         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18891         test, check for sign extended subreg and/or constant operands, and
18892         do a sign extend in that case.
18894 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
18896         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18897         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18898         Add untyped.
18899         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18900         Change logics_shift_reg to logics_shift_imm.
18901         (thunderx2t99_fp_loadpair_basic): Delete.
18902         (thunderx2t99_fp_storepair_basic): Delete.
18903         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18904         (thunderx2t99_asimd_polynomial): Delete.
18905         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18906         and neon_fp_mul_d_scalar_q.
18907         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18908         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18909         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18910         (thunderx2t99_asimd_lut): Add missing tbl types.
18911         (thunderx2t99_asimd_ext): Delete.
18912         (thunderx2t99_asimd_load1_1_mult): Delete.
18913         (thunderx2t99_asimd_load1_2_mult): Delete.
18914         (thunderx2t99_asimd_load1_ldp): New.
18915         (thunderx2t99_asimd_load1): New.
18916         (thunderx2t99_asimd_load2): Add missing *load2* types.
18917         (thunderx2t99_asimd_load3): New.
18918         (thunderx2t99_asimd_load4): New.
18919         (thunderx2t99_asimd_store1_1_mult): Delete.
18920         (thunderx2t99_asimd_store1_2_mult): Delete.
18921         (thunderx2t99_asimd_store2_mult): Delete.
18922         (thunderx2t99_asimd_store2_onelane): Delete.
18923         (thunderx2t99_asimd_store_stp): New.
18924         (thunderx2t99_asimd_store1): New.
18925         (thunderx2t99_asimd_store2): New.
18926         (thunderx2t99_asimd_store3): New.
18927         (thunderx2t99_asimd_store4): New.
18929 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
18931         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18932         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
18934 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
18935             Segher Boessenkool  <segher@kernel.crashing.org>
18937         PR target/85698
18938         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18939         operand.
18941 2018-05-17  Richard Biener  <rguenther@suse.de>
18943         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18944         for pruning loop and prune defs feeding only already visited PHIs.
18946 2018-05-17  Richard Biener  <rguenther@suse.de>
18948         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18950 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
18951             Richard Biener  <rguenther@suse.de>
18953         PR tree-optimization/85793
18954         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18955         for VMAT_ELEMENTWISE.
18957 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
18959         * internal-fn.h (lookup_internal_fn): Declare
18960         * internal-fn.c (lookup_internal_fn): New function.
18961         * gimple.c (gimple_build_call_from_tree): Handle calls to
18962         internal functions.
18963         * gimple-pretty-print.c (dump_gimple_call): Print "." before
18964         internal function names.
18965         * tree-pretty-print.c (dump_generic_node): Likewise.
18966         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
18968 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
18970         * gimple-fold.h (gimple_build): Make the function forms take
18971         combined_fn rather than built_in_function.
18972         (gimple_simplify): Likewise.
18973         * gimple-match-head.c (gimple_simplify): Likewise.
18974         * gimple-fold.c (gimple_build): Likewise.
18975         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
18976         rather than gimple_build_call_internal.
18977         (get_initial_defs_for_reduction): Likewise.
18978         (vect_create_epilog_for_reduction): Likewise.
18979         (vectorizable_live_operation): Likewise.
18981 2018-05-17  Martin Liska  <mliska@suse.cz>
18983         * gimple-ssa-sprintf.c (format_directive): Do not use
18984         space in between 'G_' and '('.
18986 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
18988         PR target/85323
18989         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
18990         even if the mask is not all ones.
18992         PR target/85323
18993         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
18994         vector.
18995         (ix86_gimple_fold_builtin): Likewise.
18997         PR target/85323
18998         * config/i386/i386.c: Include tree-vector-builder.h.
18999         (ix86_vector_shift_count): New function.
19000         (ix86_fold_builtin): Fold shift builtins by scalar count.
19001         (ix86_gimple_fold_builtin): Likewise.
19003         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19004         _mm512_setzero): New intrinsics.
19006 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
19007             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19009         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19010         code generation for cases where splatting a value is not useful.
19011         * simplify-rtx.c (simplify_ternary_operation): Simplify
19012         vec_merge across a vec_duplicate and a paradoxical subreg forming
19013         a vector mode to a vec_concat.
19015 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
19017         * config.gcc: Support "goldmont-plus".
19018         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19019         "goldmont-plus".
19020         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19021         PROCESSOR_GOLDMONT_PLUS.
19022         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19023         (processor_target_table): Add "goldmont-plus".
19024         (PTA_GOLDMONT_PLUS): Define.
19025         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19026         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19027         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19028         (fold_builtin_cpu): Add "goldmont-plus".
19029         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19030         (ix86_option_override_internal): Add "goldmont-plus".
19031         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19032         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19033         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19034         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19036 2018-05-17  Richard Biener  <rguenther@suse.de>
19038         PR tree-optimization/85757
19039         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19040         remove defs that only feed that PHI from further processing.
19042 2018-05-16  Jim Wilson  <jimw@sifive.com>
19044         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19045         asterisk to name.
19046         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19048 2018-05-16  Mark Wielaard  <mark@klomp.org>
19050         * dwarf2out.c (count_index_strings): New function.
19051         (output_indirect_strings): Call count_index_strings and generate
19052         header for dwarf_version >= 5.
19054 2018-05-16  Mark Wielaard  <mark@klomp.org>
19056         * dwarf2out.c (dwarf_FORM): New function.
19057         (set_indirect_string): Use dwarf_FORM.
19058         (reset_indirect_string): Likewise.
19059         (size_of_die): Likewise.
19060         (value_format): Likewise.
19061         (output_die): Likewise.
19062         (add_skeleton_AT_string): Likewise.
19063         (output_macinfo_op): Likewise.
19064         (index_string): Likewise.
19065         (output_index_string_offset): Likewise.
19066         (output_index_string): Likewise.
19067         (count_index_strings): Likewise.
19069 2018-05-16  Carl Love  <cel@us.ibm.com>
19071         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19072         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19074 2018-05-16  Martin Jambor  <mjambor@suse.cz>
19076         * ipa-prop.c (ipa_free_all_edge_args): Remove.
19077         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19079 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
19081         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19082         (fnma<mode>4): Likewise.
19083         (fms<mode>4): Likewise.
19084         (fnms<mode>4): Likewise.
19085         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19086         (aarch64_fnma<mode>4): Likewise.
19087         (aarch64_fms<mode>4): Likewise.
19088         (aarch64_fnms<mode>4): Likewise.
19089         (aarch64_fnmadd<mode>4): Likewise.
19091 2018-05-16  Jason Merrill  <jason@redhat.com>
19093         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
19095 2018-05-16  Richard Biener  <rguenther@suse.de>
19097         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19098         (dump_stmt_cost): Declare.
19099         (add_stmt_cost): Dump cost we add.
19100         (add_stmt_costs): New function.
19101         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19102         No longer exported.
19103         (vect_analyze_stmt): Adjust prototype.
19104         (vectorizable_condition): Likewise.
19105         (vectorizable_live_operation): Likewise.
19106         (vectorizable_reduction): Likewise.
19107         (vectorizable_induction): Likewise.
19108         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19109         cost vector to pass to vectorizable_ and record afterwards.
19110         (vect_model_reduction_cost): Take cost vector argument and adjust.
19111         (vect_model_induction_cost): Likewise.
19112         (vectorizable_reduction): Likewise.
19113         (vectorizable_induction): Likewise.
19114         (vectorizable_live_operation): Likewise.
19115         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19116         SLP_TREE_NUMBER_OF_VEC_STMTS.
19117         (vect_analyze_slp_cost_1): Remove.
19118         (vect_analyze_slp_cost): Likewise.
19119         (vect_slp_analyze_node_operations): Take visited args and
19120         a target cost vector.  Avoid processing already visited stmt sets.
19121         (vect_slp_analyze_operations): Use a local cost vector to gather
19122         costs and register those of non-discarded instances.
19123         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19124         (vect_schedule_slp_instance): Remove copying of
19125         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
19126         zero.
19127         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19128         adding cost.  Record cost entry location.
19129         (vect_prologue_cost_for_slp_op): Function to compute cost of
19130         a constant or invariant generated for SLP vect in the prologue,
19131         split out from vect_analyze_slp_cost_1.
19132         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
19133         (vect_model_promotion_demotion_cost): Likewise.
19134         (vect_model_store_cost): Likewise, make static.
19135         (vect_model_load_cost): Likewise.
19136         (vectorizable_bswap): Add cost vector arg and adjust.
19137         (vectorizable_call): Likewise.
19138         (vectorizable_simd_clone_call): Likewise.
19139         (vectorizable_conversion): Likewise.
19140         (vectorizable_assignment): Likewise.
19141         (vectorizable_shift): Likewise.
19142         (vectorizable_operation): Likewise.
19143         (vectorizable_store): Likewise.
19144         (vectorizable_load): Likewise.
19145         (vectorizable_condition): Likewise.
19146         (vectorizable_comparison): Likewise.
19147         (can_vectorize_live_stmts): Likewise.
19148         (vect_analyze_stmt): Likewise.
19149         (vect_transform_stmt): Adjust calls to vectorizable_*.
19150         * tree-vectorizer.c: Include gimple-pretty-print.h.
19151         (dump_stmt_cost): New function.
19153 2018-05-16  Richard Biener  <rguenther@suse.de>
19155         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19156         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19157         * tree-ssa-dse.c: Include tree-ssa-loop.h.
19158         (check_name): New callback.
19159         (dse_classify_store): Track cycles via a visited bitmap of PHI
19160         defs and simplify handling of in-loop and across loop dead stores
19161         and properly fail for loop-variant refs.  Handle byte-tracking with
19162         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19163         limiting the walk.
19165 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
19167         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19168         (vect_get_mask_type_for_stmt): Likewise.
19169         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19170         split out from...
19171         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
19172         to determine the statement's vector type and the vector type that
19173         should be used for calculating nunits.  Deal with cases in which
19174         the type has to be deferred.
19175         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19176         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19177         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19178         (vect_determine_vf_for_stmt): New functions, split out from...
19179         (vect_determine_vectorization_factor): ...here.
19180         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19181         (vect_get_mask_type_for_stmt): New functions, split out from
19182         vect_determine_vectorization_factor.
19184 2018-05-16  Richard Biener  <rguenther@suse.de>
19186         * tree-cfg.c (verify_gimple_assign_ternary): Properly
19187         verify the [VEC_]COND_EXPR embedded comparison.
19189 2018-05-15  Martin Sebor  <msebor@redhat.com>
19191         PR tree-optimization/85753
19192         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19193         RECORD_TYPE in addition to ARRAY_TYPE.
19195 2018-05-15  Martin Sebor  <msebor@redhat.com>
19197         PR middle-end/85643
19198         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19200 2018-05-15  Richard Biener  <rguenther@suse.de>
19202         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19203         add by_clobber_p one.  Change algorithm to collect all defs
19204         representing uses we need to walk and try reducing them to
19205         a single one before failing.
19206         (dse_dom_walker::dse_optimize_stmt): Adjust.
19208 2018-05-13  Mark Wielaard  <mark@klomp.org>
19210         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19211         (size_of_loc_descr): Likewise.
19212         (output_loc_operands): Likewise.
19213         (output_loc_operands_raw): Likewise.
19214         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19215         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19216         (hash_loc_operands): Likewise.
19217         (compare_loc_operands): Likewise.
19219 2018-05-14  Mark Wielaard  <mark@klomp.org>
19221         * dwarf2out.c (count_index_addrs): New function.
19222         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19224 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19226         PR tree-optimization/83648
19227         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19228         return value as malloc candidate.
19230 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19232         PR ipa/85734
19233         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19234         param as true in call to suggest_attribute.
19236 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
19238         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19239         -mreadonly-in-sdata.
19241 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19243         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19244         New pattern.
19245         (aarch64_crypto_aesd_fused): Likewise.
19247 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
19249         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19250         (movsi_aarch64): Likewise.
19251         (load_pairsi): Likewise.
19252         (load_pairdi): Likewise.
19253         (store_pairsi): Likewise.
19254         (store_pairdi): Likewise.
19255         (load_pairsf): Likewise.
19256         (load_pairdf): Likewise.
19257         (store_pairsf): Likewise.
19258         (store_pairdf): Likewise.
19259         (zero_extend): Likewise.
19260         (trunc): Swap alternatives.
19261         (fcvt_target): Add '?' to prefer w over r.
19263 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
19265         PR target/85756
19266         * config/i386/i386.md: Disallow non-commutative arithmetics in
19267         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19268         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
19269         in the peephole2 before it.
19271 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
19273         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19274         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19275         (ix86_handle_option): Handle -mcldemote.
19276         * config.gcc: New header.
19277         * config/i386/cldemoteintrin.h: New file.
19278         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19279         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19280         -mcldemote.
19281         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19282         OPTION_MASK_ISA_CLDEMOTE.
19283         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19284         (ix86_valid_target_attribute_inner_p): Ditto.
19285         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19286         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19287         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19288         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19289         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19290         (cldemote): New.
19291         * config/i386/i386.opt: Add -mcldemote.
19292         * config/i386/x86intrin.h: New header.
19293         * doc/invoke.texi: Add -mcldemote.
19295 2018-05-14  Richard Biener  <rguenther@suse.de>
19297         * doc/match-and-simplify.texi: Adjust :s documentation.
19299 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
19301         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19302         intended memcpy size.
19303         (REORDER_45): Likewise.
19305 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
19307         * sort.cc: New file.
19308         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19309         * vec.c (qsort_chk): Use gcc_qsort.
19310         * Makefile.in (OBJS-libcommon): Add sort.o.
19311         (build/sort.o): New target.  Use it...
19312         (BUILD_RTL): ... here, and...
19313         (build/gencfn-macros): ... here, and...
19314         (build/genmatch): ... here.
19316 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19317             Chung-Ju Wu  <jasonwucj@gmail.com>
19319         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19320         * config/nds32/nds32-graywolf.md: New file.
19321         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19322         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19323         pipeline.
19324         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19325         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19326         * config/nds32/nds32.md (pipeline_model): Add graywolf.
19327         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19328         * config/nds32/pipelines.md: Include n15 settings.
19330 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19331             Chung-Ju Wu  <jasonwucj@gmail.com>
19333         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19334         * config/nds32/nds32-n13.md: New file.
19335         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19336         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19337         pipeline.
19338         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19339         * config/nds32/nds32.md (pipeline_model): Add n13.
19340         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19341         * config/nds32/pipelines.md: Include n13 settings.
19343 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19344             Chung-Ju Wu  <jasonwucj@gmail.com>
19346         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19347         * config/nds32/nds32-n10.md: New file.
19348         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19349         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19350         pipeline.
19351         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19352         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19353         * config/nds32/nds32.md (pipeline_model): Add n10.
19354         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19355         * config/nds32/pipelines.md: Include n10 settings.
19357 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
19358             Kito Cheng  <kito.cheng@gmail.com>
19359             Chung-Ju Wu  <jasonwucj@gmail.com>
19361         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19362         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19363         Add enum values for DSP extension instructions.
19364         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19365         New constraints.
19366         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19367         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19368         New code iterators.
19369         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19370         * config/nds32/nds32-dspext.md: New file for DSP implementation.
19371         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19372         * config/nds32/nds32-intrinsic.md: Likewise.
19373         * config/nds32/nds32_intrinsic.h: Likewise.
19374         * config/nds32/nds32-md-auxiliary.c: Likewise.
19375         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19376         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19377         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19378         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19379         * config/nds32/nds32-protos.h: New declarations for DSP extension.
19380         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19381         TYPE_DMAC in switch statement.
19382         * config/nds32/nds32.c: New checking and implementation for DSP
19383         extension instructions.
19384         * config/nds32/nds32.h: Likewise.
19385         * config/nds32/nds32.md: Likewise.
19386         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19387         * config/nds32/predicates.md: Implement new predicates for DSP
19388         extension.
19390 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
19392         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19393         Reformat alternatives and attributes so it is easier to identify
19394         which constraints/attributes go with which instruction.
19395         (mov<mode>_hardfloat32, FMOVE64): Likewise.
19396         (mov<mode>_softfloat32, FMOVE64): Likewise.
19397         (mov<mode>_hardfloat64, FMOVE64): Likewise.
19398         (mov<mode>_softfloat64, FMOVE64): Likewise.
19400 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19402         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19403         subsection.
19404         (Basic PowerPC Built-in Functions): The new name of the
19405         subsection previously known as "PowerPC Built-in Functions".
19406         (Basic PowerPC Built-in Functions Available on all Configurations):
19407         New subsubsection.
19408         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19409         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19410         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19411         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19413 2018-05-11  Martin Jambor  <mjambor@suse.cz>
19415         PR ipa/85655
19416         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19417         single const.
19419 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
19421         PR target/85733
19422         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19424 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
19426         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19427         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19428         (ix86_handle_option): Handle -mwaitpkg.
19429         * config.gcc: New header.
19430         * config/i386/cpuid.h (bit_WAITPKG): New bit.
19431         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19432         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19433         function type.
19434         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19435         OPTION_MASK_ISA_WAITPKG.
19436         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19437         (ix86_option_override_internal): Add PTA_WAITPKG.
19438         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19439         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19440         IX86_BUILTIN_TPAUSE.
19441         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19442         __builtin_ia32_umwait and __builtin_ia32_tpause.
19443         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19444         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19445         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19446         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19447         UNSPECV_TPAUSE): New.
19448         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19449         * config/i386/i386.opt: Add -mwaitpkg.
19450         * config/i386/waitpkgintrin.h: New file.
19451         * config/i386/x86intrin.h: New header.
19452         * doc/invoke.texi: Add -mwaitpkg.
19454 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
19456         PR target/85606
19457         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19458         equivalent.
19459         (cortex-m0): Use armv6s-m isa.
19460         (cortex-m0plus): Likewise.
19461         (cortex-m1): Likewise.
19462         (cortex-m0.small-multiply): Likewise.
19463         (cortex-m0plus.small-multiply): Likewise.
19464         (cortex-m1.small-multiply): Likewise.
19466 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
19467             Jakub Jelinek  <jakub@redhat.com>
19469         PR tree-optimization/85692
19470         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19471         source permute as well.
19473 2018-05-11  Martin Liska  <mliska@suse.cz>
19475         PR sanitizer/85556
19476         * doc/extend.texi: Document LLVM style format for no_sanitize
19477         attribute.
19479 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19481         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19482         mode_supports_vsx_dform_quad to mode_supports_dq_form.
19483         (mode_supports_vsx_dform_quad): Likewise.
19484         (mode_supports_vmx_dform): Move these functions to be next to the
19485         other mode_supports functions.
19486         (mode_supports_dq_form): Likewise.
19487         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19488         mode_supports_dq_form.
19489         (reg_offset_addressing_ok_p): Likewise.
19490         (offsettable_ok_by_alignment): Likewise.
19491         (rs6000_legitimate_offset_address_p): Likewise.
19492         (legitimate_lo_sum_address_p): Likewise.
19493         (rs6000_legitimize_address): Likewise.
19494         (rs6000_legitimize_reload_address): Likewise.
19495         (rs6000_secondary_reload_inner): Likewise.
19496         (rs6000_preferred_reload_class): Likewise.
19497         (rs6000_output_move_128bit): Likewise.
19499 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19501         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19502         Generate SImode target register for null target.
19503         <case IX86_BUILTIN_XGETBV>: Ditto.
19504         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19505         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19507 2018-05-10  Carl Love  <cel@us.ibm.com>
19509         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19510         dcbtt and dcbtstt if operands[2] is 0.
19512 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19514         PR target/85693
19515         * config/i386/sse.md (usadv64qi): New expander.
19517 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
19519         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19520         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19521         -maltivec=be support.
19522         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19523         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19524         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19525         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19526         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19527         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19528         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19529         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19530         altivec_vsumsws): Adjust.
19531         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19532         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19533         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19534         support.
19535         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19536         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19537         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19538         (altivec_lve<VI_char>x): Delete expand.
19539         (*altivec_lve<VI_char>x_internal): Rename to...
19540         (altivec_lve<VI_char>x): ... this.
19541         (altivec_lvxl_<mode>): Delete expand.
19542         (*altivec_lvxl_<mode>_internal): Rename to ...
19543         (altivec_lvxl_<mode>): ... this.
19544         (altivec_stvxl_<mode>): Delete expand.
19545         (*altivec_stvxl_<mode>_internal): Rename to ...
19546         (altivec_stvxl_<mode>): ... this.
19547         (altivec_stve<VI_char>x): Delete expand.
19548         (*altivec_stve<VI_char>x_internal): Rename to ...
19549         (altivec_stve<VI_char>x): ... this.
19550         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19551         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19552         reduc_plus_scal_<mode>): Adjust.
19553         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19554         comment.
19555         (rs6000_cpu_cpp_builtins): Adjust.
19556         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19557         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19558         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19559         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19560         -maltivec=be support.
19561         (rs6000_split_vec_extract_var): Adjust.
19562         (rs6000_split_v4si_init): Adjust.
19563         (swap_selector_for_mode): Delete.
19564         (altivec_expand_lvx_be, altivec_expand_stvx_be,
19565         altivec_expand_stvex_be): Delete.
19566         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19567         -maltivec=be support.
19568         (rs6000_gimple_fold_builtin): Ditto.
19569         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19570         Adjust.
19571         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19572         (TARGET_DIRECT_MOVE_64BIT): Adjust.
19573         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19574         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19575         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19576         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19577         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19578         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19579         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19580         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19581         anonymous split): Adjust.
19582         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19583         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19585 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
19587         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19588         when --with-gxx-include-dir is also specified.
19589         * configure: Regenerate.
19591 2018-05-09  Jim Wilson  <jimw@sifive.com>
19593         PR target/84797
19594         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19595         * config/riscv/t-withmultilib: New.
19596         * config/riscv/withmultilib.h: New.
19597         * doc/install.texi: Document RISC-V --with-multilib-list support.
19599 2018-05-09  Richard Biener  <rguenther@suse.de>
19601         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19602         vector.
19603         (vect_bb_vectorization_profitable_p): Adjust.  Compute
19604         actual scalar cost using the cost vector and the add_stmt_cost
19605         machinery.
19607 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19609         PR rtl-optimization/85645
19610         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19611         in the REG_CFA_REGISTER note for LR, don't leave it empty.
19613 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19615         PR rtl-optimization/85645
19616         * shrink-wrap.c (spread_components): Return a boolean saying if
19617         anything was changed.
19618         (try_shrink_wrapping_separate): Iterate spread_components until
19619         nothing changes anymore.
19621 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19623         PR rtl-optimization/85645
19624         * regrename.c (build_def_use): Also kill the chains that include the
19625         destination of a REG_CFA_REGISTER note.
19627 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19629         PR rtl-optimization/85645
19630         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19631         insn that has a REG_CFA_REGISTER note.
19633 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
19635         * cfgexpand.c (expand_clobber): New function.
19636         (expand_gimple_stmt_1): Use it.
19637         * tree-vect-stmts.c (vect_clobber_variable): New function,
19638         split out from...
19639         (vectorizable_simd_clone_call): ...here.
19640         (vectorizable_store): Emit a clobber either side of an
19641         IFN_STORE_LANES sequence.
19642         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19644 2018-05-09  Tom de Vries  <tom@codesourcery.com>
19646         PR target/85626
19647         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19648         (define_insn "trap_if_false"): Add exit after trap.
19650 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
19652         PR rtl-optimization/85638
19653         * bb-reorder.c: Include common/common-target.h.
19654         (create_forwarder_block): New function extracted from...
19655         (fix_up_crossing_landing_pad): ...here.  Rename into...
19656         (dw2_fix_up_crossing_landing_pad): ...this.
19657         (sjlj_fix_up_crossing_landing_pad): New function.
19658         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19659         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19660         from both partitions and exit the loop after one iteration.
19662 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19664         Revert:
19665         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19666         subsection.
19667         (Basic PowerPC Built-in Functions): The new name of the
19668         subsection previously known as "PowerPC Built-in Functions".
19669         (Basic PowerPC Built-in Functions Available on all Configurations):
19670         New subsubsection.
19671         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19672         subsubsection.
19673         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19674         subsubsection.
19675         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19676         subsubsection.
19677         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19678         subsubsection.
19680 2018-05-08  Jim Wilson  <jimw@sifive.com>
19682         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19683         (LD_EMUL_SUFFIX): New.
19684         (LINK_SPEC): Use it.
19686 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19688         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19689         subsection.
19690         (Basic PowerPC Built-in Functions): The new name of the
19691         subsection previously known as "PowerPC Built-in Functions".
19692         (Basic PowerPC Built-in Functions Available on all Configurations):
19693         New subsubsection.
19694         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19695         subsubsection.
19696         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19697         subsubsection.
19698         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19699         subsubsection.
19700         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19701         subsubsection.
19703 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
19705         PR target/85683
19706         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19707         after cmpelim optimization.
19709 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
19711         * config.gcc: Support "goldmont".
19712         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19713         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19714         PROCESSOR_GOLDMONT.
19715         * config/i386/i386.c (m_GOLDMONT): Define.
19716         (processor_target_table): Add "goldmont".
19717         (PTA_GOLDMONT): Define.
19718         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19719         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19720         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19721         (fold_builtin_cpu): Add "goldmont".
19722         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19723         (ix86_option_override_internal): Add "goldmont".
19724         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19725         (processor_type): Add PROCESSOR_GOLDMONT.
19726         * config/i386/i386.md: Add CPU "glm".
19727         * config/i386/glm.md: New file.
19728         * config/i386/x86-tune.def: Add m_GOLDMONT.
19729         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19731 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
19733         PR target/85572
19734         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19735         E_V4DImode.
19736         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19737         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
19738         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
19740         PR target/85317
19741         * config/i386/i386.c (ix86_fold_builtin): Handle
19742         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19744         PR target/85480
19745         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19746         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19748 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
19750         PR target/85658
19751         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19752         (check_arch): Likewise.
19753         (check_fpu): Return the result rather than printing it.
19754         (end arch): Fix operator precedence.
19755         (end cpu): Likewise.
19756         (END): Print the result from check_fpu.
19758 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
19759             Alan Hayward  <alan.hayward@arm.com>
19760             David Sherwood  <david.sherwood@arm.com>
19762         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19763         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19764         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19765         (*fcmuo<mode>_and): New patterns.
19767 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
19769         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19770         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19771         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19772         (cmp_op, sve_imm_con): New code attributes.
19773         (SVE_COND_INT_CMP, imm_con): Delete.
19774         (cmp_op): Remove above unspecs from int attribute.
19775         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19776         to...
19777         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
19778         comparison-specific unspecs.
19779         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19780         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19781         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19782         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19783         (*vec_fcm<cmp_op><mode>): Rename to...
19784         (*fcm<cmp_op><mode>): ...this and adjust likewise.
19785         (*vec_fcmuo<mode>): Rename to...
19786         (*fcmuo<mode>): ...this and adjust likewise.
19787         (*pred_fcm<cmp_op><mode>): New pattern.
19788         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19789         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19790         functions.
19791         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19792         and UNORDERED.
19793         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19794         (aarch64_emit_sve_predicated_cond): New function.
19795         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19796         (aarch64_emit_unspec_cond_or): Replace with...
19797         (aarch64_emit_sve_or_conds): ...this new function.  Use
19798         aarch64_emit_sve_ptrue_op for the individual comparisons and
19799         aarch64_emit_binop to OR them together.
19800         (aarch64_emit_inverted_unspec_cond): Replace with...
19801         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
19802         aarch64_emit_sve_ptrue_op for the comparison and
19803         aarch64_emit_unop to invert the result.
19804         (aarch64_expand_sve_vec_cmp_float): Update after the above
19805         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
19807 2018-05-07  Nathan Sidwell  <nathan@acm.org>
19809         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19810         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19811         (Backwards Compatibility): Likewise.
19813 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19815         PR bootstrap/85681
19816         Revert:
19817         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19819         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19820         <prefetch_dynamic_strides>: New const bool field.
19821         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19822         prefetch_dynamic_strides.
19823         (exynosm1_prefetch_tune): Likewise.
19824         (thunderxt88_prefetch_tune): Likewise.
19825         (thunderx_prefetch_tune): Likewise.
19826         (thunderx2t99_prefetch_tune): Likewise.
19827         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19828         to false.
19829         (aarch64_override_options_internal): Update to set
19830         PARAM_PREFETCH_DYNAMIC_STRIDES.
19831         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19832         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19833         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19834         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19835         prefetch-dynamic-strides setting.
19837         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19839         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19840         <minimum_stride>: New const int field.
19841         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19842         minimum_stride field.
19843         (exynosm1_prefetch_tune): Likewise.
19844         (thunderxt88_prefetch_tune): Likewise.
19845         (thunderx_prefetch_tune): Likewise.
19846         (thunderx2t99_prefetch_tune): Likewise.
19847         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19848         (aarch64_override_options_internal): Update to set
19849         PARAM_PREFETCH_MINIMUM_STRIDE.
19850         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19851         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19852         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19853         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19854         stride is constant and is below the minimum stride threshold.
19856 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19858         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19859         to 512.
19861 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19863         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19864         <prefetch_dynamic_strides>: New const bool field.
19865         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19866         prefetch_dynamic_strides.
19867         (exynosm1_prefetch_tune): Likewise.
19868         (thunderxt88_prefetch_tune): Likewise.
19869         (thunderx_prefetch_tune): Likewise.
19870         (thunderx2t99_prefetch_tune): Likewise.
19871         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19872         to false.
19873         (aarch64_override_options_internal): Update to set
19874         PARAM_PREFETCH_DYNAMIC_STRIDES.
19875         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19876         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19877         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19878         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19879         prefetch-dynamic-strides setting.
19881 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19883         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19884         <minimum_stride>: New const int field.
19885         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19886         minimum_stride field.
19887         (exynosm1_prefetch_tune): Likewise.
19888         (thunderxt88_prefetch_tune): Likewise.
19889         (thunderx_prefetch_tune): Likewise.
19890         (thunderx2t99_prefetch_tune): Likewise.
19891         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19892         (aarch64_override_options_internal): Update to set
19893         PARAM_PREFETCH_MINIMUM_STRIDE.
19894         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19895         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19896         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19897         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19898         stride is constant and is below the minimum stride threshold.
19900 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
19902         PR c++/85659
19903         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19904         the type is addressable.  Don't force op into register if it has
19905         BLKmode.
19907 2018-05-05  Roland McGrath  <mcgrathr@google.com>
19909         PR other/77609
19910         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19911         any section for which we don't know a specific type it should have,
19912         regardless of name.  Previously this was done only for the exact
19913         names ".init_array", ".fini_array", and ".preinit_array".
19914         (default_elf_asm_named_section): Add comment about
19915         relationship with default_section_type_flags and SECTION_NOTYPE.
19916         (get_section): Don't consider it a type conflict if one side has
19917         SECTION_NOTYPE and the other doesn't, as long as neither has the
19918         SECTION_BSS et al used in the default_section_type_flags logic.
19920 2018-05-05  Tom de Vries  <tom@codesourcery.com>
19922         PR target/85653
19923         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19924         (workaround_barsyncs): New function.
19925         (nvptx_reorg): Use workaround_barsyncs.
19926         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19927         (define_expand "nvptx_membar_cta"): New define_expand.
19928         (define_insn "*nvptx_membar_cta"): New insn.
19930 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
19932         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19933         To improve optimization opportunities.
19934         * builtin-types.def: The new needed builtin types for the above.
19936 2018-05-04  Richard Biener  <rguenther@suse.de>
19938         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19939         * gimple-ssa-store-merging.c
19940         (imm_store_chain_info::output_merged_store): Remove redundant create,
19941         release split_store vector contents on failure.
19942         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19943         scalar stmt vector on cache hit.
19945 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
19947         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19948         Xilinx FP support.
19949         * config.gcc (powerpc-xilinx-eabi*): Remove.
19950         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19951         support.
19952         (fusion_addis_mem_combo_load): Ditto.
19953         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19954         FP support.
19955         (rs6000_cpu_cpp_builtins): Ditto.
19956         * config/rs6000/rs6000-linux.c
19957         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
19958         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
19959         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
19960         support.
19961         (rs6000_setup_reg_addr_masks): Ditto.
19962         (rs6000_init_hard_regno_mode_ok): Ditto.
19963         (rs6000_option_override_internal): Ditto.
19964         (legitimate_lo_sum_address_p): Ditto.
19965         (rs6000_legitimize_address): Ditto.
19966         (rs6000_legitimize_reload_address): Ditto.
19967         (rs6000_legitimate_address_p): Ditto.
19968         (abi_v4_pass_in_fpr): Ditto.
19969         (setup_incoming_varargs): Ditto.
19970         (rs6000_gimplify_va_arg): Ditto.
19971         (rs6000_split_multireg_move): Ditto.
19972         (rs6000_savres_strategy): Ditto.
19973         (rs6000_emit_prologue_components): Ditto.
19974         (rs6000_emit_epilogue_components): Ditto.
19975         (rs6000_emit_prologue): Ditto.
19976         (rs6000_emit_epilogue): Ditto.
19977         (rs6000_elf_file_end): Ditto.
19978         (rs6000_function_value): Ditto.
19979         (rs6000_libcall_value): Ditto.
19980         * config/rs6000/rs6000.h: Ditto.
19981         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
19982         (TARGET_MINMAX): ... this.  New.
19983         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
19984         * config/rs6000/rs6000.md: Remove Xilinx FP support.
19985         (*movsi_internal1_single): Delete.
19986         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
19987         mfpu=, mxilinx-fpu): Delete.
19988         * config/rs6000/singlefp.h: Delete.
19989         * config/rs6000/sysv4.h: Remove Xilinx FP support.
19990         * config/rs6000/t-rs6000: Ditto.
19991         * config/rs6000/t-xilinx: Delete.
19992         * config/rs6000/titan.md: Adjust for fp_type removal.
19993         * config/rs6000/vsx.md: Remove Xilinx FP support.
19994         (VStype_simple): Delete.
19995         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
19996         * config/rs6000/xfpu.h: Delete.
19997         * config/rs6000/xfpu.md: Delete.
19998         * config/rs6000/xilinx.h: Delete.
19999         * config/rs6000/xilinx.opt: Delete.
20000         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20001         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20003 2018-05-04  Tom de Vries  <tom@codesourcery.com>
20005         PR libgomp/85639
20006         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20007         if ignore == 0.
20009 2018-05-04  Richard Biener  <rguenther@suse.de>
20011         PR middle-end/85627
20012         * tree-complex.c (update_complex_assignment): We are always in SSA form.
20013         (expand_complex_div_wide): Likewise.
20014         (expand_complex_operations_1): Likewise.
20015         (expand_complex_libcall): Preserve EH info of the original stmt.
20016         (tree_lower_complex): Handle removed blocks.
20017         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20018         on complex multiplication and division libcall builtins.
20020 2018-05-04  Richard Biener  <rguenther@suse.de>
20022         PR middle-end/85574
20023         * fold-const.c (negate_expr_p): Restrict negation of operand
20024         zero of a division to when we know that can happen without
20025         overflow.
20026         (fold_negate_expr_1): Likewise.
20028 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
20030         PR libstdc++/85466
20031         * real.h (real_nextafter): Declare.
20032         * real.c (real_nextafter): New function.
20033         * fold-const-call.c (fold_const_nextafter): New function.
20034         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20035         CASE_CFN_NEXTTOWARD.
20036         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20037         even when arg1_mode is different from arg0_mode.
20039 2018-05-03  Nathan Sidwell  <nathan@acm.org>
20041         * doc/extend.texi (Deprecated Features): Remove
20042         -ffriend-injection.
20043         (Backwards Compatibility): Likewise.
20044         * doc/invoke.texi (C++ Language Options): Likewise.
20045         (C++ Dialect Options): Likewise.
20047 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
20049         PR target/85530
20050         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20051         _mm512_mask_mullox_epi64): New intrinsics.
20053 2018-05-03  Tom de Vries  <tom@codesourcery.com>
20055         PR testsuite/85106
20056         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20057         dump files): Add offload-tree.
20059 2018-05-03  Richard Biener  <rguenther@suse.de>
20061         PR tree-optimization/85615
20062         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20063         to loops not nested in BBs loop father to avoid creating multi-entry
20064         loops.
20066 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20068         PR tree-optimization/70291
20069         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20070         arguments.  Change return type to tree.  Emit libcall as a new
20071         statement rather than replacing existing one when inplace_p is true.
20072         (expand_complex_multiplication_components): New function.
20073         (expand_complex_multiplication): Expand floating-point complex
20074         multiplication using the above.
20075         (expand_complex_division): Rename inner_type parameter to type.
20076         Update expand_complex_libcall call-site.
20077         (expand_complex_operations_1): Update expand_complex_multiplication
20078         and expand_complex_division call-sites.
20080 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20082         PR target/85582
20083         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20084         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20085         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20086         the highest significant bit of the shift count mask is clear.  In
20087         check whether and[sq]i3 is needed verify that all significant bits
20088         of the shift count other than the highest are set.
20090 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20092         PR libgomp/82428
20093         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20094         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20095         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20096         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20097         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20098         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20099         __builtin_goacc_parlevel_size.
20101 2018-05-02  Richard Biener  <rguenther@suse.de>
20103         PR tree-optimization/85597
20104         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20105         do not use split vect_get_vec_defs call but call vect_get_slp_defs
20106         directly.
20108 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20110         PR testsuite/85106
20111         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20112         dump files): Add ltrans-tree.
20114 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20116         PR testsuite/85106
20117         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20118         dump files): Add wpa-ipa.
20120 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
20122         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
20123         powerpc*-*-linux*paired* target.
20124         * config/rs6000/750cl.h: Delete.
20125         * config/rs6000/paired.h: Delete.
20126         * config/rs6000/paired.md: Delete.
20127         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20128         float support.
20129         * config/rs6000/rs6000-builtin.def: Remove paired float support.
20130         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20131         comment.  Remove paired float support.
20132         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20133         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20134         VECTOR_PAIRED.
20135         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20136         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20137         declarations.
20138         * config/rs6000/rs6000.c: Remove paired float support.
20139         (paired_expand_vector_init, paired_expand_vector_move,
20140         paired_emit_vector_compare, paired_emit_vector_cond_expr,
20141         (paired_expand_lv_builtin, paired_expand_stv_builtin,
20142         paired_expand_builtin, paired_expand_predicate_builtin,
20143         paired_init_builtins): Delete.
20144         * config/rs6000/rs6000.h: Remove paired float support.
20145         * config/rs6000/rs6000.md: Remove paired float support.
20146         (move_from_CR_ov_bit): Delete.
20147         * config/rs6000/rs6000.opt (mpaired): Delete.
20148         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20149         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20151 2018-05-02  Richard Biener  <rguenther@suse.de>
20153         PR middle-end/85567
20154         * gimplify.c (gimplify_save_expr): When in SSA form allow
20155         SAVE_EXPRs to compute to SSA vars.
20157 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20159         PR target/85582
20160         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20161         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20162         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20163         clobber operands[2], instead use a new pseudo.  Formatting fixes.
20165 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
20167         PR tree-optimization/85586
20168         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20169         exit early for statements in the same group if the accesses are
20170         not strided.
20172 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20174         PR lto/85451
20175         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20176         error message.
20178 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
20180         PR tree-optimization/85143
20181         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20183 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20185         PR lto/85451
20186         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20187         not found" error message.
20189 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20191         PR other/83786
20192         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20193         * vec.c (test_ordered_remove_if): New function.
20194         (vec_c_tests): Call test_ordered_remove_if.
20195         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20196         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20197         * tree-vect-patterns.c (vect_pattern_recog_1): Use
20198         VEC_ORDERED_REMOVE_IF.
20200 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20202         PR tree-optimization/82665
20203         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20204         pointer subtraction where arguments come from a memchr call.
20206 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
20208         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20209         --push-state --as-needed and --pop-state instead of --as-needed and
20210         --no-as-needed if ld supports it.
20211         * configure: Regenerated.
20213         PR web/85578
20214         * doc/install.texi2html: Replace _002d with - and _002a with * in
20215         generated html files using sed.
20217 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20219         PR c++/85523
20220         * gcc-rich-location.c (blank_line_before_p): New function.
20221         (use_new_line): New function.
20222         (gcc_rich_location::add_fixit_insert_formatted): New function.
20223         * gcc-rich-location.h
20224         (gcc_rich_location::add_fixit_insert_formatted): New function.
20226 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20228         * selftest.c (assert_streq): Rename "expected" and "actual" to
20229         "val1" and "val2".  Extend NULL-handling to cover both inputs
20230         symmetrically, while still requiring both to be non-NULL for a pass.
20231         * selftest.h (assert_streq): Rename "expected" and "actual" to
20232         "val1" and "val2".
20233         (ASSERT_EQ): Likewise.
20234         (ASSERT_EQ_AT): Likewise.
20235         (ASSERT_KNOWN_EQ): Likewise.
20236         (ASSERT_KNOWN_EQ_AT): Likewise.
20237         (ASSERT_NE): Likewise.
20238         (ASSERT_MAYBE_NE): Likewise.
20239         (ASSERT_MAYBE_NE_AT): Likewise.
20240         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
20241         the assertion to pass.
20242         (ASSERT_STREQ_AT): Likewise.
20244 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20246         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20247         interaction with -pie.
20249 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20251         * selftest.h: Fix alphabetization of per-source-file selftest
20252         declarations.
20254 2018-04-30  Jason Merrill  <jason@redhat.com>
20256         PR c++/61982 - dead stores to destroyed objects.
20257         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20258         of clobber.
20260 2018-04-30  Jason Merrill  <jason@redhat.com>
20262         * tree.c (build_clobber): New.
20263         * tree.h: Declare it.
20264         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20266 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20268         * diagnostic-show-locus.c (layout::layout): Update for
20269         location_get_source_line returning a char_span.
20270         (struct char_span): Move to input.h.
20271         (struct correction): Update for fields in char_span becoming
20272         private.
20273         (struct source_line): Update for location_get_source_line
20274         returning a char_span.
20275         (layout::print_line): Likewise.
20276         * edit-context.c (edited_file::print_content): Likewise.
20277         (edited_file::print_diff_hunk): Likewise.
20278         (edited_file::print_run_of_changed_lines): Likewise.
20279         (edited_file::get_num_lines): Likewise.
20280         (edited_line::edited_line): Likewise.
20281         * final.c (asm_show_source): Likewise.
20282         * input.c (location_get_source_line): Convert return type
20283         from const char * to char_span, losing the final "line_len"
20284         param.
20285         (dump_location_info): Update for the above.
20286         (get_substring_ranges_for_loc): Likewise.  Use a char_span
20287         when handling the literal within the line.
20288         (test_reading_source_line): Update for location_get_source_line
20289         returning a char_span.
20290         * input.h (class char_span): Move here from
20291         diagnostic-show-locus.c, converting from a struct to a class.
20292         Make data members private.
20293         (char_span::operator bool): New.
20294         (char_span::length): New.
20295         (char_span::get_buffer): New.
20296         (char_span::operator[]): New.
20297         (char_span::subspan): Make const.
20298         (char_span::xstrdup): New.
20299         (location_get_source_line): Convert return type from const char *
20300         to char_span, losing the final "line_size" param.
20302 2018-04-30  Jan Hubicka  <jh@suse.cz>
20304         * lto-wrapper.c (ltrans_priorities): New static var.
20305         (cmp_priority): New.
20306         (run_gcc): Read priorities and if doing parallel build order
20307         the Makefile by them.
20309 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20311         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20313 2018-04-30  Richard Biener  <rguenther@suse.de>
20315         * tree-cfg.c (verify_address): Remove base argument, add
20316         flag whether to check TREE_ADDRESSABLE and do that.
20317         (verify_expr): Remove.
20318         (verify_types_in_gimple_reference): Add pieces from verify_expr.
20319         (verify_gimple_assign_single): Likewise.
20320         (verify_gimple_switch): Likewise.
20321         (verify_expr_location_1): Dereference tp once.  Add (disabled)
20322         piece from verify_expr.
20323         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20325 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20327         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20329 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20331         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20332         (small_data_pattern): Likewise.
20333         (arc_rewrite_small_data): Likewise.
20334         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20335         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20336         (get_symbol_alignment): New function.
20337         (legitimate_small_data_address_p): Likewise.
20338         (legitimate_scaled_address): Update, call
20339         legitimate_small_data_address_p.
20340         (output_sdata): New static variable.
20341         (arc_print_operand): Update how we handle small data operands.
20342         (arc_print_operand_address): Likewise.
20343         (arc_legitimate_address_p): Update, use
20344         legitimate_small_data_address_p.
20345         (arc_rewrite_small_data_p): Remove.
20346         (arc_rewrite_small_data_1): Likewise.
20347         (arc_rewrite_small_data): Likewise.
20348         (small_data_pattern): Likewise.
20349         (compact_sda_memory_operand): Update to use
20350         legitimate_small_data_address_p and get_symbol_alignment.
20351         (prepare_move_operands): Don't rewite sdata pattern.
20352         (prepare_extend_operands): Remove.
20353         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20354         pattern.
20355         (zero_extendqisi2): Likewise.
20356         (zero_extendhisi2): Likewise.
20357         (extendqihi2): Likewise.
20358         (extendqisi2): Likewise.
20359         (extendhisi2): Likewise.
20360         (addsi3): Likewise.
20361         (subsi3): Likewise.
20362         (andsi3): Likewise.
20363         * config/arc/constraints.md (Usd): Change it to memory constraint.
20365 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20367         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20368         as source of std instructions.
20369         * config/arc/arc.md (movsi_insn): Update pattern predicate to
20370         allow 6-bit constants as source for store instructions.
20371         (movdi_insn): Update instruction pattern to allow 6-bit constants
20372         as source for store instructions.
20374 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20376         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20378 2018-04-30  Nathan Sidwell  <nathan@acm.org>
20379             Sandra Loosemore <sandra@codesourcery.com>
20381         * dumpfile.c (dump_open): Allow '-' for stdout.
20382         * doc/invoke.texi (Developer Options): Document dump filename
20383         determination early.  Document stdin/stdout selection.
20385 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
20387         Microblaze Target: PIC data text relative
20389         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20390         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20391         Add declaration.
20392         * config/microblaze/microblaze.h (microblaze_constant_address_p):
20393         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20394         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20395         New addressing mode for data-text relative position indepenedent code.
20396         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20397         'ADDRESS_SYMBOLIC_TXT_REL'.
20398         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20399         (microblaze_legitimate_pic_operand): Exclude function calls from
20400         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20401         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20402         addresses cases.
20403         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20404         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20405         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20406         for 'address + offset'.
20407         (microblaze_expand_prologue): Add new function prologue call for
20408         'r20' assignation.
20409         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20410         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20411         table in case of TARGET_PIC_DATA_TEXT_REL.
20412         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20413         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20414         Add new macros 'UNSPEC_TEXT',
20415         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20416         + exclude function calls from 'UNSPEC_PLT' in case of data text
20417         relative mode.
20418         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20419         new target hook for generating address diff vector tables in case of
20420         flag_pic.
20421         * doc/tm.texi : Regenerate.
20422         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20423         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20424         of addr diff vector generation.
20425         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20426         target hook definition.
20427         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20428         Add default function for generate_pic_addr_diff_vec -> flag_pic.
20429         * doc/invoke.texi (Add new pic option): Add new microblaze pic
20430         option for data text relative.
20432 2018-04-30  Richard Biener  <rguenther@suse.de>
20434         * tree-chrec.h (evolution_function_is_constant_p): Remove
20435         redundant check.
20436         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20438 2018-04-30  Richard Biener  <rguenther@suse.de>
20440         PR bootstrap/85571
20441         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20443 2018-04-30  Richard Biener  <rguenther@suse.de>
20445         PR tree-optimization/28364
20446         PR tree-optimization/85275
20447         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20448         copying first exit test.
20450 2018-04-28  Mark Wielaard  <mark@klomp.org>
20452         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20453         dwarf_version >= 5.
20454         (dwarf_AT): Handle DW_AT_addr_base.
20455         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20457 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
20459         PR target/84431
20460         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20461         (*ashl<dwi>3_doubleword_mask_1): Ditto.
20462         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20463         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20465 2018-04-28  Richard Biener  <rguenther@suse.de>
20467         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20468         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20469         to reflect use.  Only add interesting stmts.
20471 2018-04-27  Martin Jambor  <mjambor@suse.cz>
20473         PR ipa/85549
20474         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20475         the jump function allows for passing through aggregate values.
20477 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
20479         * input.h (in_system_header_at): Convert from macro to inline
20480         function.
20481         (from_macro_expansion_at): Likewise.
20482         (from_macro_definition_at): Likewise.
20484 2018-04-27  Jeff Law  <law@redhat.com>
20486         * config.gcc: Mark tile* targets as deprecated/obsolete.
20488 2018-04-27  Richard Biener  <rguenther@suse.de>
20490         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20491         fix for ILP32.
20493 2018-04-27  Richard Biener  <rguenther@suse.de>
20495         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20497 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
20499         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20500         with Yd constraint. Set "preferred_for_speed" attribute from
20501         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20502         with Yd constraint.
20503         (*movdi_internal): Ditto.
20504         (movti_interunit splitters): Remove
20505         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20506         (movdi_interunit splitters): Ditto.
20507         * config/i386/constraints.md (Ye): Remove.
20508         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20510 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20512         PR target/85512
20513         * config/aarch64/constraints.md (Usg): Limit to 31.
20514         (Usj): Limit to 63.
20516 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
20518         PR tree-optimization/85529
20519         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20520         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20521         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20522         zero extension or masking of the MSB bit.
20523         (optimize_range_tests): Add FIRST_BB argument, pass it through
20524         to optimize_range_tests_var_bound.
20525         (maybe_optimize_range_tests, reassociate_bb): Adjust
20526         optimize_range_tests callers.
20528 2018-04-26  Richard Biener  <rguenther@suse.de>
20529             Jakub Jelinek  <jakub@redhat.com>
20531         * cgraph.h (symbol_table): Just declare debug method here.
20532         * symtab.c (symbol_table::debug): Define.
20534 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
20536         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20538 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
20540         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20541         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20542         (*movdi_internal): Substitute Yi and Yj constraint with x
20543         and Ym and Yn constraint with y constraint.  Update "isa"
20544         attribute and set "preferred_for_speed" attribute from
20545         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20546         (*movsi_internal): Ditto.
20547         (*movdf_internal): Ditto.
20548         (*movsf_internal): Ditto.
20549         (*zero_extendsidi2): Ditto.
20550         * config/i386/sse.md (vec_set<mode>_0): Ditto.
20551         (sse2_loadld): Ditto.
20552         (*vec_extract<ssevecmodelower>_0): Ditto.
20553         (*vec_extractv4si_0_zext_sse4): Ditto.
20554         (vec_concatv2di): Ditto.
20555         (*vec_dup<mode>): Ditto.
20556         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20557         * config/i386/constraints.md (Yi): Remove.
20558         (Yj): Remove.
20559         (Ym): Remove.
20560         (Yn): Remove.
20562 2018-04-26  Nathan Sidwell  <nathan@acm.org>
20564         * dumpfile.c (dump_open): New.
20565         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20566         (dump_finish): Detect stdio/stderr by value not name.
20568 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
20570         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20572 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20574         PR target/84952
20575         * config/nvptx/nvptx.c (verify_neutering_jumps)
20576         (verify_neutering_labels): New function
20577         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20579 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20581         PR target/84025
20582         * config/nvptx/nvptx.c (needs_neutering_p): New function.
20583         (nvptx_single): Use needs_neutering_p to skip over insns that do not
20584         need neutering.
20586 2018-04-26  Richard Biener <rguenther@suse.de>
20587             Tom de Vries  <tom@codesourcery.com>
20589         PR lto/85422
20590         * lto-streamer-out.c (output_function): Fixup loops if required to match
20591         discovery done in the reader.
20593 2018-04-26  Richard Biener  <rguenther@suse.de>
20595         PR tree-optimization/85116
20596         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20597         have a loop exit from the single latch predecessor.  Remove
20598         case of header with just condition.
20599         (ch_base::copy_headers): Exclude infinite loops from any
20600         processing.
20601         (pass_ch::execute): Record exits.
20603 2018-04-26  Richard Biener  <rguenther@suse.de>
20605         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20606         prologue cost vector and pass it to vect_get_load_cost.
20607         (vect_get_peeling_costs_all_drs): Likewise.
20608         (vect_peeling_hash_get_lowest_cost): Likewise.
20609         (vect_enhance_data_refs_alignment): Likewise.
20611 2018-04-26  Richard Biener  <rguenther@suse.de>
20613         PR middle-end/85450
20614         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20615         checking of integer<->pointer conversions.
20616         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20617         sign-/zero-extending pointer types.
20618         (expand_omp_for_static_chunk): Likewise.
20620 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
20621             Jean Lee  <xiaoyur347@gmail.com>
20623         * config/mips/mips.c (mips_asan_shadow_offset): New function.
20624         (TARGET_ASAN_SHADOW_OFFSET): Define.
20625         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20626         true for -fsanitize=address.
20628 2018-04-25  Mark Wielaard  <mark@klomp.org>
20630         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20631         shorter ones.
20633 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
20635         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20636         than "alu", remove explicit "memory" and "imm_disp" attributes.
20637         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20639         PR middle-end/85414
20640         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20641         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20642         gen_lowpart_no_emit.
20644 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
20646         PR target/85473
20647         * config/i386/i386.c (ix86_expand_builtin): Change memory
20648         operand to XI, extend p0 to Pmode.
20649         * config/i386/i386.md: Change unspec volatile and operand
20650         1 mode to XI, change operand 0 mode to P.
20652 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20654         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20655         GET_MODE_MASK before any checking.
20656         (nds32_can_use_bset_p): Likewise.
20657         (nds32_can_use_btgl_p): Likewise.
20659 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20661         * config/nds32/nds32-doubleword.md: New define_split pattern for
20662         illegal register number.
20664 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20666         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20668 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20670         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20672 2018-04-25  Richard Biener  <rguenther@suse.de>
20674         * lto-streamer.h (LTO_major_version): Bump to 8.
20676 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
20678         * BASE-VER: Set to 9.0.0.
20680 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
20682         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20683         in __abskf2 and __powikf2.
20685 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20687         PR target/85512
20688         * config/aarch64/constraints.md (Usg, Usj): New constraints.
20689         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20690         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20691         Use the above on operand 2.  Reindent.
20692         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20694 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
20696         PR target/85485
20697         * common/config/i386/i386-common.c (ix86_handle_option): Don't
20698         handle OPT_mcet.
20699         * config/i386/i386.opt (mcet): Removed.
20700         * doc/install.texi: Remove -mcet documentation.
20701         * doc/invoke.texi: Likewise.
20703 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
20705         PR target/85485
20706         * doc/install.texi: Remove -mcet from bootstrap-cet.
20708 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20710         PR target/85511
20711         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20712         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20713         if TARGET_64BIT.
20715         PR target/85503
20716         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20717         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20718         containing a CONST_VECTOR.
20720 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
20722         * doc/install.texi: Update newlib dependency for nvptx.
20724 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20726         PR target/85508
20727         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20728         instead of INTVAL when shifting x left.
20730 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
20732         PR tree-optimization/85478
20733         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20734         vect_grouped_store_supported for single element vectors.
20736 2018-04-24  Richard Biener  <rguenther@suse.de>
20738         PR target/85491
20739         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20740         load cost increase to the case of non-constant step.
20742 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20744         PR target/84828
20745         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20746         destination if any_malformed_asm.
20748 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
20750         PR middle-end/85496
20751         * expr.c (store_field): In the bitfield case, if the value comes from
20752         a function call and is returned in registers by means of a PARALLEL,
20753         do not change the mode of the temporary unless BLKmode and VOIDmode.
20755 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
20757         PR rtl-optimization/85423
20758         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20759         dependencies to debug insns when the previous insn is non-debug.
20761 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20763         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20764         enums into a single definition.
20765         (fls): Fix predicates and printing.
20766         (seti): Likewise.
20768 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20770         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20771         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20772         and short u6 immediate.
20773         (check_if_valid_sleep_operand): Remove.
20774         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20776 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20778         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20779         flag_always_save_lp condition.
20780         * config/nds32/nds32.opt (malways-save-lp): New option.
20782 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20784         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20785         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20786         * config/nds32/nds32.h
20787         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20788         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20790 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20792         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20793         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20795 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20796             Chung-Ju Wu  <jasonwucj@gmail.com>
20798         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20799         Declare.
20800         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20801         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20803 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20805         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20807 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20809         * config/nds32/nds32-protos.h (nds32_data_alignment,
20810         nds32_local_alignment): Declare.
20811         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20812         nds32_local_alignment): New functions.
20813         (TARGET_CONSTANT_ALIGNMENT): Define.
20814         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20816 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20818         * config/nds32/nds32.c
20819         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20820         (TARGET_MODES_TIEABLE_P): Likewise.
20822 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20824         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20825         level Ofast and Og.
20827 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
20828             Chung-Ju Wu  <jasonwucj@gmail.com>
20830         * config/nds32/constants.md (unspec_volatile_element): Add enum values
20831         for unaligned access.
20832         * config/nds32/nds32-intrinsic.c: Implementation of expanding
20833         unaligned access.
20834         * config/nds32/nds32-intrinsic.md: Likewise.
20835         * config/nds32/nds32_intrinsic.h: Likewise.
20836         * config/nds32/nds32.h (nds32_builtins): Likewise.
20837         * config/nds32/nds32.opt (munaligned-access): New option.
20838         * config/nds32/nds32.c (nds32_asm_file_start): Display
20839         flag_unaligned_access status.
20841 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20843         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20844         -mno-relax is present.
20845         * config/riscv/linux.h (LINK_SPEC): Ditto.
20847 2018-04-20  Martin Sebor  <msebor@redhat.com>
20849         PR c/85365
20850         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20851         for null pointers.
20852         (gimple_fold_builtin_stxcpy_chk): Same.
20853         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20855 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
20857         PR target/85456
20858         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20859         __powikf2 when long double is IEEE 128-bit.
20861 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20863         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20864         step to make sure stack always aligned.
20866 2018-04-20  Carl Love  <cel@us.ibm.com>
20868         PR target/83402
20869         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20870         size check for arg0.
20872 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
20873             Tom de Vries  <tom@codesourcery.com>
20875         PR target/85445
20876         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20877         Emit insns for calls too.
20878         (nvptx_find_par): Always look for worker-level predecessor insn.
20879         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
20880         calls.
20881         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20882         (nvptx_process_pars): Propagate frames for calls.
20884 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
20886         PR target/85469
20887         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20888         Removed.
20889         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20890         (ix86_handle_option): Don't handle OPT_mibt.
20891         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20892         __SHSTK__.
20893         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20894         has_ibt and ibt.
20895         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20896         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20897         (ix86_target_macros): Define __CET__ with flag_cf_protection
20898         for -fcf-protection.
20899         * config/i386/i386.c (isa2_opts): Remove -mibt.
20900         * config/i386/i386.h (TARGET_IBT): Removed.
20901         (TARGET_IBT_P): Likewise.
20902         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20903         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20904         * config/i386/i386.opt (mcet): Update help message.
20905         (mshstk): Likewise.
20906         (mibt): Removed.
20907         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
20908         -mcet as an alias for -mshstk.
20910 2018-04-20  Richard Biener <rguenther@suse.de>
20912         PR middle-end/85475
20913         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20914         complexity by forcing a single use of the multiply operand.
20916 2018-04-20  Martin Jambor  <mjambor@suse.cz>
20918         ipa/85449
20919         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20920         recursion dependency to only apply to non-clones.
20922 2018-04-20  Martin Jambor  <mjambor@suse.cz>
20924         ipa/85447
20925         * ipa-cp.c (create_specialized_node): Check that clones of
20926         self-recursive edges exist during IPA-CP.
20928 2018-04-19  Toon Moene  <toon@moene.org>
20930         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20931         by -O3.
20933 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
20935         PR tree-optimization/85467
20936         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20937         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
20938         VECTOR_CST element to type.
20940 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20942         PR target/85397
20943         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20944         * config/i386/i386.md (builtin_setjmp_setup): Removed.
20945         (builtin_longjmp): Likewise.
20946         (save_stack_nonlocal): New pattern.
20947         (restore_stack_nonlocal): Likewise.
20949 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20951         PR target/85404
20952         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20953         Replace ASM_OUTPUT_LABEL with fprintf.
20955 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20957         PR target/85417
20958         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20959         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
20960         * config/i386/i386-c.c (ix86_target_macros_internal): Also
20961         define __IBT__ and __SHSTK__ for -fcf-protection.
20962         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
20963         TARGET_IBT.
20964         (ix86_trampoline_init): Likewise.
20965         (x86_output_mi_thunk): Likewise.
20966         (ix86_notrack_prefixed_insn_p): Likewise.
20967         (ix86_option_override_internal): Don't disallow -fcf-protection.
20968         * config/i386/i386.md (rdssp<mode>): Also enable for
20969         -fcf-protection.
20970         (incssp<mode>): Likewise.
20971         (nop_endbr): Likewise.
20972         * config/i386/i386.opt (mcet): Change help message to built-in
20973         functions only.
20974         (mibt): Likewise.
20975         (mshstk): Likewise.
20976         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
20977         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
20978         enable CET built-in functions.
20980 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
20982         * common/config/i386/i386-common.c
20983         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
20984         OPTION_MASK_ISA_MOVDIRI_UNSET,
20985         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
20986         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
20987         * config.gcc (movdirintrin.h): New header.
20988         * config/i386/cpuid.h (bit_MOVDIRI,
20989         bit_MOVDIR64B): New bits.
20990         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
20991         and -mmvodir64b.
20992         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
20993         (VOID, PVOID, PCVOID)): New function types.
20994         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
20995         __builtin_ia32_directstoreu_u64,
20996         __builtin_ia32_movdir64b): New builtins.
20997         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
20998         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
20999         and -mmovdiri.
21000         (ix86_valid_target_attribute_inner_p): Ditto.
21001         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21002         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21003         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21004         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21005         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21006         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21007         (movdiri<mode>, movdir64b_<mode>): New.
21008         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21009         * config/i386/immintrin.h: Include movdirintrin.h.
21010         * config/i386/movdirintrin.h: New file.
21011         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21013 2018-04-19  Richard Biener  <rguenther@suse.de>
21015         PR middle-end/85455
21016         * cfg.c (clear_bb_flags): When loop state says we have
21017         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21019 2018-04-19  Richard Biener  <rguenther@suse.de>
21021         PR tree-optimization/84737
21022         * tree-vect-data-refs.c (vect_copy_ref_info): New function
21023         copying restrict info.
21024         (vect_setup_realignment): Use it.
21025         * tree-vectorizer.h (vect_copy_ref_info): Declare.
21026         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21027         the first DR to all generated stores.
21028         (vectorizable_load): Likewise for loads.
21030 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
21032         PR tree-optimization/85446
21033         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21034         the integral and pointer types to have the same precision.
21036         * doc/install.texi: Document --disable-cet being the default and
21037         --enable-cet=auto.
21039 2018-04-18  Martin Liska  <mliska@suse.cz>
21041         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21042         style.
21044 2018-04-18  Martin Liska  <mliska@suse.cz>
21046         Revert
21047         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21049         PR ipa/83983
21050         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21051         arguments if they are comparable.
21053 2018-04-18  Martin Liska  <mliska@suse.cz>
21055         Revert
21056         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
21058         PR lto/84805
21059         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21060         incomplete types.
21062 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
21064         PR target/85388
21065         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21066         ENDBR after calling __morestack.
21068 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
21070         PR jit/85384
21071         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21072         by using gcc_base_ver to generate a gcc_driver_version, and use
21073         it when generating GCC_DRIVER_NAME.
21074         * configure: Regenerate.
21076 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
21078         PR target/81084
21079         * config.gcc: Obsolete powerpc*-*-*spe*.
21081 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21083         PR debug/84637
21084         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21085         (stabstr_D): Change type of unum from unsigned int to
21086         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
21087         type.
21089 2018-04-17  Jim Wilson  <jimw@sifive.com>
21091         PR 84856
21092         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21093         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21094         Set arg_pointer_offset after using pretend_args_size.
21096 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21098         PR rtl-optimization/85431
21099         * dse.c (record_store): Ignore zero width stores.
21101         PR sanitizer/85230
21102         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
21103         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21104         __builtin_stack_restore rather than after it.
21105         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21106         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21107         argument instead of virtual_dynamic_stack_rtx.
21109 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21111         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21112         New prototype.
21113         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21114         Add note to error message to explain internal mapping of overloaded
21115         built-in function name to non-overloaded built-in function name.
21116         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21117         function.
21119 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
21121         PR target/85424
21122         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21123         where the inputs overlap with the output.
21125 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21127         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21128         (=v, v) alternative and explicit "memory" attribute.
21129         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
21130         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21131         attributes.
21132         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21133         "sselog1" type instead of "sselog".
21134         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21135         "sselog".  Remove explicit "memory" attribute.
21136         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21137         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21138         attributes.
21139         (vec_extract_hi_v32hi): Merge all alternatives into one, use
21140         "sselog1" type instead of "sselog".  Remove explicit "memory"
21141         attribute.
21142         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21143         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21144         attribute.
21145         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21146         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21147         attributes.
21148         (vec_extract_hi_v64qi): Merge all alternatives into one, use
21149         "sselog1" type instead of "sselog".  Remove explicit "memory"
21150         attribute.
21151         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21152         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21153         attribute.
21155         PR target/85430
21156         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21158         PR middle-end/85414
21159         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21160         on a SUBREG.
21162 2018-04-17  Martin Jambor  <mjambor@suse.cz>
21164         PR ipa/85421
21165         * ipa-cp.c (create_specialized_node): Call
21166         expand_all_artificial_thunks if necessary.
21168 2018-04-17  Martin Liska  <mliska@suse.cz>
21170         PR lto/85405
21171         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21172         in message, remote space in between '_G' and '('.
21174 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21176         PR target/85281
21177         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21178         avx512f_vmcmp<mode>3<round_saeonly_name>,
21179         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21180         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21181         avx512f_rndscale<mode><round_saeonly_name>,
21182         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21183         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21184         Use %<iptr>2 instead of %2 for -masm=intel.
21185         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21186         avx512f_vcvttss2usi<round_saeonly_name>,
21187         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21188         -masm=intel.
21189         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21190         avx512f_vcvttsd2usi<round_saeonly_name>,
21191         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21192         Use %q1 instead of %1 for -masm=intel.
21193         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21194         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21195         of %3 for -masm=intel.
21196         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21197         -masm=intel.
21198         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21199         -masm=intel.
21200         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21201         -masm=intel.
21202         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21203         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21204         %g1.
21205         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21206         -masm=intel.
21207         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21208         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21209         %g1 and one with %0 and %1.
21210         (avx512er_vmrcp28<mode><round_saeonly_name>,
21211         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21212         %1 for -masm=intel.
21213         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21214         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21215         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21216         of %0 and %{%4%} for -masm=intel.
21217         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21218         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21219         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21220         order of %0 and %{%5%}%{z%} for -masm=intel.
21222 2018-04-17  Jan Hubicka  <jh@suse.cz>
21224         PR lto/85405
21225         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21227 2018-04-17  Martin Liska  <mliska@suse.cz>
21229         PR ipa/85329
21230         * multiple_target.c (create_dispatcher_calls): Set apostrophes
21231         for target_clone error message.  Make default implementation
21232         clone to be a local declaration.
21233         (separate_attrs): Add new argument and check for an empty
21234         string.
21235         (expand_target_clones): Handle it.
21236         (ipa_target_clone): Make redirection just for target_clones
21237         functions.
21239 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
21240             Tom de Vries  <tom@codesourcery.com>
21242         PR middle-end/84955
21243         * omp-expand.c (expand_oacc_for): Add dummy false branch for
21244         tiled basic blocks without omp continue statements.
21246 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
21248         PR target/83660
21249         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21250         vec_extract expression as having side effects to make sure it gets
21251         a cleanup point.
21253 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
21255         PR target/85403
21256         * config/i386/i386.c (get_builtin_code_for_version): Check
21257         error_mark_node.
21259 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
21261         PR target/84331
21262         * config.gcc: Support "skylake".
21263         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21264         PROCESSOR_SKYLAKE.
21265         * config/i386/i386.c (m_SKYLAKE): Define.
21266         (processor_target_table): Add "skylake".
21267         (ix86_option_override_internal): Add "skylake".
21268         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21269         PROCESSOR_CANNONLAKE.
21270         (get_builtin_code_for_version): Fix priority for
21271         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21272         PROCESSOR_SKYLAKE-AVX512.
21273         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21274         (processor_type): Add PROCESSOR_SKYLAKE.
21276 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
21277             Jason Merrill  <jason@redhat.com>
21279         PR c++/85112
21280         * convert.c (convert_to_integer_1): Use direct recursion for
21281         enumeral types and types with a precision less than the number
21282         of bits in their mode.
21284 2018-04-16  Julia Koval  <julia.koval@intel.com>
21286         PR target/84413
21287         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21288         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21290 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
21292         PR target/85293
21293         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21294         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21295         and -mno-direct-move.
21297 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
21299         PR target/83402
21300         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21301         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21302         Ensure negative shifts result in {0}.
21304 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
21306         PR rtl-optimization/79916
21307         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21308         regs (if any) to define how to gnerate SD moves when LRA is in
21309         progress.
21311 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
21313         PR rtl-optimization/85393
21314         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21315         * except.c (expand_dw2_landing_pad_for_region): Make static.
21316         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21317         a label and unconditional jump to old_bb, rather than
21318         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21319         basic block.
21321         PR rtl-optimization/85376
21322         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21323         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21324         instead of a specific value.
21326 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21327             Bin Cheng  <bin.cheng@arm.com>
21329         PR tree-optimization/82965
21330         PR tree-optimization/83991
21331         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21332         by_profile_only parameter.
21333         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21334         information if the loop was predicted to iterate too many times.
21335         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21337 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21339         PR lto/71991
21340         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21341         always inline.
21343 2018-04-13  Martin Liska  <mliska@suse.cz>
21344             Jakub Jelinek  <jakub@redhat.com>
21346         PR middle-end/81657
21347         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21348         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21349         * builtins.c (expand_builtin_memory_copy_args): Use
21350         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21351         handle dest_addr == pc_rtx.
21353 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
21355         PR target/85291
21356         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21357         asked to not generate direct moves.
21358         (fix_trunc<mode>si2_stfiwx): Similar.
21359         (fix_trunc<mode>si2_internal): Similar.
21361 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21363         PR debug/83157
21364         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21365         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21366         lookup if dest in some wider mode is known to be const0_rtx and
21367         if so, record permanent equivalence for it to be ZERO_EXTEND of
21368         the narrower mode destination.
21370 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
21372         * lto-streamer-out.c (output_function): Revert 259346.
21373         * omp-expand.c (expand_oacc_for): Likewise.
21375 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
21377         PR rtl-optimization/85354
21378         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21379         * sel-sched.c (sel_global_init): ... here.
21381 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
21383         PR target/85238
21384         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21385         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21386         mode for PE-COFF targets.
21387         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21388         (i386_pe_asm_lto_end): Likewise.
21389         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21390         (TARGET_ASM_LTO_END): Likewise.
21391         * config/i386/winnt.c (saved_debug_info_level): New static variable.
21392         (i386_pe_asm_lto_start): New function.
21393         (i386_pe_asm_lto_end): Likewise.
21395 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
21396             Richard Biener  <rguenther@suse.de>
21398         PR middle-end/84955
21399         * lto-streamer-out.c (output_function): Fix CFG loop state before
21400         streaming out.
21401         * omp-expand.c (expand_oacc_for): Handle calls to internal
21402         functions like regular functions.
21404 2018-04-12  Richard Biener  <rguenther@suse.de>
21406         PR lto/85371
21407         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21408         for the early LTO debug to properly generate references to it
21409         during DIE emission.  Do not re-use that for the skeleton for
21410         split-dwarf.
21411         (dwarf2out_early_finish): Likewise.
21413 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21415         PR target/85328
21416         * config/i386/sse.md
21417         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21418         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21419         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21420         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21421         and output is a reg, avoid creating invalid lowpart subreg, but
21422         instead split into a 512-bit move.  Don't split if not AVX512VL,
21423         input is xmm16+ reg and output is a mem.
21424         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21425         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21426         xmm16+ reg and output is a mem.
21428 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21430         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21431         also for flag_dwarf2_cfi_asm.
21433 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21435         PR rtl-optimization/85342
21436         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21437         a bool scalar var inside of the loop instead.  Don't try to update
21438         recog_data.operand after failed apply_change_group.
21440 2018-04-12  Tom de Vries  <tom@codesourcery.com>
21442         PR target/85296
21443         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21444         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
21445         array with flexible array member as array without given dimension.
21446         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21447         argument for undefined param to true.
21449 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
21451         PR target/85321
21452         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21453         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21454         from PowerPC section.
21455         * config/rs6000/sysv4.opt (mcall-): Improve help text.
21456         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21457         help text that is too long.
21458         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21459         help text that is too long.
21460         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21461         help text that is too long.
21463 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
21465         * config/alpha/alpha.md (stack_probe_internal): Rename
21466         from "probe_stack".  Update all callers.
21468 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21470         PR rtl-optimization/84566
21471         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21472         sched_macro_fuse_insns.
21474 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21476         PR target/84301
21477         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21478         (compute_block_dependences): ... from here.
21480 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21482         PR tree-optimization/85331
21483         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21484         from int to HOST_WIDE_INT.
21486 2018-04-11  Martin Jambor  <mjambor@suse.cz>
21488         PR ipa/84149
21489         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21490         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21491         not the same as the source val.
21492         (cgraph_edge_brings_value_p): New parameter.
21493         (gather_edges_for_value): Pass destination value to
21494         cgraph_edge_brings_value_p.
21495         (perhaps_add_new_callers): Likewise.
21496         (get_info_about_necessary_edges): Likewise and exclude values brought
21497         only by self-recursive edges.
21498         (create_specialized_node): Redirect only clones of self-calling edges.
21499         (+self_recursive_pass_through_p): New function.
21500         (find_more_scalar_values_for_callers_subset): Use it.
21501         (find_aggregate_values_for_callers_subset): Likewise.
21502         (known_aggs_to_agg_replacement_list): Removed.
21503         (decide_whether_version_node): Re-calculate known constants for all
21504         remaining context clones.
21506 2018-04-11  Richard Biener  <rguenther@suse.de>
21508         PR lto/85339
21509         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21510         from early DWARF output.
21511         (dwarf2out_early_finish): Output line info unconditionally into
21512         early DWARF and add reference to it.
21514 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21516         PR target/85281
21517         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21518         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21519         other than V2DFmode using iptr mode attribute.
21520         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21522 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21524         PR rtl-optimization/84659
21525         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21527 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21529         PR debug/85302
21530         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21531         SIZEP is NULL.
21532         (output_loc_list): Pass address of a dummy size variable even in the
21533         locview handling loop.
21534         (index_location_lists): Add comment on why skip_loc_list_entry can't
21535         call size_of_locs.
21537 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21539         PR target/85261
21540         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21541         into register.
21543 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
21545         PR target/85321
21546         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21547         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21548         and -mstring-compare-inline-limit.
21550 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21552         PR target/85287
21553         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21554         for stack clash protection in a register whenever we need it to be in
21555         a register.
21557 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21559         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21560         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21562 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21564         PR target/85321
21565         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21566         the help text.
21567         (mlong-double-): Ditto.
21568         * config/rs6000/sysv4.opt (msdata=): Ditto.
21569         (mtls-size=): Ditto.
21571 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21573         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21574         erroneous entries for
21575         "vector int vec_ldl (int, long int *)", and
21576         "vector unsigned int vec_ldl (int, unsigned long int *)".
21577         Add comments and entries for
21578         "vector bool char vec_ldl (int, bool char *)",
21579         "vector bool short vec_ldl (int, bool short *)",
21580         "vector bool int vec_ldl (int, bool int *)",
21581         "vector bool long long vec_ldl (int, bool long long *)",
21582         "vector pixel vec_ldl (int, pixel *)",
21583         "vector long long vec_ldl (int, long long *)",
21584         "vector unsigned long long vec_ldl (int, unsigned long long *)".
21585         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21586         type tree bool_long_long_type_node and correct definition of
21587         bool_V2DI_type_node to make reference to this new type tree.
21588         (rs6000_mangle_type): Replace erroneous reference to
21589         bool_long_type_node with bool_long_long_type_node.
21590         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21591         comments to emphasize sign distinctions for char and int types and
21592         replace RS6000_BTI_bool_long constant with
21593         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
21594         use of RS6000_BTI_pixel.
21595         (bool_long_type_node): Remove this macro definition.
21596         (bool_long_long_type_node): New macro definition
21598 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21600         PR rtl-optimization/85300
21601         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21602         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21603         simplify_unary_operation fails.
21605 2018-04-10  Martin Liska  <mliska@suse.cz>
21607         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21608         cgraph_edge and ipa_ref.
21610 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21612         PR target/85177
21613         PR target/85255
21614         * config/i386/sse.md
21615         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21616         computation of the VEC_MERGE selector from mask.
21617         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21618         Fix decoding of the VEC_MERGE selector into mask.
21620 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21622         PR tree-optimization/85286
21623         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21625 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21627         * final.c (final_1): Set insn_last_address as well as
21628         insn_current_address.
21630 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21632         PR target/85173
21633         * explow.c (emit_stack_probe): Call validize_mem on memory location
21634         before passing it to gen_probe_stack.  Create address operand and
21635         legitimize it for the probe_stack_address case.
21637 2018-04-09  Jan Hubicka  <jh@suse.cz>
21639         PR lto/85078
21640         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21641         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21642         * tree.c (free_lang_data_in_type): Fix handling of binfos;
21643         walk basetypes.
21644         (free_lang_data): Rebuild type inheritance graph.
21646 2018-04-09  Martin Sebor  <msebor@redhat.com>
21648         * invoke.texi (-finline-small-functions): Mention other optimization
21649         options.
21650         (-findirect-inlining, -fpartial-inlining): Same.
21651         (-finline-functions-called-once): Same.
21652         (-freorder-blocks-and-partition): Same.
21654 2018-04-09  Jan Hubicka  <jh@suse.cz>
21656         PR rtl/84058
21657         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21658         jumps; choose last target that matches the criteria (i.e.
21659         no partition changes for non-crossing jumps).
21660         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21661         support for redirecting crossing jumps to non-crossing.
21663 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
21665         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21666         also for naked functions.
21668 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
21670         * config/arc/arc.md (add_shift): New pattern.
21671         (add_shift2): Likewise.
21672         (sub_shift): Likewise.
21673         (sub_shift_cmp0_noout): Likewise.
21674         (compare_si_ashiftsi): Likewise.
21675         (xbfu_cmp0_noout): New combine pattern.
21676         (xbfu_cmp0"): Likewise.
21677         (movsi_set_cc_insn): Place the predicable variant first.
21678         (commutative_binary_cmp0_noout): Remove clobber.
21679         (commutative_binary_cmp0): New pattern.
21680         (noncommutative_binary_cmp0): Likewise.
21681         (noncommutative_binary_cmp0_noout): Likewise.
21682         (noncommutative_binary_comparison_result_used): Removed.
21683         (rsub_cmp0): New pattern.
21684         (rsub_cmp0_noout): Likewise.
21685         (extzvsi): Changed, keep only meaningful variants.
21686         (SQH, SEZ): New iterators.
21687         (SQH_postfix): New mode attribute.
21688         (SEZ_prefix): New code attribute.
21689         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21690         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21691         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21692         of numerical value.
21693         (noncommutative_operator): Check the availability of barrel
21694         shifter option.
21696 2018-04-09  Richard Biener  <rguenther@suse.de>
21698         PR tree-optimization/85284
21699         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21700         Only use the niter constraining form of simple_iv when the exit
21701         is always executed.
21703 2018-04-09  Tom de Vries  <tom@codesourcery.com>
21705         PR target/84041
21706         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21707         (define_expand "*memory_barrier"): New define_expand.
21708         (define_insn "memory_barrier"): New insn.
21710 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21712         PR rtl-optimization/80463
21713         PR rtl-optimization/83972
21714         PR rtl-optimization/83480
21716         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21717         correct producer for the insn.
21718         (tidy_control_flow): Fixup seqnos in case of debug insns.
21720 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21722         PR rtl-optimization/83913
21724         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21725         different sched-times when merging exprs.
21727 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21729         PR rtl-optimization/83962
21731         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21732         tidy_fallthru_edge and tidy_control_flow.
21734 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21736         PR rtl-optimization/83530
21738         * sel-sched.c (force_next_insn): New global variable.
21739         (remove_insn_for_debug): When force_next_insn is true, also leave only
21740         next insn in the ready list.
21741         (sel_sched_region): When the region wasn't scheduled, make another pass
21742         over it with force_next_insn set to 1.
21744 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
21746         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21747         into tm_file.
21748         * config/nds32/constants.md (unspec_volatile_element): Add enum values
21749         for interrupt control.
21750         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21751         functions for interrupt control.
21752         * config/nds32/nds32-intrinsic.md: Likewise.
21753         * config/nds32/nds32_intrinsic.h: Likewise.
21754         * config/nds32/nds32.h (nds32_builtins): Likewise.
21756 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
21758         * config/nds32/nds32.c (nds32_init_machine_status,
21759         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21760         strict_aligned_p field.
21761         (nds32_expand_to_rtl_hook): New function.
21762         (TARGET_EXPAND_TO_RTL_HOOK): Define.
21763         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21765 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21766             Chung-Ju Wu  <jasonwucj@gmail.com>
21768         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21769         * config/nds32/nds32-n7.md: New file.
21770         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21771         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21772         pipeline.
21773         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21774         * config/nds32/nds32.md (pipeline_model): Add n7.
21775         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21776         * config/nds32/pipelines.md: Include n7 settings.
21778 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21779             Chung-Ju Wu  <jasonwucj@gmail.com>
21781         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21782         * config/nds32/nds32-e8.md: New file.
21783         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21784         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21785         pipeline.
21786         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21787         * config/nds32/nds32.md (pipeline_model): Add e8.
21788         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21789         * config/nds32/pipelines.md: Include e8 settings.
21791 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21792             Chung-Ju Wu  <jasonwucj@gmail.com>
21794         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21795         * config/nds32/nds32-n8.md: New file.
21796         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21797         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21798         pipeline.
21799         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21800         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21801         * config/nds32/nds32.md (pipeline_model): Add n8.
21802         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21803         * config/nds32/pipelines.md: Include n8 settings.
21805 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21806             Chung-Ju Wu  <jasonwucj@gmail.com>
21808         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21809         * config/nds32/nds32-n9-2r1w.md: New file.
21810         * config/nds32/nds32-n9-3r2w.md: New file.
21811         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21812         nds32_register_ports): New or modify for cpu n9.
21813         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21814         pipeline.
21815         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21816         * config/nds32/nds32-utils.c: New file.
21817         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21818         TARGET_MUL_SLOW): Define.
21819         * config/nds32/nds32.md (pipeline_model): New attribute.
21820         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21821         New options that support cpu n9.
21822         * config/nds32/pipelines.md: Include n9 settings.
21823         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21825 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
21827         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21828         information if necessary.
21829         (output_cond_branch_compare_zero): Likewise.
21830         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21831         (nds32_target_alignment): Refine for alignment.
21832         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21833         (FUNCTION_BOUNDARY): Modify.
21834         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21835         align case.
21836         * config/nds32/nds32.opt (malways-align, malign-functions): New.
21838 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
21840         * config/nds32/constants.md (unspec_volatile_element): Add values for
21841         TLB operation and data prefetch.
21842         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21843         functions for TLB operation and data prefetch.
21844         * config/nds32/nds32-intrinsic.md: Likewise.
21845         * config/nds32/nds32_intrinsic.h: Likewise.
21846         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21847         (nds32_print_operand): Likewise.
21848         * config/nds32/nds32.h (nds32_builtins): Likewise.
21850 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
21851         Andrew Pinski <pinsika@gcc.gnu.org>
21853         PR middle-end/82976
21854         * match.pd: Use constant_boolean_node of correct type instead of
21855         boolean_true_node or boolean_false_node for simplifying
21856         pointer comparisons to zero.
21858 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
21860         PR tree-optimization/80021
21861         * tree.c (verify_type_variant): Make error call in verify_variant_match
21862         translatable and remove final full stop.
21864 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21866         * config/nds32/constants.md (unspec_volatile_element): Add
21867         UNSPEC_VOLATILE_EH_RETURN.
21868         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21869         nds32_output_stack_pop): Support dwarf exception handling process.
21870         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21871         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21872         exception handling process.
21873         (nds32_compute_stack_frame): Likewise.
21874         (nds32_return_addr_rtx): Likewise.
21875         (nds32_initial_elimination_offset): Likewise.
21876         (nds32_expand_prologue): Likewise.
21877         (nds32_expand_epilogue): Likewise.
21878         (nds32_dynamic_chain_address): New function.
21879         * config/nds32/nds32.h (machine_function): Add fields for dwarf
21880         exception handling.
21881         (DYNAMIC_CHAIN_ADDRESS): Define.
21882         (EH_RETURN_DATA_REGNO): Define.
21883         (EH_RETURN_STACKADJ_RTX): Define.
21884         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21885         patterns for dwarf exception handling.
21887 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21889         * config/nds32/nds32.h: Clean up obsolete macros.
21891 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21893         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21894         Add enum values for particular instructions.
21895         * config/nds32/nds32-intrinsic.c: Implementation of expanding
21896         particular intrinsic functions.
21897         * config/nds32/nds32-intrinsic.md: Likewise.
21898         * config/nds32/nds32_intrinsic.h: Likewise.
21899         * config/nds32/nds32.h (nds32_builtins): Likewise.
21900         * config/nds32/nds32.md (type): Add pbsad and pbsada.
21901         (btst, ave): New patterns for particular instructions.
21903 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21905         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21906         Add enum values for atomic load/store and memory sync.
21907         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21908         and memory sync.
21909         * config/nds32/nds32-intrinsic.md: Likewise.
21910         * config/nds32/nds32_intrinsic.h: Likewise.
21911         * config/nds32/nds32.h (nds32_builtins): Likewise.
21913 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
21915         PR tree-optimization/85257
21916         * fold-const.c (native_encode_vector): If not all elts could fit
21917         and off is -1, return 0 rather than offset.
21918         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21919         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21920         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
21921         adjust buffer in native_interpret_expr call.
21923 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21925         * config/nds32/constants.md (unspec_volatile_element): Add cache
21926         control enum values.
21927         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21928         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21929         * config/nds32/nds32.c (nds32_cctl_names): New.
21930         (nds32_print_operand): Handle cache control register names.
21931         * config/nds32/nds32.h (nds32_builtins): New enum values.
21932         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21933         macros.
21934         * config/nds32/nds32.md (type): Add mmu.
21935         * config/nds32/pipelines.md (simple_insn): Add mmu.
21937 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21939         * config/nds32/nds32.md (type): Remove call.
21940         * config/nds32/pipelines.md (simple_insn): Likewise.
21942 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21944         * config/nds32/constants.md (unspec_volatile_element): Add
21945         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21946         UNSPEC_VOLATILE_FMFCFG.
21947         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21948         description for fmfcfg and fmfcsr.
21949         (bdesc_1arg): Add fmtcsr.
21950         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21951         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21952         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21953         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21954         unspec_fmfcfg): New patterns.
21955         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21956         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21957         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
21958         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
21959         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
21960         __nds32__fmfcfg): Define.
21962 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21964         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
21965         intrinsic register names.
21966         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
21967         intrinsic register enum values and macros.
21969 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21971         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
21972         for load/store addressing form.
21973         (nds32_print_operand_address): Likewise.
21975 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
21977         PR target/85196
21978         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
21979         based on LABEL_REF.  Remove useless assertion.
21980         (pic_address_needs_scratch): Fix formatting.
21981         (sparc_legitimize_pic_address): Minor tweaks.
21982         (sparc_delegitimize_address): Adjust assertion accordingly.
21983         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
21984         into symbolic_operand.
21985         (movsi_high_pic_label_ref): Likewise.
21986         (movsi_lo_sum_pic_label_ref): Likewise.
21987         (movdi_pic_label_ref): Likewise.
21988         (movdi_high_pic_label_ref): Likewise.
21989         (movdi_lo_sum_pic_label_ref): Likewise.
21991 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
21993         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
21994         custom LIB_SPEC setup.
21996 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
21997             Kito Cheng  <kito.cheng@gmail.com>
21999         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22000         * config/riscv/freebsd.h: New.
22002 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22004         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22005         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22006         file.
22008 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22009             Kito Cheng  <kito.cheng@gmail.com>
22011         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22012         nds32_output_call, nds32_symbol_binds_local_p): New functions.
22013         * config/nds32/nds32-protos.h (nds32_output_call,
22014         nds32_output_return): Declare.
22015         * config/nds32/nds32.md: Refine all the call and return patterns.
22017 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22019         PR debug/85252
22020         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22021         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22023         PR rtl-optimization/84872
22024         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22025         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22026         EDGE_CROSSING edge.
22028 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
22030         * expr.c (copy_blkmode_to_reg): Revert 254862.
22031         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22033 2018-04-06  Richard Biener  <rguenther@suse.de>
22035         PR middle-end/85244
22036         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22037         after seeing a component reference with an adjacent field.  Treat
22038         refs to arrays at struct end of external decls similar to
22039         refs to unconstrained commons.
22041 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22043         PR sanitizer/85213
22044         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22045         look through SAVE_EXPRs with non-side-effects argument.  Adjust
22046         recursive calls.
22047         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22048         save_p here.
22050 2018-04-06  Richard Biener  <rguenther@suse.de>
22052         PR middle-end/85180
22053         * alias.c (find_base_term): New wrapper around find_base_term
22054         unwinding CSELIB_VAL_PTR changes.
22055         (find_base_term): Do not restore CSELIB_VAL_PTR during the
22056         recursion.
22058 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22060         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22061         instructions.
22062         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22063         constant definitions.
22064         ("nop"): lr 0,0 -> nopr r0
22065         ("nop_lr0", "nop_lr1"): New insn definitions.
22067 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22069         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22070         NDS32_V3PUSH_AVAILABLE_P macro.
22072 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
22073             Chung-Ju Wu  <jasonwucj@gmail.com>
22075         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22076         (nds32*-*-*): Add float and fpu_config into supported_defaults.
22077         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22078         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22079         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22080         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22081         * config/nds32/constraints.md: New constraints and checking for hard
22082         float configuration.
22083         * config/nds32/iterators.md: New mode iterator and attribute for hard
22084         float configuration.
22085         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22086         patterns.
22087         * config/nds32/nds32-fpu.md: New file.
22088         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22089         deal with hard float code generation.
22090         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22091         ARCH_V3S.
22092         (abi_type, float_reg_number): New enum type.
22093         * config/nds32/nds32-predicates.c: New predicates for hard float.
22094         * config/nds32/nds32-protos.h: Declare functions for hard float.
22095         * config/nds32/nds32.c: Implementation for hard float configuration.
22096         * config/nds32/nds32.h: Definitions for hard float configuration.
22097         * config/nds32/nds32.md: Include hard float machine description and
22098         modify patterns for hard float configuration.
22099         * config/nds32/nds32.opt: New options for hard float configuration.
22100         * config/nds32/predicates.md: New predicates for hard float
22101         configuration.
22103 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22105         * common/config/nds32/nds32-common.c
22106         (nds32_option_optimization_table): Enable -mreleax-hint by default.
22108 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
22110         PR middle-end/85195
22111         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22112         CONSTRUCTOR_ELT (ctor, ...)->value.
22114 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
22116         PR target/85193
22117         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22119 2018-04-05  Tom de Vries  <tom@codesourcery.com>
22121         PR target/85204
22122         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22123         cond jump.
22125 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22126             Kito Cheng  <kito.cheng@gmail.com>
22128         * config/nds32/constraints.md (U33): Fine-tune checking condition.
22129         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22130         * config/nds32/nds32.h (nds32_16bit_address_type): Add
22131         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22133 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22134             Kito Cheng  <kito.cheng@gmail.com>
22136         * config/nds32/constraints.md (Ufe): New memory constraint.
22137         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22138         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22139         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22140         operands.
22141         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22142         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22144 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22146         * config/nds32/nds32.md: Use optimize_size in the condition for
22147         alu-shift instructions.
22149 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22151         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22153 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22155         * config/nds32/nds32.md (negsi2): Refine pattern.
22157 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22158             Chung-Ju Wu  <jasonwucj@gmail.com>
22160         * config/nds32/iterators.md (shift_rotate): New code iterator.
22161         (shift): New code attribute.
22162         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22163         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22164         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22165         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22166         bit-wise operations.
22167         (andsi3, *andsi3): Ditto.
22168         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22169         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22170         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22171         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22172         nds32_ior_operand, nds32_xor_operand): New predicates.
22174 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22176         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22177         (addsi3, subsi3): ... this.
22179 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22181         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22183 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22185         * config/nds32/nds32.md: Adjust indention.
22187 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22189         * config/nds32/nds32.md (feature): New attribute.
22191 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22193         * config/nds32/nds32.md (subtype): New attribute.
22195 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22197         PR target/85203
22198         * config/arm/arm-builtins.c (arm_expand_builtin): Change
22199         expansion to perform a bitwise AND of the argument followed by a
22200         boolean negation of the result.
22202 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
22204         PR rtl-optimization/84878
22205         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22206         the basic block.  Assert the use reference is not artificial and that
22207         it has an associated insn.
22209 2018-04-04  Michael Matz  <matz@suse.de>
22211         * builtins.c (compute_objsize): Pass correct operand
22212         to array_at_struct_end_p.
22214 2018-04-04  Richard Biener  <rguenther@suse.de>
22216         PR lto/85176
22217         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22218         from contexts for DINFO_LEVEL_TERSE and below.
22220 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22222         * config/nds32/nds32-doubleword.md (move_<mode>): Require
22223         resiter_operand condition.
22224         * config/nds32/nds32.md (*move<mode>): Ditto.
22226 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22227             Monk Chiang  <sh.chiang04@gmail.com>
22229         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22231 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22233         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22235 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22236             Kito Cheng  <kito.cheng@gmail.com>
22238         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22239         nds32_cond_code_str, output_cond_branch,
22240         output_cond_branch_compare_zero, nds32_expand_cbranch,
22241         nds32_expand_cstore, nds32_expand_movcc,
22242         nds32_output_cbranchsi4_equality_zero,
22243         nds32_output_cbranchsi4_equality_reg,
22244         nds32_output_cbranchsi4_equality_reg_or_const_int,
22245         nds32_output_cbranchsi4_greater_less_zero: New functions.
22246         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22247         nds32_expand_cstore, nds32_expand_movcc,
22248         nds32_output_cbranchsi4_equality_zero,
22249         nds32_output_cbranchsi4_equality_reg,
22250         nds32_output_cbranchsi4_equality_reg_or_const_int,
22251         nds32_output_cbranchsi4_greater_less_zero): Declare.
22252         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22253         nds32_rimm11s_operand): New predicates.
22254         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22255         * config/nds32/nds32.md: Rewrite all the branch and conditional move
22256         patterns.
22258 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22260         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22261         * config/nds32/nds32.md: Ditto.
22262         * config/nds32/pipelines.md: Ditto.
22264 2018-04-04  Richard Biener  <rguenther@suse.de>
22266         PR tree-optimization/85168
22267         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22268         propagating abnormals.
22270 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22272         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22274 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22275             Kito Cheng  <kito.cheng@gmail.com>
22277         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22278         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22279         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22280         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22281         * config/nds32/nds32.md (sibcall_internal): New.
22282         (sibcall_register): Remove.
22283         (sibcall_immediate): Remove.
22284         (sibcall_value_internal): New.
22285         (sibcall_value_register): Remove.
22286         (sibcall_value_immediate): Remove.
22287         * config/nds32/predicates.md (nds32_general_register_operand): New.
22288         (nds32_call_address_operand): New.
22290 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22292         PR rtl-optimization/85167
22293         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22294         bb_defs if *split_p, instead preinitialize it to NULL.
22296         PR tree-optimization/85156
22297         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22298         evaluating the argument multiple times.
22300 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
22302         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22303         than vector.
22304         (_mm_cvtpd_ps): Likewise.
22305         (_mm_cvttpd_epi32): Likewise.
22306         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22307         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22308         vector, pixel, and bool following altivec.h include.
22310 2018-04-03  Martin Sebor  <msebor@redhat.com>
22312         * doc/extend.texi (Common Function Attributes): Clarify.
22313         (const attribute): Likewise.
22314         (pure attribute): Likewise.
22316 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22318         PR target/85169
22319         * config/i386/i386.c (ix86_expand_vector_set): Use
22320         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
22322 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
22324         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22325         instructions when changing rounding bits to preserve precision bits
22326         in the x87 control word.
22328 2018-04-03  Martin Liska  <mliska@suse.cz>
22330         PR tree-optimization/82491
22331         * rtl.h (strip_offset_and_add): Replace += suboffset with
22332         poly_uint64 () + suboffset.
22334 2018-03-29  Martin Liska  <mliska@suse.cz>
22335             Martin Jambor  <mjambor@suse.cz>
22337         PR ipa/84947
22338         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22339         param_type is not an integral or pointer type.
22341 2018-04-03  Richard Biener  <rguenther@suse.de>
22343         * sese.h (recompute_all_dominators): Remove.
22345 2018-04-02  Martin Sebor  <msebor@redhat.com>
22347         * doc/invoke.texi (-Wrestrict): Fix typos.
22349 2018-04-02  Jim Wilson  <jimw@sifive.com>
22351         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22352         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22353         (<optab>di3, <optab>si3_extend): Likewise.
22354         (<optab>si3_mask, <optab>si3_mask_1): New.
22355         (<optab>di3_mask, <optab>di3_mask_1): New.
22356         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22357         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22358         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22360 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
22362         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22363         example.
22365 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
22367         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22368         (nds32_canonicalize_comparison): New function.
22370 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22371             Kito Cheng  <kito.cheng@gmail.com>
22372             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22374         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22375         * config/nds32/constants.md (unspec_volatile_element): Add
22376         UNSPEC_VOLATILE_RELAX_GROUP.
22377         * config/nds32/nds32-relax-opt.c: New file.
22378         * config/nds32/nds32-predicates.c
22379         (nds32_symbol_load_store_p): New function.
22380         * config/nds32/nds32-protos.h
22381         (nds32_symbol_load_store_p): Declare function.
22382         (make_pass_nds32_relax_opt): Declare new rtl pass function.
22383         * config/nds32/nds32.c
22384         (nds32_register_pass): New function to register pass.
22385         (nds32_register_passes): New function to register passes.
22386         * config/nds32/nds32.md (relax_group): New pattern.
22387         * config/nds32/nds32.opt (mrelax-hint): New option.
22388         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22390 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
22392         * config/nds32/t-nds32: Modify files dependency.
22394 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22396         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22397         (PROFILE_HOOK): Define its implementation.
22399 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22401         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22402         type and 32-bit size.
22404 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
22406         PR middle-end/85090
22407         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22408         (V_128_256): New mode iterator.
22409         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22410         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22411         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22412         of V.
22413         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22414         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22416 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
22418         PR target/83315
22419         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22420         NaN inputs correctly.
22422 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
22424         PR target/80546
22425         * config/rs6000/vsx.md (??r): New mode attribute.
22426         (*vsx_mov<mode>_64bit): Use it.
22427         (*vsx_mov<mode>_32bit): Likewise.
22429 2018-03-30  Martin Sebor  <msebor@redhat.com>
22431         PR tree-optimization/84818
22432         * builtins.c (check_access): Use warning_n.
22434 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22436         PR target/83822
22437         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22438         condition.
22439         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22440         condition.
22442 2018-03-30  Julia Koval  <julia.koval@intel.com>
22444         PR target/84413
22445         * x86-tune.def (movx, partial_reg_dependency): Enable for
22446         m_SKYLAKE_AVX512.
22448 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
22450         PR inline-asm/84985
22451         * lra-constraints.c (process_alt_operands): Move setting
22452         this_alternative_matches below.
22454 2018-03-29  Martin Liska  <mliska@suse.cz>
22456         PR lto/84995.
22457         * doc/invoke.texi: Document how LTO works with debug info.
22458         Describe auto-load support of binutils.  Mention 'x86-64'
22459         as valid option value of -march option.
22461 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
22463         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22465         PR c/85094
22466         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22467         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22468         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22469         checking.
22471 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
22473         PR target/84912
22474         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22475         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22476         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22477         for RS6000_BTM_POWERPC64.
22478         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22479         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22480         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22481         definition.
22482         (DIVDE): Use it.
22483         (DIVDEU): Likewise.
22485 2018-03-28  Carl Love  <cel@us.ibm.com>
22487         Revert
22488         2017-09-27  Carl Love  <cel@us.ibm.com>
22490         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22491         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22492         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22493         fctiw instruction.
22495 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22497         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22498         instead of __vector bool.
22499         (_mm_max_pu8): Likewise.
22500         (_mm_min_pi16): Likewise.
22502 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
22504         PR target/84912
22505         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22506         (DIVWEUO): Likewise.
22507         (DIVDEO): Likewise.
22508         (DIVDEUO): Likewise.
22509         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22510         DIVWEUO and DIVDEUO.
22511         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22512         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22513         (div_extend): Likewise.
22514         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22515         builtin function.
22516         (__builtin_divweuo): Likewise.
22517         (__builtin_divdeo): Likewise.
22518         (__builtin_divdeuo): Likewise.
22520 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22522         PR target/85095
22523         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22524         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22526         PR tree-optimization/82004
22527         * gimple-match-head.c (optimize_pow_to_exp): New function.
22528         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22529         Don't fold to exp if optimize_pow_to_exp is false.
22531 2018-03-28  Martin Liska  <mliska@suse.cz>
22533         PR other/84819
22534         * calls.c (initialize_argument_information): Fix trailing space.
22535         * common.opt: Fix typo and provide better explanation for
22536         -fsanitize-coverage option.
22537         * config/i386/i386.opt: Fix typo.
22539 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22540             Martin Liska  <mliska@suse.cz>
22542         PR sanitizer/85081
22543         * gimplify.c (asan_poison_variable): Don't do the check for
22544         gimplify_omp_ctxp here.
22545         (gimplify_decl_expr): Do it here.
22546         (gimplify_target_expr): Likewise.
22548 2018-03-28  Martin Liska  <mliska@suse.cz>
22550         PR target/84988
22551         * config/i386/i386.c (ix86_function_arg_advance): Do not call
22552         chkp_type_bounds_count if MPX is not enabled.
22554 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
22556         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22558 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
22560         PR target/84914
22561         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22562         function to create the function decl for complex long double
22563         multiply and divide for -mabi=ieeelongdouble.
22564         (init_float128_ieee): Call it.
22566 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
22568         PR target/85044
22569         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22570         -fcf-protection=branch -mibt.
22571         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22573 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22575         PR target/81863
22576         * config/arm/arm.c (arm_valid_symbolic_address): Handle
22577         arm_word_relocations.
22579 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
22581         PR target/85056
22582         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22583         extern array declarations.
22585 2018-03-27  Richard Biener  <rguenther@suse.de>
22587         PR middle-end/84067
22588         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22589         explicit single_use checks.
22591 2018-03-27  Richard Biener  <rguenther@suse.de>
22593         PR tree-optimization/85082
22594         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22595         Valueize the VUSE.
22597 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22599         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22600         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22601         Turn on fasynchronous-unwind-tables and funwind-tables.
22603 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
22605         PR target/85073
22606         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22607         (*bmi_blsr_<mode>_ccz): Ditto.
22609 2018-03-26  Tom de Vries  <tom@codesourcery.com>
22611         PR tree-optimization/85063
22612         * omp-general.c (offloading_function_p): New function.  Factor out
22613         of ...
22614         * omp-offload.c (pass_omp_target_link::gate): ... here.
22615         * omp-general.h (offloading_function_p): Declare.
22616         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22617         with attribute omp declare target for offloading functions.
22619 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
22621         PR tree-optimization/84005
22622         * tree-data-ref.h (get_base_for_alignment): Declare.
22623         * tree-data-ref.c (get_base_for_alignment_1): New function.
22624         (get_base_for_alignment): Likewise.
22625         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22626         get_base_for_alignment to find a suitable base object, instead
22627         of always using drb->base_address.
22629 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22631         PR inline-asm/85022
22632         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22633         known size by default.
22635 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
22637         PR inline-asm/85030
22638         * lra-constraints.c (process_alt_operands): Don't match BLKmode
22639         and non BLKmode operands.
22641 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22643         PR target/85026
22644         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22645         Clean up attributes.
22647 2018-03-23  Richard Biener  <rguenther@suse.de>
22649         PR debug/85020
22650         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22651         we are going to emit early debug for LTO.
22653 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22655         PR inline-asm/85034
22656         * function.c (match_asm_constraints_1): Don't optimize if input
22657         doesn't satisfy general_operand predicate for output's mode.
22659         PR inline-asm/85022
22660         * alias.c (write_dependence_p): Don't require for x_canonicalized
22661         non-VOIDmode if x has VOIDmode.
22663         PR sanitizer/85029
22664         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22665         just don't try to optimize it rather than assert it never happens.
22667 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22669         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22670         macro expansions for definition of ST_INTERNAL_<mode> and
22671         LD_INTERNAL_<mode> builtins.
22672         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22673         Remove prototype.
22674         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22675         function.
22676         (altivec_expand_st_builtin): Likewise.
22677         (altivec_expand_builtin): Remove calls to deleted functions.
22678         (rs6000_address_for_altivec): Delete this function.
22679         * config/rs6000/vector.md: Remove expands for
22680         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22682 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
22684         PR target/84826
22685         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22686         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22687         re-computing once computed.
22688         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22689         (arm_init_machine_status): Initialize
22690         machine->static_chain_stack_bytes.
22692 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22694         PR target/84760
22695         * doc/extend.texi: Add four new prototypes for vec_ld.
22696         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22697         definitions for more logical presentation.
22698         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22699         entries for V1TI variants of __builtin_altivec_ld builtin.
22700         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22701         handling of V1TI variant of LVX icode pattern.
22702         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22703         (rs6000_gimple_fold_builtin): Likewise.
22704         (altivec_init_builtins): Add code to define
22705         __builtin_altivec_lvx_v1ti function.
22707 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
22709         PR inline-asm/84941
22710         * function.c (match_asm_constraints_1): Don't do the optimization
22711         if input isn't a REG, SUBREG, MEM or constant.
22713 2018-03-22  Tom de Vries  <tom@codesourcery.com>
22715         PR tree-optimization/84956
22716         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22717         bb_has_abnormal_pred.
22719 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
22721         PR sanitizer/85018
22722         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22723         DECL_INITIAL (decl) to decl at the end.
22724         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22725         adjust the comment.
22727 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
22729         * doc/extend.texi (__builtin_tgmath): Document when complex
22730         integer types are treated as _Complex _Float64.
22732 2018-03-21  Tom de Vries  <tom@codesourcery.com>
22734         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22736 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22738         PR tree-optimization/84960
22739         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22740         if it is ENTRY block, move them into single succ of ENTRY in that case.
22742 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
22744         PR tree-optimization/84811
22745         * poly-int.h (poly_span_traits): Remove the T3 parameter and
22746         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22747         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22748         (known_subrange_p): Update accordingly.  Cast each value involved
22749         in the size comparison, rather than casting the result of the
22750         subtraction.
22752 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22754         PR tree-optimization/84982
22755         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22756         by flipping the least significant bit rather than all bits from
22757         bitpos to bitpos + bitsize - 1.
22759 2018-03-21  Nathan Sidwell  <nathan@acm.org>
22761         * doc/extend.texi (Deprecated Features): Remove mention of
22762         long-deleted deprecations.
22764 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22766         PR jit/84288
22767         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22768         * configure: Regenerate.
22770 2018-03-21  Tom de Vries  <tom@codesourcery.com>
22772         PR tree-optimization/83126
22773         * tree-parloops.c (num_phis): New function.
22774         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22776 2018-03-21  Nathan Sidwell  <nathan@acm.org>
22778         * doc/extend.texi (Deprecated Features): Update deprecated flags,
22779         mention anon-struct/union members and trailing attributes.
22781 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
22783         PR tree-optimization/84969
22784         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22785         builtin memset partitions if they set different rhs values.
22787 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22789         PR rtl-optimization/84989
22790         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22791         VEC_DUPLICATE with scalar result mode.
22793 2018-03-21  Martin Liska  <mliska@suse.cz>
22795         PR ipa/84963
22796         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22797         not intended return statement.
22799 2018-03-21  Martin Liska  <mliska@suse.cz>
22801         PR target/84988
22802         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22803         (chkp_find_bound_slots_1): Limit number of iterations.
22805 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
22807         PR target/84838
22808         * Minor grammar fixes for x86 options.
22810 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22812         PR debug/84875
22813         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22814         holding REG_CFA_RESTORE notes, instead turn them into a USE.
22816 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
22818         PR target/83789
22819         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22820         (altivec_lvx_<mode>_1op): Likewise.
22821         (altivec_stvx_<mode>_2op): Likewise.
22822         (altivec_stvx_<mode>_1op): Likewise.
22823         (altivec_lvx_<VM2:mode>): New define_expand.
22824         (altivec_stvx_<VM2:mode>): Likewise.
22825         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22826         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22827         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22828         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22829         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22830         (rs6000_gen_lvx): Likewise.
22831         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22832         (altivec_expand_stv_builtin): Likewise.
22833         (altivec_expand_builtin): Likewise.
22834         * config/rs6000/vector.md: Likewise.
22836 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22838         PR target/82518
22839         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22840         BYTES_BIG_ENDIAN.
22842 2018-03-20  Richard Biener  <rguenther@suse.de>
22844         PR target/84986
22845         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22846         sign-conversions as zero, fall back to standard scalar_stmt
22847         cost for the rest.
22849 2018-03-20  Martin Liska  <mliska@suse.cz>
22851         PR ipa/84825
22852         * predict.c (rebuild_frequencies): Handle case when we have
22853         PROFILE_ABSENT, but flag_guess_branch_prob is false.
22855 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22857         PR target/84990
22858         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22859         flag_section_anchors.
22860         * varasm.c (use_blocks_for_decl_p): Remove hack for
22861         dw2_force_const_mem.
22863         PR target/84845
22864         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22865         to ...
22866         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
22867         be created, use lowpart_subreg of operands[0] rather than operands[0]
22868         itself.
22869         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22870         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22871         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22872         and n constraint instead of aarch64_shift_imm_di and Usd.
22873         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22874         (*aarch64_<optab>_reg_minus<mode>3): ... this.
22876 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
22878         PR target/82989
22879         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22880         to favor GPR over NEON registers.
22881         (<shift>di3_neon): Likewise.
22883 2018-03-20  Tom de Vries  <tom@codesourcery.com>
22885         PR target/84952
22886         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22887         (nvptx_process_pars): Emit bar.sync asap and alap.
22889 2018-03-20  Tom de Vries  <tom@codesourcery.com>
22891         PR target/84954
22892         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22893         seen_label if seen_label is already set.
22895 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22897         PR target/84945
22898         * config/i386/i386.c (fold_builtin_cpu): For features above 31
22899         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22900         Use 1U instead of 1.  Formatting fixes.
22902         PR c/84953
22903         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22904         instead of TREE_TYPE (s1) for the return value.
22906 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
22908         PR tree-optimization/84946
22909         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22910         bitsize + bitsize in poly_uint64 rather than poly_int64.
22912         PR sanitizer/78651
22913         * dwarf2asm.c: Include fold-const.c.
22914         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22915         of decl rather than decl itself.
22917         PR rtl-optimization/84643
22918         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22920 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
22922         PR sanitizer/78651
22923         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22924         calling assemble_variable.
22926 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
22928         PR target/81647
22929         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22930         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22932 2018-03-19  Jim Wilson  <jimw@sifive.com>
22934         PR bootstrap/84856
22935         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22936         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22937         (riscv_first_stack_step): Likewise.
22938         (riscv_option_override): Use STACK_BOUNDARY instead of
22939         MIN_STACK_BOUNDARY.
22940         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22941         MIN_STACK_BOUNDARY.
22942         (BIGGEST_ALIGNMENT): Set to 128.
22943         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22944         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22945         STACK_BOUNDARY.
22947 2018-03-19  Richard Biener  <rguenther@suse.de>
22949         PR tree-optimization/84933
22950         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22951         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22953 2018-03-19  Richard Biener  <rguenther@suse.de>
22955         PR tree-optimization/84859
22956         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
22957         (cond_if_else_store_replacement): Perform sinking operation on
22958         single-store BBs regardless of MAX_STORES_TO_SINK setting.
22959         Generalize what a BB with a single eligible store is.
22961 2018-03-19  Richard Biener  <rguenther@suse.de>
22963         PR tree-optimization/84929
22964         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
22965         chrec_is_positive against non-chrec arg.
22967 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
22969         PR target/84711
22970         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
22972 2018-03-18  Martin Liska  <mliska@suse.cz>
22974         PR rtl-optimization/84635
22975         * regrename.c (build_def_use): Use matches_mode only when
22976         matches >= 0.
22978 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
22980         PR tree-optimization/84913
22981         * tree-vect-loop.c (vectorizable_reduction): Don't try to
22982         vectorize chains of COND_EXPRs.
22984 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22986         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
22988 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22990         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
22992 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22994         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
22996 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
22997             Kito Cheng  <kito.cheng@gmail.com>
22999         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23000         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23001         (nds32_adjust_reg_alloc_order): New function.
23002         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23004 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
23006         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23007         nds32_print_operand, nds32_print_operand_address): Use
23008         HOST_WIDE_INT_PRINT_DEC instead.
23010 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
23012         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23014 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
23016         PR target/84902
23017         * config/i386/i386.c (initial_ix86_tune_features,
23018         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23019         unsigned long long.
23020         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23021         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23022         rather than 1u << ix86_tune.  Formatting fix.
23023         (ix86_option_override_internal): Change ix86_arch_mask from
23024         unsigned int to unsigned HOST_WIDE_INT, initialize to
23025         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23026         (ix86_function_specific_restore): Likewise.
23028 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23030         PR target/84899
23031         * postreload.c (reload_combine_recognize_pattern): Perform
23032         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23033         truncate_int_for_mode the result for the destination's mode.
23035         PR c/84909
23036         * hsa-gen.c (mem_type_for_type): Fix comment typo.
23037         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23038         Likewise.
23039         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23040         Likewise.
23042 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
23044         PR target/84876
23045         * lra-assigns.c (lra_split_hard_reg_for): Don't use
23046         regno_allocno_class_array and sorted_pseudos.
23047         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23048         insns where regno is used.
23050 2018-03-16  Martin Liska  <mliska@suse.cz>
23052         PR ipa/84833
23053         * multiple_target.c (create_dispatcher_calls): Redirect
23054         reference in the symbol table.
23056 2018-03-16  Martin Liska  <mliska@suse.cz>
23058         PR ipa/84722
23059         * multiple_target.c (create_dispatcher_calls): Redirect also
23060         an alias.
23062 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23064         PR c++/79937
23065         PR c++/82410
23066         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23067         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23068         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23070 2018-03-16  Julia Koval  <julia.koval@intel.com>
23072         * doc/invoke.texi (Skylake Server): Add CLWB.
23073         Cannonlake): Remove CLWB.
23075 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23077         PR tree-optimization/84841
23078         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23079         1 << 3.
23080         (FLOAT_ONE_CONST_TYPE): Define.
23081         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23082         (sort_by_operand_rank): Put entries with higher constant_type last
23083         rather than first to match comments.
23085 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
23087         * config/nios2/nios2.md (movsi_internal): Fix thinko in
23088         split predicate.
23090 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23092         PR c++/79085
23093         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23094         check and use address of target always.
23096 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
23098         PR target/84574
23099         * config/i386/i386.c (indirect_thunk_needed): Update comments.
23100         (indirect_thunk_bnd_needed): Likewise.
23101         (indirect_thunks_used): Likewise.
23102         (indirect_thunks_bnd_used): Likewise.
23103         (indirect_return_needed): New.
23104         (indirect_return_bnd_needed): Likewise.
23105         (output_indirect_thunk_function): Add a bool argument for
23106         function return.
23107         (output_indirect_thunk_function): Don't generate alias for
23108         function return thunk.
23109         (ix86_code_end): Call output_indirect_thunk_function to generate
23110         function return thunks.
23111         (ix86_output_function_return): Set indirect_return_bnd_needed
23112         and indirect_return_needed instead of indirect_thunk_bnd_needed
23113         and indirect_thunk_needed.
23115 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
23117         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23118         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23119         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23121 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
23122             Paul Hua <paul.hua.gm@gmail.com>
23124         PR c/84852
23125         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23127 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
23129         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23130         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23131         resp. SFmode cases.
23133 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
23135         PR target/84711
23136         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23137         instead of GET_MODE_SIZE when comparing Units.
23139 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
23141         PR target/68256
23142         * varasm.c (hash_section): Return an unchangeble hash value
23143         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23144         Return !aarch64_can_use_per_function_literal_pools_p ().
23146 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23148         PR target/84860
23149         * optabs.c (emit_conditional_move): Pass address of cmode's copy
23150         rather than address of cmode as last argument to prepare_cmp_insn.
23152 2018-03-15  Julia Koval  <julia.koval@intel.com>
23154         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23155         F_AVX512VNNI, F_AVX512BITALG): New.
23157 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
23159         PR target/83451
23160         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
23161         insn for floating-point loads and stores.
23163 2018-03-14  Carl Love  <cel@us.ibm.com>
23165         * config/rs6000/rs6000-c.c: Add macro definitions for
23166         ALTIVEC_BUILTIN_VEC_PERMXOR.
23167         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23168         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23169         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23170         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23171         UNSPEC_VPERMXOR.
23172         * config/doc/extend.texi: Add prototypes for vec_permxor.
23174 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
23176         PR c/84852
23177         * diagnostic-show-locus.c (class layout_point): Convert m_line
23178         from int to linenum_type.
23179         (line_span::comparator): Use linenum "compare" function when
23180         comparing line numbers.
23181         (test_line_span): New function.
23182         (layout_range::contains_point): Convert param "row" from int to
23183         linenum_type.
23184         (layout_range::intersects_line_p): Likewise.
23185         (layout::will_show_line_p): Likewise.
23186         (layout::print_source_line): Likewise.
23187         (layout::should_print_annotation_line_p): Likewise.
23188         (layout::print_annotation_line): Likewise.
23189         (layout::print_leading_fixits): Likewise.
23190         (layout::annotation_line_showed_range_p): Likewise.
23191         (struct line_corrections): Likewise for field m_row.
23192         (line_corrections::line_corrections): Likewise for param "row".
23193         (layout::print_trailing_fixits): Likewise.
23194         (layout::get_state_at_point): Likewise.
23195         (layout::get_x_bound_for_row): Likewise.
23196         (layout::print_line): Likewise.
23197         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23198         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23199         * input.c (selftest::test_linenum_comparisons): New function.
23200         (selftest::input_c_tests): Call it.
23201         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23202         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23203         * selftest.h (ASSERT_GT): New macro.
23204         (ASSERT_GT_AT): New macro.
23205         (ASSERT_LT): New macro.
23206         (ASSERT_LT_AT): New macro.
23208 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
23210         PR rtl-optimization/84780
23211         * combine.c (distribute_links): Don't make a link based on pc_rtx.
23213 2018-03-14  Martin Liska  <mliska@suse.cz>
23215         * tree.c (record_node_allocation_statistics): Use
23216         get_stats_node_kind.
23217         (get_stats_node_kind): New function extracted from
23218         record_node_allocation_statistics.
23219         (free_node): Use get_stats_node_kind.
23221 2018-03-14  Richard Biener  <rguenther@suse.de>
23223         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23224         that the value-set of ANTIC_IN doesn't grow.
23226         Revert
23227         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23228         member.
23229         (BB_VISITED_WITH_VISITED_SUCCS): New define.
23230         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23232 2018-03-14  Julia Koval  <julia.koval@intel.com>
23234         * config.gcc (icelake-client, icelake-server): New.
23235         (icelake): Remove.
23236         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23237         (initial_ix86_arch_features): Ditto.
23238         (PTA_SKYLAKE): Add SGX.
23239         (PTA_ICELAKE): Remove.
23240         (PTA_ICELAKE_CLIENT): New.
23241         (PTA_ICELAKE_SERVER): New.
23242         (ix86_option_override_internal): Split up icelake on icelake client and
23243         icelake server.
23244         (get_builtin_code_for_version): Ditto.
23245         (fold_builtin_cpu): Ditto.
23246         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23247         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23248         * config/i386/i386.h (processor_type): Ditto.
23249         * doc/invoke.texi: Ditto.
23251 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
23253         PR sanitizer/83392
23254         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23255         INTEGER_CST offset, add it together with bitpos / 8 and
23256         sign extend based on POINTER_SIZE.
23258         PR target/84844
23259         Revert
23260         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
23262         PR target/78090
23263         * config/i386/constraints.md (Yc): New register constraint.
23264         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23265         Use Yc constraint for alternative 2 of operand 0.  Remove
23266         preferred_for_speed attribute.
23268 2018-03-14  Richard Biener  <rguenther@suse.de>
23270         PR tree-optimization/84830
23271         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23272         with the old one to avoid oscillations.
23274 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
23276         PR target/83712
23277         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23278         pseudos.
23279         (assign_by_spills): Return a flag of reload assignment failure.
23280         Do not process the reload assignment failures.  Do not spill other
23281         reload pseudos if they has the same reg class.  Update n if
23282         necessary.
23283         (lra_assign): Add a return arg.  Set up from the result of
23284         assign_by_spills call.
23285         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23286         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23287         usage_insns if it is not NULL.
23288         (spill_hard_reg_in_range): New function.
23289         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23290         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23291         function prototypes.
23292         (lra_assign): Change prototype.
23293         * lra.c (lra): Add code to deal with fails by splitting hard reg
23294         live ranges.
23296 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
23298         * config/riscv/riscv.opt (mrelax): New option.
23299         * config/riscv/riscv.c (riscv_file_start): Emit ".option
23300         "norelax" when riscv_mrelax is disabled.
23301         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23303 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23305         PR target/84743
23306         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23307         reassociation for int modes.
23309 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23311         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23312         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23313         for big-endian.
23314         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23315         * config/aarch64/aarch64-sve.md
23316         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23317         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23318         (*extend<mode><Vwide>2): Rename to...
23319         (aarch64_sve_extend<mode><Vwide>2): ...this.
23320         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23321         renaming the old pattern to...
23322         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
23323         unsigned packs.
23324         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23325         define_expand, renaming the old pattern to...
23326         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23327         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23328         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23329         account when deciding which SVE instruction the optab should use.
23330         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23332 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23334         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23335         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23336         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23337         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23338         (tlsdesc_small_<mode>): Turn a define_expand and use
23339         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
23340         (tlsdesc_small_advsimd_<mode>): ...this.
23341         (tlsdesc_small_sve_<mode>): New pattern.
23343 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23345         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23346         (UNSPEC_UMUL_HIGHPART): New constants.
23347         (MUL_HIGHPART): New int iteraor.
23348         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23349         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23350         define_expand.
23351         (*<su>mul<mode>3_highpart): New define_insn.
23353 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23355         PR lto/84805
23356         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23357         incomplete types.
23359 2018-03-13  Martin Liska  <mliska@suse.cz>
23361         PR ipa/84658.
23362         * (sem_item_optimizer::sem_item_optimizer): Initialize new
23363         vector.
23364         (sem_item_optimizer::~sem_item_optimizer): Release it.
23365         (sem_item_optimizer::merge_classes): Register variable aliases.
23366         (sem_item_optimizer::fixup_pt_set): New function.
23367         (sem_item_optimizer::fixup_points_to_sets): Likewise.
23368         * ipa-icf.h: Declare new variables and functions.
23370 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
23372         PR middle-end/84834
23373         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23374         integer_pow2p@2 and test integer_pow2p in condition.
23375         (A < 0 ? C : 0): Similarly for @1.
23377         PR middle-end/84831
23378         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23379         characters starting at p contain '\0' character, don't look beyond
23380         that.
23382         PR target/84827
23383         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23384         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23386         PR target/84828
23387         * reg-stack.c (change_stack): Change update_end var from int to
23388         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23389         also call set_block_for_insn on the newly added insns and rescan.
23391         PR target/84786
23392         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23393         on the last operand.
23395         PR c++/84704
23396         * tree.c (stabilize_reference_1): Return save_expr (e) for
23397         STATEMENT_LIST even if it doesn't have side-effects.
23399 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
23401         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23403 2018-03-12  Renlin Li  <renlin.li@arm.com>
23405         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23406         aarch64_output_scalar_simd_mov_immediate.
23408 2018-03-12  Martin Sebor  <msebor@redhat.com>
23410         PR tree-optimization/83456
23411         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23412         for perfectly overlapping calls to memcpy.
23413         (gimple_fold_builtin_memory_chk): Same.
23414         (gimple_fold_builtin_strcpy): Handle no-warning.
23415         (gimple_fold_builtin_stxcpy_chk): Same.
23416         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23418 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
23420         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23421         parameter.  Use it for SFmode.
23422         (rs6000_function_arg_advance_1): Adjust.
23423         (rs6000_function_arg): Adjust.
23424         (rs6000_gimplify_va_arg): Pass false for that new parameter.
23426 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
23428         PR rtl-optimization/84169
23429         PR rtl-optimization/84780
23430         * combine.c (can_combine_p): Check for a 2-insn combination whether
23431         the destination register is used between the two insns, too.
23433 2018-03-12  Richard Biener  <rguenther@suse.de>
23435         PR tree-optimization/84803
23436         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23437         for refs DR analysis didn't process.
23439 2018-03-12  Richard Biener  <rguenther@suse.de>
23441         PR tree-optimization/84777
23442         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23443         force-vectorize loops ignore whether we are optimizing for size.
23445 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
23447         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23448         (TARGET_MD_ASM_ADJUST): Define.
23450 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
23451             Kito Cheng  <kito.cheng@gmail.com>
23452             Chung-Ju Wu  <jasonwucj@gmail.com>
23454         * config/nds32/nds32.c (nds32_compute_stack_frame,
23455         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23456         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23457         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23458         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23459         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23460         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23461         * config/nds32/nds32.md (prologue, epilogue): Use macro
23462         NDS32_V3PUSH_AVAILABLE_P to do checking.
23464 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
23466         PR debug/58150
23467         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23468         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23469         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
23470         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
23471         addition of most attributes on !orig_type_die or the attribute not
23472         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23474 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23475             Chung-Ju Wu  <jasonwucj@gmail.com>
23477         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23478         __NDS32_VH__ macro.
23479         * config/nds32/nds32.opt (mvh): New option.
23481 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23482             Chung-Ju Wu  <jasonwucj@gmail.com>
23484         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23485         function.
23486         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23487         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23488         definition.
23490 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23491             Chung-Ju Wu  <jasonwucj@gmail.com>
23493         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23494         function.
23495         * config/nds32/nds32-multiple.md (strlensi): New pattern.
23496         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23498 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
23499             Kito Cheng  <kito.cheng@gmail.com>
23500             Chung-Ju Wu  <jasonwucj@gmail.com>
23502         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23503         UNSPEC_FFMISM and UNSPEC_FLMISM.
23504         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23505         for ffb, ffmism and flmism.
23506         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23507         (unspec_ffmism): Ditto.
23508         (unspec_flmism): Ditto.
23509         (nds32_expand_builtin_impl): Check if string extension is available.
23510         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23511         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23513 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
23515         Reverting patch:
23516         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23518         PR target/83712
23519         * lra-assigns.c (assign_by_spills): Return a flag of reload
23520         assignment failure.  Do not process the reload assignment
23521         failures.  Do not spill other reload pseudos if they has the same
23522         reg class.
23523         (lra_assign): Add a return arg.  Set up from the result of
23524         assign_by_spills call.
23525         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23526         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23527         usage_insns if it is not NULL.
23528         (spill_hard_reg_in_range): New function.
23529         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23530         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23531         function prototypes.
23532         (lra_assign): Change prototype.
23533         * lra.c (lra): Add code to deal with fails by splitting hard reg
23534         live ranges.
23536 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
23538         PR target/84807
23539         * config/i386/i386.opt: Replace Enforcment with Enforcement.
23541 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
23543         PR debug/84620
23544         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23545         (dw_val_node): Add val_symbolic_view.
23546         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23547         (symview_upper_bound): New.
23548         (new_line_info_table): Initialize symviews_since_reset.
23549         (dwarf2out_source_line): Count symviews_since_reset and set
23550         symview_upper_bound.
23551         (dw_val_equal_p): Handle symview.
23552         (add_AT_symview): New.
23553         (print_dw_val): Handle symview.
23554         (attr_checksum, attr_checksum_ordered): Likewise.
23555         (same_dw_val_p, size_of_die): Likewise.
23556         (value_format, output_die): Likewise.
23557         (add_high_low_attributes): Use add_AT_symview for entry_view.
23558         (dwarf2out_finish): Reset symview_upper_bound, clear
23559         zero_view_p.
23561 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
23563         PR target/83969
23564         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23565         Add strict argument and use it.
23566         (rs6000_split_multireg_move): Update for new strict argument.
23567         (mem_operand_gpr): Disallow all non-offsettable addresses.
23568         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23570 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
23572         PR target/84772
23573         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23574         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23575         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23577         PR c++/84767
23578         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23579         decl, use remap_type if we want to use the type.
23581 2018-03-09  Martin Sebor  <msebor@redhat.com>
23583         PR tree-optimization/84526
23584         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23585         Remove dead code.
23586         (builtin_access::generic_overlap): Be prepared to handle non-array
23587         base objects.
23589 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
23591         PR rtl-optimization/84682
23592         * lra-constraints.c (process_address_1): Check is_address flag
23593         for address constraints.
23594         (process_alt_operands): Likewise.
23595         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23596         preprocess_constraints.
23597         * recog.h (preprocess_constraints): Add oploc parameter.
23598         Adjust callers.
23599         * recog.c (preprocess_constraints): Test address_operand for
23600         CT_ADDRESS constraints.
23602 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23604         PR target/83712
23605         * lra-assigns.c (assign_by_spills): Return a flag of reload
23606         assignment failure.  Do not process the reload assignment
23607         failures.  Do not spill other reload pseudos if they has the same
23608         reg class.
23609         (lra_assign): Add a return arg.  Set up from the result of
23610         assign_by_spills call.
23611         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23612         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23613         usage_insns if it is not NULL.
23614         (spill_hard_reg_in_range): New function.
23615         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23616         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23617         function prototypes.
23618         (lra_assign): Change prototype.
23619         * lra.c (lra): Add code to deal with fails by splitting hard reg
23620         live ranges.
23622 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23624         PR target/83193
23625         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23626         Accept complain bool parameter.  Only emit errors if it is true.
23627         (arm_parse_cpu_option_name): Likewise.
23628         (arm_target_thumb_only): Adjust callers of the above.
23629         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23630         prototype to take a default true bool parameter.
23631         (arm_parse_arch_option_name): Likewise.
23633 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
23634             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
23636         PR jit/64089
23637         PR jit/84288
23638         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23639         * configure: Regenerate.
23640         * configure.ac ("linker --version-script option"): New.
23641         ("linker soname option"): New.
23643 2018-03-09  Richard Biener  <rguenther@suse.de>
23645         PR tree-optimization/84775
23646         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23647         immediate uses of predicate stmts and mark them modified.
23649         Revert
23650         PR tree-optimization/84178
23651         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23652         to caller.
23653         (version_loop_for_if_conversion): Delay update_ssa call.
23654         (tree_if_conversion): Delay update_ssa until after predicate
23655         insertion.
23657 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
23659         PR target/84763
23660         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23661         when the function accesses prior frames.
23663 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
23665         PR debug/84456
23666         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23667         gen_llsym, otherwise call maybe_gen_llsym.
23669         PR inline-asm/84742
23670         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23671         has ',' character inside of it.
23673 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23675         PR target/84748
23676         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23677         as clobbering CC_REGNUM.
23679 2018-03-08  Richard Biener  <rguenther@suse.de>
23681         PR middle-end/84552
23682         * tree-scalar-evolution.c: Include tree-into-ssa.h.
23683         (follow_copies_to_constant): Do not follow SSA names registered
23684         for update.
23686 2018-03-08  Richard Biener  <rguenther@suse.de>
23688         PR tree-optimization/84178
23689         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23690         to caller.
23691         (version_loop_for_if_conversion): Delay update_ssa call.
23692         (tree_if_conversion): Delay update_ssa until after predicate
23693         insertion.
23695 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
23697         PR tree-optimization/84178
23698         * tree-if-conv.c (release_bb_predicate): Remove the
23699         the assertion that the stmts have NULL use_ops.
23700         Discard the statements, asserting that they haven't
23701         yet been added to a BB.
23703 2018-03-08  Richard Biener  <rguenther@suse.de>
23705         PR tree-optimization/84746
23706         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23707         (phi_translate): Pass in destination ANTIC_OUT set.
23708         (phi_translate_1): Likewise.  For a simplified result lookup
23709         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23710         (phi_translate_set): Adjust.
23711         (do_pre_regular_insertion): Likewise.
23712         (do_pre_partial_partial_insertion): Likewise.
23714 2018-03-08  Martin Liska  <mliska@suse.cz>
23716         PR gcov-profile/84735
23717         * doc/gcov.texi: Document usage of profile files.
23718         * gcov-io.h: Document changes in the format.
23720 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
23722         PR debug/84404
23723         PR debug/84408
23724         * dwarf2out.c (struct dw_line_info_table): Update comments for
23725         view == -1.
23726         (FORCE_RESET_NEXT_VIEW): New.
23727         (FORCE_RESETTING_VIEW_P): New.
23728         (RESETTING_VIEW_P): Check for -1 too.
23729         (ZERO_VIEW_P): Likewise.
23730         (new_line_info_table): Force-reset next view.
23731         (dwarf2out_begin_function): Likewise.
23732         (dwarf2out_source_line): Simplify zero_view_p initialization.
23733         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23734         view directly.  Omit view when omitting .loc at line 0.
23736 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
23738         PR tree-optimization/84740
23739         * tree-switch-conversion.c (process_switch): Call build_constructors
23740         only if info.phi_count is non-zero.
23742         PR tree-optimization/84739
23743         * tree-tailcall.c (find_tail_calls): Check call arguments against
23744         DECL_ARGUMENTS (current_function_decl) rather than
23745         DECL_ARGUMENTS (func) when checking for tail recursion.
23747 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
23749         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23750         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23751         Volker Reichelt's entry and add entries for people that perform
23752         GCC fuzzy testing and report numerous bugs.
23754 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
23756         PR target/82411
23757         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23758         readonly data in sdata, if that is disabled.
23759         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23760         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23761         -mreadonly-in-sdata option.
23763 2018-03-07  Martin Sebor  <msebor@redhat.com>
23765         PR tree-optimization/84468
23766         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23767         basic block when looking for nul assignment.
23769 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
23771         PR target/84277
23772         * except.h (output_function_exception_table): Adjust prototype.
23773         * except.c (output_function_exception_table): Remove FNNAME parameter
23774         and add SECTION parameter.  Ouput one part of the table at a time.
23775         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23776         the first part of the exception table and emit unwind directives.
23777         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23778         (i386_pe_seh_cold_init): Likewise.
23779         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23780         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23781         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23782         (ix86_output_call_insn): Emit a nop in one more case for SEH.
23783         * config/i386/winnt.c: Include except.h.
23784         (struct seh_frame_state): Add reg_offset, after_prologue and
23785         in_cold_section fields.
23786         (i386_pe_seh_end_prologue): Set seh->after_prologue.
23787         (i386_pe_seh_cold_init): New function.
23788         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23789         to seh->in_cold_section.
23790         (seh_emit_push): Record the offset of the push.
23791         (seh_emit_save): Record the offet of the save.
23792         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23793         Test seh->after_prologue to disregard the epilogue.
23794         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23795         (i386_pe_end_cold_function): New function.
23797 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
23799         PR fortran/84565
23800         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23801         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23803         PR c++/84704
23804         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23805         on tmp_var.
23806         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23807         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23809         PR middle-end/84723
23810         * multiple_target.c: Include tree-inline.h and intl.h.
23811         (expand_target_clones): Diagnose and fail if node->definition and
23812         !tree_versionable_function_p (node->decl).
23814 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
23816         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23817         sprint_ul.
23818         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23819         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23820         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23822 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23824         PR target/84710
23825         * combine.c (try_combine): Use reg_or_subregno instead of handling
23826         just paradoxical SUBREGs and REGs.
23828 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
23830         * config/arc/arc.c (arc_finalize_pic): Remove function.
23831         (arc_must_save_register): We use single base PIC register, remove
23832         checks to save/restore the PIC register.
23833         (arc_expand_prologue): Likewise.
23834         * config/arc/arc-protos.h (arc_set_default_type_attributes):
23835         Remove.
23836         (arc_verify_short): Likewise.
23837         (arc_attr_type): Likewise.
23838         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23839         (walk_stores): Likewise.
23840         (arc_address_cost): Make it static.
23841         (arc_verify_short): Likewise.
23842         (branch_dest): Likewise.
23843         (arc_attr_type): Likewise.
23844         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23845         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23846         (arc_final_prescan_insn): Remove inserting the nops due to
23847         hardware hazards.  It is done in reorg step.
23848         (insn_length_variant_t): Remove.
23849         (insn_length_parameters_t): Likewise.
23850         (arc_insn_length_parameters): Likewise.
23851         (arc_get_insn_variants): Likewise.
23852         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23854 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23856         PR inline-asm/84683
23857         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23858         assertion failure.
23860         PR tree-optimization/84687
23861         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23862         on new_node->decl.
23863         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23865 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23867         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23868         Rename to ppc_speculation_barrier.
23869         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23870         __builtin_ppc_speculation_barrier.
23872 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
23874         PR target/84700
23875         * combine.c (combine_simplify_rtx): Don't try to simplify if
23876         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23877         are equal to x.
23879 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
23881         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23882         to 32 bytes when compiling for POWER9.
23884 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
23886         PR target/84564
23887         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23888         regparm >= 3 with no arg reg available also for calls with
23889         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
23891         PR target/84524
23892         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23893         orig,vex.
23894         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
23896 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
23898         PR target/84264
23899         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23901 2018-03-05  Richard Biener  <rguenther@suse.de>
23903         PR tree-optimization/84486
23904         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23905         When inserting a __builtin_assume_aligned call set the LHS
23906         SSA name alignment info accordingly.
23908 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
23910         PR tree-optimization/84114
23911         * config/aarch64/aarch64.c (aarch64_reassociation_width)
23912         Avoid reassociation of FLOAT_MODE addition.
23914 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
23916         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23917         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23918         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23919         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23920         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23921         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23922         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23923         and -mwbnoinvd.
23924         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23925         __builtin_ia32_wbinvd): New builtins.
23926         (SPECIAL_ARGS2): New.
23927         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23928         (SPECIAL_ARGS2): New.
23929         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23930         (ix86_valid_target_attribute_inner_p): Ditto.
23931         (ix86_init_mmx_sse_builtins): Add special_args2.
23932         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23933         TARGET_WBNOINVD_P): New.
23934         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23935         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23936         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23937         * config/i386/immintrin.h (_wbinvd): New intrinsic.
23938         * config/i386/pconfigintrin.h: New file.
23939         * config/i386/wbnoinvdintrin.h: Ditto.
23940         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23941         wbnoinvdintrin.h.
23942         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23944 2018-03-05  Richard Biener  <rguenther@suse.de>
23946         PR tree-optimization/84670
23947         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23948         member.
23949         (BB_VISITED_WITH_VISITED_SUCCS): New define.
23950         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23951         (compute_antic_aux): Only assert the number of values in ANTIC_IN
23952         doesn't grow if all successors (recursively) were visited at least
23953         once.
23955 2018-03-05  Richard Biener  <rguenther@suse.de>
23957         PR tree-optimization/84650
23958         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
23959         if executed in the loop pipeline.
23961 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
23963         * doc/configfiles.texi (Configuration Files): Move info about
23964         conditionalizing $target-protos.h to...
23965         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
23966         differs from $target-protos.h.
23968 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
23969             Chung-Ju Wu  <jasonwucj@gmail.com>
23971         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
23972         * config/nds32/nds32-multiple.md (setmemsi): Define.
23973         * config/nds32/nds32-memory-manipulation.c
23974         (nds32_gen_dup_4_byte_to_word_value): New.
23975         (emit_setmem_word_loop): New.
23976         (emit_setmem_byte_loop): New.
23977         (nds32_expand_setmem_loop): New.
23978         (nds32_expand_setmem_loop_v3m): New.
23979         (nds32_expand_setmem_unroll): New.
23980         (nds32_expand_setmem): New.
23982 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
23983             Chung-Ju Wu  <jasonwucj@gmail.com>
23985         * config/nds32/nds32-memory-manipulation.c
23986         (nds32_emit_load_store): New.
23987         (nds32_emit_post_inc_load_store): New.
23988         (nds32_emit_mem_move): New.
23989         (nds32_emit_mem_move_block): New.
23990         (nds32_expand_movmemsi_loop_unknown_size): New.
23991         (nds32_expand_movmemsi_loop_known_size): New.
23992         (nds32_expand_movmemsi_loop): New.
23993         (nds32_expand_movmemsi_unroll): New.
23994         (nds32_expand_movmemqi): Rename ...
23995         (nds32_expand_movmemsi): ... to this.
23996         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
23997         (movmemsi): ... to this.
23998         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
23999         (nds32_expand_movmemsi): ... to this.
24001 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24002             Monk Chiang  <sh.chiang04@gmail.com>
24003             Chung-Ju Wu  <jasonwucj@gmail.com>
24005         * config/nds32/nds32-protos.h
24006         (nds32_expand_load_multiple): New arguments.
24007         (nds32_expand_store_multiple): Ditto.
24008         (nds32_valid_multiple_load_store): Rename ...
24009         (nds32_valid_multiple_load_store_p): ... to this.
24010         * config/nds32/nds32-memory-manipulation.c
24011         (nds32_expand_load_multiple): Refine implementation.
24012         (nds32_expand_store_multiple): Ditto.
24013         * config/nds32/nds32-multiple.md
24014         (load_multiple): Update nds32_expand_load_multiple interface.
24015         (store_multiple): Update nds32_expand_store_multiple interface.
24016         * config/nds32/nds32-predicates.c
24017         (nds32_valid_multiple_load_store): Rename ...
24018         (nds32_valid_multiple_load_store_p): ... to this and refine
24019         implementation.
24020         * config/nds32/predicates.md
24021         (nds32_load_multiple_and_update_address_operation): New predicate.
24022         (nds32_store_multiple_and_update_address_operation): New predicate.
24024 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24025             Chung-Ju Wu  <jasonwucj@gmail.com>
24027         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24028         (combo): New attribute.
24029         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24031 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
24033         * config/nds32/nds32.opt: Change -mcmodel= default value.
24035 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
24036             Monk Chiang  <sh.chiang04@gmail.com>
24037             Chung-Ju Wu  <jasonwucj@gmail.com>
24039         * config/nds32/constants.md (unspec_element): New enum.
24040         * config/nds32/constraints.md (Umw): New constraint.
24041         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24042         * config/nds32/nds32-intrinsic.md: Likewise.
24043         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24044         (nds32_valid_smw_lwm_base_p): New.
24045         (nds32_output_smw_single_word): New.
24046         (nds32_output_lmw_single_word): New.
24047         (nds32_expand_unaligned_load): New.
24048         (nds32_expand_unaligned_store): New.
24049         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24050         (nds32_output_smw_single_word): Declare.
24051         (nds32_output_lmw_single_word): Declare.
24052         (nds32_expand_unaligned_load): Declare.
24053         (nds32_expand_unaligned_store): Declare.
24054         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24055         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24056         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24057         NDS32_BUILTIN_UASTORE_DW.
24058         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24059         predicate.
24061 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
24062             Kito Cheng  <kito.cheng@gmail.com>
24063             Chung-Ju Wu  <jasonwucj@gmail.com>
24065         * config/nds32/nds32-intrinsic.c
24066         (nds32_expand_builtin_null_ftype_reg): Delete.
24067         (nds32_expand_builtin_reg_ftype_imm): Ditto.
24068         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24069         (nds32_read_argument): New.
24070         (nds32_legitimize_target): Ditto.
24071         (nds32_legitimize_argument): Ditto.
24072         (nds32_check_constant_argument): Ditto.
24073         (nds32_expand_unop_builtin): Ditto.
24074         (nds32_expand_unopimm_builtin): Ditto.
24075         (nds32_expand_binop_builtin): Ditto.
24076         (nds32_builtin_decl_impl): Ditto.
24077         (builtin_description): Ditto.
24078         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24079         (nds32_init_builtins_impl): Ditto.
24080         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24081         (nds32_builtin_decl): New.
24082         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24083         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24085 2018-03-02  Jeff Law  <law@redhat.com>
24087         * reorg.c (stop_search_p): Handle DEBUG_INSN.
24088         (redundant_insn, fill_simple_delay_slots): Likewise.
24089         (fill_slots_from_thread): Likewise.
24090         * resource.c (mark_referenced_resources): Likewise.
24091         (mark_set_resources, find_dead_or_set_registers): Likewise.
24093 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24095         * substring-locations.h (format_warning_va): Formatting fix for
24096         ATTRIBUTE_GCC_DIAG.
24097         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24098         argument.
24099         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24100         * substring-locations.c: Include intl.h.
24101         (format_warning_va): Turned into small wrapper around
24102         format_warning_n_va, renamed to ...
24103         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24104         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24105         use ngettext.
24106         (format_warning_at_substring_n): New function.
24107         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24108         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
24109         format_warning_at_substring with just a shorter name instead of
24110         const function pointer.
24111         (fmtwarn_n): New function.
24112         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24113         appropriate, get rid of all the fmtstr temporaries, move conditionals
24114         with G_() wrapped string literals directly into fmtwarn arguments,
24115         cast dir.len to (int), formatting fixes.
24117 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
24119         * doc/invoke.texi: Remove "Cilk Plus" references.
24121 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24122             Richard Biener  <rguenther@suse.de>
24124         PR ipa/84628
24125         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24126         for error or warning attributes if CALL_FROM_THUNK_P is set.
24127         Formatting fixes.
24129 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24131         PR target/56540
24132         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24133         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24135         PR target/56540
24136         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24137         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24139         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24140         instead of -1U in last predictors element's probability member.
24142 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
24144         PR ipa/83983
24145         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24146         arguments if they are comparable.
24148 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24150         PR tree-optimization/84634
24151         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24152         masks and masked_loop_p with a single loop_masks, making sure it's
24153         null for bb vectorization.
24155 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24157         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24158         (vect_analyze_data_ref_access): Use loop->safe_len rather than
24159         loop->force_vectorize to check whether there is no alias.
24161 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24163         PR target/84614
24164         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24165         prototypes.
24166         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24167         comments.
24168         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24169         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24170         instead of a loop around prev_real_insn.
24171         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24172         prev_real_insn.
24174         PR inline-asm/84625
24175         * config/i386/i386.c (ix86_print_operand): Use conditional
24176         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24177         zero vector.
24179 2018-03-02  Richard Biener  <rguenther@suse.de>
24181         PR tree-optimization/84427
24182         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24183         (bitmap_set_subtract_values): Rewrite to handle multiple
24184         exprs per value.
24185         (clean): Likewise.
24186         (prune_clobbered_mems): Likewise.
24187         (phi_translate): Take edge instead of pred/phiblock.
24188         (phi_translate_1): Likewise.
24189         (phi_translate_set): Likewise.  Insert all translated
24190         exprs for a value into the set, keeping possibly multiple
24191         expressions per value.
24192         (compute_antic_aux): Adjust for phi_translate changes.
24193         When intersecting union the expressions and prune those
24194         not in the final value set, keeping possibly multiple
24195         expressions per value.  Do not use value-insertion
24196         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24197         all expressions.  Add verification that the value-sets
24198         only shrink during iteration.
24199         (compute_partial_antic_aux): Adjust for the phi_translate changes.
24200         (do_pre_regular_insertion): Likewise.
24201         (do_pre_partial_partial_insertion): Likewise.
24203 2018-03-02  Richard Biener  <rguenther@suse.de>
24205         PR target/82005
24206         * config/darwin.c (saved_debug_info_level): New static global.
24207         (darwin_asm_lto_start): Disable debug info generation for LTO out.
24208         (darwin_asm_lto_end): Restore debug info generation settings.
24210 2018-03-01  Martin Liska  <mliska@suse.cz>
24212         PR sanitizer/82484
24213         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24214         volatile arguments.
24216 2018-03-01  Richard Biener  <rguenther@suse.de>
24218         PR debug/84645
24219         * dwarf2out.c (gen_variable_die): Properly handle late VLA
24220         type annotation with LTO when debug was disabled at compile-time.
24222 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
24224         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24225         XINT with INTVAL.
24226         (mips_final_postscan_insn): Likewise.
24228 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
24230         PR rtl-optimization/84528
24231         * alias.c (init_alias_target): Add commentary.
24232         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24233         a unique base value if the frame pointer is not eliminated
24234         to the stack pointer.
24236 2018-03-01  Tom de Vries  <tom@codesourcery.com>
24238         PR rtl-optimization/83327
24239         * lra-int.h (hard_regs_spilled_into): Declare.
24240         * lra.c (hard_regs_spilled_into): Define.
24241         (init_reg_info): Init hard_regs_spilled_into.
24242         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24243         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24244         (process_bb_lives): Handle hard_regs_spilled_into.
24245         (lra_create_live_ranges_1): Before doing liveness propagation, clear
24246         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24248 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
24250         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24251         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24252         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24253         * config/rs6000/aix72.h: New file.
24255 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
24257         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24258         instead of warning_at with conditional singular and plural messages
24259         where possible.
24261         PR target/52991
24262         * stor-layout.c (update_alignment_for_field): For
24263         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24264         && !DECL_PACKED (field), do the alignment update, just use
24265         only desired_align instead of MAX (type_align, desired_align)
24266         as the alignment.
24267         (place_field): Don't do known_align < desired_align handling
24268         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24269         is non-NULL, instead do it after rli->prev_field handling and
24270         only if not within a bitfield word.  For DECL_PACKED (field)
24271         use type_align of BITS_PER_UNIT.
24273 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
24275         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24276         superfluous parentheses and trailing spaces.
24278 2018-02-28  Richard Biener  <rguenther@suse.de>
24280         PR tree-optimization/84584
24281         * graphite-scop-detection.c (scop_detection::add_scop): Discard
24282         SCoPs with fake exit edge.
24284 2018-02-28  Martin Liska  <mliska@suse.cz>
24286         PR testsuite/84597
24287         * timevar.c (timer::print): Fix format to properly print 100%
24288         values.
24290 2018-02-28  Richard Biener  <rguenther@suse.de>
24292         PR middle-end/84607
24293         * genmatch.c (capture_info::walk_match): Do not mark
24294         captured expressions without operands as expr_p given
24295         they act more like predicates and should be subject to
24296         "lost tail" side-effect preserving.
24298 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
24300         PR rtl-optimization/81611
24301         * auto-inc-dec.c (attempt_change): Move dead note from
24302         mem_insn if it's the next use of regno
24303         (find_address): Take address use of reg holding
24304         non-incremented value.  Add parm to limit search to the named
24305         reg only.
24306         (merge_in_block): Attempt to use a mem insn that is the next
24307         use of the original regno.
24309 2018-02-27  Martin Sebor  <msebor@redhat.com>
24311         PR c++/83871
24312         * doc/invoke.texi (-Wmissing-attributes): New option.
24313         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24315 2018-02-27  Martin Sebor  <msebor@redhat.com>
24317         PR translation/84207
24318         * diagnostic-core.h (warning_n, error_n, inform_n): Change
24319         n argument to unsigned HOST_WIDE_INT.
24320         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24321         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
24322         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24323         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24325 2018-02-27  Richard Biener  <rguenther@suse.de>
24327         PR tree-optimization/84512
24328         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24329         Do not use the estimate returned from record_stmt_cost for
24330         the scalar iteration cost but sum properly using add_stmt_cost.
24332 2018-02-27  Richard Biener  <rguenther@suse.de>
24334         PR tree-optimization/84466
24335         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24336         Adjust last change to less strictly validate use operands.
24338 2018-02-27  Martin Liska  <mliska@suse.cz>
24340         PR gcov-profile/84548
24341         * gcov.c (process_file): Allow partial overlap and consider it
24342         also as group functions.
24343         (output_lines): Properly calculate range of lines for a group.
24345 2018-02-27  Martin Liska  <mliska@suse.cz>
24347         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24348         'ggc' suffixes.  Change first column width.
24349         (timer::print): Fix formatting of the column.
24351 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
24353         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24354         preserve inline entry blocks for the sake of debug inline
24355         entry point markers alone.
24356         (remove_unused_locals): Suggest in comments a better place to
24357         force the preservation of inline entry blocks that are
24358         otherwise unused, but do not preserve them.
24360 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24362         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24364 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24366         PR target/84039
24367         * config/i386/constraints.md (Bs): Replace
24368         ix86_indirect_branch_register with
24369         TARGET_INDIRECT_BRANCH_REGISTER.
24370         (Bw): Likewise.
24371         * config/i386/i386.md (indirect_jump): Likewise.
24372         (tablejump): Likewise.
24373         (*sibcall_memory): Likewise.
24374         (*sibcall_value_memory): Likewise.
24375         Peepholes of indirect call and jump via memory: Likewise.
24376         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24377         (*sibcall_value_GOT_32): Likewise.
24378         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24379         (GOT_memory_operand): Likewise.
24380         (call_insn_operand): Likewise.
24381         (sibcall_insn_operand): Likewise.
24382         (GOT32_symbol_operand): Likewise.
24383         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24385 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
24387         PR rtl-optimization/83496
24388         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24389         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
24390         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24391         redundant insn, if any.
24392         (relax_delay_slots): Likewise.
24393         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24395 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
24397         PR tree-optimization/83965
24398         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24399         that grouped statements are part of a reduction chain.  Return
24400         true if the statement is not marked as a reduction itself but
24401         is part of a group.
24402         (vect_recog_dot_prod_pattern): Don't check whether the statement
24403         is part of a group here.
24404         (vect_recog_sad_pattern): Likewise.
24405         (vect_recog_widen_sum_pattern): Likewise.
24407 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
24409         PR debug/84545
24410         * final.c (rest_of_clean_state): Also look for calls inside sequences.
24412 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24414         PR target/84530
24415         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24416         the bool argument.
24417         (ix86_output_indirect_function_return): New prototype.
24418         (ix86_split_simple_return_pop_internal): Likewise.
24419         * config/i386/i386.c (indirect_return_via_cx): New.
24420         (indirect_return_via_cx_bnd): Likewise.
24421         (indirect_thunk_name): Handle return va CX_REG.
24422         (output_indirect_thunk_function): Create alias for
24423         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24424         (ix86_output_indirect_jmp): Remove the bool argument.
24425         (ix86_output_indirect_function_return): New function.
24426         (ix86_split_simple_return_pop_internal): Likewise.
24427         * config/i386/i386.md (*indirect_jump): Don't pass false
24428         to ix86_output_indirect_jmp.
24429         (*tablejump_1): Likewise.
24430         (simple_return_pop_internal): Change it to define_insn_and_split.
24431         Call ix86_split_simple_return_pop_internal to split it for
24432         -mfunction-return=.
24433         (simple_return_indirect_internal): Call
24434         ix86_output_indirect_function_return instead of
24435         ix86_output_indirect_jmp.
24437 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
24439         PR bootstrap/84405
24440         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24441         memset and value initialization afterwards.
24443 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
24445         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24447 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24449         PR target/84521
24450         * common/config/aarch64/aarch64-common.c
24451         (aarch_option_optimization_table[]): Switch
24452         off fomit-frame-pointer
24454 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
24455             Chung-Ju Wu  <jasonwucj@gmail.com>
24457         * config/nds32/nds32-multiple.md (load_multiple): Disallow
24458         volatile memory.
24459         (store_multiple): Ditto.
24461 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
24463         * config.gcc: Add --with-cpu support for nds32 target.
24464         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24465         * config/nds32/nds32.opt: Add -mcpu= option.
24467 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
24469         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24470         isel=yes): Warn for these deprecated options.
24472 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
24474         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24475         ISA_2_5_MASKS_EMBEDDED.
24477 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
24479         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24480         p->max as pointers rather than using iterative_hash_expr.
24482 2018-02-23  Carl Love  <cel@us.ibm.com>
24484         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24485         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24486         BU_P8V_OVERLOAD_2.
24487         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24488         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24489         P8V_BUILTIN_VEC_VUNSIGNED2.
24491 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
24493         PR target/81572
24494         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24495         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24496         LRA_UNKNOWN_ALT.
24497         * lra-constraints.c (curr_insn_transform): Set up
24498         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
24499         LRA_UNKNOWN_ALT.
24500         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24501         * lra-eliminations.c (spill_pseudos): Ditto.
24502         (process_insn_for_elimination): Ditto.
24503         * lra-lives.c (reg_early_clobber_p): Use the new macros.
24504         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24505         LRA_NON_CLOBBERED_ALT.
24507 2018-02-22  Martin Sebor  <msebor@redhat.com>
24509         PR tree-optimization/84480
24510         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24511         to maybe_diag_stxncpy_trunc.  Call it.
24512         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24513         from gimple_fold_builtin_strcpy.  Print inlining stack.
24514         (handle_builtin_stxncpy): Print inlining stack.
24515         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24517 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
24519         PR target/84176
24520         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24521         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24522         and -fcheck-pointer-bounds are used together.
24523         (indirect_thunk_prefix): New enum.
24524         (indirect_thunk_need_prefix): New function.
24525         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
24526         "_nt" instead of "_bnd" for NOTRACK prefix.
24527         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24528         (output_indirect_thunk_function): Likewise.
24529         (): Likewise.
24530         (ix86_code_end): Update output_indirect_thunk_function calls.
24531         (ix86_output_indirect_branch_via_reg): Replace
24532         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24533         (ix86_output_indirect_branch_via_push): Likewise.
24534         (ix86_output_function_return): Likewise.
24535         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24536         incompatible with -fcf-protection=branch and
24537         -fcheck-pointer-bounds.
24539 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24541         PR target/83335
24542         * config/aarch64/aarch64.c (aarch64_print_address_internal):
24543         Change gcc_assert call to output_operand_lossage.
24545 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24547         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24549 2018-02-22  DJ Delorie  <dj@redhat.com>
24550             Sebastian Perta  <sebastian.perta@renesas.com>
24551             Oleg Endo  <olegendo@gcc.gnu.org>
24553         * config/rx/rx.c (rx_rtx_costs): New function.
24554         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24556 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24558         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24560 2018-02-22  Martin Liska  <mliska@suse.cz>
24562         PR driver/83193
24563         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24564         Add "native" as a possible value.
24566 2018-02-22  Martin Liska  <mliska@suse.cz>
24568         PR driver/83193
24569         * config/i386/i386.c (ix86_option_override_internal):
24570         Add "native" as a possible value for -march and -mtune.
24572 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
24574         PR target/84502
24575         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24576         to all type variants.
24578         PR tree-optimization/84503
24579         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24580         width as info->bitpos + info->bitsize - start.
24581         (merged_store_group::merge_overlapping): Simplify width computation.
24582         (check_no_overlap): New function.
24583         (imm_store_chain_info::try_coalesce_bswap): Compute expected
24584         start + width and last_order of the group, fail if check_no_overlap
24585         fails.
24586         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24587         to group if check_no_overlap fails.
24589 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24591         * config/rs6000/altivec.md: Delete contraint arguments to
24592         define_expand, define_split, and define_peephole2, and in
24593         define_insn_and_split if always unused.
24594         * config/rs6000/darwin.md: Ditto.
24595         * config/rs6000/dfp.md: Ditto.
24596         * config/rs6000/rs6000.md: Ditto.
24597         * config/rs6000/sync.md: Ditto.
24598         * config/rs6000/vector.md: Ditto.
24599         * config/rs6000/vsx.md: Ditto.
24601 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24603         * config/rs6000/altivec.md: Write output control strings as braced
24604         blocks instead of double-quoted strings.
24605         * config/rs6000/darwin.md: Ditto.
24606         * config/rs6000/rs6000.md: Ditto.
24607         * config/rs6000/vector.md: Ditto.
24608         * config/rs6000/vsx.md: Ditto.
24610 2018-02-21  Jason Merrill  <jason@redhat.com>
24612         PR c++/84314 - ICE with templates and fastcall attribute.
24613         * attribs.c (build_type_attribute_qual_variant): Remove assert.
24615 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24617         * ipa-cp.c (determine_versionability): Fix comment typos.
24619 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24621         PR c/84229
24622         * ipa-cp.c (determine_versionability): Do not version functions caling
24623         va_arg_pack.
24625 2018-02-21  Martin Liska  <mliska@suse.cz>
24627         PR driver/83193
24628         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24629         Add "native" as a possible value.
24630         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
24631         the macro when native cpu detection is available.
24633 2018-02-21  Martin Liska  <mliska@suse.cz>
24635         PR driver/83193
24636         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24637         Add "native" as a possible value.
24638         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24639         when native cpu detection is available.
24641 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
24642             Martin Sebor  <msebor@redhat.com>
24644         PR tree-optimization/84478
24645         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24646         false.
24647         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24648         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24649         support which is conservatively correct, for 2 only stay conservative
24650         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
24651         argument to the 2 argument get_range_strlen, adjust 6 arg
24652         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24653         false.
24654         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24655         (gimple_fold_builtin_strlen): Pass true as last argument to
24656         get_range_strlen.
24658 2018-02-20  Martin Sebor  <msebor@redhat.com>
24660         PR middle-end/84095
24661         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24662         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
24663         (builtin_memref::builtin_memref): Factor out parts into
24664         set_base_and_offset and call it.
24666 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
24668         PR middle-end/84406
24669         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24670         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24671         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
24672         search at the associated MODE_INT.
24674 2018-02-20  Jeff Law  <law@redhat.com>
24676         PR middle-end/82123
24677         PR tree-optimization/81592
24678         PR middle-end/79257
24679         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24680         for range data rather than using global data.
24681         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24682         range data rather than using global data.
24683         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24684         pass it to children as needed.
24685         (struct directive::fmtresult): Similarly.
24686         (struct directive::set_width): Similarly.
24687         (struct directive::set_precision): Similarly.
24688         (format_integer, format_directive, parse_directive): Similarly.
24689         (format_none): Accept unnamed vr_values parameter.
24690         (format_percent, format_floating, format_character): Similarly.
24691         (format_string, format_plain): Similarly.
24692         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24693         the EVRP range analyzer for range data rather than using global data.
24694         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24695         gimple-ssa-evrp-analyze.h
24696         (class sprintf_dom_walker): Add after_dom_children member function.
24697         Add evrp_range_analyzer member.
24698         (sprintf_dom_walker::before_dom_children): Call into the EVRP
24699         range analyzer as needed.
24700         (sprintf_dom_walker::after_dom_children): New member function.
24701         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24702         if not optimizing.
24703         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24704         (evrp_range_analyzer::pop_to_marker): Likewise.
24706 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
24708         PR tree-optimization/84419
24709         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24710         with the required type if its current type is compatible but
24711         different.
24713 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
24715         PR middle-end/82004
24716         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24717         after vectorization.
24719 2018-02-20  Martin Liska  <mliska@suse.cz>
24721         PR driver/83193
24722         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24723         possible values if we don't have a hint.
24725 2018-02-20  Martin Liska  <mliska@suse.cz>
24727         PR c/84310
24728         PR target/79747
24729         * final.c (shorten_branches): Build align_tab array with one
24730         more element.
24731         * opts.c (finish_options): Add alignment option limit check.
24732         (MAX_CODE_ALIGN): Likewise.
24733         (MAX_CODE_ALIGN_VALUE): Likewise.
24734         * doc/invoke.texi: Document maximum allowed option value for
24735         all -falign-* options.
24737 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
24739         PR target/84146
24740         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24741         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24742         * var-tracking.c (emit_note_insn_var_location): Remove all references
24743         to NOTE_INSN_CALL_ARG_LOCATION.
24744         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24745         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24746         Use copy_rtx_if_shared.
24747         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24748         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24749         (dwarf2out_var_location): Remove handling of
24750         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24751         on call_insn.
24752         * final.c (final_scan_insn): Remove all references to
24753         NOTE_INSN_CALL_ARG_LOCATION.
24754         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
24755         before dumping final insns.
24756         * except.c (emit_note_eh_region_end): Remove all references to
24757         NOTE_INSN_CALL_ARG_LOCATION.
24758         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24759         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24760         * config/arc/arc.c (hwloop_optimize): Likewise.
24761         * config/arm/arm.c (create_fix_barrier): Likewise.
24762         * config/s390/s390.c (s390_chunkify_start): Likewise.
24763         * config/sh/sh.c (find_barrier): Likewise.
24764         * config/i386/i386.c (rest_of_insert_endbranch,
24765         ix86_seh_fixup_eh_fallthru): Likewise.
24766         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24767         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24768         * config/frv/frv.c (frv_function_prologue): Likewise.
24769         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
24770         reg note.
24771         (note_outside_basic_block_p): Remove all references to
24772         NOTE_INSN_CALL_ARG_LOCATION.
24773         * gengtype.c (adjust_field_rtx_def): Likewise.
24774         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24775         Likewise.
24776         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24777         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24779         PR c++/84444
24780         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24781         is ADDR_EXPR.
24783         PR tree-optimization/84452
24784         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24785         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24786         is NULL.
24788 2018-02-19  Martin Liska  <mliska@suse.cz>
24790         PR sanitizer/82183
24791         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24793 2018-02-19  Martin Liska  <mliska@suse.cz>
24794             Richard Sandiford  <richard.sandiford@linaro.org>
24796         PR tree-optimization/82491
24797         * gimple-fold.c (get_base_constructor): Make earlier bail out
24798         to prevent ubsan.
24800 2018-02-19  Carl Love  <cel@us.ibm.com>
24802         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24803         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24804         BU_P8V_OVERLOAD_1.
24805         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24806         P8V_BUILTIN_VEC_NEG.
24808 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
24810         * config/rl78/rl78.md (movdf): New define expand.
24812 2018-02-19  Martin Liska  <mliska@suse.cz>
24814         PR other/80589
24815         * doc/invoke.texi: Fix typo.
24816         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24818 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
24820         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24821         handle rs6000_single_float and rs6000_double_float specially for
24822         e500 family CPUs.
24824 2018-02-16  Jeff Law  <law@redhat.com>
24826         * config/rx/rx.c (add_pop_cfi_notes): New function.;
24827         (pop_regs): Use it.
24829 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
24831         PR ipa/84425
24832         * ipa-inline.c (inline_small_functions): Fix a typo.
24834 2018-02-16  Nathan Sidwell  <nathan@acm.org>
24836         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24838 2018-02-16  Carl Love  <cel@us.ibm.com>
24840         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24841         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24842         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24843         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24844         expansion to P8V_BUILTIN_VEC_FLOAT2.
24846 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
24848         PR rtl-optimization/70023
24849         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24850         src_regno into account.
24852 2018-02-16  Carl Love  <cel@us.ibm.com>
24854         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24855         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24856         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24857         * config/rs6000/rs6000.c: Remove case statements for
24858         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24859         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24860         and P9V_BUILTIN_VEC_VINSERT4B.
24861         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24862         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24863         * config/rs6000/vsx.md:
24864         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24865         vec_insert4b.
24867 2018-02-16  Carl Love  <cel@us.ibm.com>
24869         * config/rs6000/altivec.h: Add builtin names vec_extract4b
24870         vec_insert4b.
24871         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24872         definitions.
24873         * config/rs6000/rs6000-c.c: Add the definitions for
24874         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24875         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24876         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24877         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
24878         definition for insert4b and define insn *insert3b_internal.
24879         * doc/extend.texi: Add documentation for vec_extract4b.
24881 2018-02-16  Nathan Sidwell  <nathan@acm.org>
24883         * doc/extend.texi (Backwards Compatibility): Mention friend
24884         injection.  Note for-scope is deprecated.
24885         * doc/invoke.texi (-ffriend-injection): Deprecate.
24887 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
24889         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24890         that moved to I2, also allow destinations that are a paradoxical
24891         subreg (instead of a normal reg).
24893 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
24895         PR target/83831
24896         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24897         to QImode.
24899 2018-02-16  Richard Biener  <rguenther@suse.de>
24901         PR tree-optimization/84037
24902         PR tree-optimization/84016
24903         PR target/82862
24904         * config/i386/i386.c (ix86_builtin_vectorization_cost):
24905         Adjust vec_construct for the fact we need additional higher latency
24906         128bit inserts for AVX256 and AVX512 vector builds.
24907         (ix86_add_stmt_cost): Scale vector construction cost for
24908         elementwise loads.
24910 2018-02-16  Richard Biener  <rguenther@suse.de>
24912         PR tree-optimization/84417
24913         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24914         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24915         (non_rewritable_lvalue_p): Likewise, use poly-ints.
24917 2018-02-16  Martin Liska  <mliska@suse.cz>
24919         PR sanitizer/84307
24920         * internal-fn.def (ASAN_CHECK): Set proper flags.
24921         (ASAN_MARK): Likewise.
24923 2018-02-16  Julia Koval  <julia.koval@intel.com>
24925         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24926         from PTA_CANNONLAKE.
24928 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
24930         PR target/84272
24931         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24932         Use ++iter rather than iter++ for std::list iterators.
24933         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
24934         defer deleting them until all nodes in the forest are processed.  Do
24935         free even leaf nodes.  Change to_process into auto_vec.
24937         PR bootstrap/84405
24938         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24939         * vec.h (vec_default_construct): Use memset instead of placement new
24940         if BROKEN_VALUE_INITIALIZATION is defined.
24941         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24942         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24943         is defined.
24945         PR rtl-optimization/83723
24946         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24947         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
24948         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
24949         recursive calls.
24950         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24951         callers.
24952         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24954 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
24956         PR rtl-optimization/81443
24957         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
24958         from inner REGs to paradoxical SUBREGs.
24960 2018-02-16  Richard Biener  <rguenther@suse.de>
24962         PR tree-optimization/84399
24963         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24964         For operands we can analyze at their definition make sure we can
24965         analyze them at each use as well.
24967 2018-02-16  Richard Biener  <rguenther@suse.de>
24969         PR tree-optimization/84190
24970         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
24971         volatile accesses if the decl isn't volatile.
24973 2018-02-15  Jason Merrill  <jason@redhat.com>
24975         PR c++/84314 - ICE with templates and fastcall attribute.
24976         * attribs.c (build_type_attribute_qual_variant): Don't clobber
24977         TYPE_CANONICAL on an existing type.
24979 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
24981         PR tree-optimization/84383
24982         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
24983         dstoff nor call operand_equal_p if dstbase is NULL.
24985         PR tree-optimization/84334
24986         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
24987         also a CONSTANT_CLASS_P, punt.
24989 2018-02-14  Jim Wilson  <jimw@sifive.com>
24991         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
24992         first SMALL_OPERAND check.  New local min_second_step.  Move assert
24993         to where locals are set.  Add TARGET_RVC support.
24994         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
24996 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
24998         * doc/invoke.texi: Correct -Wformat-overflow code sample.
25000 2018-02-14  Martin Sebor  <msebor@redhat.com>
25002         PR tree-optimization/83698
25003         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25004         arrays constrain the offset range to their bounds.
25005         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25006         (builtin_access::overlap): Avoid setting the size of overlap if it's
25007         already been set.
25008         (maybe_diag_overlap): Also consider arrays when deciding what values
25009         of offsets to include in diagnostics.
25011 2018-02-14  Martin Sebor  <msebor@redhat.com>
25013         PR c/84108
25014         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25015         that correspond to the kind of a declaration.
25017 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
25019         PR target/83984
25020         * config/pa/pa.md: Load address of PIC label using the linkage table
25021         if the label is nonlocal.
25023 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25025         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25026         warning message if user requests -maltivec=be.
25027         * doc/invoke.texi: Document deprecation of -maltivec=be.
25029 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
25031         PR target/84220
25032         * config/rs6000/rs6000-c.c: Update definitions for
25033         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25034         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25036 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25038         PR target/84239
25039         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25040         add _get_ssp intrinsics. Remove argument from
25041         __builtin_ia32_rdssp[d|q].
25042         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25043         * config/i386/i386-builtin.def: Remove argument from
25044         __builtin_ia32_rdssp[d|q].
25045         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25046         ix86_expand_special_args_builtin for _rdssp[d|q].
25047         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25048         Clear register before usage.
25049         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25050         Add documentation for new _get_ssp and _inc_ssp intrinsics.
25052 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
25054         PR tree-optimization/84357
25055         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25056         operand 1 of an ARRAY_REF too.
25058 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
25060         PR target/83831
25061         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25062         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25063         declarations.
25064         (set_of_reg): New struct.
25065         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25066         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25067         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25068         functions.
25069         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25070         Split into bitclr, bitset, bitinvert patterns if appropriate.
25071         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25072         use rx_fuse_in_memory_bitop.
25073         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25074         to named insn, correct maximum insn length.
25076 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
25078         PR target/79242
25079         * machmode.def: Define a complex mode for PARTIAL_INT.
25080         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25081         MODE_PARTIAL_INT.
25082         * doc/rtl.texi: Document CSPImode.
25083         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25084         handling.
25085         (msp430_hard_regno_nregs_with_padding): Likewise.
25087 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
25089         PR target/84279
25090         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25092 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
25094         PR rtl-optimization/84169
25095         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
25096         we generated a parallel as new i3 and we split that to new i2 and i3
25097         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
25098         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
25099         those to i2, not i1.  Partially rewrite this scan code.
25101 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25103         PR c/82210
25104         * stor-layout.c (place_field): For variable length fields, adjust
25105         offset_align afterwards not just based on the field's alignment,
25106         but also on the size.
25108         PR middle-end/84309
25109         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25110         of exps and logs in the use_exp2 case.
25112 2018-02-13  Jeff Law  <law@redhat.com>
25114         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25115         entry for "vector".
25117         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25118         ARGS as unused.
25120 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
25122         PR debug/84342
25123         PR debug/84319
25124         * common.opt (gas-loc-support, gas-locview-support): New.
25125         (ginline-points, ginternal-reset-location-views): New.
25126         * doc/invoke.texi: Document them.  Use @itemx where intended.
25127         (gvariable-location-views): Adjust.
25128         * target.def (reset_location_view): New.
25129         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25130         (TARGET_RESET_LOCATION_VIEW): New.
25131         * doc/tm.texi: Rebuilt.
25132         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25133         (dwarf2out_default_as_locview_support): New.
25134         (output_asm_line_debug_info): Use option variables.
25135         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25136         (output_loc_list): Likewise.
25137         (add_high_low_attributes): Check option variables.
25138         Don't output entry view attribute in strict mode.
25139         (gen_inlined_subroutine_die): Check option variables.
25140         (dwarf2out_inline_entry): Likewise.
25141         (init_sections_and_labels): Likewise.
25142         (dwarf2out_early_finish): Likewise.
25143         (maybe_reset_location_view): New, from...
25144         (dwarf2out_var_location): ... here.  Call it.
25145         * debug.h (dwarf2out_default_as_loc_support): Declare.
25146         (dwarf2out_default_as_locview_support): Declare.
25147         * hooks.c (hook_int_rtx_insn_0): New.
25148         * hooks.h (hook_int_rtx_insn_0): Declare.
25149         * toplev.c (process_options): Take -gas-loc-support and
25150         -gas-locview-support from dwarf2out.  Enable
25151         -gvariable-location-views by default only with locview
25152         assembler support.  Enable -ginternal-reset-location-views by
25153         default only if the target defines the corresponding hook.
25154         Enable -ginline-points by default if location views are
25155         enabled; force it disabled if statement frontiers are
25156         disabled.
25157         * tree-inline.c (expand_call_inline): Check option variables.
25158         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25160 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
25162         PR tree-optimization/84321
25163         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25164         handling.  Also check whether the anti-range contains any values
25165         that satisfy the mask; switch to a VR_RANGE if not.
25167 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
25169         PR sanitizer/84340
25170         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25172 2018-02-13  Martin Jambor  <mjambor@suse.cz>
25174         PR c++/83990
25175         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25176         of call statements, also set location of a load to a temporary.
25178 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
25180         * config/rl78/rl78.c (add_vector_labels): New function.
25181         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25182         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25183         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25184         which checks that no arguments are passed.
25185         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25186         * doc/extend.texi: Documentation for the new attribute.
25188 2018-02-13  Andreas Schwab  <schwab@suse.de>
25190         * config/riscv/linux.h (CPP_SPEC): Define.
25192 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25194         PR target/84335
25195         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25196         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25197         OPTION_MASK_ISA_AES as first argument to def_builtin_const
25198         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25199         instead of OPTION_MASK_ISA_PCLMUL as first argument to
25200         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25201         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25202         temporarily for AES and PCLMUL builtins.
25204         PR tree-optimization/84339
25205         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25206         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25207         Formatting fixes.
25209         PR middle-end/84309
25210         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25211         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25212         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25213         inline function.
25214         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25215         inline function.
25216         * omp-simd-clone.h: New file.
25217         * omp-simd-clone.c: Include omp-simd-clone.h.
25218         (expand_simd_clones): No longer static.
25219         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25220         cgraph.h and omp-simd-clone.h.
25221         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25222         (vect_recog_widen_shift_pattern): Formatting fix.
25223         (vect_pattern_recog_1): Don't check optab for calls.
25225         PR target/84336
25226         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25227         operands[2] into a REG before using gen_lowpart on it.
25229 2018-02-12  Jeff Law  <law@redhat.com>
25231         PR target/83760
25232         * config/sh/sh.c (find_barrier): Consider a sibling call
25233         a barrier as well.
25235         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25236         successfully back substituting a reg.
25238 2018-02-12  Richard Biener  <rguenther@suse.de>
25240         PR tree-optimization/84037
25241         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25242         parameter, move visited init to caller.
25243         (vect_slp_analyze_operations): Separate cost from validity
25244         check, initialize visited once for all instances.
25245         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25246         for all instances.
25247         * tree-vect-stmts.c (vect_model_simple_cost): Make early
25248         out an assert.
25249         (vect_model_promotion_demotion_cost): Likewise.
25250         (vectorizable_bswap): Guard cost modeling with !slp_node
25251         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25252         SLP stmts.
25253         (vectorizable_call): Likewise.
25254         (vectorizable_conversion): Likewise.
25255         (vectorizable_assignment): Likewise.
25256         (vectorizable_shift): Likewise.
25257         (vectorizable_operation): Likewise.
25258         (vectorizable_store): Likewise.
25259         (vectorizable_load): Likewise.
25260         (vectorizable_condition): Likewise.
25261         (vectorizable_comparison): Likewise.
25263 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
25265         PR sanitizer/84307
25266         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25267         (ASAN_MARK): Fix fnspec to account for return value, change pointer
25268         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25270 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
25272         PR middle-end/83665
25273         * params.def (inline-min-speedup): Increase from 8 to 15.
25274         (max-inline-insns-auto): Decrease from 40 to 30.
25275         * ipa-split.c (consider_split): Add some buffer for function to
25276         be considered inlining candidate.
25277         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25278         default values.
25280 2018-02-12  Richard Biener  <rguenther@suse.de>
25282         PR tree-optimization/84037
25283         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25284         matched stmts if we cannot swap the non-matched ones.
25286 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25288         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25289         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25290         _mm_maskz_scalef_round_ss): New intrinsics.
25291         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25292         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25293         __builtin_ia32_scalefss_round): Remove.
25294         (__builtin_ia32_scalefsd_mask_round,
25295         __builtin_ia32_scalefss_mask_round): New intrinsics.
25296         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25297         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25298         ((match_operand:VF_128 2 "<round_nimm_predicate>"
25299         "<round_constraint>")): Changed to ...
25300         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25301         "<round_scalar_constraint>")): ... this.
25302         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25303         %0, %1, %2<round_op3>}"): Changed to ...
25304         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25305         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25306         %2<round_scalar_mask_op3>}"): ... this.
25307         * config/i386/subst.md (round_scalar_nimm_predicate): New.
25309 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25311         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25312         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25313         (_mm_maskz_sqrt_round_ss): New intrinsics.
25314         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25315         (__builtin_ia32_sqrtsd_mask_round)
25316         (__builtin_ia32_sqrtss_mask_round): New builtins.
25317         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25318         (__builtin_ia32_sqrtss_round): Remove.
25319         (__builtin_ia32_sqrtsd_mask_round)
25320         (__builtin_ia32_sqrtss_mask_round): New builtins.
25321         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25322         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25323         ((match_operand:VF_128 1 "vector_operand"
25324         "xBm,<round_constraint>")): Changed to ...
25325         ((match_operand:VF_128 1 "vector_operand"
25326         "xBm,<round_scalar_constraint>")): ... this.
25327         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25328         %0, %2, %<iptr>1<round_op3>}): Changed to ...
25329         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25330         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25331         %<iptr>1<round_scalar_mask_op3>}): ... this.
25332         ((set_attr "prefix" "<round_prefix>")): Changed to ...
25333         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25335 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
25337         PR target/84266
25338         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25339         Cast vec_cmpeq result to correct type.
25340         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25341         Cast vec_cmpgt result to correct type.
25343 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
25345         * final.c (final_scan_insn_1): Renamed from...
25346         (final_scan_insn): ... this.  New wrapper, to recover
25347         seen from the outermost call in recursive ones.
25348         * config/sparc/sparc.c (output_return): Drop seen from call.
25349         (output_sibcall): Likewise.
25350         * config/visium/visium.c (output_branch): Likewise.
25352 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
25354         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25355         function label.
25357 2018-02-10  Alan Modra  <amodra@gmail.com>
25359         PR target/84300
25360         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25361         Specify LR as an input.
25363 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
25365         PR sanitizer/83987
25366         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25367         remove_member_access_dummy_vars): New functions.
25368         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25369         lower_omp_1, execute_lower_omp): Use them.
25371         PR rtl-optimization/84308
25372         * shrink-wrap.c (spread_components): Release todo vector.
25374 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
25376         PR rtl-optimization/57193
25377         * ira-color.c (struct allocno_color_data): Add member
25378         conflict_allocno_hard_prefs.
25379         (update_conflict_allocno_hard_prefs): New.
25380         (bucket_allocno_compare_func): Add a preference based on
25381         conflict_allocno_hard_prefs.
25382         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25383         (color_allocnos): Remove a dead code.  Initiate
25384         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
25386 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
25388         PR target/84226
25389         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25390         constraint from =wa to wa.  Avoid a subreg on the output operand,
25391         instead use a pseudo and subreg it in a move.
25392         (p9_xxbrd_<mode>): Changed to ...
25393         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25394         (p9_xxbrd_v2df): New expander.
25395         (p9_xxbrw_<mode>): Changed to ...
25396         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25397         (p9_xxbrw_v4sf): New expander.
25399 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
25401         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25403 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
25405         PR target/83926
25406         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25407         multiply in 32-bit mode.
25408         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25409         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25410         mode.
25412 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
25414         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25415         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25416         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25417         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25419 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
25421         PR lto/84213
25422         * dwarf2out.c (is_trivial_indirect_ref): New function.
25423         (dwarf2out_late_global_decl): Do not generate a location
25424         attribute for variables that have a non-trivial DECL_VALUE_EXPR
25425         and that are not defined in the current unit.
25427 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
25429         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25430         instead of a libcall for UNORDERED.
25432 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
25434         PR target/82641
25435         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25436         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25438 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25440         PR target/PR84295
25441         * config/s390/s390.c (s390_set_current_function): Invoke
25442         s390_indirect_branch_settings also if fndecl didn't change.
25444 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
25446         * config/rs6000/rs6000.md (blockage): Set length to zero.
25448 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
25450         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25452 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
25454         PR sanitizer/84285
25455         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25456         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25457         -static-lib*san.
25459         PR debug/84252
25460         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25461         PARALLEL incoming that failed vt_get_decl_and_offset check.
25463         PR middle-end/84237
25464         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25465         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25466         TREE_READONLY bit.
25467         (get_variable_section): For decls in named .bss* sections pass true as
25468         second argument to bss_initializer_p.
25470 2018-02-09  Marek Polacek  <polacek@redhat.com>
25471             Jakub Jelinek  <jakub@redhat.com>
25473         PR c++/83659
25474         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25475         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
25476         Sync some changes from cxx_fold_indirect_ref.
25478 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
25480         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25481         markers.
25482         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25483         (BLOCK_INLINE_ENTRY_LABEL): New.
25484         (dwarf2out_var_location): Disregard inline entry markers.
25485         (inline_entry_data): New struct.
25486         (inline_entry_data_hasher): New hashtable type.
25487         (inline_entry_data_hasher::hash): New.
25488         (inline_entry_data_hasher::equal): New.
25489         (inline_entry_data_table): New variable.
25490         (add_high_low_attributes): Add DW_AT_entry_pc and
25491         DW_AT_GNU_entry_view attributes if a pending entry is found
25492         in inline_entry_data_table.  Add old entry_pc attribute only
25493         if debug nonbinding markers are disabled.
25494         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25495         markers are enabled.
25496         (block_within_block_p, dwarf2out_inline_entry): New.
25497         (dwarf2out_finish): Check that no entries remained in
25498         inline_entry_data_table.
25499         * final.c (reemit_insn_block_notes): Handle inline entry notes.
25500         (final_scan_insn, notice_source_line): Likewise.
25501         (rest_of_clean_state): Skip inline entry markers.
25502         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25503         markers.
25504         * gimple.c (gimple_build_debug_inline_entry): New.
25505         * gimple.h (enum gimple_debug_subcode): Add
25506         GIMPLE_DEBUG_INLINE_ENTRY.
25507         (gimple_build_debug_inline_entry): Declare.
25508         (gimple_debug_inline_entry_p): New.
25509         (gimple_debug_nonbind_marker_p): Adjust.
25510         * insn-notes.def (INLINE_ENTRY): New.
25511         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25512         inline entry marker notes.
25513         (print_insn): Likewise.
25514         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25515         (INSN_DEBUG_MARKER_KIND): Likewise.
25516         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25517         * tree-inline.c (expand_call_inline): Build and insert
25518         debug_inline_entry stmt.
25519         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25520         inline entry blocks early, if nonbind markers are enabled.
25521         (dump_scope_block): Dump fragment info.
25522         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25523         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25524         (gimple_build_debug_inline_entry): New.
25525         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25526         Enable/disable inline entry points too.
25527         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25528         (DEBUG_INSN): Describe inline entry markers.
25530         * common.opt (gvariable-location-views): New.
25531         (gvariable-location-views=incompat5): New.
25532         * config.in: Rebuilt.
25533         * configure: Rebuilt.
25534         * configure.ac: Test assembler for view support.
25535         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25536         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25537         * dwarf2out.c (var_loc_view): New typedef.
25538         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25539         (dwarf2out_locviews_in_attribute): New.
25540         (dwarf2out_locviews_in_loclist): New.
25541         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25542         (enum dw_line_info_opcode): Add LI_adv_address.
25543         (struct dw_line_info_table): Add view.
25544         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25545         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25546         (zero_view_p): New variable.
25547         (ZERO_VIEW_P): New macro.
25548         (output_asm_line_debug_info): New.
25549         (struct var_loc_node): Add view.
25550         (add_AT_view_list, AT_loc_list): New.
25551         (add_var_loc_to_decl): Add view param.  Test it against last.
25552         (new_loc_list): Add view params.  Record them.
25553         (AT_loc_list_ptr): Handle loc and view lists.
25554         (view_list_to_loc_list_val_node): New.
25555         (print_dw_val): Handle dw_val_class_view_list.
25556         (size_of_die): Likewise.
25557         (value_format): Likewise.
25558         (loc_list_has_views): New.
25559         (gen_llsym): Set vl_symbol too.
25560         (maybe_gen_llsym, skip_loc_list_entry): New.
25561         (dwarf2out_maybe_output_loclist_view_pair): New.
25562         (output_loc_list): Output view list or entries too.
25563         (output_view_list_offset): New.
25564         (output_die): Handle dw_val_class_view_list.
25565         (output_dwarf_version): New.
25566         (output_compilation_unit_header): Use it.
25567         (output_skeleton_debug_sections): Likewise.
25568         (output_rnglists, output_line_info): Likewise.
25569         (output_pubnames, output_aranges): Update version comments.
25570         (output_one_line_info_table): Output view numbers in asm comments.
25571         (dw_loc_list): Determine current endview, pass it to new_loc_list.
25572         Call maybe_gen_llsym.
25573         (loc_list_from_tree_1): Adjust.
25574         (add_AT_location_description): Create view list attribute if
25575         needed, check it's absent otherwise.
25576         (convert_cfa_to_fb_loc_list): Adjust.
25577         (maybe_emit_file): Call output_asm_line_debug_info for test.
25578         (dwarf2out_var_location): Reset views as needed.  Precompute
25579         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
25580         attribute.  Set view.
25581         (new_line_info_table): Reset next view.
25582         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25583         (dwarf2out_source_line): Likewise.  Output view resets and labels to
25584         the assembler, or select appropriate line info opcodes.
25585         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25586         (optimize_string_length): Catch it.  Adjust.
25587         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
25588         dw_val_class_view_list, and remove it if no longer needed.
25589         (hash_loc_list): Hash view numbers.
25590         (loc_list_hasher::equal): Compare them.
25591         (optimize_location_lists): Check whether a view list symbol is
25592         needed, and whether the locview attribute is present, and
25593         whether they match.  Remove the locview attribute if no longer
25594         needed.
25595         (index_location_lists): Call skip_loc_list_entry for test.
25596         (dwarf2out_finish): Call output_asm_line_debug_info for test.
25597         Use output_dwarf_version.
25598         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25599         (struct dw_val_node): Add val_view_list.
25600         * final.c (SEEN_NEXT_VIEW): New.
25601         (set_next_view_needed): New.
25602         (clear_next_view_needed): New.
25603         (maybe_output_next_view): New.
25604         (final_start_function): Rename to...
25605         (final_start_function_1): ... this.  Take pointer to FIRST,
25606         add SEEN parameter.  Emit param bindings in the initial view.
25607         (final_start_function): Reintroduce SEEN-less interface.
25608         (final): Rename to...
25609         (final_1): ... this.  Take SEEN parameter.  Output final pending
25610         next view at the end.
25611         (final): Reintroduce seen-less interface.
25612         (final_scan_insn): Output pending next view before switching
25613         sections or ending a block.  Mark the next view as needed when
25614         outputting variable locations.  Notify debug backend of section
25615         changes, and of location view changes.
25616         (rest_of_handle_final): Adjust.
25617         * toplev.c (process_options): Autodetect value for debug variable
25618         location views option.  Warn on incompat5 without -gdwarf-5.
25619         * doc/invoke.texi (gvariable-location-views): New.
25620         (gvariable-location-views=incompat5): New.
25621         (gno-variable-location-views): New.
25623 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
25625         PR tree-optimization/84136
25626         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25627         that the result of find_edge is non-NULL.
25629 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25631         PR target/83008
25632         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25633         storing integer register in SImode.  Fix cost of 256 and 512
25634         byte aligned SSE register store.
25636 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25638         * config/i386/i386.c (ix86_multiplication_cost): Fix
25639         multiplication cost for TARGET_AVX512DQ.
25641 2018-02-08  Marek Polacek  <polacek@redhat.com>
25643         PR tree-optimization/84238
25644         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25645         get_range_strlen.
25647 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25649         PR tree-optimization/84265
25650         * tree-vect-stmts.c (vectorizable_store): Don't treat
25651         VMAT_CONTIGUOUS accesses as grouped.
25652         (vectorizable_load): Likewise.
25654 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25656         PR tree-optimization/81635
25657         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25658         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25659         (test_round_for_mask): New functions.
25660         (wide_int_cc_tests): Call test_round_for_mask.
25661         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25662         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25663         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25664         range returned by get_range_info.
25666 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
25668         PR ipa/81360
25669         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25670         * symtab.c: Include builtins.h
25671         (symtab_node::output_to_lto_symbol_table_p): Move here
25672         from lto-streamer-out.c:output_symbol_p.
25673         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25674         (output_symbol_p): Move all logic to symtab.c
25675         (produce_symtab): Update.
25677 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25679         * config/s390/s390-opts.h (enum indirect_branch): Define.
25680         * config/s390/s390-protos.h (s390_return_addr_from_memory)
25681         (s390_indirect_branch_via_thunk)
25682         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25683         (enum s390_indirect_branch_type): Define.
25684         * config/s390/s390.c (struct s390_frame_layout, struct
25685         machine_function): Remove.
25686         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25687         (indirect_branch_table_label_no, indirect_branch_table_name):
25688         Define variables.
25689         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25690         (enum s390_indirect_branch_option): Define.
25691         (s390_return_addr_from_memory): New function.
25692         (s390_handle_string_attribute): New function.
25693         (s390_attribute_table): Add new attribute handler.
25694         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25695         (s390_indirect_branch_via_thunk): New function.
25696         (s390_indirect_branch_via_inline_thunk): New function.
25697         (s390_function_ok_for_sibcall): When jumping via thunk disallow
25698         sibling call optimization for non z10 compiles.
25699         (s390_emit_call): Force indirect branch target to be a single
25700         register.  Add r1 clobber for non-z10 compiles.
25701         (s390_emit_epilogue): Emit return jump via return_use expander.
25702         (s390_reorg): Handle JUMP_INSNs as execute targets.
25703         (s390_option_override_internal): Perform validity checks for the
25704         new command line options.
25705         (s390_indirect_branch_attrvalue): New function.
25706         (s390_indirect_branch_settings): New function.
25707         (s390_set_current_function): Invoke s390_indirect_branch_settings.
25708         (s390_output_indirect_thunk_function):  New function.
25709         (s390_code_end): Implement target hook.
25710         (s390_case_values_threshold): Implement target hook.
25711         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25712         macros.
25713         * config/s390/s390.h (struct s390_frame_layout)
25714         (struct machine_function): Move here from s390.c.
25715         (TARGET_INDIRECT_BRANCH_NOBP_RET)
25716         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25717         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25718         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25719         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25720         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25721         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25722         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25723         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25724         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25725         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25726         (mnemonic attribute): Add values which aren't recognized
25727         automatically.
25728         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25729         pattern for branch conversion.  Fix mnemonic attribute.
25730         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25731         indirect branch via thunk if requested.
25732         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25733         ("*indirect_jump"): Disable for branch conversion using out of
25734         line thunks.
25735         ("indirect_jump_via_thunk<mode>_z10")
25736         ("indirect_jump_via_thunk<mode>")
25737         ("indirect_jump_via_inlinethunk<mode>_z10")
25738         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25739         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25740         ("casesi_jump_via_inlinethunk<mode>_z10")
25741         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25742         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25743         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25744         ("*indirect2_jump"): Disable for branch conversion.
25745         ("casesi_jump"): Turn into expander and expand patterns for branch
25746         conversion.
25747         ("return_use"): New expander.
25748         ("*return"): Emit return via thunk and rename it to ...
25749         ("*return<mode>"): ... this one.
25750         * config/s390/s390.opt: Add new options and and enum for the
25751         option values.
25753 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25755         * lra-constraints.c (match_reload): Unconditionally use
25756         gen_lowpart_SUBREG, rather than selecting between that
25757         and equivalent gen_rtx_SUBREG code.
25759 2018-02-08  Richard Biener  <rguenther@suse.de>
25761         PR tree-optimization/84233
25762         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25763         changed flag instead of boguously re-using phi_inserted.
25765 2018-02-08  Martin Jambor  <mjambor@suse.cz>
25767         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25768         static local variables.
25770 2018-02-08  Richard Biener  <rguenther@suse.de>
25772         PR tree-optimization/84278
25773         * tree-vect-stmts.c (vectorizable_store): When looking for
25774         smaller vector types to perform grouped strided loads/stores
25775         make sure the mode is supported by the target.
25776         (vectorizable_load): Likewise.
25778 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25780         * config/aarch64/aarch64.c (aarch64_components_for_bb):
25781         Increase LDP/STP opportunities by adding adjacent callee-saves.
25783 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25785         PR rtl-optimization/84068
25786         PR rtl-optimization/83459
25787         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25789 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
25791         PR tree-optimization/84224
25792         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25793         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25794         non-zero arguments.
25796 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
25798         PR target/84113
25799         * config/rs6000/altivec.md (*restore_world): Remove LR use.
25800         * config/rs6000/predicates.md (restore_world_operation): Adjust op
25801         count, remove one USE.
25803 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
25805         * doc/install.texi (Configuration): Document the
25806         --with-long-double-format={ibm,ieee} PowerPC configuration
25807         options.
25809         PR target/84154
25810         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25811         Convert from define_expand to be define_insn_and_split.  Rework
25812         float/double/_Float128 conversions to QI/HI/SImode to work with
25813         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
25814         conversions to QI/HImode types did a store and then a load to
25815         truncate the value.  For conversions to VSX registers, don't split
25816         the insn, instead emit the code directly.  Use the code iterator
25817         any_fix to combine signed and unsigned conversions.
25818         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25819         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25820         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25821         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25822         (fix_<mode>di2_hw): Likewise.
25823         (fixuns_<mode>di2_hw): Likewise.
25824         (fix_<mode>si2_hw): Likewise.
25825         (fixuns_<mode>si2_hw): Likewise.
25826         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25827         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25828         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25829         fix<uns>_trunc<SFDF:mode>si2_p8.
25830         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25831         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25832         (fix<uns>_<mode>_mem): Likewise.
25833         (fctiw<u>z_<mode>_mem): Likewise.
25834         (fix<uns>_<mode>_mem): Likewise.
25835         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25836         the register allocator from doing a direct move to the GPRs to do
25837         a store, and instead use the ISA 3.0 store byte/half-word from
25838         vector register instruction.  For IEEE 128-bit floating point,
25839         also optimize stores of 32-bit ints.
25840         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25842 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
25844         * genextract.c (push_pathstr_operand): New function to support
25845         [a-zA-Z].
25846         (walk_rtx): Call push_pathstr_operand.
25847         (print_path): Support [a-zA-Z].
25849 2018-02-07  Richard Biener  <rguenther@suse.de>
25851         PR tree-optimization/84037
25852         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25853         (cse_and_gimplify_to_preheader): Declare.
25854         (vect_get_place_in_interleaving_chain): Likewise.
25855         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25856         ivexpr_map.
25857         (_loop_vec_info::~_loop_vec_info): Delete it.
25858         (cse_and_gimplify_to_preheader): New function.
25859         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25860         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25861         (vectorizable_load): Likewise.  For grouped stores always base
25862         the IV on the first element.
25863         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25864         condition before gimplifying.
25866 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
25868         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25869         *DIV_EXPR and *MOD_EXPR.
25871 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
25873         PR target/84248
25874         * config/i386/i386.c (ix86_option_override_internal): Mask out
25875         the CF_SET bit when checking -fcf-protection.
25877 2018-02-07  Tom de Vries  <tom@codesourcery.com>
25879         PR libgomp/84217
25880         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25881         enough.
25883 2018-02-07  Richard Biener  <rguenther@suse.de>
25885         PR tree-optimization/84204
25886         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25887         this place.
25889         PR tree-optimization/84205
25890         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25891         special-case isl_ast_op_zdiv_r.
25893         PR tree-optimization/84223
25894         * graphite-scop-detection.c (gather_bbs::before_dom_children):
25895         Only add conditions from within the region.
25896         (gather_bbs::after_dom_children): Adjust.
25898 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
25900         PR target/84209
25901         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25902         * config/avr/avr.md: Only post-reload split REG-REG moves if
25903         either register is GENERAL_REG_P.
25905 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
25907         PR tree-optimization/84235
25908         * tree-ssa-scopedtables.c
25909         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25910         if the subtraction is performed in floating point type where NaNs are
25911         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25912         build 1.  Formatting fix.
25914 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
25916         PR target/84146
25917         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25918         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25919         and skip it regardless of bb boundaries.  Use CALL_P macro,
25920         don't test INSN_P (insn) together with CALL_P or JUMP_P check
25921         unnecessarily, formatting fix.
25923 2018-02-06  Michael Collison  <michael.collison@arm.com>
25925         * config/arm/thumb2.md:
25926         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25927         (*thumb_mov_notscc): Ditto.
25929 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
25931         PR target/84154
25932         * config/rs6000/rs6000.md (su code attribute): Use "u" for
25933         unsigned_fix, not "s".
25935 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25937         * configure.ac (gcc_fn_eh_frame_ro): New function.
25938         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25939         correct .eh_frame permissions.
25940         * configure: Regenerate.
25942 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
25944         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25945         irrelevant options.
25947 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25949         * config/rs6000/rs6000.c (rs6000_option_override_internal):
25950         Display warning message for -mno-speculate-indirect-jumps.
25952 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
25954         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25955         Undocumented.
25956         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
25958 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
25960         PR tree-optimization/84225
25961         * tree-eh.c (find_trapping_overflow): Only call
25962         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
25964 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25966         PR target/84145
25967         * config/i386/i386.c: Reimplement the check of possible options
25968         -mibt/-mshstk conbination. Change error messages.
25969         * doc/invoke.texi: Fix a typo: remove extra '='.
25971 2018-02-06  Marek Polacek  <polacek@redhat.com>
25973         PR tree-optimization/84228
25974         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
25976 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
25978         PR target/82641
25979         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
25980         emitted arch directives.
25981         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
25982         __ARM_FEATURE_COPROC before changing architectures.
25984 2018-02-06  Richard Biener  <rguenther@suse.de>
25986         * config/i386/i386.c (print_reg): Fix typo.
25987         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
25989 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
25991         * configure: Regenerate.
25993 2018-02-05  Martin Sebor  <msebor@redhat.com>
25995         PR tree-optimization/83369
25996         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
25997         inlining context.
25999 2018-02-05  Martin Liska  <mliska@suse.cz>
26001         * doc/invoke.texi: Cherry-pick upstream r323995.
26003 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
26005         * ira.c (ira_init_register_move_cost): Adjust comment.
26007 2018-02-05  Martin Liska  <mliska@suse.cz>
26009         PR gcov-profile/84137
26010         * doc/gcov.texi: Fix typo in documentation.
26012 2018-02-05  Martin Liska  <mliska@suse.cz>
26014         PR gcov-profile/83879
26015         * doc/gcov.texi: Document necessity of --dynamic-list-data when
26016         using dlopen functionality.
26018 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
26020         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26021         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26022         _mm_maskz_range_ss, _mm_mask_range_round_ss,
26023         _mm_maskz_range_round_ss): New intrinsics.
26024         (__builtin_ia32_rangesd128_round)
26025         (__builtin_ia32_rangess128_round): Remove.
26026         (__builtin_ia32_rangesd128_mask_round,
26027         __builtin_ia32_rangess128_mask_round): New builtins.
26028         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26029         __builtin_ia32_rangess128_round): Remove.
26030         (__builtin_ia32_rangesd128_mask_round,
26031         __builtin_ia32_rangess128_mask_round): New builtins.
26032         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26033         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26034         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26035         "<round_saeonly_constraint>")): Changed to ...
26036         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26037         "<round_saeonly_scalar_constraint>")): ... this.
26038         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26039         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26040         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26041         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26042         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26044 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
26046         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26047         options.
26048         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26049         Remove all values except native, 8540 and 8548.
26051 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
26053         * config/i386/i386.c (ix86_output_function_return): Pass
26054         INVALID_REGNUM, instead of -1, as invalid register number to
26055         indirect_thunk_name and output_indirect_thunk.
26057 2018-02-02  Julia Koval  <julia.koval@intel.com>
26059         * config.gcc: Add -march=icelake.
26060         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26061         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26062         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26063         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26064         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26065         (processor_target_table): Add icelake.
26066         (ix86_option_override_internal): Handle new PTAs.
26067         (get_builtin_code_for_version): Handle icelake.
26068         (M_INTEL_COREI7_ICELAKE): New.
26069         (fold_builtin_cpu): Handle icelake.
26070         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26071         * doc/invoke.texi: Add -march=icelake.
26073 2018-02-02  Julia Koval  <julia.koval@intel.com>
26075         * config/i386/i386.c (ix86_option_override_internal): Change flags type
26076         to wide_int_bitmask.
26077         * wide-int-bitmask.h: New.
26079 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26081         PR target/84066
26082         * config/i386/i386.md: Replace Pmode with word_mode in
26083         builtin_setjmp_setup and builtin_longjmp to support x32.
26085 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
26087         PR target/56010
26088         PR target/83743
26089         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26090         #include "opts.h".
26091         (rs6000_supported_cpu_names): New static variable.
26092         (linux_cpu_translation_table): Likewise.
26093         (elf_platform) <cpu>: Define new static variable and use it.
26094         Translate kernel AT_PLATFORM name to canonical name if needed.
26095         Error if platform name is unknown.
26097 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
26099         PR target/84089
26100         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26102 2018-02-01  Jeff Law  <law@redhat.com>
26104         PR target/84128
26105         * config/i386/i386.c (release_scratch_register_on_entry): Add new
26106         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
26107         the scratch if RELEASE_VIA_POP is false.
26108         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26109         If we have to save a temporary register, decrement SIZE appropriately.
26110         Pass new arguments to release_scratch_register_on_entry.
26111         (ix86_adjust_stack_and_probe): Likewise.
26112         (ix86_emit_probe_stack_range): Pass new arguments to
26113         release_scratch_register_on_entry.
26115 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
26117         PR rtl-optimization/84157
26118         * combine.c (change_zero_ext): Use REG_P predicate in
26119         front of HARD_REGISTER_P predicate.
26121 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
26123         * config/avr/avr.c (avr_option_override): Move disabling of
26124         -fdelete-null-pointer-checks to...
26125         * common/config/avr/avr-common.c (avr_option_optimization_table):
26126         ...here.
26128 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26130         PR tree-optimization/81635
26131         * tree-data-ref.c (split_constant_offset_1): For types that
26132         wrap on overflow, try to use range info to prove that wrapping
26133         cannot occur.
26135 2018-02-01  Renlin Li  <renlin.li@arm.com>
26137         PR target/83370
26138         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26139         TAILCALL_ADDR_REGS.
26140         (aarch64_register_move_cost): Likewise.
26141         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26142         TAILCALL_ADDR_REGS.
26143         (REG_CLASS_NAMES): Likewise.
26144         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26145         TAILCALL_ADDR_REGS. Remove IP registers.
26146         * config/aarch64/aarch64.md (Ucs): Update register constraint.
26148 2018-02-01  Richard Biener  <rguenther@suse.de>
26150         * domwalk.h (dom_walker::dom_walker): Add additional constructor
26151         for specifying RPO order and allow NULL for that.
26152         * domwalk.c (dom_walker::dom_walker): Likewise.
26153         (dom_walker::walk): Handle NULL RPO order.
26154         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26155         in RPO order.
26156         (rewrite_update_dom_walker): Likewise.
26157         (mark_def_dom_walker): Likewise.
26159 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26161         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26162         (aarch64_maybe_expand_sve_subreg_move): Declare.
26163         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26164         * config/aarch64/predicates.md (aarch64_any_register_operand): New
26165         predicate.
26166         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26167         that are semantically a reverse operation.
26168         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26169         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26170         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26171         functions.
26172         (aarch64_can_change_mode_class): For big-endian, forbid changes
26173         between two SVE modes if they have different element sizes.
26175 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26177         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26178         the TImode handling for big-endian targets.
26180 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26182         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26183         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
26184         not just bytes.
26185         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26186         Remove BSWAP handing for big-endian targets and use the form of
26187         LD1RQ appropariate for the mode.
26189 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26191         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26192         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26193         duplicated element.
26195 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26197         PR tearget/83845
26198         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26199         check for operands that need to go through aarch64_sve_reload_be.
26201 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
26203         PR tree-optimization/81661
26204         PR tree-optimization/84117
26205         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26206         * tree-eh.c: Include gimplify.h.
26207         (find_trapping_overflow, replace_trapping_overflow,
26208         rewrite_to_non_trapping_overflow): New functions.
26209         * tree-vect-loop.c: Include tree-eh.h.
26210         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26211         * tree-data-ref.c: Include tree-eh.h.
26212         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26214 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
26216         PR rtl-optimization/84123
26217         * combine.c (change_zero_ext): Check if hard register satisfies
26218         can_change_dest_mode before calling gen_lowpart_SUBREG.
26220 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
26222         PR target/82444
26223         * ira.c (ira_init_register_move_cost): Remove assert.
26225 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26227         PR rtl-optimization/84071
26228         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26229         * doc/tm.texi: Regenerate.
26231 2018-01-31  Richard Biener  <rguenther@suse.de>
26233         PR tree-optimization/84132
26234         * tree-data-ref.c (analyze_miv_subscript): Properly
26235         check whether evolution_function_is_affine_multivariate_p
26236         before calling gcd_of_steps_may_divide_p.
26238 2018-01-31  Julia Koval  <julia.koval@intel.com>
26240         PR target/83618
26241         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26242         * config/i386/i386.md (rdpid_rex64) New.
26243         (rdpid): Make 32bit only.
26245 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
26247         PR lto/84105
26248         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26249         an IDENTIFIER_NODE for FUNCTION_TYPE's.
26251 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26253         Revert
26254         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26256         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26258 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26260         PR rtl-optimization/84071
26261         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26262         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26264 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26266         * config/arc/arc.c (arc_handle_aux_attribute): New function.
26267         (arc_attribute_table): Add 'aux' attribute.
26268         (arc_in_small_data_p): Consider aux like variables.
26269         (arc_is_aux_reg_p): New function.
26270         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26271         (arc_get_aux_arg): New function.
26272         (prepare_move_operands): Handle aux-register access.
26273         (arc_handle_aux_attribute): New function.
26274         * doc/extend.texi (ARC Variable attributes): Add subsection.
26276 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26278         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26279         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26280         (arc_attribute_table): Add 'uncached' attribute.
26281         (arc_print_operand): Print '.di' flag for uncached memory
26282         accesses.
26283         (arc_in_small_data_p): Do not consider for small data the uncached
26284         types.
26285         (arc_is_uncached_mem_p): New function.
26286         * config/arc/predicates.md (compact_store_memory_operand): Check
26287         for uncached memory accesses.
26288         (nonvol_nonimm_operand): Likewise.
26289         * doc/extend.texi (ARC Type Attribute): New subsection.
26291 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
26293         PR c/84100
26294         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26295         falign-loops=): Add Optimization flag.
26297 2018-01-30  Jeff Law  <law@redhat.com>
26299         PR target/84064
26300         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26301         INT_REGISTERS_SAVED.  Check it prior to calling
26302         get_scratch_register_on_entry.
26303         (ix86_adjust_stack_and_probe): Similarly.
26304         (ix86_emit_probe_stack_range): Similarly.
26305         (ix86_expand_prologue): Corresponding changes.
26307 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26309         PR target/40411
26310         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26311         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26313 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
26315         PR target/84112
26316         * lra-constraints.c (curr_insn_transform): Process AND in the
26317         address.
26319 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
26321         PR rtl-optimization/83986
26322         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26323         dependence against last_pending_memory_flush in addition to
26324         pending_jump_insns.
26326 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
26328         PR tree-optimization/81611
26329         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26330         copies.
26332 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26334         PR target/83758
26335         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26336         a reg rtx.
26338 2018-01-30  Richard Biener  <rguenther@suse.de>
26339             Jakub Jelinek  <jakub@redhat.com>
26341         PR tree-optimization/84111
26342         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26343         inner loops added during recursion, as they don't have up-to-date
26344         SSA form.
26346 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26348         PR ipa/81360
26349         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26350         (can_inline_edge_by_limits_p): ... here.
26351         (can_early_inline_edge_p, check_callers,
26352         update_caller_keys, update_callee_keys, recursive_inlining,
26353         add_new_edges_to_heap, speculation_useful_p,
26354         inline_small_functions,
26355         inline_small_functions, flatten_function,
26356         inline_to_all_callers_1): Update.
26358 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26360         * profile-count.c (profile_count::combine_with_ipa_count): Handle
26361         zeros correctly.
26363 2018-01-30  Richard Biener  <rguenther@suse.de>
26365         PR tree-optimization/83008
26366         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26367         invariant and constant vector uses in stmts when they need
26368         more than one stmt.
26370 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26372         PR bootstrap/84017
26373         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26374         * configure: Regenerate.
26376 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26378         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26379         pattern.
26380         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26381         Use gen_rtx_REG rather than gen_lowpart.
26383 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26385         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26386         rather than 0 when creating partial subregs.
26388 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26390         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26391         of usage.
26393 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
26395         PR target/81550
26396         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26397         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26398         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26399         flags.  This restores the settings used before the 2017-07-24.
26400         Turning off pre increment/decrement/modify allows IVOPTS to
26401         optimize DF/SF loops where the index is an int.
26403 2018-01-29  Richard Biener  <rguenther@suse.de>
26404             Kelvin Nilsen  <kelvin@gcc.gnu.org>
26406         PR bootstrap/80867
26407         * tree-vect-stmts.c (vectorizable_call): Don't call
26408         targetm.vectorize_builtin_md_vectorized_function if callee is
26409         NULL.
26411 2018-01-22  Carl Love  <cel@us.ibm.com>
26413         * doc/extend.tex: Fix typo in second arg in
26414         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26416 2018-01-29  Richard Biener  <rguenther@suse.de>
26418         PR tree-optimization/84086
26419         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26420         (flush_ssaname_freelist): When SSA names were released reset
26421         the SCEV hash table.
26423 2018-01-29  Richard Biener  <rguenther@suse.de>
26425         PR tree-optimization/84057
26426         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26427         removed paths when removing edges.
26429 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
26431         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26432         -mfunction-return=@var{choice}.
26434 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26436         PR diagnostic/84034
26437         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26438         Handle CR like TAB.
26439         (layout::print_source_line): Likewise.
26440         (test_get_line_width_without_trailing_whitespace): Add test cases.
26442 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
26444         PR middle-end/84040
26445         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26446         debug insns.
26448 2018-01-26  Jim Wilson  <jimw@sifive.com>
26450         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26452         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26453         specified.
26455 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26457         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26458         and CMP + SUB-immediate -> SUBS.
26460 2018-01-26  Martin Sebor  <msebor@redhat.com>
26462         PR tree-optimization/83896
26463         * tree-ssa-strlen.c (get_string_len): Rename...
26464         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
26465         Avoid assuming length is constant.
26466         (handle_char_store): Use HOST_WIDE_INT for string length.
26468 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
26470         PR target/81763
26471         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26472         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26474 2018-01-26  Richard Biener  <rguenther@suse.de>
26476         PR rtl-optimization/84003
26477         * dse.c (record_store): Only record redundant stores when
26478         the earlier store aliases at least all accesses the later one does.
26480 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
26482         PR rtl-optimization/83985
26483         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26484         REG_CFA_RESTORE insns.
26485         (delete_unmarked_insns): Don't ignore separate shrink wrapping
26486         REG_CFA_RESTORE insns here.
26488         PR c/83989
26489         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26490         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26492 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26494         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26495         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26496         (arc_init): Likewise.
26497         (arc_override_options): Likewise.
26498         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26499         value.
26500         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26501         support.
26502         * config/arc/arc.h (TARGET_DBNZ): Define.
26503         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26504         properly set the tune attribute.
26505         (dbnz): Use TARGET_DBNZ guard.
26506         * config/arc/arc.opt (mtune): Add core3 option.
26508 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26510         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26511         recognize new pic like addresses.
26512         (arc_delegitimize_address): Clean up.
26514 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26516         * config/arc/arc-arches.def: Option mrf16 valid for all
26517         architectures.
26518         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26519         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26520         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26521         * config/arc/arc-tables.opt: Regenerate.
26522         * config/arc/arc.c (arc_conditional_register_usage): Handle
26523         reduced register file case.
26524         (arc_file_start): Set must have build attributes.
26525         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26526         mrf16 option value.
26527         * config/arc/arc.opt (mrf16): Add new option.
26528         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26529         * config/arc/genmultilib.awk: Handle new mrf16 option.
26530         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26531         * config/arc/t-multilib: Regenerate.
26532         * doc/invoke.texi (ARC Options): Document mrf16 option.
26534 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26536         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26537         * config/arc/arc.c (arc_handle_secure_attribute): New function.
26538         (arc_attribute_table): Add 'secure_call' attribute.
26539         (arc_print_operand): Print secure call operand.
26540         (arc_function_ok_for_sibcall): Don't optimize tail calls when
26541         secure.
26542         (arc_is_secure_call_p): New function.  * config/arc/arc.md
26543         (call_i): Add support for sjli instruction.
26544         (call_value_i): Likewise.
26545         * config/arc/constraints.md (Csc): New constraint.
26547 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26548             John Eric Martin  <John.Martin@emmicro-us.com>
26550         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26551         * config/arc/arc.c (_arc_jli_section): New struct.
26552         (arc_jli_section): New type.
26553         (rc_jli_sections): New static variable.
26554         (arc_handle_jli_attribute): New function.
26555         (arc_attribute_table): Add jli_always and jli_fixed attribute.
26556         (arc_file_end): New function.
26557         (TARGET_ASM_FILE_END): Define.
26558         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26559         (arc_add_jli_section): New function.
26560         (jli_call_scan): Likewise.
26561         (arc_reorg): Call jli_call_scan.
26562         (arc_output_addsi): Remove 'S' from printing asm operand.
26563         (arc_is_jli_call_p): New function.
26564         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26565         operand.
26566         (movhi_insn): Likewise.
26567         (movsi_insn): Likewise.
26568         (movsi_set_cc_insn): Likewise.
26569         (loadqi_update): Likewise.
26570         (load_zeroextendqisi_update): Likewise.
26571         (load_signextendqisi_update): Likewise.
26572         (loadhi_update): Likewise.
26573         (load_zeroextendhisi_update): Likewise.
26574         (load_signextendhisi_update): Likewise.
26575         (loadsi_update): Likewise.
26576         (loadsf_update): Likewise.
26577         (movsicc_insn): Likewise.
26578         (bset_insn): Likewise.
26579         (bxor_insn): Likewise.
26580         (bclr_insn): Likewise.
26581         (bmsk_insn): Likewise.
26582         (bicsi3_insn): Likewise.
26583         (cmpsi_cc_c_insn): Likewise.
26584         (movsi_ne): Likewise.
26585         (movsi_cond_exec): Likewise.
26586         (clrsbsi2): Likewise.
26587         (norm_f): Likewise.
26588         (normw): Likewise.
26589         (swap): Likewise.
26590         (divaw): Likewise.
26591         (flag): Likewise.
26592         (sr): Likewise.
26593         (kflag): Likewise.
26594         (ffs): Likewise.
26595         (ffs_f): Likewise.
26596         (fls): Likewise.
26597         (call_i): Remove 'S' asm letter, add jli instruction.
26598         (call_value_i): Likewise.
26599         * config/arc/arc.op (mjli-always): New option.
26600         * config/arc/constraints.md (Cji): New constraint.
26601         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26602         operand.
26603         (subsf3_fpx): Likewise.
26604         (mulsf3_fpx): Likewise.
26605         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26606         asm operand.
26607         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26608         function attrbutes.
26609         * doc/invoke.texi (ARC): Document mjli-always option.
26611 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
26613         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26614         avoid addition with 0 and use incw and decw where possible.
26616 2018-01-26  Richard Biener  <rguenther@suse.de>
26618         PR tree-optimization/81082
26619         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26620         association if it requires casting to unsigned.
26621         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26622         from fold_plusminus_mult_expr to catch important cases late when
26623         range info is available.
26625 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26627         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26628         * configure.ac (hidden_linkonce): New test.
26629         * configure: Regenerate.
26630         * config.in: Regenerate.
26632 2018-01-26  Julia Koval  <julia.koval@intel.com>
26634         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26635         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26636         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26637         _mm_mask_bitshuffle_epi64_mask): Fix type.
26638         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26639         USI_FTYPE_V4DI_V4DI_USI): Remove.
26640         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26641         __builtin_ia32_vpshufbitqmb256_mask,
26642         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26643         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26644         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26646 2018-01-26  Alan Modra  <amodra@gmail.com>
26648         PR target/84033
26649         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26650         UNSPEC_VBPERMQ.  Sort other unspecs.
26652 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
26654         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26656 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
26658         PR middle-end/83055
26659         * predict.c (drop_profile): Do not push/pop cfun; update also
26660         node->count.
26661         (handle_missing_profiles): Fix logic looking for zero profiles.
26663 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
26665         PR middle-end/83977
26666         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26667         on functions with #pragma omp declare simd or functions with simd
26668         attribute.
26669         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26670         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26671         Remove trailing \n from warning_at calls.
26673 2018-01-25  Tom de Vries  <tom@codesourcery.com>
26675         PR target/84028
26676         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26677         for neutered workers.
26679 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
26681         PR target/68467
26682         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26683         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26685 2018-01-24  Jeff Law  <law@redhat.com>
26687         PR target/83994
26688         * i386.c (get_probe_interval): Move to earlier point.
26689         (ix86_compute_frame_layout): If -fstack-clash-protection and
26690         the frame is larger than the probe interval, then use pushes
26691         to save registers rather than reg->mem moves.
26692         (ix86_expand_prologue): Remove conditional for int_registers_saved
26693         assertion.
26695 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
26697         PR target/84014
26698         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26699         min/max for never referenced object.
26701 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
26703         PR middle-end/83977
26704         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26705         here.
26706         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26707         attributes from DECL_ATTRIBUTES (decl) without affecting
26708         DECL_ATTRIBUTES (current_function_decl).
26709         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26710         functions with non-NULL DECL_ABSTRACT_ORIGIN.
26712 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
26714         PR tree-optimization/83979
26715         * fold-const.c (fold_comparison): Use constant_boolean_node
26716         instead of boolean_{true,false}_node.
26718 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
26720         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26721         with zero counts.
26723 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26725         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26726         Simplify the clause that sets the length attribute.
26727         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26728         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26729         clause that sets the length attribute.
26730         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26732 2018-01-24  Tom de Vries  <tom@codesourcery.com>
26734         PR target/83589
26735         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26736         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26737         Add strict parameter.
26738         (prevent_branch_around_nothing): Insert dummy insn between branch to
26739         label and label with no ptx insn inbetween.
26740         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26742 2018-01-24  Tom de Vries  <tom@codesourcery.com>
26744         PR target/81352
26745         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26746         for neutered threads in warp.
26747         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26749 2018-01-24  Richard Biener  <rguenther@suse.de>
26751         PR tree-optimization/83176
26752         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26753         operands.
26755 2018-01-24  Richard Biener  <rguenther@suse.de>
26757         PR tree-optimization/82819
26758         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26759         code generating pluses that are no-ops in the target precision.
26761 2018-01-24  Richard Biener  <rguenther@suse.de>
26763         PR middle-end/84000
26764         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26766 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26768         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26769         to merge probabilities.
26770         * predict.c (probably_never_executed): Also mark as cold functions
26771         with global 0 profile and guessed local profile.
26772         * profile-count.c (profile_probability::combine_with_count): New
26773         member function.
26774         * profile-count.h (profile_probability::operator*,
26775         profile_probability::operator*=, profile_probability::operator/,
26776         profile_probability::operator/=): Reduce precision to adjusted
26777         and set value to guessed on contradictory divisions.
26778         (profile_probability::combine_with_freq): Remove.
26779         (profile_probability::combine_wiht_count): Declare.
26780         (profile_count::force_nonzero):: Set to adjusted.
26781         (profile_count::probability_in):: Set quality to adjusted.
26782         * tree-ssa-tail-merge.c (replace_block_by): Use
26783         combine_with_count.
26785 2018-01-23  Andrew Waterman  <andrew@sifive.com>
26786             Jim Wilson  <jimw@sifive.com>
26788         * config/riscv/riscv.c (riscv_stack_boundary): New.
26789         (riscv_option_override): Set riscv_stack_boundary.  Handle
26790         riscv_preferred_stack_boundary_arg.
26791         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26792         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26793         (STACK_BOUNDARY): Set to riscv_stack_boundary.
26794         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26795         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26796         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26798 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
26800         PR target/83905
26801         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26802         of struct ix86_frame.
26803         (ix86_expand_epilogue): Likewise.  Add a local variable for
26804         the reg_save_offset field in struct ix86_frame.
26806 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
26808         PR tree-optimization/82604
26809         * tree-loop-distribution.c (enum partition_kind): New enum item
26810         PKIND_PARTIAL_MEMSET.
26811         (partition_builtin_p): Support above new enum item.
26812         (generate_code_for_partition): Ditto.
26813         (compute_access_range): Differentiate cases that equality can be
26814         proven at all loops, the innermost loops or no loops.
26815         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26816         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
26817         (finalize_partitions, distribute_loop): Don't fuse partition of
26818         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26819         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26820         parloop is enabled.
26822 2018-01-23  Martin Liska  <mliska@suse.cz>
26824         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26825         order to ignore the predictor.
26826         (PRED_POLYMORPHIC_CALL): Likewise.
26827         (PRED_RECURSIVE_CALL): Likewise.
26829 2018-01-23  Martin Liska  <mliska@suse.cz>
26831         * tree-profile.c (tree_profiling): Print function header to
26832         aware reader which function we are working on.
26833         * value-prof.c (gimple_find_values_to_profile): Do not print
26834         not interesting value histograms.
26836 2018-01-23  Martin Liska  <mliska@suse.cz>
26838         * profile-count.h (enum profile_quality): Add
26839         profile_uninitialized as the first value. Do not number values
26840         as they are zero based.
26841         (profile_count::verify): Update sanity check.
26842         (profile_probability::verify): Likewise.
26844 2018-01-23  Nathan Sidwell  <nathan@acm.org>
26846         * doc/invoke.texi (ffor-scope): Deprecate.
26848 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26850         PR tree-optimization/83510
26851         * domwalk.c (set_all_edges_as_executable): New function.
26852         (dom_walker::dom_walker): Convert bool param
26853         "skip_unreachable_blocks" to enum reachability.  Move setup of
26854         edge flags to set_all_edges_as_executable and only do it when
26855         reachability is REACHABLE_BLOCKS.
26856         * domwalk.h (enum dom_walker::reachability): New enum.
26857         (dom_walker::dom_walker): Convert bool param
26858         "skip_unreachable_blocks" to enum reachability.
26859         (set_all_edges_as_executable): New decl.
26860         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
26861         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26862         "reachability".
26863         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26864         but converting true to REACHABLE_BLOCKS.
26865         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26866         * tree-vrp.c
26867         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26868         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26869         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26870         REACHABLE_BLOCKS.
26871         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26872         if check_all_array_refs will be called.
26874 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26876         * tree.c (selftest::test_location_wrappers): Add more test
26877         coverage.
26879 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26881         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26882         (selftest::test_bit_in_range): Likewise.
26884 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
26886         PR testsuite/83888
26887         * doc/sourcebuild.texi (vect_float): Say that the selector
26888         only describes the situation when -funsafe-math-optimizations is on.
26889         (vect_float_strict): Document.
26891 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
26893         PR tree-optimization/83965
26894         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26895         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26896         instead of checking only for a reduction.
26897         (vect_recog_widen_sum_pattern): Likewise.
26899 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26901         * predict.c (probably_never_executed): Only use precise profile info.
26902         (compute_function_frequency): Skip after inlining hack since we now
26903         have quality checking.
26905 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26907         * profile-count.h (profile_probability::very_unlikely,
26908         profile_probability::unlikely, profile_probability::even): Set
26909         precision to guessed.
26911 2018-01-23  Richard Biener  <rguenther@suse.de>
26913         PR tree-optimization/83963
26914         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26915         Properly terminate dominator walk when crossing the exit edge not
26916         when visiting its source block.
26918 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
26920         PR c++/83918
26921         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26922         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26924 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
26926         PR tree-optimization/83957
26927         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
26928         semicolon after for body surrounded by braces.
26930         PR tree-optimization/83081
26931         * profile-count.h (profile_probability::split): New method.
26932         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26933         Use profile_probability::split.
26934         (do_compare_rtx_and_jump): Fix adjustment of probabilities
26935         when splitting a single conditional jump into 2.
26937 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
26939         PR tree-optimization/69452
26940         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26941         decl.
26943 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26945         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26946         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26947         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26949 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26951         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26952         declaration.
26953         * config/rl78/rl78.md (movdi): New define_expand.
26954         * config/rl78/rl78.c (rl78_split_movdi): New function.
26956 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
26958         PR target/83862
26959         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
26960         no longer used.
26961         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
26962         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
26963         128-bit to produce an UNSPEC move to get the double word with the
26964         signbit and then a shift directly to do signbit.
26965         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
26966         implementation with a new version that just does either a direct
26967         move or a regular move.  Move memory interface to separate insns.
26968         Move insns so they are next to the expander.
26969         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
26970         with signbit move.  Split big and little endian case.
26971         (signbit<mode>2_dm_mem_le): Likewise.
26972         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
26973         (signbit<mode>2_dm2): Likewise.
26975 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26977         * config/rl78/rl78.md (anddi3): New define_expand.
26979 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26981         * config/rl78/rl78.md (umindi3): New define_expand.
26983 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26985         * config/rl78/rl78.md (smindi3): New define_expand.
26987 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26989         * config/rl78/rl78.md (smaxdi3): New define_expand.
26991 2018-01-22  Carl Love  <cel@us.ibm.com>
26993         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
26994         LVX_V1TI): Add macro expansion.
26995         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
26996         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
26997         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
26998         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
26999         Change check to determine if the instruction is a byte reversing
27000         entry.  Fix typo in comment.
27001         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27002         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27003         Add def_builtin calls for new builtins.
27004         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27005         Add define_insn expansion.
27007 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27009         * config/rl78/rl78.md (umaxdi3): New define_expand.
27011 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27013         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27014         for non-QImode registers.
27016 2018-01-22  Richard Biener  <rguenther@suse.de>
27018         PR tree-optimization/83963
27019         * graphite-scop-detection.c (scop_detection::get_sese): Delay
27020         including the loop exit block.
27021         (scop_detection::merge_sese): Likewise.
27022         (scop_detection::add_scop): Do it here instead.
27024 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27026         * doc/sourcebuild.texi (arm_softfloat): Document.
27028 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
27030         PR gcc/77734
27031         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27032         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27033         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27035 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27036             David Edelsohn  <dje.gcc@gmail.com>
27038         PR target/83946
27039         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27040         Change "crset eq" to "crset 2".
27041         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27042         (*call_indirect_aix<mode>_nospec): Likewise.
27043         (*call_value_indirect_aix<mode>_nospec): Likewise.
27044         (*call_indirect_elfv2<mode>_nospec): Likewise.
27045         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27046         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27047         change assembly output from . to $.
27048         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27049         (indirect_jump<mode>_nospec): Change assembly output from . to $.
27050         (*tablejump<mode>_internal1_nospec): Likewise.
27052 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
27054         PR target/80870
27055         * config/sh/sh_optimize_sett_clrt.cc:
27056         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27058 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
27060         PR tree-optimization/83940
27061         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27062         offset_dt to vect_constant_def rather than vect_unknown_def_type.
27063         (vect_check_load_store_mask): Add a mask_dt_out parameter and
27064         use it to pass back the definition type.
27065         (vect_check_store_rhs): Likewise rhs_dt_out.
27066         (vect_build_gather_load_calls): Add a mask_dt argument and use
27067         it instead of a call to vect_is_simple_use.
27068         (vectorizable_store): Update calls to vect_check_load_store_mask
27069         and vect_check_store_rhs.  Use the dt returned by the latter instead
27070         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
27071         instead of calls to vect_is_simple_use.  Pass the scalar rather
27072         than the vector operand to vect_is_simple_use when handling
27073         second and subsequent copies of an rhs value.
27074         (vectorizable_load): Update calls to vect_check_load_store_mask
27075         and vect_build_gather_load_calls.  Use the cached mask_dt and
27076         gs_info.offset_dt instead of calls to vect_is_simple_use.
27078 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
27080         PR middle-end/83945
27081         * tree-emutls.c: Include gimplify.h.
27082         (lower_emutls_2): New function.
27083         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27084         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27085         it before further processing.
27087         PR target/83930
27088         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27089         UINTVAL (trueop1) instead of INTVAL (op1).
27091 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
27093         PR debug/81570
27094         PR debug/83728
27095         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27096         INCOMING_FRAME_SP_OFFSET if not defined.
27097         (scan_trace): Add ENTRY argument.  If true and
27098         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27099         emit a note to adjust the CFA offset.
27100         (create_cfi_notes): Adjust scan_trace callers.
27101         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27102         INCOMING_FRAME_SP_OFFSET in the CIE.
27103         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27104         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27105         Likewise.
27106         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27107         * doc/tm.texi: Regenerated.
27109 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27111         PR rtl-optimization/83147
27112         * lra-constraints.c (remove_inheritance_pseudos): Use
27113         lra_substitute_pseudo_within_insn.
27115 2018-01-19  Tom de Vries  <tom@codesourcery.com>
27116             Cesar Philippidis  <cesar@codesourcery.com>
27118         PR target/83920
27119         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27121 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
27123         PR target/83790
27124         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27125         spaces for function labels.
27127 2018-01-19  Martin Liska  <mliska@suse.cz>
27129         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27130         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27131         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27132         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27133         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27134         (PRED_CONST_RETURN): Change from 69 to 65.
27135         (PRED_NULL_RETURN): Change from 91 to 71.
27136         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27137         (PRED_LOOP_GUARD): Change from 66 to 73.
27139 2018-01-19  Martin Liska  <mliska@suse.cz>
27141         * predict.c (predict_insn_def): Add new assert.
27142         (struct branch_predictor): Change type to signed integer.
27143         (test_prediction_value_range): Amend test to cover
27144         PROB_UNINITIALIZED.
27145         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27146         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27147         (PRED_LOOP_ITERATIONS_MAX): Likewise.
27148         (PRED_LOOP_IV_COMPARE): Likewise.
27149         * predict.h (PROB_UNINITIALIZED): Define new constant.
27151 2018-01-19  Martin Liska  <mliska@suse.cz>
27153         * predict.c (dump_prediction): Add new format for
27154         analyze_brprob.py script which is enabled with -details
27155         suboption.
27156         * profile-count.h (precise_p): New function.
27158 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27160         PR tree-optimization/83922
27161         * tree-vect-loop.c (vect_verify_full_masking): Return false if
27162         there are no statements that need masking.
27163         (vect_active_double_reduction_p): New function.
27164         (vect_analyze_loop_operations): Use it when handling phis that
27165         are not in the loop header.
27167 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27169         PR tree-optimization/83914
27170         * tree-vect-loop.c (vectorizable_induction): Don't convert
27171         init_expr or apply the peeling adjustment for inductions
27172         that are nested within the vectorized loop.
27174 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27176         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27177         instead of NEG.
27179 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27181         PR sanitizer/81715
27182         PR testsuite/83882
27183         * function.h (gimplify_parameters): Add gimple_seq * argument.
27184         * function.c: Include gimple.h and options.h.
27185         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27186         for the added local temporaries if needed.
27187         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27188         if there are any parameter cleanups, wrap whole body into a
27189         try/finally with the cleanups.
27191 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
27193         PR target/82964
27194         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27195         Use GET_MODE_CLASS for scalar floating point.
27197 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27199         PR ipa/82256
27200         patch by PaX Team
27201         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27202         Fix call of call_cgraph_insertion_hooks.
27204 2018-01-18  Martin Sebor  <msebor@redhat.com>
27206         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27208 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27210         PR ipa/83619
27211         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27212         frequencies.
27214 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
27216         PR other/70268
27217         * common.opt: (-ffile-prefix-map): New option.
27218         * opts.c (common_handle_option): Defer it.
27219         * opts-global.c (handle_common_deferred_options): Handle it.
27220         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27221         * file-prefix-map.h: New file.
27222         (remap_debug_filename, add_debug_prefix_map): ...here.
27223         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27224         * final.c (debug_prefix_map, add_debug_prefix_map
27225         remap_debug_filename): Move to...
27226         * file-prefix-map.c: New file.
27227         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27228         generalize, get rid of alloca(), use strrchr() instead of strchr().
27229         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27230         Implement in terms of add_prefix_map().
27231         (remap_macro_filename, remap_debug_filename): Implement in term of
27232         remap_filename().
27233         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27234         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27235         * dbxout.c: Include file-prefix-map.h.
27236         * varasm.c: Likewise.
27237         * vmsdbgout.c: Likewise.
27238         * xcoffout.c: Likewise.
27239         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27240         * doc/cppopts.texi (-fmacro-prefix-map): Document.
27241         * doc/invoke.texi (-ffile-prefix-map): Document.
27242         (-fdebug-prefix-map): Update description.
27244 2018-01-18  Martin Liska  <mliska@suse.cz>
27246         * config/i386/i386.c (indirect_thunk_name): Document that also
27247         lfence is emitted.
27248         (output_indirect_thunk): Document why both instructions
27249         (pause and lfence) are generated.
27251 2018-01-18  Richard Biener  <rguenther@suse.de>
27253         PR tree-optimization/83887
27254         * graphite-scop-detection.c
27255         (scop_detection::get_nearest_dom_with_single_entry): Remove.
27256         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27257         (scop_detection::merge_sese): Re-implement with a flood-fill
27258         algorithm that properly finds a SESE region if it exists.
27260 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27262         PR c/61240
27263         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27264         pointer_diff optimizations use view_convert instead of convert.
27266 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27268         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27269         Generate different code for -mno-speculate-indirect-jumps.
27270         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27271         (*call_indirect_aix<mode>): Disable for
27272         -mno-speculate-indirect-jumps.
27273         (*call_indirect_aix<mode>_nospec): New define_insn.
27274         (*call_value_indirect_aix<mode>): Disable for
27275         -mno-speculate-indirect-jumps.
27276         (*call_value_indirect_aix<mode>_nospec): New define_insn.
27277         (*sibcall_nonlocal_sysv<mode>): Generate different code for
27278         -mno-speculate-indirect-jumps.
27279         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27281 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
27283         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27284         long double type, set the flags for noting the default long double
27285         type, even if we don't pass or return a long double type.
27287 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
27289         PR ipa/83051
27290         * ipa-inline.c (flatten_function): Do not overwrite final inlining
27291         failure.
27293 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
27295         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27296         support for merge[hl].
27297         (fold_mergehl_helper): New helper function.
27298         (tree-vector-builder.h): New #include for tree_vector_builder usage.
27299         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27300         (altivec_vmrglw_direct): Add xxmrglw insn.
27302 2018-01-17  Andrew Waterman  <andrew@sifive.com>
27304         * config/riscv/riscv.c (riscv_conditional_register_usage): If
27305         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27307 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
27309         PR lto/83121
27310         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27311         call the lto_location_cache before reading the
27312         DECL_SOURCE_LOCATION of the types.
27314 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
27315             Richard Sandiford  <richard.sandiford@linaro.org>
27317         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27318         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27319         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27320         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27321         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27322         Add declaration.
27323         * config/aarch64/constraints.md (aarch64_movti_operand):
27324         Limit immediates.
27325         * config/aarch64/predicates.md (Uti): Add new constraint.
27327 2018-01-17  Carl Love  <cel@us.ibm.com>
27329         * config/rs6000/vsx.md (define_expand xl_len_r,
27330         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27331         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27332         lxvll.
27333         (define_expand, define_insn): Move the shift left from  the
27334         define_insn to the define_expand for lxvl and stxvl instructions.
27335         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27336         and XL_LEN_R definitions to PURE.
27338 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
27340         * config/i386/i386.c (indirect_thunk_name): Declare regno
27341         as unsigned int.  Compare regno with INVALID_REGNUM.
27342         (output_indirect_thunk): Ditto.
27343         (output_indirect_thunk_function): Ditto.
27344         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
27345         in the call to output_indirect_thunk_function.
27347 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
27349         PR middle-end/83884
27350         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27351         rather than the size of inner_type to determine the stack slot size
27352         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27354 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
27356         PR target/83546
27357         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27358         to PTA_SILVERMONT.
27360 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
27362         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27363         endian Linux systems to optionally enable multilibs for selecting
27364         the long double type if the user configured an explicit type.
27365         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27366         have no long double multilibs if not defined.
27367         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27368         warn if the user used -mabi={ieee,ibm}longdouble and we built
27369         multilibs for long double.
27370         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27371         appropriate multilib option.
27372         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27373         multilib options.
27374         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27375         for building long double multilibs.
27376         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27378 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
27380         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27381         copies.
27383         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27384         64 bits.
27385         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27386         128 bits.
27388         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27389         variables.
27391         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27392         return value.
27394 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
27396         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27397         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27399 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27401         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27402         different rtl trees depending on TARGET_64BIT.
27403         (rs6000_gen_lvx): Likewise.
27405 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
27407         * config/visium/visium.md (nop): Tweak comment.
27408         (hazard_nop): Likewise.
27410 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27412         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27413         -mspeculate-indirect-jumps.
27414         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27415         for -mno-speculate-indirect-jumps.
27416         (*call_indirect_elfv2<mode>_nospec): New define_insn.
27417         (*call_value_indirect_elfv2<mode>): Disable for
27418         -mno-speculate-indirect-jumps.
27419         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27420         (indirect_jump): Emit different RTL for
27421         -mno-speculate-indirect-jumps.
27422         (*indirect_jump<mode>): Disable for
27423         -mno-speculate-indirect-jumps.
27424         (*indirect_jump<mode>_nospec): New define_insn.
27425         (tablejump): Emit different RTL for
27426         -mno-speculate-indirect-jumps.
27427         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27428         (tablejumpsi_nospec): New define_expand.
27429         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27430         (tablejumpdi_nospec): New define_expand.
27431         (*tablejump<mode>_internal1): Disable for
27432         -mno-speculate-indirect-jumps.
27433         (*tablejump<mode>_internal1_nospec): New define_insn.
27434         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27435         option.
27437 2018-01-16  Artyom Skrobov tyomitch@gmail.com
27439         * caller-save.c (insert_save): Drop unnecessary parameter.  All
27440         callers updated.
27442 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27443             Richard Biener  <rguenth@suse.de>
27445         PR libgomp/83590
27446         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27447         return early, inline manually is_gimple_sizepos.  Make sure if we
27448         call gimplify_expr we don't end up with a gimple constant.
27449         * tree.c (variably_modified_type_p): Don't return true for
27450         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
27451         * gimplify.h (is_gimple_sizepos): Remove.
27453 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27455         PR tree-optimization/83857
27456         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27457         vectorizable_live_operation for pure SLP statements.
27458         (vectorizable_live_operation): Handle PHIs.
27460 2018-01-16  Richard Biener  <rguenther@suse.de>
27462         PR tree-optimization/83867
27463         * tree-vect-stmts.c (vect_transform_stmt): Precompute
27464         nested_in_vect_loop_p since the scalar stmt may get invalidated.
27466 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27468         PR c/83844
27469         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27470         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27471         If off is not INTEGER_CST, issue a may not be aligned warning
27472         rather than isn't aligned.  Use isn%'t rather than isn't.
27473         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27474         into MULT_EXPR.
27475         <case MULT_EXPR>: Improve the case when bottom and one of the
27476         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27477         operand, in that case check if the other operand is multiple of
27478         bottom divided by the INTEGER_CST operand.
27480 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27482         PR target/83858
27483         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27484         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27485         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27486         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27487         * config/pa/pa.c (pa_function_arg_advance): Likewise.
27488         (pa_function_arg, pa_arg_partial_bytes): Likewise.
27489         (pa_function_arg_size): New function.
27491 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27493         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27494         in a separate statement.
27496 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27498         PR tree-optimization/83847
27499         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27500         group gathers and scatters.
27502 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27504         PR rtl-optimization/86620
27505         * params.def (max-sched-ready-insns): Bump minimum value to 1.
27507         PR rtl-optimization/83213
27508         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27509         to last if both are JUMP_INSNs.
27511         PR tree-optimization/83843
27512         * gimple-ssa-store-merging.c
27513         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27514         store_immediate_info for bswap/nop orig_stores.
27516 2018-01-15  Andrew Waterman  <andrew@sifive.com>
27518         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27519         !TARGET_MUL.
27520         <UDIV>: Increase cost if !TARGET_DIV.
27522 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
27524         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27525         (define_attr "cr_logical_3op"): New.
27526         (cceq_ior_compare): Adjust.
27527         (cceq_ior_compare_complement): Adjust.
27528         (*cceq_rev_compare): Adjust.
27529         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27530         (is_cracked_insn): Adjust.
27531         (insn_must_be_first_in_group): Adjust.
27532         * config/rs6000/40x.md: Adjust.
27533         * config/rs6000/440.md: Adjust.
27534         * config/rs6000/476.md: Adjust.
27535         * config/rs6000/601.md: Adjust.
27536         * config/rs6000/603.md: Adjust.
27537         * config/rs6000/6xx.md: Adjust.
27538         * config/rs6000/7450.md: Adjust.
27539         * config/rs6000/7xx.md: Adjust.
27540         * config/rs6000/8540.md: Adjust.
27541         * config/rs6000/cell.md: Adjust.
27542         * config/rs6000/e300c2c3.md: Adjust.
27543         * config/rs6000/e500mc.md: Adjust.
27544         * config/rs6000/e500mc64.md: Adjust.
27545         * config/rs6000/e5500.md: Adjust.
27546         * config/rs6000/e6500.md: Adjust.
27547         * config/rs6000/mpc.md: Adjust.
27548         * config/rs6000/power4.md: Adjust.
27549         * config/rs6000/power5.md: Adjust.
27550         * config/rs6000/power6.md: Adjust.
27551         * config/rs6000/power7.md: Adjust.
27552         * config/rs6000/power8.md: Adjust.
27553         * config/rs6000/power9.md: Adjust.
27554         * config/rs6000/rs64.md: Adjust.
27555         * config/rs6000/titan.md: Adjust.
27557 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27559         * config/i386/predicates.md (indirect_branch_operand): Rewrite
27560         ix86_indirect_branch_register logic.
27562 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27564         * config/i386/constraints.md (Bs): Update
27565         ix86_indirect_branch_register check.  Don't check
27566         ix86_indirect_branch_register with GOT_memory_operand.
27567         (Bw): Likewise.
27568         * config/i386/predicates.md (GOT_memory_operand): Don't check
27569         ix86_indirect_branch_register here.
27570         (GOT32_symbol_operand): Likewise.
27572 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27574         * config/i386/predicates.md (constant_call_address_operand):
27575         Rewrite ix86_indirect_branch_register logic.
27576         (sibcall_insn_operand): Likewise.
27578 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27580         * config/i386/constraints.md (Bs): Replace
27581         ix86_indirect_branch_thunk_register with
27582         ix86_indirect_branch_register.
27583         (Bw): Likewise.
27584         * config/i386/i386.md (indirect_jump): Likewise.
27585         (tablejump): Likewise.
27586         (*sibcall_memory): Likewise.
27587         (*sibcall_value_memory): Likewise.
27588         Peepholes of indirect call and jump via memory: Likewise.
27589         * config/i386/i386.opt: Likewise.
27590         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27591         (GOT_memory_operand): Likewise.
27592         (call_insn_operand): Likewise.
27593         (sibcall_insn_operand): Likewise.
27594         (GOT32_symbol_operand): Likewise.
27596 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27598         PR middle-end/83837
27599         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27600         type rather than type addr's type points to.
27601         (expand_omp_atomic_mutex): Likewise.
27602         (expand_omp_atomic): Likewise.
27604 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27606         PR target/83839
27607         * config/i386/i386.c (output_indirect_thunk_function): Use
27608         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27609         for  __x86_return_thunk.
27611 2018-01-15  Richard Biener  <rguenther@suse.de>
27613         PR middle-end/83850
27614         * expmed.c (extract_bit_field_1): Fix typo.
27616 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27618         PR target/83687
27619         * config/arm/iterators.md (VF): New mode iterator.
27620         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27621         Remove integer-related logic from pattern.
27622         (neon_vabd<mode>_3): Likewise.
27624 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27626         PR middle-end/82694
27627         * common.opt (fstrict-overflow): No longer an alias.
27628         (fwrapv-pointer): New option.
27629         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27630         also for pointer types based on flag_wrapv_pointer.
27631         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27632         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27633         opts->x_flag_wrapv got set.
27634         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27635         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27636         POINTER_TYPE_OVERFLOW_UNDEFINED.
27637         * match.pd: Likewise in address comparison pattern.
27638         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27640 2018-01-15  Richard Biener  <rguenther@suse.de>
27642         PR lto/83804
27643         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27644         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
27645         Reset type names to their identifier if their TYPE_DECL doesn't
27646         have linkage (and thus is used for ODR and devirt).
27647         (save_debug_info_for_decl): Remove.
27648         (save_debug_info_for_type): Likewise.
27649         (add_tree_to_fld_list): Adjust.
27650         * tree-pretty-print.c (dump_generic_node): Make dumping of
27651         type names more robust.
27653 2018-01-15  Richard Biener  <rguenther@suse.de>
27655         * BASE-VER: Bump to 8.0.1.
27657 2018-01-14  Martin Sebor  <msebor@redhat.com>
27659         PR other/83508
27660         * builtins.c (check_access): Avoid warning when the no-warning bit
27661         is set.
27663 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
27665         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27666         * ira-color (allocno_hard_regs_compare): Likewise.
27668 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
27670         PR target/83013
27671         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27672         Use .pushsection/.popsection.
27674 2018-01-14  Martin Sebor  <msebor@redhat.com>
27676         PR c++/81327
27677         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27679 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
27681         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27682         entry from extra_headers.
27683         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27684         extra_headers, make the list bitwise identical to the i?86-*-* one.
27686 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27688         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27689         -mcmodel=large with -mindirect-branch=thunk,
27690         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27691         -mfunction-return=thunk-extern.
27692         * doc/invoke.texi: Document -mcmodel=large is incompatible with
27693         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27694         -mfunction-return=thunk and -mfunction-return=thunk-extern.
27696 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27698         * config/i386/i386.c (print_reg): Print the name of the full
27699         integer register without '%'.
27700         (ix86_print_operand): Handle 'V'.
27701         * doc/extend.texi: Document 'V' modifier.
27703 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27705         * config/i386/constraints.md (Bs): Disallow memory operand for
27706         -mindirect-branch-register.
27707         (Bw): Likewise.
27708         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27709         (GOT_memory_operand): Likewise.
27710         (call_insn_operand): Likewise.
27711         (sibcall_insn_operand): Likewise.
27712         (GOT32_symbol_operand): Likewise.
27713         * config/i386/i386.md (indirect_jump): Call convert_memory_address
27714         for -mindirect-branch-register.
27715         (tablejump): Likewise.
27716         (*sibcall_memory): Likewise.
27717         (*sibcall_value_memory): Likewise.
27718         Disallow peepholes of indirect call and jump via memory for
27719         -mindirect-branch-register.
27720         (*call_pop): Replace m with Bw.
27721         (*call_value_pop): Likewise.
27722         (*sibcall_pop_memory): Replace m with Bs.
27723         * config/i386/i386.opt (mindirect-branch-register): New option.
27724         * doc/invoke.texi: Document -mindirect-branch-register option.
27726 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27728         * config/i386/i386-protos.h (ix86_output_function_return): New.
27729         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27730         set function_return_type.
27731         (indirect_thunk_name): Add ret_p to indicate thunk for function
27732         return.
27733         (output_indirect_thunk_function): Pass false to
27734         indirect_thunk_name.
27735         (ix86_output_indirect_branch_via_reg): Likewise.
27736         (ix86_output_indirect_branch_via_push): Likewise.
27737         (output_indirect_thunk_function): Create alias for function
27738         return thunk if regno < 0.
27739         (ix86_output_function_return): New function.
27740         (ix86_handle_fndecl_attribute): Handle function_return.
27741         (ix86_attribute_table): Add function_return.
27742         * config/i386/i386.h (machine_function): Add
27743         function_return_type.
27744         * config/i386/i386.md (simple_return_internal): Use
27745         ix86_output_function_return.
27746         (simple_return_internal_long): Likewise.
27747         * config/i386/i386.opt (mfunction-return=): New option.
27748         (indirect_branch): Mention -mfunction-return=.
27749         * doc/extend.texi: Document function_return function attribute.
27750         * doc/invoke.texi: Document -mfunction-return= option.
27752 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27754         * config/i386/i386-opts.h (indirect_branch): New.
27755         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27756         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27757         with local indirect jump when converting indirect call and jump.
27758         (ix86_set_indirect_branch_type): New.
27759         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27760         (indirectlabelno): New.
27761         (indirect_thunk_needed): Likewise.
27762         (indirect_thunk_bnd_needed): Likewise.
27763         (indirect_thunks_used): Likewise.
27764         (indirect_thunks_bnd_used): Likewise.
27765         (INDIRECT_LABEL): Likewise.
27766         (indirect_thunk_name): Likewise.
27767         (output_indirect_thunk): Likewise.
27768         (output_indirect_thunk_function): Likewise.
27769         (ix86_output_indirect_branch_via_reg): Likewise.
27770         (ix86_output_indirect_branch_via_push): Likewise.
27771         (ix86_output_indirect_branch): Likewise.
27772         (ix86_output_indirect_jmp): Likewise.
27773         (ix86_code_end): Call output_indirect_thunk_function if needed.
27774         (ix86_output_call_insn): Call ix86_output_indirect_branch if
27775         needed.
27776         (ix86_handle_fndecl_attribute): Handle indirect_branch.
27777         (ix86_attribute_table): Add indirect_branch.
27778         * config/i386/i386.h (machine_function): Add indirect_branch_type
27779         and has_local_indirect_jump.
27780         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27781         to true.
27782         (tablejump): Likewise.
27783         (*indirect_jump): Use ix86_output_indirect_jmp.
27784         (*tablejump_1): Likewise.
27785         (simple_return_indirect_internal): Likewise.
27786         * config/i386/i386.opt (mindirect-branch=): New option.
27787         (indirect_branch): New.
27788         (keep): Likewise.
27789         (thunk): Likewise.
27790         (thunk-inline): Likewise.
27791         (thunk-extern): Likewise.
27792         * doc/extend.texi: Document indirect_branch function attribute.
27793         * doc/invoke.texi: Document -mindirect-branch= option.
27795 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
27797         PR ipa/83051
27798         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27800 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
27802         * ipa-inline.c (want_inline_small_function_p): Return false if
27803         inlining has already failed with CIF_FINAL_ERROR.
27804         (update_caller_keys): Call want_inline_small_function_p before
27805         can_inline_edge_p.
27806         (update_callee_keys): Likewise.
27808 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27810         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27811         New function.
27812         (rs6000_quadword_masked_address_p): Likewise.
27813         (quad_aligned_load_p): Likewise.
27814         (quad_aligned_store_p): Likewise.
27815         (const_load_sequence_p): Add comment to describe the outer-most loop.
27816         (mimic_memory_attributes_and_flags): New function.
27817         (rs6000_gen_stvx): Likewise.
27818         (replace_swapped_aligned_store): Likewise.
27819         (rs6000_gen_lvx): Likewise.
27820         (replace_swapped_aligned_load): Likewise.
27821         (replace_swapped_load_constant): Capitalize argument name in
27822         comment describing this function.
27823         (rs6000_analyze_swaps): Add a third pass to search for vector loads
27824         and stores that access quad-word aligned addresses and replace
27825         with stvx or lvx instructions when appropriate.
27826         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27827         New function prototype.
27828         (rs6000_quadword_masked_address_p): Likewise.
27829         (rs6000_gen_lvx): Likewise.
27830         (rs6000_gen_stvx): Likewise.
27831         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27832         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27833         when memory address is aligned.
27834         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27835         this split to select lvx instruction when memory address is aligned.
27836         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27837         instruction when memory address is aligned.
27838         (*vsx_le_perm_load_v16qi): Likewise.
27839         (four unnamed splitters): Modify to select the stvx instruction
27840         when memory is aligned.
27842 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
27844         * predict.c (determine_unlikely_bbs): Handle correctly BBs
27845         which appears in the queue multiple times.
27847 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27848             Alan Hayward  <alan.hayward@arm.com>
27849             David Sherwood  <david.sherwood@arm.com>
27851         * tree-vectorizer.h (vec_lower_bound): New structure.
27852         (_loop_vec_info): Add check_nonzero and lower_bounds.
27853         (LOOP_VINFO_CHECK_NONZERO): New macro.
27854         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27855         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27856         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27857         fields.  Make seg_len the distance travelled, not including the
27858         access size.
27859         (dr_direction_indicator): Declare.
27860         (dr_zero_step_indicator): Likewise.
27861         (dr_known_forward_stride_p): Likewise.
27862         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27863         tree-ssanames.h.
27864         (runtime_alias_check_p): Allow runtime alias checks with
27865         variable strides.
27866         (operator ==): Compare access_size and align.
27867         (prune_runtime_alias_test_list): Rework for new distinction between
27868         the access_size and seg_len.
27869         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
27870         segment lengths.
27871         (get_segment_min_max): New function.
27872         (create_intersect_range_checks): Use it.
27873         (dr_step_indicator): New function.
27874         (dr_direction_indicator): Likewise.
27875         (dr_zero_step_indicator): Likewise.
27876         (dr_known_forward_stride_p): Likewise.
27877         * tree-loop-distribution.c (data_ref_segment_size): Return
27878         DR_STEP * (niters - 1).
27879         (compute_alias_check_pairs): Update call to the dr_with_seg_len
27880         constructor.
27881         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27882         (vect_preserves_scalar_order_p): New function, split out from...
27883         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
27884         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27885         (vect_vfa_access_size): New function.
27886         (vect_vfa_align): Likewise.
27887         (vect_compile_time_alias): Take access_size_a and access_b arguments.
27888         (dump_lower_bound): New function.
27889         (vect_check_lower_bound): Likewise.
27890         (vect_small_gap_p): Likewise.
27891         (vectorizable_with_step_bound_p): Likewise.
27892         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27893         depencies if the vectorization factor is 1.  Convert the checks
27894         for nonzero steps into checks on the bounds of DR_STEP.  Try using
27895         a bunds check for variable steps if the minimum required step is
27896         relatively small. Update calls to the dr_with_seg_len
27897         constructor and to vect_compile_time_alias.
27898         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27899         function.
27900         (vect_loop_versioning): Call it.
27901         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27902         when retrying.
27903         (vect_estimate_min_profitable_iters): Account for any bounds checks.
27905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27906             Alan Hayward  <alan.hayward@arm.com>
27907             David Sherwood  <david.sherwood@arm.com>
27909         * doc/sourcebuild.texi (vect_scatter_store): Document.
27910         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27911         optabs.
27912         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27913         Document.
27914         * genopinit.c (main): Add supports_vec_scatter_store and
27915         supports_vec_scatter_store_cached to target_optabs.
27916         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27917         IFN_MASK_SCATTER_STORE.
27918         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27919         functions.
27920         * internal-fn.h (internal_store_fn_p): Declare.
27921         (internal_fn_stored_value_index): Likewise.
27922         * internal-fn.c (scatter_store_direct): New macro.
27923         (expand_scatter_store_optab_fn): New function.
27924         (direct_scatter_store_optab_supported_p): New macro.
27925         (internal_store_fn_p): New function.
27926         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27927         IFN_MASK_SCATTER_STORE.
27928         (internal_fn_mask_index): Likewise.
27929         (internal_fn_stored_value_index): New function.
27930         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27931         for scatter stores.
27932         * optabs-query.h (supports_vec_scatter_store_p): Declare.
27933         * optabs-query.c (supports_vec_scatter_store_p): New function.
27934         * tree-vectorizer.h (vect_get_store_rhs): Declare.
27935         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27936         true for scatter stores.
27937         (vect_gather_scatter_fn_p): Handle scatter stores too.
27938         (vect_check_gather_scatter): Consider using scatter stores if
27939         supports_vec_scatter_store_p.
27940         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27941         scatter stores too.
27942         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27943         internal_fn_stored_value_index.
27944         (check_load_store_masking): Handle scatter stores too.
27945         (vect_get_store_rhs): Make public.
27946         (vectorizable_call): Use internal_store_fn_p.
27947         (vectorizable_store): Handle scatter store internal functions.
27948         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27949         when deciding whether the end of the group has been reached.
27950         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27951         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27952         (mask_scatter_store<mode>): New insns.
27954 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27955             Alan Hayward  <alan.hayward@arm.com>
27956             David Sherwood  <david.sherwood@arm.com>
27958         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
27959         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
27960         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
27961         function.
27962         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
27963         Use vect_truncate_gather_scatter_offset if we can't treat the
27964         operation as a normal gather load or scatter store.
27965         (get_group_load_store_type): Take the gather_scatter_info
27966         as argument.  Try using a gather load or scatter store for
27967         single-element groups.
27968         (get_load_store_type): Update calls to get_group_load_store_type
27969         and vect_use_strided_gather_scatters_p.
27971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27972             Alan Hayward  <alan.hayward@arm.com>
27973             David Sherwood  <david.sherwood@arm.com>
27975         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
27976         optional tree argument.
27977         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
27978         null target hooks.
27979         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
27980         but continue to use the current value as a fallback.
27981         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
27982         to compare the updates.
27983         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
27984         (get_load_store_type): Use it when handling a strided access.
27985         (vect_get_strided_load_store_ops): New function.
27986         (vect_get_data_ptr_increment): Likewise.
27987         (vectorizable_load): Handle strided gather loads.  Always pass
27988         a step to vect_create_data_ref_ptr and bump_vector_ptr.
27990 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27991             Alan Hayward  <alan.hayward@arm.com>
27992             David Sherwood  <david.sherwood@arm.com>
27994         * doc/md.texi (gather_load@var{m}): Document.
27995         (mask_gather_load@var{m}): Likewise.
27996         * genopinit.c (main): Add supports_vec_gather_load and
27997         supports_vec_gather_load_cached to target_optabs.
27998         * optabs-tree.c (init_tree_optimization_optabs): Use
27999         ggc_cleared_alloc to allocate target_optabs.
28000         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28001         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28002         functions.
28003         * internal-fn.h (internal_load_fn_p): Declare.
28004         (internal_gather_scatter_fn_p): Likewise.
28005         (internal_fn_mask_index): Likewise.
28006         (internal_gather_scatter_fn_supported_p): Likewise.
28007         * internal-fn.c (gather_load_direct): New macro.
28008         (expand_gather_load_optab_fn): New function.
28009         (direct_gather_load_optab_supported_p): New macro.
28010         (direct_internal_fn_optab): New function.
28011         (internal_load_fn_p): Likewise.
28012         (internal_gather_scatter_fn_p): Likewise.
28013         (internal_fn_mask_index): Likewise.
28014         (internal_gather_scatter_fn_supported_p): Likewise.
28015         * optabs-query.c (supports_at_least_one_mode_p): New function.
28016         (supports_vec_gather_load_p): Likewise.
28017         * optabs-query.h (supports_vec_gather_load_p): Declare.
28018         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28019         and memory_type field.
28020         (NUM_PATTERNS): Bump to 15.
28021         * tree-vect-data-refs.c: Include internal-fn.h.
28022         (vect_gather_scatter_fn_p): New function.
28023         (vect_describe_gather_scatter_call): Likewise.
28024         (vect_check_gather_scatter): Try using internal functions for
28025         gather loads.  Recognize existing calls to a gather load function.
28026         (vect_analyze_data_refs): Consider using gather loads if
28027         supports_vec_gather_load_p.
28028         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28029         (vect_get_gather_scatter_offset_type): Likewise.
28030         (vect_convert_mask_for_vectype): Likewise.
28031         (vect_add_conversion_to_patterm): Likewise.
28032         (vect_try_gather_scatter_pattern): Likewise.
28033         (vect_recog_gather_scatter_pattern): New pattern recognizer.
28034         (vect_vect_recog_func_ptrs): Add it.
28035         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28036         internal_fn_mask_index and internal_gather_scatter_fn_p.
28037         (check_load_store_masking): Take the gather_scatter_info as an
28038         argument and handle gather loads.
28039         (vect_get_gather_scatter_ops): New function.
28040         (vectorizable_call): Check internal_load_fn_p.
28041         (vectorizable_load): Likewise.  Handle gather load internal
28042         functions.
28043         (vectorizable_store): Update call to check_load_store_masking.
28044         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28045         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28046         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28047         (aarch64_gather_scale_operand_d): New predicates.
28048         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28049         (mask_gather_load<mode>): New insns.
28051 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28052             Alan Hayward  <alan.hayward@arm.com>
28053             David Sherwood  <david.sherwood@arm.com>
28055         * optabs.def (fold_left_plus_optab): New optab.
28056         * doc/md.texi (fold_left_plus_@var{m}): Document.
28057         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28058         * internal-fn.c (fold_left_direct): Define.
28059         (expand_fold_left_optab_fn): Likewise.
28060         (direct_fold_left_optab_supported_p): Likewise.
28061         * fold-const-call.c (fold_const_fold_left): New function.
28062         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28063         * tree-parloops.c (valid_reduction_p): New function.
28064         (gather_scalar_reductions): Use it.
28065         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28066         (vect_finish_replace_stmt): Declare.
28067         * tree-vect-loop.c (fold_left_reduction_fn): New function.
28068         (needs_fold_left_reduction_p): New function, split out from...
28069         (vect_is_simple_reduction): ...here.  Accept reductions that
28070         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28071         (vect_force_simple_reduction): Also store the reduction type in
28072         the assignment's STMT_VINFO_REDUC_TYPE.
28073         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28074         (merge_with_identity): New function.
28075         (vect_expand_fold_left): Likewise.
28076         (vectorize_fold_left_reduction): Likewise.
28077         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
28078         scalar phi in place for it.  Check for target support and reject
28079         cases that would reassociate the operation.  Defer the transform
28080         phase to vectorize_fold_left_reduction.
28081         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28082         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28083         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28085 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28087         * tree-if-conv.c (predicate_mem_writes): Remove redundant
28088         call to ifc_temp_var.
28090 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28091             Alan Hayward  <alan.hayward@arm.com>
28092             David Sherwood  <david.sherwood@arm.com>
28094         * target.def (legitimize_address_displacement): Take the original
28095         offset as a poly_int.
28096         * targhooks.h (default_legitimize_address_displacement): Update
28097         accordingly.
28098         * targhooks.c (default_legitimize_address_displacement): Likewise.
28099         * doc/tm.texi: Regenerate.
28100         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28101         as an argument, moving assert of ad->disp == ad->disp_term to...
28102         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
28103         Try calling targetm.legitimize_address_displacement before expanding
28104         the address rather than afterwards, and adjust for the new interface.
28105         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28106         Match the new hook interface.  Handle SVE addresses.
28107         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28108         new hook interface.
28110 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28112         * Makefile.in (OBJS): Add early-remat.o.
28113         * target.def (select_early_remat_modes): New hook.
28114         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28115         * doc/tm.texi: Regenerate.
28116         * targhooks.h (default_select_early_remat_modes): Declare.
28117         * targhooks.c (default_select_early_remat_modes): New function.
28118         * timevar.def (TV_EARLY_REMAT): New timevar.
28119         * passes.def (pass_early_remat): New pass.
28120         * tree-pass.h (make_pass_early_remat): Declare.
28121         * early-remat.c: New file.
28122         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28123         function.
28124         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28126 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28127             Alan Hayward  <alan.hayward@arm.com>
28128             David Sherwood  <david.sherwood@arm.com>
28130         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28131         vfm1 with a bound_epilog parameter.
28132         (vect_do_peeling): Update calls accordingly, and move the prologue
28133         call earlier in the function.  Treat the base bound_epilog as 0 for
28134         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
28135         this base when peeling for gaps.
28136         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28137         with fully-masked loops.
28138         (vect_estimate_min_profitable_iters): Handle the single peeled
28139         iteration in that case.
28141 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28142             Alan Hayward  <alan.hayward@arm.com>
28143             David Sherwood  <david.sherwood@arm.com>
28145         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28146         single-element interleaving even if the size is not a power of 2.
28147         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28148         accesses for single-element interleaving if the group size is
28149         not a power of 2.
28151 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28152             Alan Hayward  <alan.hayward@arm.com>
28153             David Sherwood  <david.sherwood@arm.com>
28155         * doc/md.texi (fold_extract_last_@var{m}): Document.
28156         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28157         * optabs.def (fold_extract_last_optab): New optab.
28158         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28159         * internal-fn.c (fold_extract_direct): New macro.
28160         (expand_fold_extract_optab_fn): Likewise.
28161         (direct_fold_extract_optab_supported_p): Likewise.
28162         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28163         * tree-vect-loop.c (vect_model_reduction_cost): Handle
28164         EXTRACT_LAST_REDUCTION.
28165         (get_initial_def_for_reduction): Do not create an initial vector
28166         for EXTRACT_LAST_REDUCTION reductions.
28167         (vectorizable_reduction): Leave the scalar phi in place for
28168         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
28169         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
28170         epilogue code for EXTRACT_LAST_REDUCTION and defer the
28171         transform phase to vectorizable_condition.
28172         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28173         split out from...
28174         (vect_finish_stmt_generation): ...here.
28175         (vect_finish_replace_stmt): New function.
28176         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28177         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28178         pattern.
28179         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28181 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28182             Alan Hayward  <alan.hayward@arm.com>
28183             David Sherwood  <david.sherwood@arm.com>
28185         * doc/md.texi (extract_last_@var{m}): Document.
28186         * optabs.def (extract_last_optab): New optab.
28187         * internal-fn.def (EXTRACT_LAST): New internal function.
28188         * internal-fn.c (cond_unary_direct): New macro.
28189         (expand_cond_unary_optab_fn): Likewise.
28190         (direct_cond_unary_optab_supported_p): Likewise.
28191         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28192         loops using EXTRACT_LAST.
28193         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28194         (extract_last_<mode>): ...this optab.
28195         (vec_extract<mode><Vel>): Update accordingly.
28197 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28198             Alan Hayward  <alan.hayward@arm.com>
28199             David Sherwood  <david.sherwood@arm.com>
28201         * target.def (empty_mask_is_expensive): New hook.
28202         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28203         * doc/tm.texi: Regenerate.
28204         * targhooks.h (default_empty_mask_is_expensive): Declare.
28205         * targhooks.c (default_empty_mask_is_expensive): New function.
28206         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28207         if the target says that empty masks are expensive.
28208         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28209         New function.
28210         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28212 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28213             Alan Hayward  <alan.hayward@arm.com>
28214             David Sherwood  <david.sherwood@arm.com>
28216         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28217         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28218         (vect_use_loop_mask_for_alignment_p): New function.
28219         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28220         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28221         niters_skip argument.  Make sure that the first niters_skip elements
28222         of the first iteration are inactive.
28223         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28224         Update call to vect_set_loop_masks_directly.
28225         (get_misalign_in_elems): New function, split out from...
28226         (vect_gen_prolog_loop_niters): ...here.
28227         (vect_update_init_of_dr): Take a code argument that specifies whether
28228         the adjustment should be added or subtracted.
28229         (vect_update_init_of_drs): Likewise.
28230         (vect_prepare_for_masked_peels): New function.
28231         (vect_do_peeling): Skip prologue peeling if we're using a mask
28232         instead.  Update call to vect_update_inits_of_drs.
28233         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28234         mask_skip_niters.
28235         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28236         alignment.  Do not include the number of peeled iterations in
28237         the minimum threshold in that case.
28238         (vectorizable_induction): Adjust the start value down by
28239         LOOP_VINFO_MASK_SKIP_NITERS iterations.
28240         (vect_transform_loop): Call vect_prepare_for_masked_peels.
28241         Take the number of skipped iterations into account when calculating
28242         the loop bounds.
28243         * tree-vect-stmts.c (vect_gen_while_not): New function.
28245 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28246             Alan Hayward  <alan.hayward@arm.com>
28247             David Sherwood  <david.sherwood@arm.com>
28249         * doc/sourcebuild.texi (vect_fully_masked): Document.
28250         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28251         default value to 0.
28252         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28253         split out from...
28254         (vect_analyze_loop_2): ...here. Don't check the vectorization
28255         factor against the number of loop iterations if the loop is
28256         fully-masked.
28258 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28259             Alan Hayward  <alan.hayward@arm.com>
28260             David Sherwood  <david.sherwood@arm.com>
28262         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28263         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28264         (dump_groups): Update accordingly.
28265         (iv_use::mem_type): New member variable.
28266         (address_p): New function.
28267         (record_use): Add a mem_type argument and initialize the new
28268         mem_type field.
28269         (record_group_use): Add a mem_type argument.  Use address_p.
28270         Remove obsolete null checks of base_object.  Update call to record_use.
28271         (find_interesting_uses_op): Update call to record_group_use.
28272         (find_interesting_uses_cond): Likewise.
28273         (find_interesting_uses_address): Likewise.
28274         (get_mem_type_for_internal_fn): New function.
28275         (find_address_like_use): Likewise.
28276         (find_interesting_uses_stmt): Try find_address_like_use before
28277         calling find_interesting_uses_op.
28278         (addr_offset_valid_p): Use the iv mem_type field as the type
28279         of the addressed memory.
28280         (add_autoinc_candidates): Likewise.
28281         (get_address_cost): Likewise.
28282         (split_small_address_groups_p): Use address_p.
28283         (split_address_groups): Likewise.
28284         (add_iv_candidate_for_use): Likewise.
28285         (autoinc_possible_for_pair): Likewise.
28286         (rewrite_groups): Likewise.
28287         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28288         (determine_group_iv_cost): Update after split of USE_ADDRESS.
28289         (get_alias_ptr_type_for_ptr_address): New function.
28290         (rewrite_use_address): Rewrite address uses in calls that were
28291         identified by find_address_like_use.
28293 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28294             Alan Hayward  <alan.hayward@arm.com>
28295             David Sherwood  <david.sherwood@arm.com>
28297         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28298         TARGET_MEM_REFs.
28299         * gimple-expr.h (is_gimple_addressable: Likewise.
28300         * gimple-expr.c (is_gimple_address): Likewise.
28301         * internal-fn.c (expand_call_mem_ref): New function.
28302         (expand_mask_load_optab_fn): Use it.
28303         (expand_mask_store_optab_fn): Likewise.
28305 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28306             Alan Hayward  <alan.hayward@arm.com>
28307             David Sherwood  <david.sherwood@arm.com>
28309         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28310         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28311         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28312         (cond_umax@var{mode}): Document.
28313         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28314         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28315         (cond_umin_optab, cond_umax_optab): New optabs.
28316         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28317         (COND_IOR, COND_XOR): New internal functions.
28318         * internal-fn.h (get_conditional_internal_fn): Declare.
28319         * internal-fn.c (cond_binary_direct): New macro.
28320         (expand_cond_binary_optab_fn): Likewise.
28321         (direct_cond_binary_optab_supported_p): Likewise.
28322         (get_conditional_internal_fn): New function.
28323         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28324         Cope with reduction statements that are vectorized as calls rather
28325         than assignments.
28326         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28327         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28328         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28329         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28330         (UNSPEC_COND_EOR): New unspecs.
28331         (optab): Add mappings for them.
28332         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28333         (sve_int_op, sve_fp_op): New int attributes.
28335 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28336             Alan Hayward  <alan.hayward@arm.com>
28337             David Sherwood  <david.sherwood@arm.com>
28339         * optabs.def (while_ult_optab): New optab.
28340         * doc/md.texi (while_ult@var{m}@var{n}): Document.
28341         * internal-fn.def (WHILE_ULT): New internal function.
28342         * internal-fn.h (direct_internal_fn_supported_p): New override
28343         that takes two types as argument.
28344         * internal-fn.c (while_direct): New macro.
28345         (expand_while_optab_fn): New function.
28346         (convert_optab_supported_p): Likewise.
28347         (direct_while_optab_supported_p): New macro.
28348         * wide-int.h (wi::udiv_ceil): New function.
28349         * tree-vectorizer.h (rgroup_masks): New structure.
28350         (vec_loop_masks): New typedef.
28351         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28352         and fully_masked_p.
28353         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28354         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28355         (vect_max_vf): New function.
28356         (slpeel_make_loop_iterate_ntimes): Delete.
28357         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28358         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28359         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28360         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28361         internal-fn.h, stor-layout.h and optabs-query.h.
28362         (vect_set_loop_mask): New function.
28363         (add_preheader_seq): Likewise.
28364         (add_header_seq): Likewise.
28365         (interleave_supported_p): Likewise.
28366         (vect_maybe_permute_loop_masks): Likewise.
28367         (vect_set_loop_masks_directly): Likewise.
28368         (vect_set_loop_condition_masked): Likewise.
28369         (vect_set_loop_condition_unmasked): New function, split out from
28370         slpeel_make_loop_iterate_ntimes.
28371         (slpeel_make_loop_iterate_ntimes): Rename to..
28372         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
28373         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28374         (vect_do_peeling): Update call accordingly.
28375         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28376         loops.
28377         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28378         mask_compare_type, can_fully_mask_p and fully_masked_p.
28379         (release_vec_loop_masks): New function.
28380         (_loop_vec_info): Use it to free the loop masks.
28381         (can_produce_all_loop_masks_p): New function.
28382         (vect_get_max_nscalars_per_iter): Likewise.
28383         (vect_verify_full_masking): Likewise.
28384         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28385         retries, and free the mask rgroups before retrying.  Check loop-wide
28386         reasons for disallowing fully-masked loops.  Make the final decision
28387         about whether use a fully-masked loop or not.
28388         (vect_estimate_min_profitable_iters): Do not assume that peeling
28389         for the number of iterations will be needed for fully-masked loops.
28390         (vectorizable_reduction): Disable fully-masked loops.
28391         (vectorizable_live_operation): Likewise.
28392         (vect_halve_mask_nunits): New function.
28393         (vect_double_mask_nunits): Likewise.
28394         (vect_record_loop_mask): Likewise.
28395         (vect_get_loop_mask): Likewise.
28396         (vect_transform_loop): Handle the case in which the final loop
28397         iteration might handle a partial vector.  Call vect_set_loop_condition
28398         instead of slpeel_make_loop_iterate_ntimes.
28399         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28400         (check_load_store_masking): New function.
28401         (prepare_load_store_mask): Likewise.
28402         (vectorizable_store): Handle fully-masked loops.
28403         (vectorizable_load): Likewise.
28404         (supportable_widening_operation): Use vect_halve_mask_nunits for
28405         booleans.
28406         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28407         (vect_gen_while): New function.
28408         * config/aarch64/aarch64.md (umax<mode>3): New expander.
28409         (aarch64_uqdec<mode>): New insn.
28411 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28412             Alan Hayward  <alan.hayward@arm.com>
28413             David Sherwood  <david.sherwood@arm.com>
28415         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28416         (reduc_xor_scal_optab): New optabs.
28417         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28418         (reduc_xor_scal_@var{m}): Document.
28419         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28420         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28421         internal functions.
28422         * fold-const-call.c (fold_const_call): Handle them.
28423         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28424         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28425         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28426         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28427         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28428         (UNSPEC_XORV): New unspecs.
28429         (optab): Add entries for them.
28430         (BITWISEV): New int iterator.
28431         (bit_reduc_op): New int attributes.
28433 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28434             Alan Hayward  <alan.hayward@arm.com>
28435             David Sherwood  <david.sherwood@arm.com>
28437         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28438         * internal-fn.def (VEC_SHL_INSERT): New internal function.
28439         * optabs.def (vec_shl_insert_optab): New optab.
28440         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28441         (duplicate_and_interleave): Likewise.
28442         * tree-vect-loop.c: Include internal-fn.h.
28443         (neutral_op_for_slp_reduction): New function, split out from
28444         get_initial_defs_for_reduction.
28445         (get_initial_def_for_reduction): Handle option 2 for variable-length
28446         vectors by loading the neutral value into a vector and then shifting
28447         the initial value into element 0.
28448         (get_initial_defs_for_reduction): Replace the code argument with
28449         the neutral value calculated by neutral_op_for_slp_reduction.
28450         Use gimple_build_vector for constant-length vectors.
28451         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28452         but the first group_size elements have a neutral value.
28453         Use duplicate_and_interleave otherwise.
28454         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28455         Update call to get_initial_defs_for_reduction.  Handle SLP
28456         reductions for variable-length vectors by creating one vector
28457         result for each scalar result, with the elements associated
28458         with other scalar results stubbed out with the neutral value.
28459         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28460         Require IFN_VEC_SHL_INSERT for double reductions on
28461         variable-length vectors, or SLP reductions that have
28462         a neutral value.  Require can_duplicate_and_interleave_p
28463         support for variable-length unchained SLP reductions if there
28464         is no neutral value, such as for MIN/MAX reductions.  Also require
28465         the number of vector elements to be a multiple of the number of
28466         SLP statements when doing variable-length unchained SLP reductions.
28467         Update call to vect_create_epilog_for_reduction.
28468         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28469         and remove initial values.
28470         (duplicate_and_interleave): Make public.
28471         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28472         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28474 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28475             Alan Hayward  <alan.hayward@arm.com>
28476             David Sherwood  <david.sherwood@arm.com>
28478         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28479         (can_duplicate_and_interleave_p): New function.
28480         (vect_get_and_check_slp_defs): Take the vector of statements
28481         rather than just the current one.  Remove excess parentheses.
28482         Restriction rejectinon of vect_constant_def and vect_external_def
28483         for variable-length vectors to boolean types, or types for which
28484         can_duplicate_and_interleave_p is false.
28485         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28486         (duplicate_and_interleave): New function.
28487         (vect_get_constant_vectors): Use gimple_build_vector for
28488         constant-length vectors and suitable variable-length constant
28489         vectors.  Use duplicate_and_interleave for other variable-length
28490         vectors.  Don't defer the update when inserting new statements.
28492 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28493             Alan Hayward  <alan.hayward@arm.com>
28494             David Sherwood  <david.sherwood@arm.com>
28496         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28497         min_profitable_iters doesn't go negative.
28499 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28500             Alan Hayward  <alan.hayward@arm.com>
28501             David Sherwood  <david.sherwood@arm.com>
28503         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28504         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28505         * optabs.def (vec_mask_load_lanes_optab): New optab.
28506         (vec_mask_store_lanes_optab): Likewise.
28507         * internal-fn.def (MASK_LOAD_LANES): New internal function.
28508         (MASK_STORE_LANES): Likewise.
28509         * internal-fn.c (mask_load_lanes_direct): New macro.
28510         (mask_store_lanes_direct): Likewise.
28511         (expand_mask_load_optab_fn): Handle masked operations.
28512         (expand_mask_load_lanes_optab_fn): New macro.
28513         (expand_mask_store_optab_fn): Handle masked operations.
28514         (expand_mask_store_lanes_optab_fn): New macro.
28515         (direct_mask_load_lanes_optab_supported_p): Likewise.
28516         (direct_mask_store_lanes_optab_supported_p): Likewise.
28517         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28518         parameter.
28519         (vect_load_lanes_supported): Likewise.
28520         * tree-vect-data-refs.c (strip_conversion): New function.
28521         (can_group_stmts_p): Likewise.
28522         (vect_analyze_data_ref_accesses): Use it instead of checking
28523         for a pair of assignments.
28524         (vect_store_lanes_supported): Take a masked_p parameter.
28525         (vect_load_lanes_supported): Likewise.
28526         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28527         vect_store_lanes_supported and vect_load_lanes_supported.
28528         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28529         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28530         parameter.  Don't allow gaps for masked accesses.
28531         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
28532         and vect_load_lanes_supported.
28533         (get_load_store_type): Take a masked_p parameter and update
28534         call to get_group_load_store_type.
28535         (vectorizable_store): Update call to get_load_store_type.
28536         Handle IFN_MASK_STORE_LANES.
28537         (vectorizable_load): Update call to get_load_store_type.
28538         Handle IFN_MASK_LOAD_LANES.
28540 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28541             Alan Hayward  <alan.hayward@arm.com>
28542             David Sherwood  <david.sherwood@arm.com>
28544         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28545         modes for SVE.
28546         * config/aarch64/aarch64-protos.h
28547         (aarch64_sve_struct_memory_operand_p): Declare.
28548         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28549         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28550         (VPRED, vpred): Handle SVE structure modes.
28551         * config/aarch64/constraints.md (Utx): New constraint.
28552         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28553         (aarch64_sve_struct_nonimmediate_operand): New predicates.
28554         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28555         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28556         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28557         structure modes.  Split into pieces after RA.
28558         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28559         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28560         New patterns.
28561         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28562         SVE structure modes.
28563         (aarch64_classify_address): Likewise.
28564         (sizetochar): Move earlier in file.
28565         (aarch64_print_operand): Handle SVE register lists.
28566         (aarch64_array_mode): New function.
28567         (aarch64_sve_struct_memory_operand_p): Likewise.
28568         (TARGET_ARRAY_MODE): Redefine.
28570 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28571             Alan Hayward  <alan.hayward@arm.com>
28572             David Sherwood  <david.sherwood@arm.com>
28574         * target.def (array_mode): New target hook.
28575         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28576         * doc/tm.texi: Regenerate.
28577         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28578         * hooks.c (hook_optmode_mode_uhwi_none): New function.
28579         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28580         targetm.array_mode.
28581         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
28582         type sizes.
28584 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28585             Alan Hayward  <alan.hayward@arm.com>
28586             David Sherwood  <david.sherwood@arm.com>
28588         * fold-const.c (fold_binary_loc): Check the argument types
28589         rather than the result type when testing for a vector operation.
28591 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28593         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28594         * doc/tm.texi: Regenerate.
28596 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28597             Alan Hayward  <alan.hayward@arm.com>
28598             David Sherwood  <david.sherwood@arm.com>
28600         * doc/invoke.texi (-msve-vector-bits=): Document new option.
28601         (sve): Document new AArch64 extension.
28602         * doc/md.texi (w): Extend the description of the AArch64
28603         constraint to include SVE vectors.
28604         (Upl, Upa): Document new AArch64 predicate constraints.
28605         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28606         enum.
28607         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28608         (msve-vector-bits=): New option.
28609         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28610         SVE when these are disabled.
28611         (sve): New extension.
28612         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28613         modes.  Adjust their number of units based on aarch64_sve_vg.
28614         (MAX_BITSIZE_MODE_ANY_MODE): Define.
28615         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28616         aarch64_addr_query_type.
28617         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28618         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28619         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28620         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28621         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28622         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28623         (aarch64_simd_imm_zero_p): Delete.
28624         (aarch64_check_zero_based_sve_index_immediate): Declare.
28625         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28626         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28627         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28628         (aarch64_sve_float_mul_immediate_p): Likewise.
28629         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28630         rather than an rtx.
28631         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28632         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28633         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28634         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28635         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28636         (aarch64_regmode_natural_size): Likewise.
28637         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28638         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28639         left one place.
28640         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28641         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28642         for VG and the SVE predicate registers.
28643         (V_ALIASES): Add a "z"-prefixed alias.
28644         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28645         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28646         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28647         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28648         (REG_CLASS_NAMES): Add entries for them.
28649         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
28650         and the predicate registers.
28651         (aarch64_sve_vg): Declare.
28652         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28653         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28654         (REGMODE_NATURAL_SIZE): Define.
28655         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28656         SVE macros.
28657         * config/aarch64/aarch64.c: Include cfgrtl.h.
28658         (simd_immediate_info): Add a constructor for series vectors,
28659         and an associated step field.
28660         (aarch64_sve_vg): New variable.
28661         (aarch64_dbx_register_number): Handle VG and the predicate registers.
28662         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28663         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28664         (VEC_ANY_DATA, VEC_STRUCT): New constants.
28665         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28666         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28667         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28668         (aarch64_get_mask_mode): New functions.
28669         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28670         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28671         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
28672         predicate modes and predicate registers.  Explicitly restrict
28673         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
28674         to store a vector mode if it is recognized by
28675         aarch64_classify_vector_mode.
28676         (aarch64_regmode_natural_size): New function.
28677         (aarch64_hard_regno_caller_save_mode): Return the original mode
28678         for predicates.
28679         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28680         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28681         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28682         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28683         functions.
28684         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
28685         does not overlap dest if the function is frame-related.  Handle
28686         SVE constants.
28687         (aarch64_split_add_offset): New function.
28688         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28689         them aarch64_add_offset.
28690         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28691         and update call to aarch64_sub_sp.
28692         (aarch64_add_cfa_expression): New function.
28693         (aarch64_expand_prologue): Pass extra temporary registers to the
28694         functions above.  Handle the case in which we need to emit new
28695         DW_CFA_expressions for registers that were originally saved
28696         relative to the stack pointer, but now have to be expressed
28697         relative to the frame pointer.
28698         (aarch64_output_mi_thunk): Pass extra temporary registers to the
28699         functions above.
28700         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
28701         IP0 and IP1 values for SVE frames.
28702         (aarch64_expand_vec_series): New function.
28703         (aarch64_expand_sve_widened_duplicate): Likewise.
28704         (aarch64_expand_sve_const_vector): Likewise.
28705         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28706         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
28707         into the register, rather than emitting a SET directly.
28708         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28709         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28710         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28711         (offset_9bit_signed_scaled_p): New functions.
28712         (aarch64_replicate_bitmask_imm): New function.
28713         (aarch64_bitmask_imm): Use it.
28714         (aarch64_cannot_force_const_mem): Reject expressions involving
28715         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
28716         (aarch64_classify_index): Handle SVE indices, by requiring
28717         a plain register index with a scale that matches the element size.
28718         (aarch64_classify_address): Handle SVE addresses.  Assert that
28719         the mode of the address is VOIDmode or an integer mode.
28720         Update call to aarch64_classify_symbol.
28721         (aarch64_classify_symbolic_expression): Update call to
28722         aarch64_classify_symbol.
28723         (aarch64_const_vec_all_in_range_p): New function.
28724         (aarch64_print_vector_float_operand): Likewise.
28725         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
28726         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
28727         and the FP immediates 1.0 and 0.5.
28728         (aarch64_print_address_internal): Handle SVE addresses.
28729         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28730         (aarch64_regno_regclass): Handle predicate registers.
28731         (aarch64_secondary_reload): Handle big-endian reloads of SVE
28732         data modes.
28733         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28734         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28735         (aarch64_convert_sve_vector_bits): New function.
28736         (aarch64_override_options): Use it to handle -msve-vector-bits=.
28737         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28738         rather than an rtx.
28739         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28740         Handle SVE vector and predicate modes.  Accept VL-based constants
28741         that need only one temporary register, and VL offsets that require
28742         no temporary registers.
28743         (aarch64_conditional_register_usage): Mark the predicate registers
28744         as fixed if SVE isn't available.
28745         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28746         Return true for SVE vector and predicate modes.
28747         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28748         rather than an unsigned int.  Handle SVE modes.
28749         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
28750         SVE modes.
28751         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28752         if SVE is enabled.
28753         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28754         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28755         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28756         (aarch64_sve_float_mul_immediate_p): New functions.
28757         (aarch64_sve_valid_immediate): New function.
28758         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28759         Explicitly reject structure modes.  Check for INDEX constants.
28760         Handle PTRUE and PFALSE constants.
28761         (aarch64_check_zero_based_sve_index_immediate): New function.
28762         (aarch64_simd_imm_zero_p): Delete.
28763         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28764         vector modes.  Accept constants in the range of CNT[BHWD].
28765         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28766         ask for an Advanced SIMD mode.
28767         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28768         (aarch64_simd_vector_alignment): Handle SVE predicates.
28769         (aarch64_vectorize_preferred_vector_alignment): New function.
28770         (aarch64_simd_vector_alignment_reachable): Use it instead of
28771         the vector size.
28772         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28773         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28774         functions.
28775         (MAX_VECT_LEN): Delete.
28776         (expand_vec_perm_d): Add a vec_flags field.
28777         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28778         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28779         (aarch64_evpc_ext): Don't apply a big-endian lane correction
28780         for SVE modes.
28781         (aarch64_evpc_rev): Rename to...
28782         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
28783         (aarch64_evpc_rev_global): New function.
28784         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28785         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28786         MAX_VECT_LEN.
28787         (aarch64_evpc_sve_tbl): New function.
28788         (aarch64_expand_vec_perm_const_1): Update after rename of
28789         aarch64_evpc_rev.  Handle SVE permutes too, trying
28790         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28791         than aarch64_evpc_tbl.
28792         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28793         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28794         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28795         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28796         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28797         (aarch64_expand_sve_vcond): New functions.
28798         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28799         of aarch64_vector_mode_p.
28800         (aarch64_dwarf_poly_indeterminate_value): New function.
28801         (aarch64_compute_pressure_classes): Likewise.
28802         (aarch64_can_change_mode_class): Likewise.
28803         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28804         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28805         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28806         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28807         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28808         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28809         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28810         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28811         constraints.
28812         (Dn, Dl, Dr): Accept const as well as const_vector.
28813         (Dz): Likewise.  Compare against CONST0_RTX.
28814         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28815         of "vector" where appropriate.
28816         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28817         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28818         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28819         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28820         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28821         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28822         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28823         (v_int_equiv): Extend to SVE modes.
28824         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28825         mode attributes.
28826         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28827         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28828         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28829         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28830         (SVE_COND_FP_CMP): New int iterators.
28831         (perm_hilo): Handle the new unpack unspecs.
28832         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28833         attributes.
28834         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28835         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28836         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28837         (aarch64_equality_operator, aarch64_constant_vector_operand)
28838         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28839         (aarch64_sve_nonimmediate_operand): Likewise.
28840         (aarch64_sve_general_operand): Likewise.
28841         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28842         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28843         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28844         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28845         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28846         (aarch64_sve_float_arith_immediate): Likewise.
28847         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28848         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28849         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28850         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28851         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28852         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28853         (aarch64_sve_float_arith_operand): Likewise.
28854         (aarch64_sve_float_arith_with_sub_operand): Likewise.
28855         (aarch64_sve_float_mul_operand): Likewise.
28856         (aarch64_sve_vec_perm_operand): Likewise.
28857         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28858         (aarch64_mov_operand): Accept const_poly_int and const_vector.
28859         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28860         as well as const_vector.
28861         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28862         in file.  Use CONST0_RTX and CONSTM1_RTX.
28863         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
28864         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28865         Use aarch64_simd_imm_zero.
28866         * config/aarch64/aarch64-sve.md: New file.
28867         * config/aarch64/aarch64.md: Include it.
28868         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28869         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28870         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28871         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28872         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28873         (sve): New attribute.
28874         (enabled): Disable instructions with the sve attribute unless
28875         TARGET_SVE.
28876         (movqi, movhi): Pass CONST_POLY_INT operaneds through
28877         aarch64_expand_mov_immediate.
28878         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28879         CNT[BHSD] immediates.
28880         (movti): Split CONST_POLY_INT moves into two halves.
28881         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28882         Split additions that need a temporary here if the destination
28883         is the stack pointer.
28884         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28885         (*add<mode>3_poly_1): New instruction.
28886         (set_clobber_cc): New expander.
28888 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28890         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28891         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
28892         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28893         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28894         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
28895         Change innermode from fixed_mode_size to machine_mode.
28896         (simplify_subreg): Update call accordingly.  Handle a constant-sized
28897         subreg of a variable-length CONST_VECTOR.
28899 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28900             Alan Hayward  <alan.hayward@arm.com>
28901             David Sherwood  <david.sherwood@arm.com>
28903         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28904         (add_offset_to_base): New function, split out from...
28905         (create_mem_ref): ...here.  When handling a scale other than 1,
28906         check first whether the address is valid without the offset.
28907         Add it into the base if so, leaving the index and scale as-is.
28909 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
28911         PR c++/83778
28912         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28913         fold_for_warn before checking if arg2 is INTEGER_CST.
28915 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
28917         * config/rs6000/predicates.md (load_multiple_operation): Delete.
28918         (store_multiple_operation): Delete.
28919         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28920         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28921         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28922         guarded by TARGET_STRING.
28923         (rs6000_output_load_multiple): Delete.
28924         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28925         OPTION_MASK_STRING / TARGET_STRING handling.
28926         (print_operand) <'N', 'O'>: Add comment that these are unused now.
28927         (const rs6000_opt_masks) <"string">: Change mask to 0.
28928         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28929         (MASK_STRING): Delete.
28930         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28931         parts.  Simplify.
28932         (load_multiple): Delete.
28933         (*ldmsi8): Delete.
28934         (*ldmsi7): Delete.
28935         (*ldmsi6): Delete.
28936         (*ldmsi5): Delete.
28937         (*ldmsi4): Delete.
28938         (*ldmsi3): Delete.
28939         (store_multiple): Delete.
28940         (*stmsi8): Delete.
28941         (*stmsi7): Delete.
28942         (*stmsi6): Delete.
28943         (*stmsi5): Delete.
28944         (*stmsi4): Delete.
28945         (*stmsi3): Delete.
28946         (movmemsi_8reg): Delete.
28947         (corresponding unnamed define_insn): Delete.
28948         (movmemsi_6reg): Delete.
28949         (corresponding unnamed define_insn): Delete.
28950         (movmemsi_4reg): Delete.
28951         (corresponding unnamed define_insn): Delete.
28952         (movmemsi_2reg): Delete.
28953         (corresponding unnamed define_insn): Delete.
28954         (movmemsi_1reg): Delete.
28955         (corresponding unnamed define_insn): Delete.
28956         * config/rs6000/rs6000.opt (mno-string): New.
28957         (mstring): Replace by deprecation warning stub.
28958         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
28960 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
28962         * regrename.c (regrename_do_replace): If replacing the same
28963         reg multiple times, try to reuse last created gen_raw_REG.
28965         PR debug/81155
28966         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
28967         main to workaround a bug in GDB.
28969 2018-01-12  Tom de Vries  <tom@codesourcery.com>
28971         PR target/83737
28972         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
28974 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
28976         PR rtl-optimization/80481
28977         * ira-color.c (get_cap_member): New function.
28978         (allocnos_conflict_by_live_ranges_p): Use it.
28979         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
28980         (setup_slot_coalesced_allocno_live_ranges): Ditto.
28982 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
28984         PR target/83628
28985         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
28986         (*saddl_se_1): Ditto.
28987         (*ssubsi_1): Ditto.
28988         (*ssubl_se_1): Ditto.
28990 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
28992         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
28993         rather than wi::to_widest for DR_INITs.
28994         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
28995         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
28996         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
28997         INTEGER_CSTs.
28998         (vect_analyze_group_access_1): Note that here.
29000 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29002         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29003         polynomial type sizes.
29005 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29007         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29008         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29009         (gimple_add_tmp_var): Likewise.
29011 2018-01-12  Martin Liska  <mliska@suse.cz>
29013         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29014         (gimple_alloc_sizes): Likewise.
29015         (dump_gimple_statistics): Use PRIu64 in printf format.
29016         * gimple.h: Change uint64_t to int.
29018 2018-01-12  Martin Liska  <mliska@suse.cz>
29020         * tree-core.h: Use uint64_t instead of int.
29021         * tree.c (tree_node_counts): Likewise.
29022         (tree_node_sizes): Likewise.
29023         (dump_tree_statistics): Use PRIu64 in printf format.
29025 2018-01-12  Martin Liska  <mliska@suse.cz>
29027         * Makefile.in: As qsort_chk is implemented in vec.c, add
29028         vec.o to linkage of gencfn-macros.
29029         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29030         passing the info to record_node_allocation_statistics.
29031         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29032         and pass the info.
29033         * ggc-common.c (struct ggc_usage): Add operator== and use
29034         it in operator< and compare function.
29035         * mem-stats.h (struct mem_usage): Likewise.
29036         * vec.c (struct vec_usage): Remove operator< and compare
29037         function. Can be simply inherited.
29039 2018-01-12  Martin Jambor  <mjambor@suse.cz>
29041         PR target/81616
29042         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29043         * tree-ssa-math-opts.c: Include domwalk.h.
29044         (convert_mult_to_fma_1): New function.
29045         (fma_transformation_info): New type.
29046         (fma_deferring_state): Likewise.
29047         (cancel_fma_deferring): New function.
29048         (result_of_phi): Likewise.
29049         (last_fma_candidate_feeds_initial_phi): Likewise.
29050         (convert_mult_to_fma): Added deferring logic, split actual
29051         transformation to convert_mult_to_fma_1.
29052         (math_opts_dom_walker): New type.
29053         (math_opts_dom_walker::after_dom_children): New method, body moved
29054         here from pass_optimize_widening_mul::execute, added deferring logic
29055         bits.
29056         (pass_optimize_widening_mul::execute): Moved most of code to
29057         math_opts_dom_walker::after_dom_children.
29058         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29059         * config/i386/i386.c (ix86_option_override_internal): Added
29060         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29062 2018-01-12  Richard Biener  <rguenther@suse.de>
29064         PR debug/83157
29065         * dwarf2out.c (gen_variable_die): Do not reset old_die for
29066         inline instance vars.
29068 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
29070         PR target/81819
29071         * config/rx/rx.c (rx_is_restricted_memory_address):
29072         Handle SUBREG case.
29074 2018-01-12  Richard Biener  <rguenther@suse.de>
29076         PR tree-optimization/80846
29077         * target.def (split_reduction): New target hook.
29078         * targhooks.c (default_split_reduction): New function.
29079         * targhooks.h (default_split_reduction): Declare.
29080         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29081         target requests first reduce vectors by combining low and high
29082         parts.
29083         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29084         (get_vectype_for_scalar_type_and_size): Export.
29085         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29086         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29087         * doc/tm.texi: Regenerate.
29088         * config/i386/i386.c (ix86_split_reduction): Implement
29089         TARGET_VECTORIZE_SPLIT_REDUCTION.
29091 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29093         PR target/83368
29094         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29095         in PIC mode except for TARGET_VXWORKS_RTP.
29096         * config/sparc/sparc.c: Include cfgrtl.h.
29097         (TARGET_INIT_PIC_REG): Define.
29098         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29099         (sparc_pic_register_p): New predicate.
29100         (sparc_legitimate_address_p): Use it.
29101         (sparc_legitimize_pic_address): Likewise.
29102         (sparc_delegitimize_address): Likewise.
29103         (sparc_mode_dependent_address_p): Likewise.
29104         (gen_load_pcrel_sym): Remove 4th parameter.
29105         (load_got_register): Adjust call to above.  Remove obsolete stuff.
29106         (sparc_expand_prologue): Do not call load_got_register here.
29107         (sparc_flat_expand_prologue): Likewise.
29108         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29109         (sparc_use_pseudo_pic_reg): New function.
29110         (sparc_init_pic_reg): Likewise.
29111         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29112         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29114 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
29116         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29117         Add item for branch_cost.
29119 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29121         PR rtl-optimization/83565
29122         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29123         not extend the result to a larger mode for rotate operations.
29124         (num_sign_bit_copies1): Likewise.
29126 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29128         PR target/40411
29129         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29130         -symbolic.
29131         Use values-Xc.o for -pedantic.
29132         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29134 2018-01-12  Martin Liska  <mliska@suse.cz>
29136         PR ipa/83054
29137         * ipa-devirt.c (final_warning_record::grow_type_warnings):
29138         New function.
29139         (possible_polymorphic_call_targets): Use it.
29140         (ipa_devirt): Likewise.
29142 2018-01-12  Martin Liska  <mliska@suse.cz>
29144         * profile-count.h (enum profile_quality): Use 0 as invalid
29145         enum value of profile_quality.
29147 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
29149         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29150         -mext-string options.
29152 2018-01-12  Richard Biener  <rguenther@suse.de>
29154         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29155         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29156         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29157         Likewise.
29158         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29160 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
29162         * configure.ac (--with-long-double-format): Add support for the
29163         configuration option to change the default long double format on
29164         PowerPC systems.
29165         * config.gcc (powerpc*-linux*-*): Likewise.
29166         * configure: Regenerate.
29167         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29168         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29169         used without modification.
29171 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29173         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29174         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29175         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29176         MISC_BUILTIN_SPEC_BARRIER.
29177         (rs6000_init_builtins): Likewise.
29178         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29179         enum value.
29180         (speculation_barrier): New define_insn.
29181         * doc/extend.texi: Document __builtin_speculation_barrier.
29183 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29185         PR target/83203
29186         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29187         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29188         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29189         iterators.
29190         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
29191         integral modes instead of "ss" and "sd".
29192         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29193         vectors with 32-bit and 64-bit elements.
29194         (vecdupssescalarmodesuffix): New mode attribute.
29195         (vec_dup<mode>): Use it.
29197 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
29199         PR target/83330
29200         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29201         frame if argument is passed on stack.
29203 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29205         PR target/82682
29206         * ree.c (combine_reaching_defs): Optimize also
29207         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29208         reg2=any_extend(exp); reg1=reg2;, formatting fix.
29210 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29212         PR middle-end/83189
29213         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29215 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29217         PR middle-end/83718
29218         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29219         after they are computed.
29221 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
29223         PR tree-optimization/83695
29224         * gimple-loop-linterchange.cc
29225         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29226         reset cached scev information after interchange.
29227         (pass_linterchange::execute): Remove call to scev_reset_htab.
29229 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29231         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29232         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29233         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29234         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29235         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29236         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29237         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29238         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29239         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29240         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29241         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29242         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29243         (V_lane_reg): Likewise.
29244         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29245         New define_expand.
29246         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29247         (vfmal_lane_low<mode>_intrinsic,
29248         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29249         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29250         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29251         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29252         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29253         vfmsl_lane_high<mode>_intrinsic): New define_insns.
29255 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29257         * config/arm/arm-cpus.in (fp16fml): New feature.
29258         (ALL_SIMD): Add fp16fml.
29259         (armv8.2-a): Add fp16fml as an option.
29260         (armv8.3-a): Likewise.
29261         (armv8.4-a): Add fp16fml as part of fp16.
29262         * config/arm/arm.h (TARGET_FP16FML): Define.
29263         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29264         when appropriate.
29265         * config/arm/arm-modes.def (V2HF): Define.
29266         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29267         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29268         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29269         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29270         vfmsl_low, vfmsl_high): New set of builtins.
29271         * config/arm/iterators.md (PLUSMINUS): New code iterator.
29272         (vfml_op): New code attribute.
29273         (VFMLHALVES): New int iterator.
29274         (VFML, VFMLSEL): New mode attributes.
29275         (V_reg): Define mapping for V2HF.
29276         (V_hi, V_lo): New mode attributes.
29277         (VF_constraint): Likewise.
29278         (vfml_half, vfml_half_selector): New int attributes.
29279         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29280         define_expand.
29281         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29282         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29283         New define_insn.
29284         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29285         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29286         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29287         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
29288         documentation.
29289         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29290         Document new effective target and option set.
29292 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29294         * config/arm/arm-cpus.in (armv8_4): New feature.
29295         (ARMv8_4a): New fgroup.
29296         (armv8.4-a): New arch.
29297         * config/arm/arm-tables.opt: Regenerate.
29298         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29299         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29300         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29301         Add matching rules for -march=armv8.4-a and extensions.
29302         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29304 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
29306         PR target/81821
29307         * config/rx/rx.md (BW): New mode attribute.
29308         (sync_lock_test_and_setsi): Add mode suffix to insn output.
29310 2018-01-11  Richard Biener  <rguenther@suse.de>
29312         PR tree-optimization/83435
29313         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29314         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29315         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29317 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29318             Alan Hayward  <alan.hayward@arm.com>
29319             David Sherwood  <david.sherwood@arm.com>
29321         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29322         field.
29323         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
29324         (aarch64_print_address_internal): Use it to check for a zero offset.
29326 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29327             Alan Hayward  <alan.hayward@arm.com>
29328             David Sherwood  <david.sherwood@arm.com>
29330         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29331         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29332         Return a poly_int64 rather than a HOST_WIDE_INT.
29333         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29334         rather than a HOST_WIDE_INT.
29335         * config/aarch64/aarch64.h (aarch64_frame): Protect with
29336         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
29337         hard_fp_offset, frame_size, initial_adjust, callee_offset and
29338         final_offset from HOST_WIDE_INT to poly_int64.
29339         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29340         to_constant when getting the number of units in an Advanced SIMD
29341         mode.
29342         (aarch64_builtin_vectorized_function): Check for a constant number
29343         of units.
29344         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29345         GET_MODE_SIZE.
29346         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29347         attribute instead of GET_MODE_NUNITS.
29348         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29349         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29350         GET_MODE_SIZE for fixed-size registers.
29351         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29352         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29353         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29354         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29355         (aarch64_print_operand, aarch64_print_address_internal)
29356         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29357         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29358         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29359         Handle polynomial GET_MODE_SIZE.
29360         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
29361         wider than SImode without modification.
29362         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29363         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29364         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29365         passing and returning SVE modes.
29366         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29367         rather than GEN_INT.
29368         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29369         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29370         (aarch64_allocate_and_probe_stack_space): Likewise.
29371         (aarch64_layout_frame): Cope with polynomial offsets.
29372         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29373         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
29374         polynomial offsets.
29375         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29376         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29377         poly_int64 rather than a HOST_WIDE_INT.
29378         (aarch64_get_separate_components, aarch64_process_components)
29379         (aarch64_expand_prologue, aarch64_expand_epilogue)
29380         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29381         (aarch64_anchor_offset): New function, split out from...
29382         (aarch64_legitimize_address): ...here.
29383         (aarch64_builtin_vectorization_cost): Handle polynomial
29384         TYPE_VECTOR_SUBPARTS.
29385         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29386         GET_MODE_NUNITS.
29387         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29388         number of elements from the PARALLEL rather than the mode.
29389         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29390         rather than GET_MODE_BITSIZE.
29391         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29392         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29393         (aarch64_expand_vec_perm_const_1): Handle polynomial
29394         d->perm.length () and d->perm elements.
29395         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
29396         Apply to_constant to d->perm elements.
29397         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29398         polynomial CONST_VECTOR_NUNITS.
29399         (aarch64_move_pointer): Take amount as a poly_int64 rather
29400         than an int.
29401         (aarch64_progress_pointer): Avoid temporary variable.
29402         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29403         the mode attribute instead of GET_MODE.
29405 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29406             Alan Hayward  <alan.hayward@arm.com>
29407             David Sherwood  <david.sherwood@arm.com>
29409         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29410         x exists before using it.
29411         (aarch64_add_constant_internal): Rename to...
29412         (aarch64_add_offset_1): ...this.  Replace regnum with separate
29413         src and dest rtxes.  Handle the case in which they're different,
29414         including when the offset is zero.  Replace scratchreg with an rtx.
29415         Use 2 additions if there is no spare register into which we can
29416         move a 16-bit constant.
29417         (aarch64_add_constant): Delete.
29418         (aarch64_add_offset): Replace reg with separate src and dest
29419         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
29420         Use aarch64_add_offset_1.
29421         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29422         an rtx rather than an int.  Take the delta as a poly_int64
29423         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
29424         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29425         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29426         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29427         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29428         and aarch64_add_sp.
29429         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29430         aarch64_add_constant.
29432 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29434         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29435         Use scalar_float_mode.
29437 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29439         * config/aarch64/aarch64-simd.md
29440         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29441         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29442         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29443         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29444         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29445         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29446         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29447         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29448         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29449         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29451 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29453         PR target/83514
29454         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29455         targ_options->x_arm_arch_string is non NULL.
29457 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
29459         * config/aarch64/aarch64.h
29460         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
29462 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
29464         PR target/82096
29465         * expmed.c (emit_store_flag_force): Swap if const op0
29466         and change VOIDmode to mode of op0.
29468 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29470         PR rtl-optimization/83761
29471         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29472         than bytes to mode_for_size.
29474 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29476         PR middle-end/83189
29477         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29478         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29479         profile.
29481 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29483         PR middle-end/83575
29484         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29485         when in layout mode.
29486         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29487         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29488         partition fixup.
29490 2018-01-10  Michael Collison  <michael.collison@arm.com>
29492         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29493         * config/aarch64/aarch64-option-extension.def: Add
29494         AARCH64_OPT_EXTENSION of 'fp16fml'.
29495         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29496         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29497         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29498         * config/aarch64/constraints.md (Ui7): New constraint.
29499         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29500         (VFMLA_SEL_W): Ditto.
29501         (f16quad): Ditto.
29502         (f16mac1): Ditto.
29503         (VFMLA16_LOW): New int iterator.
29504         (VFMLA16_HIGH): Ditto.
29505         (UNSPEC_FMLAL): New unspec.
29506         (UNSPEC_FMLSL): Ditto.
29507         (UNSPEC_FMLAL2): Ditto.
29508         (UNSPEC_FMLSL2): Ditto.
29509         (f16mac): New code attribute.
29510         * config/aarch64/aarch64-simd-builtins.def
29511         (aarch64_fmlal_lowv2sf): Ditto.
29512         (aarch64_fmlsl_lowv2sf): Ditto.
29513         (aarch64_fmlalq_lowv4sf): Ditto.
29514         (aarch64_fmlslq_lowv4sf): Ditto.
29515         (aarch64_fmlal_highv2sf): Ditto.
29516         (aarch64_fmlsl_highv2sf): Ditto.
29517         (aarch64_fmlalq_highv4sf): Ditto.
29518         (aarch64_fmlslq_highv4sf): Ditto.
29519         (aarch64_fmlal_lane_lowv2sf): Ditto.
29520         (aarch64_fmlsl_lane_lowv2sf): Ditto.
29521         (aarch64_fmlal_laneq_lowv2sf): Ditto.
29522         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29523         (aarch64_fmlalq_lane_lowv4sf): Ditto.
29524         (aarch64_fmlsl_lane_lowv4sf): Ditto.
29525         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29526         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29527         (aarch64_fmlal_lane_highv2sf): Ditto.
29528         (aarch64_fmlsl_lane_highv2sf): Ditto.
29529         (aarch64_fmlal_laneq_highv2sf): Ditto.
29530         (aarch64_fmlsl_laneq_highv2sf): Ditto.
29531         (aarch64_fmlalq_lane_highv4sf): Ditto.
29532         (aarch64_fmlsl_lane_highv4sf): Ditto.
29533         (aarch64_fmlalq_laneq_highv4sf): Ditto.
29534         (aarch64_fmlsl_laneq_highv4sf): Ditto.
29535         * config/aarch64/aarch64-simd.md:
29536         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29537         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29538         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29539         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29540         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29541         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29542         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29543         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29544         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29545         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29546         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29547         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29548         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29549         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29550         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29551         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29552         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29553         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29554         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29555         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29556         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29557         (vfmlsl_low_u32): Ditto.
29558         (vfmlalq_low_u32): Ditto.
29559         (vfmlslq_low_u32): Ditto.
29560         (vfmlal_high_u32): Ditto.
29561         (vfmlsl_high_u32): Ditto.
29562         (vfmlalq_high_u32): Ditto.
29563         (vfmlslq_high_u32): Ditto.
29564         (vfmlal_lane_low_u32): Ditto.
29565         (vfmlsl_lane_low_u32): Ditto.
29566         (vfmlal_laneq_low_u32): Ditto.
29567         (vfmlsl_laneq_low_u32): Ditto.
29568         (vfmlalq_lane_low_u32): Ditto.
29569         (vfmlslq_lane_low_u32): Ditto.
29570         (vfmlalq_laneq_low_u32): Ditto.
29571         (vfmlslq_laneq_low_u32): Ditto.
29572         (vfmlal_lane_high_u32): Ditto.
29573         (vfmlsl_lane_high_u32): Ditto.
29574         (vfmlal_laneq_high_u32): Ditto.
29575         (vfmlsl_laneq_high_u32): Ditto.
29576         (vfmlalq_lane_high_u32): Ditto.
29577         (vfmlslq_lane_high_u32): Ditto.
29578         (vfmlalq_laneq_high_u32): Ditto.
29579         (vfmlslq_laneq_high_u32): Ditto.
29580         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29581         (AARCH64_FL_FOR_ARCH8_4): New.
29582         (AARCH64_ISA_F16FML): New ISA flag.
29583         (TARGET_F16FML): New feature flag for fp16fml.
29584         (doc/invoke.texi): Document new fp16fml option.
29586 2018-01-10  Michael Collison  <michael.collison@arm.com>
29588         * config/aarch64/aarch64-builtins.c:
29589         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29590         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29591         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29592         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29593         (AARCH64_ISA_SHA3): New ISA flag.
29594         (TARGET_SHA3): New feature flag for sha3.
29595         * config/aarch64/iterators.md (sha512_op): New int attribute.
29596         (CRYPTO_SHA512): New int iterator.
29597         (UNSPEC_SHA512H): New unspec.
29598         (UNSPEC_SHA512H2): Ditto.
29599         (UNSPEC_SHA512SU0): Ditto.
29600         (UNSPEC_SHA512SU1): Ditto.
29601         * config/aarch64/aarch64-simd-builtins.def
29602         (aarch64_crypto_sha512hqv2di): New builtin.
29603         (aarch64_crypto_sha512h2qv2di): Ditto.
29604         (aarch64_crypto_sha512su0qv2di): Ditto.
29605         (aarch64_crypto_sha512su1qv2di): Ditto.
29606         (aarch64_eor3qv8hi): Ditto.
29607         (aarch64_rax1qv2di): Ditto.
29608         (aarch64_xarqv2di): Ditto.
29609         (aarch64_bcaxqv8hi): Ditto.
29610         * config/aarch64/aarch64-simd.md:
29611         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29612         (aarch64_crypto_sha512su0qv2di): Ditto.
29613         (aarch64_crypto_sha512su1qv2di): Ditto.
29614         (aarch64_eor3qv8hi): Ditto.
29615         (aarch64_rax1qv2di): Ditto.
29616         (aarch64_xarqv2di): Ditto.
29617         (aarch64_bcaxqv8hi): Ditto.
29618         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29619         (vsha512h2q_u64): Ditto.
29620         (vsha512su0q_u64): Ditto.
29621         (vsha512su1q_u64): Ditto.
29622         (veor3q_u16): Ditto.
29623         (vrax1q_u64): Ditto.
29624         (vxarq_u64): Ditto.
29625         (vbcaxq_u16): Ditto.
29626         * config/arm/types.md (crypto_sha512): New type attribute.
29627         (crypto_sha3): Ditto.
29628         (doc/invoke.texi): Document new sha3 option.
29630 2018-01-10  Michael Collison  <michael.collison@arm.com>
29632         * config/aarch64/aarch64-builtins.c:
29633         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29634         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29635         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29636         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29637         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29638         (AARCH64_ISA_SM4): New ISA flag.
29639         (TARGET_SM4): New feature flag for sm4.
29640         * config/aarch64/aarch64-simd-builtins.def
29641         (aarch64_sm3ss1qv4si): Ditto.
29642         (aarch64_sm3tt1aq4si): Ditto.
29643         (aarch64_sm3tt1bq4si): Ditto.
29644         (aarch64_sm3tt2aq4si): Ditto.
29645         (aarch64_sm3tt2bq4si): Ditto.
29646         (aarch64_sm3partw1qv4si): Ditto.
29647         (aarch64_sm3partw2qv4si): Ditto.
29648         (aarch64_sm4eqv4si): Ditto.
29649         (aarch64_sm4ekeyqv4si): Ditto.
29650         * config/aarch64/aarch64-simd.md:
29651         (aarch64_sm3ss1qv4si): Ditto.
29652         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29653         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29654         (aarch64_sm4eqv4si): Ditto.
29655         (aarch64_sm4ekeyqv4si): Ditto.
29656         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29657         (sm3part_op): Ditto.
29658         (CRYPTO_SM3TT): Ditto.
29659         (CRYPTO_SM3PART): Ditto.
29660         (UNSPEC_SM3SS1): New unspec.
29661         (UNSPEC_SM3TT1A): Ditto.
29662         (UNSPEC_SM3TT1B): Ditto.
29663         (UNSPEC_SM3TT2A): Ditto.
29664         (UNSPEC_SM3TT2B): Ditto.
29665         (UNSPEC_SM3PARTW1): Ditto.
29666         (UNSPEC_SM3PARTW2): Ditto.
29667         (UNSPEC_SM4E): Ditto.
29668         (UNSPEC_SM4EKEY): Ditto.
29669         * config/aarch64/constraints.md (Ui2): New constraint.
29670         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29671         * config/arm/types.md (crypto_sm3): New type attribute.
29672         (crypto_sm4): Ditto.
29673         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29674         (vsm3tt1aq_u32): Ditto.
29675         (vsm3tt1bq_u32): Ditto.
29676         (vsm3tt2aq_u32): Ditto.
29677         (vsm3tt2bq_u32): Ditto.
29678         (vsm3partw1q_u32): Ditto.
29679         (vsm3partw2q_u32): Ditto.
29680         (vsm4eq_u32): Ditto.
29681         (vsm4ekeyq_u32): Ditto.
29682         (doc/invoke.texi): Document new sm4 option.
29684 2018-01-10  Michael Collison  <michael.collison@arm.com>
29686         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29687         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29688         (AARCH64_FL_FOR_ARCH8_4): New.
29689         (AARCH64_FL_V8_4): New flag.
29690         (doc/invoke.texi): Document new armv8.4-a option.
29692 2018-01-10  Michael Collison  <michael.collison@arm.com>
29694         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29695         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29696         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29697         * config/aarch64/aarch64-option-extension.def: Add
29698         AARCH64_OPT_EXTENSION of 'sha2'.
29699         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29700         (crypto): Disable sha2 and aes if crypto disabled.
29701         (crypto): Enable aes and sha2 if enabled.
29702         (simd): Disable sha2 and aes if simd disabled.
29703         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29704         New flags.
29705         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29706         (TARGET_SHA2): New feature flag for sha2.
29707         (TARGET_AES): New feature flag for aes.
29708         * config/aarch64/aarch64-simd.md:
29709         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29710         conditional on TARGET_AES.
29711         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29712         (aarch64_crypto_sha1hsi): Make pattern conditional
29713         on TARGET_SHA2.
29714         (aarch64_crypto_sha1hv4si): Ditto.
29715         (aarch64_be_crypto_sha1hv4si): Ditto.
29716         (aarch64_crypto_sha1su1v4si): Ditto.
29717         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29718         (aarch64_crypto_sha1su0v4si): Ditto.
29719         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29720         (aarch64_crypto_sha256su0v4si): Ditto.
29721         (aarch64_crypto_sha256su1v4si): Ditto.
29722         (doc/invoke.texi): Document new aes and sha2 options.
29724 2018-01-10  Martin Sebor  <msebor@redhat.com>
29726         PR tree-optimization/83781
29727         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29728         as string arrays.
29730 2018-01-11  Martin Sebor  <msebor@gmail.com>
29731             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29733         PR tree-optimization/83501
29734         PR tree-optimization/81703
29736         * tree-ssa-strlen.c (get_string_cst): Rename...
29737         (get_string_len): ...to this.  Handle global constants.
29738         (handle_char_store): Adjust.
29740 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
29741             Jim Wilson  <jimw@sifive.com>
29743         * config/riscv/riscv-protos.h (riscv_output_return): New.
29744         * config/riscv/riscv.c (struct machine_function): New naked_p field.
29745         (riscv_attribute_table, riscv_output_return),
29746         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29747         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29748         (riscv_compute_frame_info): Only compute frame->mask if not a naked
29749         function.
29750         (riscv_expand_prologue): Add early return for naked function.
29751         (riscv_expand_epilogue): Likewise.
29752         (riscv_function_ok_for_sibcall): Return false for naked function.
29753         (riscv_set_current_function): New.
29754         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29755         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29756         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29757         * doc/extend.texi (RISC-V Function Attributes): New.
29759 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
29761         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29762         check for 128-bit long double before checking TCmode.
29763         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29764         128-bit long doubles before checking TFmode or TCmode.
29765         (FLOAT128_IBM_P): Likewise.
29767 2018-01-10  Martin Sebor  <msebor@redhat.com>
29769         PR tree-optimization/83671
29770         * builtins.c (c_strlen): Unconditionally return zero for the empty
29771         string.
29772         Use -Warray-bounds for warnings.
29773         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29774         for non-constant array indices with COMPONENT_REF, arrays of
29775         arrays, and pointers to arrays.
29776         (gimple_fold_builtin_strlen): Determine and set length range for
29777         non-constant character arrays.
29779 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
29781         PR middle-end/81897
29782         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29783         empty blocks.
29785 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
29787         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29789 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29791         PR target/83399
29792         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29793         VECTOR_MEM_ALTIVEC_OR_VSX_P.
29794         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29795         indexed_or_indirect_operand predicate.
29796         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29797         (*vsx_le_perm_load_v8hi): Likewise.
29798         (*vsx_le_perm_load_v16qi): Likewise.
29799         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29800         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29801         (*vsx_le_perm_store_v8hi): Likewise.
29802         (*vsx_le_perm_store_v16qi): Likewise.
29803         (eight unnamed splitters): Likewise.
29805 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29807         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29808         * config/rs6000/emmintrin.h: Likewise.
29809         * config/rs6000/mmintrin.h: Likewise.
29810         * config/rs6000/xmmintrin.h: Likewise.
29812 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
29814         PR c++/43486
29815         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29816         "public_flag".
29817         * tree.c (tree_nop_conversion): Return true for location wrapper
29818         nodes.
29819         (maybe_wrap_with_location): New function.
29820         (selftest::check_strip_nops): New function.
29821         (selftest::test_location_wrappers): New function.
29822         (selftest::tree_c_tests): Call it.
29823         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29824         (maybe_wrap_with_location): New decl.
29825         (EXPR_LOCATION_WRAPPER_P): New macro.
29826         (location_wrapper_p): New inline function.
29827         (tree_strip_any_location_wrapper): New inline function.
29829 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
29831         PR target/83735
29832         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29833         stack_realign_offset for the largest alignment of stack slot
29834         actually used.
29835         (ix86_find_max_used_stack_alignment): New function.
29836         (ix86_finalize_stack_frame_flags): Use it.  Set
29837         max_used_stack_alignment if we don't realign stack.
29838         * config/i386/i386.h (machine_function): Add
29839         max_used_stack_alignment.
29841 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
29843         * config/arm/arm.opt (-mbranch-cost): New option.
29844         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29845         account.
29847 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
29849         PR target/83629
29850         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29851         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29853 2018-01-10  Richard Biener  <rguenther@suse.de>
29855         PR debug/83765
29856         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29857         early out so it also covers the case where we have a non-NULL
29858         origin.
29860 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
29862         PR tree-optimization/83753
29863         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29864         for non-strided grouped accesses if the number of elements is 1.
29866 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29868         PR target/81616
29869         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29870         * i386.h (TARGET_USE_GATHER): Define.
29871         * x86-tune.def (X86_TUNE_USE_GATHER): New.
29873 2018-01-10  Martin Liska  <mliska@suse.cz>
29875         PR bootstrap/82831
29876         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29877         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29878         partitioning.
29879         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29880         CLEANUP_NO_PARTITIONING is not set.
29882 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
29884         * doc/rtl.texi: Remove documentation of (const ...) wrappers
29885         for vectors, as a partial revert of r254296.
29886         * rtl.h (const_vec_p): Delete.
29887         (const_vec_duplicate_p): Don't test for vector CONSTs.
29888         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29889         * expmed.c (make_tree): Likewise.
29891         Revert:
29892         * common.md (E, F): Use CONSTANT_P instead of checking for
29893         CONST_VECTOR.
29894         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29895         checking for CONST_VECTOR.
29897 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29899         PR middle-end/83575
29900         * predict.c (force_edge_cold): Handle in more sane way edges
29901         with no prediction.
29903 2018-01-09  Carl Love  <cel@us.ibm.com>
29905         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29906         V4SI, V4SF types.
29907         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29908         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29909         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29910         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
29911         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29912         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
29913         * config/rs6000/rs6000-protos.h: Add extern defition for
29914         rs6000_generate_float2_double_code.
29915         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29916         function.
29917         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29918         (float2_v2df): Add define_expand.
29920 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
29922         PR target/83628
29923         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29924         op_mode in the force_to_mode call.
29926 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29928         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29929         instead of checking each element individually.
29930         (aarch64_evpc_uzp): Likewise.
29931         (aarch64_evpc_zip): Likewise.
29932         (aarch64_evpc_ext): Likewise.
29933         (aarch64_evpc_rev): Likewise.
29934         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29935         instead of checking each element individually.  Return true without
29936         generating rtl if
29937         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29938         whether all selected elements come from the same input, instead of
29939         checking each element individually.  Remove calls to gen_rtx_REG,
29940         start_sequence and end_sequence and instead assert that no rtl is
29941         generated.
29943 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29945         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29946         order of HIGH and CONST checks.
29948 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29950         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29951         if the destination isn't an SSA_NAME.
29953 2018-01-09  Richard Biener  <rguenther@suse.de>
29955         PR tree-optimization/83668
29956         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
29957         move prologue...
29958         (canonicalize_loop_form): ... here, renamed from ...
29959         (canonicalize_loop_closed_ssa_form): ... this and amended to
29960         swap successor edges for loop exit blocks to make us use
29961         the RPO order we need for initial schedule generation.
29963 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
29965         PR tree-optimization/64811
29966         * match.pd: When optimizing comparisons with Inf, avoid
29967         introducing or losing exceptions from comparisons with NaN.
29969 2018-01-09  Martin Liska  <mliska@suse.cz>
29971         PR sanitizer/82517
29972         * asan.c (shadow_mem_size): Add gcc_assert.
29974 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
29976         Don't save registers in main().
29978         PR target/83738
29979         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
29980         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
29981         * config/avr/avr.c (avr_set_current_function): Don't error if
29982         naked, OS_task or OS_main are specified at the same time.
29983         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
29984         OS_main.
29985         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
29986         attribute.
29987         * common/config/avr/avr-common.c (avr_option_optimization_table):
29988         Switch on -mmain-is-OS_task for optimizing compilations.
29990 2018-01-09  Richard Biener  <rguenther@suse.de>
29992         PR tree-optimization/83572
29993         * graphite.c: Include cfganal.h.
29994         (graphite_transform_loops): Connect infinite loops to exit
29995         and remove fake edges at the end.
29997 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29999         * ipa-inline.c (edge_badness): Revert accidental checkin.
30001 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30003         PR ipa/80763
30004         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30005         symbols; not inline clones.
30007 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
30009         PR target/83507
30010         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30011         hard registers.  Formatting fixes.
30013         PR preprocessor/83722
30014         * gcc.c (try_generate_repro): Pass
30015         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30016         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30017         do_report_bug.
30019 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
30020             Kito Cheng  <kito.cheng@gmail.com>
30022         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30023         (riscv_leaf_function_p): Delete.
30024         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30026 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30028         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30029         function.
30030         (do_ifelse): New function.
30031         (do_isel): New function.
30032         (do_sub3): New function.
30033         (do_add3): New function.
30034         (do_load_mask_compare): New function.
30035         (do_overlap_load_compare): New function.
30036         (expand_compare_loop): New function.
30037         (expand_block_compare): Call expand_compare_loop() when appropriate.
30038         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30039         option description.
30040         (-mblock-compare-inline-loop-limit): New option.
30042 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30044         PR target/83677
30045         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30046         Reverse order of second and third operands in first alternative.
30047         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30048         of first and second elements in UNSPEC_VPERMR vector.
30049         (altivec_expand_vec_perm_le): Likewise.
30051 2018-01-08  Jeff Law  <law@redhat.com>
30053         PR rtl-optimizatin/81308
30054         * tree-switch-conversion.c (cfg_altered): New file scoped static.
30055         (process_switch): If group_case_labels makes a change, then set
30056         cfg_altered.
30057         (pass_convert_switch::execute): If a switch is converted, then
30058         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
30060         PR rtl-optimization/81308
30061         * recog.c (split_all_insns): Conditionally cleanup the CFG after
30062         splitting insns.
30064 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
30066         PR target/83663 - Revert r255946
30067         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30068         generation for cases where splatting a value is not useful.
30069         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30070         across a vec_duplicate and a paradoxical subreg forming a vector
30071         mode to a vec_concat.
30073 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30075         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30076         -march=armv8.3-a variants.
30077         * config/arm/t-multilib: Likewise.
30078         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
30080 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30082         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30083         to generate rtl.
30084         (cceq_ior_compare_complement): Give it a name so I can use it, and
30085         change boolean_or_operator predicate to boolean_operator so it can
30086         be used to generate a crand.
30087         (eqne): New code iterator.
30088         (bd/bd_neg): New code_attrs.
30089         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30090         a single define_insn.
30091         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30092         decrement (bdnzt/bdnzf/bdzt/bdzf).
30093         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30094         with the new names of the branch decrement patterns, and added the
30095         names of the branch decrement conditional patterns.
30097 2018-01-08  Richard Biener  <rguenther@suse.de>
30099         PR tree-optimization/83563
30100         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30101         cache.
30103 2018-01-08  Richard Biener  <rguenther@suse.de>
30105         PR middle-end/83713
30106         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30108 2018-01-08  Richard Biener  <rguenther@suse.de>
30110         PR tree-optimization/83685
30111         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30112         references to abnormals.
30114 2018-01-08  Richard Biener  <rguenther@suse.de>
30116         PR lto/83719
30117         * dwarf2out.c (output_indirect_strings): Handle empty
30118         skeleton_debug_str_hash.
30119         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30121 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30123         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30124         (emit_store_direct): Likewise.
30125         (arc_trampoline_adjust_address): Likewise.
30126         (arc_asm_trampoline_template): New function.
30127         (arc_initialize_trampoline): Use asm_trampoline_template.
30128         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30129         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30130         * config/arc/arc.md (flush_icache): Delete pattern.
30132 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30134         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30135         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30136         munaligned-access.
30138 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30140         PR target/83681
30141         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30142         by not USED_FOR_TARGET.
30143         (make_pass_resolve_sw_modes): Likewise.
30145 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30147         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30148         USED_FOR_TARGET.
30150 2018-01-08  Richard Biener  <rguenther@suse.de>
30152         PR middle-end/83580
30153         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30155 2018-01-08  Richard Biener  <rguenther@suse.de>
30157         PR middle-end/83517
30158         * match.pd ((t * 2) / 2) -> t): Add missing :c.
30160 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
30162         PR middle-end/81897
30163         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30164         basic blocks with a small number of successors.
30165         (convert_control_dep_chain_into_preds): Improve handling of
30166         forwarder blocks.
30167         (dump_predicates): Split apart into...
30168         (dump_pred_chain): ...here...
30169         (dump_pred_info): ...and here.
30170         (can_one_predicate_be_invalidated_p): Add debugging printfs.
30171         (can_chain_union_be_invalidated_p): Improve check for invalidation
30172         of paths.
30173         (uninit_uses_cannot_happen): Avoid unnecessary if
30174         convert_control_dep_chain_into_preds yielded nothing.
30176 2018-01-06  Martin Sebor  <msebor@redhat.com>
30178         PR tree-optimization/83640
30179         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30180         subtracting negative offset from size.
30181         (builtin_access::overlap): Adjust offset bounds of the access to fall
30182         within the size of the object if possible.
30184 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
30186         PR rtl-optimization/83699
30187         * expmed.c (extract_bit_field_1): Restrict the vector usage of
30188         extract_bit_field_as_subreg to cases in which the extracted
30189         value is also a vector.
30191         * lra-constraints.c (process_alt_operands): Test for the equivalence
30192         substitutions when detecting a possible reload cycle.
30194 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
30196         PR debug/83480
30197         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30198         by default if flag_selective_schedling{,2}.  Formatting fixes.
30200         PR rtl-optimization/83682
30201         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30202         if it has non-VECTOR_MODE element mode.
30203         (vec_duplicate_p): Likewise.
30205         PR middle-end/83694
30206         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30207         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30209 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30211         PR target/83604
30212         * config/i386/i386-builtin.def
30213         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30214         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30215         Require also OPTION_MASK_ISA_AVX512F in addition to
30216         OPTION_MASK_ISA_GFNI.
30217         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30218         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30219         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30220         to OPTION_MASK_ISA_GFNI.
30221         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30222         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30223         OPTION_MASK_ISA_AVX512BW.
30224         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30225         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30226         addition to OPTION_MASK_ISA_GFNI.
30227         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30228         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30229         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30230         to OPTION_MASK_ISA_GFNI.
30231         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30232         a requirement for all ISAs rather than any of them with a few
30233         exceptions.
30234         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30235         processing.
30236         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30237         bitmasks to be enabled with 3 exceptions, instead of requiring any
30238         enabled ISA with lots of exceptions.
30239         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30240         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30241         Change avx512bw in isa attribute to avx512f.
30242         * config/i386/sgxintrin.h: Add license boilerplate.
30243         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
30244         to __AVX512F__ and __AVX512VL to __AVX512VL__.
30245         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30246         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30247         defined.
30248         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30249         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30250         temporarily sse2 rather than sse if not enabled already.
30252         PR target/83604
30253         * config/i386/sse.md (VI248_VLBW): Rename to ...
30254         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
30255         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30256         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30257         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30258         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30259         mode iterator instead of VI248_VLBW.
30261 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
30263         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30264         (record_modified): Skip clobbers; add debug output.
30265         (param_change_prob): Use sreal frequencies.
30267 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30269         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30270         punt for user-aligned variables.
30272 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30274         * tree-chrec.c (chrec_contains_symbols): Return true for
30275         POLY_INT_CST.
30277 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
30279         PR target/82439
30280         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30281         of (x|y) == x for BICS pattern.
30283 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30285         PR tree-optimization/83605
30286         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30287         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30288         can throw.
30290 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30292         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30293         * config/epiphany/rtems.h: New file.
30295 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30296             Uros Bizjak  <ubizjak@gmail.com>
30298         PR target/83554
30299         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30300         QIreg_operand instead of register_operand predicate.
30301         * config/i386/i386.c (ix86_rop_should_change_byte_p,
30302         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30303         comments instead of -fmitigate[-_]rop.
30305 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
30307         PR bootstrap/81926
30308         * cgraphunit.c (symbol_table::compile): Switch to text_section
30309         before calling assembly_start debug hook.
30310         * run-rtl-passes.c (run_rtl_passes): Likewise.
30311         Include output.h.
30313 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30315         * tree-vrp.c (extract_range_from_binary_expr_1): Check
30316         range_int_cst_p rather than !symbolic_range_p before calling
30317         extract_range_from_multiplicative_op_1.
30319 2018-01-04  Jeff Law  <law@redhat.com>
30321         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30322         redundant test in assertion.
30324 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30326         * doc/rtl.texi: Document machine_mode wrapper classes.
30328 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30330         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30331         using tree_to_uhwi.
30333 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30335         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30336         the VEC_PERM_EXPR fold to fail.
30338 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30340         PR debug/83585
30341         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30342         to switched_sections.
30344 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30346         PR target/83680
30347         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30348         test for d.testing.
30350 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
30352         PR target/83387
30353         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30354         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30356 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30358         PR debug/83666
30359         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30360         is BLKmode and bitpos not zero or mode change is needed.
30362 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30364         PR target/83675
30365         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30366         TARGET_VIS2.
30368 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
30370         PR target/83628
30371         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30372         instead of MULT rtx.  Update all corresponding splitters.
30373         (*saddl_se): Ditto.
30374         (*ssub<modesuffix>): Ditto.
30375         (*ssubl_se): Ditto.
30376         (*cmp_sadd_di): Update split patterns.
30377         (*cmp_sadd_si): Ditto.
30378         (*cmp_sadd_sidi): Ditto.
30379         (*cmp_ssub_di): Ditto.
30380         (*cmp_ssub_si): Ditto.
30381         (*cmp_ssub_sidi): Ditto.
30382         * config/alpha/predicates.md (const23_operand): New predicate.
30383         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30384         Look for ASHIFT, not MULT inner operand.
30385         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30387 2018-01-04  Martin Liska  <mliska@suse.cz>
30389         PR gcov-profile/83669
30390         * gcov.c (output_intermediate_file): Add version to intermediate
30391         gcov file.
30392         * doc/gcov.texi: Document new field 'version' in intermediate
30393         file format. Fix location of '-k' option of gcov command.
30395 2018-01-04  Martin Liska  <mliska@suse.cz>
30397         PR ipa/82352
30398         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30400 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30402         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30404 2018-01-03  Martin Sebor  <msebor@redhat.com>
30406         PR tree-optimization/83655
30407         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30408         checking calls with invalid arguments.
30410 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30412         * tree-vect-stmts.c (vect_get_store_rhs): New function.
30413         (vectorizable_mask_load_store): Delete.
30414         (vectorizable_call): Return false for masked loads and stores.
30415         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
30416         instead of gimple_assign_rhs1.
30417         (vectorizable_load): Handle IFN_MASK_LOAD.
30418         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30420 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30422         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30423         split out from..,
30424         (vectorizable_mask_load_store): ...here.
30425         (vectorizable_load): ...and here.
30427 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30429         * tree-vect-stmts.c (vect_build_all_ones_mask)
30430         (vect_build_zero_merge_argument): New functions, split out from...
30431         (vectorizable_load): ...here.
30433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30435         * tree-vect-stmts.c (vect_check_store_rhs): New function,
30436         split out from...
30437         (vectorizable_mask_load_store): ...here.
30438         (vectorizable_store): ...and here.
30440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30442         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30443         split out from...
30444         (vectorizable_mask_load_store): ...here.
30446 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30448         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30449         (vect_model_store_cost): Take a vec_load_store_type instead of a
30450         vect_def_type.
30451         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30452         (vect_model_store_cost): Take a vec_load_store_type instead of a
30453         vect_def_type.
30454         (vectorizable_mask_load_store): Update accordingly.
30455         (vectorizable_store): Likewise.
30456         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30458 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30460         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30461         IFN_MASK_LOAD calls here rather than...
30462         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30464 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30465             Alan Hayward  <alan.hayward@arm.com>
30466             David Sherwood  <david.sherwood@arm.com>
30468         * expmed.c (extract_bit_field_1): For vector extracts,
30469         fall back to extract_bit_field_as_subreg if vec_extract
30470         isn't available.
30472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30473             Alan Hayward  <alan.hayward@arm.com>
30474             David Sherwood  <david.sherwood@arm.com>
30476         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30477         they are variable or constant sized.
30478         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30479         slots for constant-sized data.
30481 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30482             Alan Hayward  <alan.hayward@arm.com>
30483             David Sherwood  <david.sherwood@arm.com>
30485         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30486         handling COND_EXPRs with boolean comparisons, try to find a better
30487         basis for the mask type than the boolean itself.
30489 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30491         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30492         is calculated and how it can be overridden.
30493         * genmodes.c (max_bitsize_mode_any_mode): New variable.
30494         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30495         if defined.
30496         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30497         if nonzero.
30499 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30500             Alan Hayward  <alan.hayward@arm.com>
30501             David Sherwood  <david.sherwood@arm.com>
30503         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30504         Remove the mode argument.
30505         (aarch64_simd_valid_immediate): Remove the mode and inverse
30506         arguments.
30507         * config/aarch64/iterators.md (bitsize): New iterator.
30508         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30509         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30510         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30511         aarch64_simd_valid_immediate.
30512         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30513         (aarch64_reg_or_bic_imm): Likewise.
30514         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30515         with an insn_type enum and msl with a modifier_type enum.
30516         Replace element_width with a scalar_mode.  Change the shift
30517         to unsigned int.  Add constructors for scalar_float_mode and
30518         scalar_int_mode elements.
30519         (aarch64_vect_float_const_representable_p): Delete.
30520         (aarch64_can_const_movi_rtx_p)
30521         (aarch64_simd_scalar_immediate_valid_for_move)
30522         (aarch64_simd_make_constant): Update call to
30523         aarch64_simd_valid_immediate.
30524         (aarch64_advsimd_valid_immediate_hs): New function.
30525         (aarch64_advsimd_valid_immediate): Likewise.
30526         (aarch64_simd_valid_immediate): Remove mode and inverse
30527         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
30528         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30529         and aarch64_float_const_representable_p on the result.
30530         (aarch64_output_simd_mov_immediate): Remove mode argument.
30531         Update call to aarch64_simd_valid_immediate and use of
30532         simd_immediate_info.
30533         (aarch64_output_scalar_simd_mov_immediate): Update call
30534         accordingly.
30536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30537             Alan Hayward  <alan.hayward@arm.com>
30538             David Sherwood  <david.sherwood@arm.com>
30540         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30541         (mode_nunits): Likewise CONST_MODE_NUNITS.
30542         * machmode.def (ADJUST_NUNITS): Document.
30543         * genmodes.c (mode_data::need_nunits_adj): New field.
30544         (blank_mode): Update accordingly.
30545         (adj_nunits): New variable.
30546         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30547         parameter.
30548         (emit_mode_size_inline): Set need_bytesize_adj for all modes
30549         listed in adj_nunits.
30550         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30551         listed in adj_nunits.  Don't emit case statements for such modes.
30552         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30553         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
30554         nothing if adj_nunits is nonnull.
30555         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30556         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30557         (emit_mode_fbit): Update use of print_maybe_const_decl.
30558         (emit_move_size): Likewise.  Treat the array as non-const
30559         if adj_nunits.
30560         (emit_mode_adjustments): Handle adj_nunits.
30562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30564         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30565         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30566         (VECTOR_MODES): Use it.
30567         (make_vector_modes): Take the prefix as an argument.
30569 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30570             Alan Hayward  <alan.hayward@arm.com>
30571             David Sherwood  <david.sherwood@arm.com>
30573         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30574         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30575         for MODE_VECTOR_BOOL.
30576         * machmode.def (VECTOR_BOOL_MODE): Document.
30577         * genmodes.c (VECTOR_BOOL_MODE): New macro.
30578         (make_vector_bool_mode): New function.
30579         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30580         MODE_VECTOR_BOOL.
30581         * lto-streamer-in.c (lto_input_mode_table): Likewise.
30582         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30583         Likewise.
30584         * stor-layout.c (int_mode_for_mode): Likewise.
30585         * tree.c (build_vector_type_for_mode): Likewise.
30586         * varasm.c (output_constant_pool_2): Likewise.
30587         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30588         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
30589         for MODE_VECTOR_BOOL.
30590         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30591         of mode class checks.
30592         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30593         instead of a list of mode class checks.
30594         (expand_vector_scalar_condition): Likewise.
30595         (type_for_widest_vector_mode): Handle BImode as an inner mode.
30597 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30598             Alan Hayward  <alan.hayward@arm.com>
30599             David Sherwood  <david.sherwood@arm.com>
30601         * machmode.h (mode_size): Change from unsigned short to
30602         poly_uint16_pod.
30603         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30604         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30605         or if measurement_type is not polynomial.
30606         (fixed_size_mode::includes_p): Check for constant-sized modes.
30607         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30608         return a poly_uint16 rather than an unsigned short.
30609         (emit_mode_size): Change the type of mode_size from unsigned short
30610         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
30611         (emit_mode_adjustments): Cope with polynomial vector sizes.
30612         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30613         for GET_MODE_SIZE.
30614         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30615         for GET_MODE_SIZE.
30616         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30617         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30618         * caller-save.c (setup_save_areas): Likewise.
30619         (replace_reg_with_saved_mem): Likewise.
30620         * calls.c (emit_library_call_value_1): Likewise.
30621         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30622         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30623         (gen_lowpart_for_combine): Likewise.
30624         * convert.c (convert_to_integer_1): Likewise.
30625         * cse.c (equiv_constant, cse_insn): Likewise.
30626         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30627         (cselib_subst_to_values): Likewise.
30628         * dce.c (word_dce_process_block): Likewise.
30629         * df-problems.c (df_word_lr_mark_ref): Likewise.
30630         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30631         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30632         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30633         (rtl_for_decl_location): Likewise.
30634         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30635         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30636         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30637         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30638         (expand_expr_real_1): Likewise.
30639         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30640         (pad_below): Likewise.
30641         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30642         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30643         * ira.c (get_subreg_tracking_sizes): Likewise.
30644         * ira-build.c (ira_create_allocno_objects): Likewise.
30645         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30646         (ira_sort_regnos_for_alter_reg): Likewise.
30647         * ira-costs.c (record_operand_costs): Likewise.
30648         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30649         (resolve_simple_move): Likewise.
30650         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30651         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30652         (lra_constraints): Likewise.
30653         (CONST_POOL_OK_P): Reject variable-sized modes.
30654         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30655         (add_pseudo_to_slot, lra_spill): Likewise.
30656         * omp-low.c (omp_clause_aligned_alignment): Likewise.
30657         * optabs-query.c (get_best_extraction_insn): Likewise.
30658         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30659         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30660         (expand_mult_highpart, valid_multiword_target_p): Likewise.
30661         * recog.c (offsettable_address_addr_space_p): Likewise.
30662         * regcprop.c (maybe_mode_change): Likewise.
30663         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30664         * regrename.c (build_def_use): Likewise.
30665         * regstat.c (dump_reg_info): Likewise.
30666         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30667         (find_reloads, find_reloads_subreg_address): Likewise.
30668         * reload1.c (eliminate_regs_1): Likewise.
30669         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30670         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30671         (simplify_binary_operation_1, simplify_subreg): Likewise.
30672         * targhooks.c (default_function_arg_padding): Likewise.
30673         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30674         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30675         (verify_gimple_assign_ternary): Likewise.
30676         * tree-inline.c (estimate_move_cost): Likewise.
30677         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30678         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30679         (get_address_cost_ainc): Likewise.
30680         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30681         (vect_supportable_dr_alignment): Likewise.
30682         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30683         (vectorizable_reduction): Likewise.
30684         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30685         (vectorizable_operation, vectorizable_load): Likewise.
30686         * tree.c (build_same_sized_truth_vector_type): Likewise.
30687         * valtrack.c (cleanup_auto_inc_dec): Likewise.
30688         * var-tracking.c (emit_note_insn_var_location): Likewise.
30689         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30690         (ADDR_VEC_ALIGN): Likewise.
30692 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30693             Alan Hayward  <alan.hayward@arm.com>
30694             David Sherwood  <david.sherwood@arm.com>
30696         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30697         unsigned short.
30698         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30699         or if measurement_type is polynomial.
30700         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30701         * combine.c (make_extraction): Likewise.
30702         * dse.c (find_shift_sequence): Likewise.
30703         * dwarf2out.c (mem_loc_descriptor): Likewise.
30704         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30705         (extract_bit_field, extract_low_bits): Likewise.
30706         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30707         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30708         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30709         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30710         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30711         * reload.c (find_reloads): Likewise.
30712         * reload1.c (alter_reg): Likewise.
30713         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30714         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30715         * tree-if-conv.c (predicate_mem_writes): Likewise.
30716         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30717         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30718         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30719         * valtrack.c (dead_debug_insert_temp): Likewise.
30720         * varasm.c (mergeable_constant_section): Likewise.
30721         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30723 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30724             Alan Hayward  <alan.hayward@arm.com>
30725             David Sherwood  <david.sherwood@arm.com>
30727         * expr.c (expand_assignment): Cope with polynomial mode sizes
30728         when assigning to a CONCAT.
30730 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30731             Alan Hayward  <alan.hayward@arm.com>
30732             David Sherwood  <david.sherwood@arm.com>
30734         * machmode.h (mode_precision): Change from unsigned short to
30735         poly_uint16_pod.
30736         (mode_to_precision): Return a poly_uint16 rather than an unsigned
30737         short.
30738         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30739         or if measurement_type is not polynomial.
30740         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
30741         in which the mode is already known to be a scalar_int_mode.
30742         * genmodes.c (emit_mode_precision): Change the type of mode_precision
30743         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
30744         initializer.
30745         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30746         for GET_MODE_PRECISION.
30747         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30748         for GET_MODE_PRECISION.
30749         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30750         as polynomial.
30751         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30752         (expand_field_assignment, make_extraction): Likewise.
30753         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30754         (get_last_value): Likewise.
30755         * convert.c (convert_to_integer_1): Likewise.
30756         * cse.c (cse_insn): Likewise.
30757         * expr.c (expand_expr_real_1): Likewise.
30758         * lra-constraints.c (simplify_operand_subreg): Likewise.
30759         * optabs-query.c (can_atomic_load_p): Likewise.
30760         * optabs.c (expand_atomic_load): Likewise.
30761         (expand_atomic_store): Likewise.
30762         * ree.c (combine_reaching_defs): Likewise.
30763         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30764         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30765         * tree.h (type_has_mode_precision_p): Likewise.
30766         * ubsan.c (instrument_si_overflow): Likewise.
30768 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30769             Alan Hayward  <alan.hayward@arm.com>
30770             David Sherwood  <david.sherwood@arm.com>
30772         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30773         polynomial numbers of units.
30774         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30775         (valid_vector_subparts_p): New function.
30776         (build_vector_type): Remove temporary shim and take the number
30777         of units as a poly_uint64 rather than an int.
30778         (build_opaque_vector_type): Take the number of units as a
30779         poly_uint64 rather than an int.
30780         * tree.c (build_vector_from_ctor): Handle polynomial
30781         TYPE_VECTOR_SUBPARTS.
30782         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30783         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30784         (build_vector_from_val): If the number of units is variable,
30785         use build_vec_duplicate_cst for constant operands and
30786         VEC_DUPLICATE_EXPR otherwise.
30787         (make_vector_type): Remove temporary is_constant ().
30788         (build_vector_type, build_opaque_vector_type): Take the number of
30789         units as a poly_uint64 rather than an int.
30790         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30791         VECTOR_CST_NELTS.
30792         * cfgexpand.c (expand_debug_expr): Likewise.
30793         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30794         (store_constructor, expand_expr_real_1): Likewise.
30795         (const_scalar_mask_from_tree): Likewise.
30796         * fold-const-call.c (fold_const_reduction): Likewise.
30797         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30798         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30799         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30800         (fold_relational_const): Likewise.
30801         (native_interpret_vector): Likewise.  Change the size from an
30802         int to an unsigned int.
30803         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30804         TYPE_VECTOR_SUBPARTS.
30805         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30806         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30807         duplicating a non-constant operand into a variable-length vector.
30808         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30809         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30810         * ipa-icf.c (sem_variable::equals): Likewise.
30811         * match.pd: Likewise.
30812         * omp-simd-clone.c (simd_clone_subparts): Likewise.
30813         * print-tree.c (print_node): Likewise.
30814         * stor-layout.c (layout_type): Likewise.
30815         * targhooks.c (default_builtin_vectorization_cost): Likewise.
30816         * tree-cfg.c (verify_gimple_comparison): Likewise.
30817         (verify_gimple_assign_binary): Likewise.
30818         (verify_gimple_assign_ternary): Likewise.
30819         (verify_gimple_assign_single): Likewise.
30820         * tree-pretty-print.c (dump_generic_node): Likewise.
30821         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30822         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30823         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30824         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30825         (vect_shift_permute_load_chain): Likewise.
30826         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30827         (expand_vector_condition, optimize_vector_constructor): Likewise.
30828         (lower_vec_perm, get_compute_type): Likewise.
30829         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30830         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30831         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30832         (vect_recog_mask_conversion_pattern): Likewise.
30833         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30834         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30835         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30836         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30837         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30838         (vectorizable_shift, vectorizable_operation, vectorizable_store)
30839         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30840         (supportable_widening_operation): Likewise.
30841         (supportable_narrowing_operation): Likewise.
30842         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30843         Likewise.
30844         * varasm.c (output_constant): Likewise.
30846 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30847             Alan Hayward  <alan.hayward@arm.com>
30848             David Sherwood  <david.sherwood@arm.com>
30850         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30851         so that both the length == 3 and length != 3 cases set up their
30852         own permute vectors.  Add comments explaining why we know the
30853         number of elements is constant.
30854         (vect_permute_load_chain): Likewise.
30856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30857             Alan Hayward  <alan.hayward@arm.com>
30858             David Sherwood  <david.sherwood@arm.com>
30860         * machmode.h (mode_nunits): Change from unsigned char to
30861         poly_uint16_pod.
30862         (ONLY_FIXED_SIZE_MODES): New macro.
30863         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30864         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30865         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30866         New typedefs.
30867         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30868         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30869         or if measurement_type is not polynomial.
30870         * genmodes.c (ZERO_COEFFS): New macro.
30871         (emit_mode_nunits_inline): Make mode_nunits_inline return a
30872         poly_uint16.
30873         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30874         Use ZERO_COEFFS when emitting initializers.
30875         * data-streamer.h (bp_pack_poly_value): New function.
30876         (bp_unpack_poly_value): Likewise.
30877         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30878         for GET_MODE_NUNITS.
30879         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30880         for GET_MODE_NUNITS.
30881         * tree.c (make_vector_type): Remove temporary shim and make
30882         the real function take the number of units as a poly_uint64
30883         rather than an int.
30884         (build_vector_type_for_mode): Handle polynomial nunits.
30885         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30886         * emit-rtl.c (const_vec_series_p_1): Likewise.
30887         (gen_rtx_CONST_VECTOR): Likewise.
30888         * fold-const.c (test_vec_duplicate_folding): Likewise.
30889         * genrecog.c (validate_pattern): Likewise.
30890         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30891         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30892         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30893         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30894         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30895         * rtlanal.c (subreg_get_info): Likewise.
30896         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30897         (vect_grouped_load_supported): Likewise.
30898         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30899         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30900         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30901         (simplify_const_unary_operation, simplify_binary_operation_1)
30902         (simplify_const_binary_operation, simplify_ternary_operation)
30903         (test_vector_ops_duplicate, test_vector_ops): Likewise.
30904         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30905         instead of CONST_VECTOR_NUNITS.
30906         * varasm.c (output_constant_pool_2): Likewise.
30907         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30908         explicit-encoded elements in the XVEC for variable-length vectors.
30910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30912         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30914 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30915             Alan Hayward  <alan.hayward@arm.com>
30916             David Sherwood  <david.sherwood@arm.com>
30918         * coretypes.h (fixed_size_mode): Declare.
30919         (fixed_size_mode_pod): New typedef.
30920         * builtins.h (target_builtins::x_apply_args_mode)
30921         (target_builtins::x_apply_result_mode): Change type to
30922         fixed_size_mode_pod.
30923         * builtins.c (apply_args_size, apply_result_size, result_vector)
30924         (expand_builtin_apply_args_1, expand_builtin_apply)
30925         (expand_builtin_return): Update accordingly.
30927 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30929         * cse.c (hash_rtx_cb): Hash only the encoded elements.
30930         * cselib.c (cselib_hash_rtx): Likewise.
30931         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30932         CONST_VECTOR encoding.
30934 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30935             Jeff Law  <law@redhat.com>
30937         PR target/83641
30938         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30939         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30940         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30941         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30943         PR target/83641
30944         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30945         explicitly probe *sp in a noreturn function if there were any callee
30946         register saves or frame pointer is needed.
30948 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30950         PR debug/83621
30951         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30952         BLKmode for ternary, binary or unary expressions.
30954         PR debug/83645
30955         * var-tracking.c (delete_vta_debug_insn): New inline function.
30956         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
30957         insns from get_insns () to NULL instead of each bb separately.
30958         Use delete_vta_debug_insn.  No longer static.
30959         (vt_debug_insns_local, variable_tracking_main_1): Adjust
30960         delete_vta_debug_insns callers.
30961         * rtl.h (delete_vta_debug_insns): Declare.
30962         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
30963         instead of variable_tracking_main.
30965 2018-01-03  Martin Sebor  <msebor@redhat.com>
30967         PR tree-optimization/83603
30968         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
30969         arguments past the endof the argument list in functions declared
30970         without a prototype.
30971         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
30972         Avoid checking when arguments are null.
30974 2018-01-03  Martin Sebor  <msebor@redhat.com>
30976         PR c/83559
30977         * doc/extend.texi (attribute const): Fix a typo.
30978         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
30979         issuing -Wsuggest-attribute for void functions.
30981 2018-01-03  Martin Sebor  <msebor@redhat.com>
30983         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
30984         offset_int::from instead of wide_int::to_shwi.
30985         (maybe_diag_overlap): Remove assertion.
30986         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
30987         * gimple-ssa-sprintf.c (format_directive): Same.
30988         (parse_directive): Same.
30989         (sprintf_dom_walker::compute_format_length): Same.
30990         (try_substitute_return_value): Same.
30992 2018-01-03  Jeff Law  <law@redhat.com>
30994         PR middle-end/83654
30995         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
30996         non-constant residual for zero at runtime and avoid probing in
30997         that case.  Reorganize code for trailing problem to mirror handling
30998         of the residual.
31000 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31002         PR tree-optimization/83501
31003         * tree-ssa-strlen.c (get_string_cst): New.
31004         (handle_char_store): Call get_string_cst.
31006 2018-01-03  Martin Liska  <mliska@suse.cz>
31008         PR tree-optimization/83593
31009         * tree-ssa-strlen.c: Include tree-cfg.h.
31010         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31011         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31012         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31013         to false.
31014         (strlen_dom_walker::before_dom_children): Call
31015         gimple_purge_dead_eh_edges. Dump tranformation with details
31016         dump flags.
31017         (strlen_dom_walker::before_dom_children): Update call by adding
31018         new argument cleanup_eh.
31019         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31021 2018-01-03  Martin Liska  <mliska@suse.cz>
31023         PR ipa/83549
31024         * cif-code.def (VARIADIC_THUNK): New enum value.
31025         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31026         thunks.
31028 2018-01-03  Jan Beulich  <jbeulich@suse.com>
31030         * sse.md (mov<mode>_internal): Tighten condition for when to use
31031         vmovdqu<ssescalarsize> for TI and OI modes.
31033 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31035         Update copyright years.
31037 2018-01-03  Martin Liska  <mliska@suse.cz>
31039         PR ipa/83594
31040         * ipa-visibility.c (function_and_variable_visibility): Skip
31041         functions with noipa attribure.
31043 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31045         * gcc.c (process_command): Update copyright notice dates.
31046         * gcov-dump.c (print_version): Ditto.
31047         * gcov.c (print_version): Ditto.
31048         * gcov-tool.c (print_version): Ditto.
31049         * gengtype.c (create_file): Ditto.
31050         * doc/cpp.texi: Bump @copying's copyright year.
31051         * doc/cppinternals.texi: Ditto.
31052         * doc/gcc.texi: Ditto.
31053         * doc/gccint.texi: Ditto.
31054         * doc/gcov.texi: Ditto.
31055         * doc/install.texi: Ditto.
31056         * doc/invoke.texi: Ditto.
31058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31060         * vector-builder.h (vector_builder::m_full_nelts): Change from
31061         unsigned int to poly_uint64.
31062         (vector_builder::full_nelts): Update prototype accordingly.
31063         (vector_builder::new_vector): Likewise.
31064         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31065         (vector_builder::operator ==): Likewise.
31066         (vector_builder::finalize): Likewise.
31067         * int-vector-builder.h (int_vector_builder::int_vector_builder):
31068         Take the number of elements as a poly_uint64 rather than an
31069         unsigned int.
31070         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31071         from unsigned int to poly_uint64.
31072         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31073         (vec_perm_indices::new_vector): Likewise.
31074         (vec_perm_indices::length): Likewise.
31075         (vec_perm_indices::nelts_per_input): Likewise.
31076         (vec_perm_indices::input_nelts): Likewise.
31077         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31078         number of elements per input as a poly_uint64 rather than an
31079         unsigned int.  Use the original encoding for variable-length
31080         vectors, rather than clamping each individual element.
31081         For the second and subsequent elements in each pattern,
31082         clamp the step and base before clamping their sum.
31083         (vec_perm_indices::series_p): Handle polynomial element counts.
31084         (vec_perm_indices::all_in_range_p): Likewise.
31085         (vec_perm_indices_to_tree): Likewise.
31086         (vec_perm_indices_to_rtx): Likewise.
31087         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31088         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31089         (tree_vector_builder::new_binary_operation): Handle polynomial
31090         element counts.  Return false if we need to know the number
31091         of elements at compile time.
31092         * fold-const.c (fold_vec_perm): Punt if the number of elements
31093         isn't known at compile time.
31095 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31097         * vec-perm-indices.h (vec_perm_builder): Change element type
31098         from HOST_WIDE_INT to poly_int64.
31099         (vec_perm_indices::element_type): Update accordingly.
31100         (vec_perm_indices::clamp): Handle polynomial element_types.
31101         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31102         (vec_perm_indices::all_in_range_p): Likewise.
31103         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31104         than shwi trees.
31105         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31106         polynomial vec_perm_indices element types.
31107         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31108         * fold-const.c (fold_vec_perm): Likewise.
31109         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31110         * tree-vect-generic.c (lower_vec_perm): Likewise.
31111         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31112         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31113         element type to HOST_WIDE_INT.
31115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31116             Alan Hayward  <alan.hayward@arm.com>
31117             David Sherwood  <david.sherwood@arm.com>
31119         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31120         rather than an int.  Use plus_constant.
31121         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31122         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31125             Alan Hayward  <alan.hayward@arm.com>
31126             David Sherwood  <david.sherwood@arm.com>
31128         * calls.c (emit_call_1, expand_call): Change struct_value_size from
31129         a HOST_WIDE_INT to a poly_int64.
31131 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31132             Alan Hayward  <alan.hayward@arm.com>
31133             David Sherwood  <david.sherwood@arm.com>
31135         * calls.c (load_register_parameters): Cope with polynomial
31136         mode sizes.  Require a constant size for BLKmode parameters
31137         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
31138         forces a parameter to be padded at the lsb end in order to
31139         fill a complete number of words, require the parameter size
31140         to be ordered wrt UNITS_PER_WORD.
31142 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31143             Alan Hayward  <alan.hayward@arm.com>
31144             David Sherwood  <david.sherwood@arm.com>
31146         * reload1.c (spill_stack_slot_width): Change element type
31147         from unsigned int to poly_uint64_pod.
31148         (alter_reg): Treat mode sizes as polynomial.
31150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31151             Alan Hayward  <alan.hayward@arm.com>
31152             David Sherwood  <david.sherwood@arm.com>
31154         * reload.c (complex_word_subreg_p): New function.
31155         (reload_inner_reg_of_subreg, push_reload): Use it.
31157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31158             Alan Hayward  <alan.hayward@arm.com>
31159             David Sherwood  <david.sherwood@arm.com>
31161         * lra-constraints.c (process_alt_operands): Reject matched
31162         operands whose sizes aren't ordered.
31163         (match_reload): Refer to this check here.
31165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31166             Alan Hayward  <alan.hayward@arm.com>
31167             David Sherwood  <david.sherwood@arm.com>
31169         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31170         that the mode size is in the set {1, 2, 4, 8, 16}.
31172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31173             Alan Hayward  <alan.hayward@arm.com>
31174             David Sherwood  <david.sherwood@arm.com>
31176         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31177         Use plus_constant instead of gen_rtx_PLUS.
31179 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31180             Alan Hayward  <alan.hayward@arm.com>
31181             David Sherwood  <david.sherwood@arm.com>
31183         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31184         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31185         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31186         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31187         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31188         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31189         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31190         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31191         * config/i386/i386.c (ix86_push_rounding): ...this new function.
31192         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31193         a poly_int64.
31194         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31195         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31196         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31197         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31198         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31199         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31200         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31201         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31202         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31203         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31204         function.
31205         * expr.c (emit_move_resolve_push): Treat the input and result
31206         of PUSH_ROUNDING as a poly_int64.
31207         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31208         (emit_push_insn): Likewise.
31209         * lra-eliminations.c (mark_not_eliminable): Likewise.
31210         * recog.c (push_operand): Likewise.
31211         * reload1.c (elimination_effects): Likewise.
31212         * rtlanal.c (nonzero_bits1): Likewise.
31213         * calls.c (store_one_arg): Likewise.  Require the padding to be
31214         known at compile time.
31216 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31217             Alan Hayward  <alan.hayward@arm.com>
31218             David Sherwood  <david.sherwood@arm.com>
31220         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31221         Use plus_constant instead of gen_rtx_PLUS.
31223 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31224             Alan Hayward  <alan.hayward@arm.com>
31225             David Sherwood  <david.sherwood@arm.com>
31227         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31228         rather than an int.
31230 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31231             Alan Hayward  <alan.hayward@arm.com>
31232             David Sherwood  <david.sherwood@arm.com>
31234         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31235         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31236         via stack temporaries.  Treat the mode size as polynomial too.
31238 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31239             Alan Hayward  <alan.hayward@arm.com>
31240             David Sherwood  <david.sherwood@arm.com>
31242         * expr.c (expand_expr_real_2): When handling conversions involving
31243         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31244         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
31245         as a poly_uint64 too.
31247 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31248             Alan Hayward  <alan.hayward@arm.com>
31249             David Sherwood  <david.sherwood@arm.com>
31251         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31254             Alan Hayward  <alan.hayward@arm.com>
31255             David Sherwood  <david.sherwood@arm.com>
31257         * combine.c (can_change_dest_mode): Handle polynomial
31258         REGMODE_NATURAL_SIZE.
31259         * expmed.c (store_bit_field_1): Likewise.
31260         * expr.c (store_constructor): Likewise.
31261         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31262         and polynomial REGMODE_NATURAL_SIZE.
31263         (gen_lowpart_common): Likewise.
31264         * reginfo.c (record_subregs_of_mode): Likewise.
31265         * rtlanal.c (read_modify_subreg_p): Likewise.
31267 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31268             Alan Hayward  <alan.hayward@arm.com>
31269             David Sherwood  <david.sherwood@arm.com>
31271         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31272         numbers of elements.
31274 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31275             Alan Hayward  <alan.hayward@arm.com>
31276             David Sherwood  <david.sherwood@arm.com>
31278         * match.pd: Cope with polynomial numbers of vector elements.
31280 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31281             Alan Hayward  <alan.hayward@arm.com>
31282             David Sherwood  <david.sherwood@arm.com>
31284         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31285         in a POINTER_PLUS_EXPR.
31287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31288             Alan Hayward  <alan.hayward@arm.com>
31289             David Sherwood  <david.sherwood@arm.com>
31291         * omp-simd-clone.c (simd_clone_subparts): New function.
31292         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31293         (ipa_simd_modify_function_body): Likewise.
31295 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31296             Alan Hayward  <alan.hayward@arm.com>
31297             David Sherwood  <david.sherwood@arm.com>
31299         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31300         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31301         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31302         (expand_vector_condition, vector_element): Likewise.
31303         (subparts_gt): New function.
31304         (get_compute_type): Use subparts_gt.
31305         (count_type_subparts): Delete.
31306         (expand_vector_operations_1): Use subparts_gt instead of
31307         count_type_subparts.
31309 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31310             Alan Hayward  <alan.hayward@arm.com>
31311             David Sherwood  <david.sherwood@arm.com>
31313         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31314         (vect_compile_time_alias): ...this new function.  Do the calculation
31315         on poly_ints rather than trees.
31316         (vect_prune_runtime_alias_test_list): Update call accordingly.
31318 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31319             Alan Hayward  <alan.hayward@arm.com>
31320             David Sherwood  <david.sherwood@arm.com>
31322         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31323         numbers of units.
31324         (vect_schedule_slp_instance): Likewise.
31326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31327             Alan Hayward  <alan.hayward@arm.com>
31328             David Sherwood  <david.sherwood@arm.com>
31330         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31331         constant and extern definitions for variable-length vectors.
31332         (vect_get_constant_vectors): Note that the number of units
31333         is known to be constant.
31335 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31336             Alan Hayward  <alan.hayward@arm.com>
31337             David Sherwood  <david.sherwood@arm.com>
31339         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31340         of units as polynomial.  Choose between WIDE and NARROW based
31341         on multiple_p.
31343 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31344             Alan Hayward  <alan.hayward@arm.com>
31345             David Sherwood  <david.sherwood@arm.com>
31347         * tree-vect-stmts.c (simd_clone_subparts): New function.
31348         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31351             Alan Hayward  <alan.hayward@arm.com>
31352             David Sherwood  <david.sherwood@arm.com>
31354         * tree-vect-stmts.c (vectorizable_call): Treat the number of
31355         vectors as polynomial.  Use build_index_vector for
31356         IFN_GOMP_SIMD_LANE.
31358 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31359             Alan Hayward  <alan.hayward@arm.com>
31360             David Sherwood  <david.sherwood@arm.com>
31362         * tree-vect-stmts.c (get_load_store_type): Treat the number of
31363         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31364         for variable-length vectors.
31365         (vectorizable_mask_load_store): Treat the number of units as
31366         polynomial, asserting that it is constant if the condition has
31367         already been enforced.
31368         (vectorizable_store, vectorizable_load): Likewise.
31370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31371             Alan Hayward  <alan.hayward@arm.com>
31372             David Sherwood  <david.sherwood@arm.com>
31374         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31375         of units as polynomial.  Punt if we can't tell at compile time
31376         which vector contains the final result.
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         * tree-vect-loop.c (vectorizable_induction): Treat the number
31383         of units as polynomial.  Punt on SLP inductions.  Use an integer
31384         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
31385         cast of such a series for variable-length floating-point
31386         reductions.
31388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31389             Alan Hayward  <alan.hayward@arm.com>
31390             David Sherwood  <david.sherwood@arm.com>
31392         * tree.h (build_index_vector): Declare.
31393         * tree.c (build_index_vector): New function.
31394         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31395         of units as polynomial, forcibly converting it to a constant if
31396         vectorizable_reduction has already enforced the condition.
31397         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
31398         to create a {1,2,3,...} vector.
31399         (vectorizable_reduction): Treat the number of units as polynomial.
31400         Choose vectype_in based on the largest scalar element size rather
31401         than the smallest number of units.  Enforce the restrictions
31402         relied on above.
31404 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31405             Alan Hayward  <alan.hayward@arm.com>
31406             David Sherwood  <david.sherwood@arm.com>
31408         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31409         number of units as polynomial.
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         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31416         * target.def (autovectorize_vector_sizes): Return the vector sizes
31417         by pointer, using vector_sizes rather than a bitmask.
31418         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31419         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31420         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31421         Likewise.
31422         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31423         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31424         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31425         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31426         * omp-general.c (omp_max_vf): Likewise.
31427         * omp-low.c (omp_clause_aligned_alignment): Likewise.
31428         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31429         * tree-vect-loop.c (vect_analyze_loop): Likewise.
31430         * tree-vect-slp.c (vect_slp_bb): Likewise.
31431         * doc/tm.texi: Regenerate.
31432         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31433         to a poly_uint64.
31434         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31435         the vector size as a poly_uint64 rather than an unsigned int.
31436         (current_vector_size): Change from an unsigned int to a poly_uint64.
31437         (get_vectype_for_scalar_type): Update accordingly.
31438         * tree.h (build_truth_vector_type): Take the size and number of
31439         units as a poly_uint64 rather than an unsigned int.
31440         (build_vector_type): Add a temporary overload that takes
31441         the number of units as a poly_uint64 rather than an unsigned int.
31442         * tree.c (make_vector_type): Likewise.
31443         (build_truth_vector_type): Take the number of units as a poly_uint64
31444         rather than an unsigned int.
31446 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31447             Alan Hayward  <alan.hayward@arm.com>
31448             David Sherwood  <david.sherwood@arm.com>
31450         * target.def (get_mask_mode): Take the number of units and length
31451         as poly_uint64s rather than unsigned ints.
31452         * targhooks.h (default_get_mask_mode): Update accordingly.
31453         * targhooks.c (default_get_mask_mode): Likewise.
31454         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31455         * doc/tm.texi: Regenerate.
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         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31462         * omp-general.c (omp_max_vf): Likewise.
31463         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31464         (expand_omp_simd): Handle polynomial safelen.
31465         * omp-low.c (omplow_simd_context): Add a default constructor.
31466         (omplow_simd_context::max_vf): Change from int to poly_uint64.
31467         (lower_rec_simd_input_clauses): Update accordingly.
31468         (lower_rec_input_clauses): Likewise.
31470 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31471             Alan Hayward  <alan.hayward@arm.com>
31472             David Sherwood  <david.sherwood@arm.com>
31474         * tree-vectorizer.h (vect_nunits_for_cost): New function.
31475         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31476         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31477         (vect_analyze_slp_cost): Likewise.
31478         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31479         (vect_model_load_cost): Likewise.
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-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31486         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31487         from an unsigned int * to a poly_uint64_pod *.
31488         (calculate_unrolling_factor): New function.
31489         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
31491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31492             Alan Hayward  <alan.hayward@arm.com>
31493             David Sherwood  <david.sherwood@arm.com>
31495         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31496         from an unsigned int to a poly_uint64.
31497         (_loop_vec_info::slp_unrolling_factor): Likewise.
31498         (_loop_vec_info::vectorization_factor): Change from an int
31499         to a poly_uint64.
31500         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31501         (vect_get_num_vectors): New function.
31502         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31503         (vect_get_num_copies): Use vect_get_num_vectors.
31504         (vect_analyze_data_ref_dependences): Change max_vf from an int *
31505         to an unsigned int *.
31506         (vect_analyze_data_refs): Change min_vf from an int * to a
31507         poly_uint64 *.
31508         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31509         than an unsigned HOST_WIDE_INT.
31510         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31511         (vect_analyze_data_ref_dependence): Change max_vf from an int *
31512         to an unsigned int *.
31513         (vect_analyze_data_ref_dependences): Likewise.
31514         (vect_compute_data_ref_alignment): Handle polynomial vf.
31515         (vect_enhance_data_refs_alignment): Likewise.
31516         (vect_prune_runtime_alias_test_list): Likewise.
31517         (vect_shift_permute_load_chain): Likewise.
31518         (vect_supportable_dr_alignment): Likewise.
31519         (dependence_distance_ge_vf): Take the vectorization factor as a
31520         poly_uint64 rather than an unsigned HOST_WIDE_INT.
31521         (vect_analyze_data_refs): Change min_vf from an int * to a
31522         poly_uint64 *.
31523         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31524         vfm1 as a poly_uint64 rather than an int.  Make the same change
31525         for the returned bound_scalar.
31526         (vect_gen_vector_loop_niters): Handle polynomial vf.
31527         (vect_do_peeling): Likewise.  Update call to
31528         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31529         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31530         be constant.
31531         * tree-vect-loop.c (vect_determine_vectorization_factor)
31532         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31533         (vect_get_known_peeling_cost): Likewise.
31534         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31535         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31536         (vect_transform_loop): Likewise.  Use the lowest possible VF when
31537         updating the upper bounds of the loop.
31538         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
31539         rather than an int.
31540         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31541         polynomial unroll factors.
31542         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31543         (vect_make_slp_decision): Likewise.
31544         (vect_supported_load_permutation_p): Likewise, and polynomial
31545         vf too.
31546         (vect_analyze_slp_cost): Handle polynomial vf.
31547         (vect_slp_analyze_node_operations): Likewise.
31548         (vect_slp_analyze_bb_1): Likewise.
31549         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31550         than an unsigned HOST_WIDE_INT.
31551         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31552         (vectorizable_load): Handle polynomial vf.
31553         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31554         a poly_uint64.
31555         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31558             Alan Hayward  <alan.hayward@arm.com>
31559             David Sherwood  <david.sherwood@arm.com>
31561         * match.pd: Handle bit operations involving three constants
31562         and try to fold one pair.
31564 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31566         * tree-vect-loop-manip.c: Include gimple-fold.h.
31567         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31568         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
31569         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31570         Add a path that uses a step of VF instead of 1, but disable it
31571         for now.
31572         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31573         and niters_no_overflow parameters.  Update calls to
31574         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31575         Create a new SSA name if the latter choses to use a ste other
31576         than zero, and return it via niters_vector_mult_vf_var.
31577         * tree-vect-loop.c (vect_transform_loop): Update calls to
31578         vect_do_peeling, vect_gen_vector_loop_niters and
31579         slpeel_make_loop_iterate_ntimes.
31580         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31581         (vect_gen_vector_loop_niters): Update declarations after above changes.
31583 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
31585         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31586         128-bit round to integer instructions.
31587         (ceil<mode>2): Likewise.
31588         (btrunc<mode>2): Likewise.
31589         (round<mode>2): Likewise.
31591 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31593         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31594         unaligned VSX load/store on P8/P9.
31595         (expand_block_clear): Allow the use of unaligned VSX
31596         load/store on P8/P9.
31598 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31600         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31601         New function.
31602         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31603         swap associated with both a load and a store.
31605 2018-01-02  Andrew Waterman  <andrew@sifive.com>
31607         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31608         * config/riscv/riscv.md (clear_cache): Use it.
31610 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
31612         * web.c: Remove out-of-date comment.
31614 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31616         * expr.c (fixup_args_size_notes): Check that any existing
31617         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31618         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31619         (emit_single_push_insn): ...here.
31621 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31623         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31624         (const_vector_encoded_nelts): New function.
31625         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31626         (const_vector_int_elt, const_vector_elt): Declare.
31627         * emit-rtl.c (const_vector_int_elt_1): New function.
31628         (const_vector_elt): Likewise.
31629         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31630         of CONST_VECTOR_ELT.
31632 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31634         * expr.c: Include rtx-vector-builder.h.
31635         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31636         directly on the tree encoding.
31637         (const_vector_from_tree): Likewise.
31638         * optabs.c: Include rtx-vector-builder.h.
31639         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31640         sequence of "u" values.
31641         * vec-perm-indices.c: Include rtx-vector-builder.h.
31642         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31643         directly on the vec_perm_indices encoding.
31645 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31647         * doc/rtl.texi (const_vector): Describe new encoding scheme.
31648         * Makefile.in (OBJS): Add rtx-vector-builder.o.
31649         * rtx-vector-builder.h: New file.
31650         * rtx-vector-builder.c: Likewise.
31651         * rtl.h (rtx_def::u2): Add a const_vector field.
31652         (CONST_VECTOR_NPATTERNS): New macro.
31653         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31654         (CONST_VECTOR_DUPLICATE_P): Likewise.
31655         (CONST_VECTOR_STEPPED_P): Likewise.
31656         (CONST_VECTOR_ENCODED_ELT): Likewise.
31657         (const_vec_duplicate_p): Check for a duplicated vector encoding.
31658         (unwrap_const_vec_duplicate): Likewise.
31659         (const_vec_series_p): Check for a non-duplicated vector encoding.
31660         Say that the function only returns true for integer vectors.
31661         * emit-rtl.c: Include rtx-vector-builder.h.
31662         (gen_const_vec_duplicate_1): Delete.
31663         (gen_const_vector): Call gen_const_vec_duplicate instead of
31664         gen_const_vec_duplicate_1.
31665         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31666         (gen_const_vec_duplicate): Use rtx_vector_builder.
31667         (gen_const_vec_series): Likewise.
31668         (gen_rtx_CONST_VECTOR): Likewise.
31669         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31670         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31671         Build a new vector rather than modifying a CONST_VECTOR in-place.
31672         (handle_special_swappables): Update call accordingly.
31673         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31674         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31675         Build a new vector rather than modifying a CONST_VECTOR in-place.
31676         (handle_special_swappables): Update call accordingly.
31678 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31680         * simplify-rtx.c (simplify_const_binary_operation): Use
31681         CONST_VECTOR_ELT instead of XVECEXP.
31683 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31685         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31686         the selector elements to be different from the data elements
31687         if the selector is a VECTOR_CST.
31688         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31689         ssizetype for the selector.
31691 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31693         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31694         before testing each element individually.
31695         * tree-vect-generic.c (lower_vec_perm): Likewise.
31697 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31699         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31700         * selftest-run-tests.c (selftest::run_tests): Call it.
31701         * vector-builder.h (vector_builder::operator ==): New function.
31702         (vector_builder::operator !=): Likewise.
31703         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31704         (vec_perm_indices::all_from_input_p): New function.
31705         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31706         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31707         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31708         instead of reading the VECTOR_CST directly.  Detect whether both
31709         vector inputs are the same before constructing the vec_perm_indices,
31710         and update the number of inputs argument accordingly.  Use the
31711         utility functions added above.  Only construct sel2 if we need to.
31713 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31715         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31716         the broadcast of the low byte.
31717         (expand_mult_highpart): Use an explicit encoding for the permutes.
31718         * optabs-query.c (can_mult_highpart_p): Likewise.
31719         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31720         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31721         (vectorizable_bswap): Likewise.
31722         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31723         explicit encoding for the power-of-2 permutes.
31724         (vect_permute_store_chain): Likewise.
31725         (vect_grouped_load_supported): Likewise.
31726         (vect_permute_load_chain): Likewise.
31728 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31730         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31731         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31732         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31733         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31734         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31735         (vect_gen_perm_mask_any): Likewise.
31737 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31739         * int-vector-builder.h: New file.
31740         * vec-perm-indices.h: Include int-vector-builder.h.
31741         (vec_perm_indices): Redefine as an int_vector_builder.
31742         (auto_vec_perm_indices): Delete.
31743         (vec_perm_builder): Redefine as a stand-alone class.
31744         (vec_perm_indices::vec_perm_indices): New function.
31745         (vec_perm_indices::clamp): Likewise.
31746         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31747         (vec_perm_indices::new_vector): New function.
31748         (vec_perm_indices::new_expanded_vector): Update for new
31749         vec_perm_indices class.
31750         (vec_perm_indices::rotate_inputs): New function.
31751         (vec_perm_indices::all_in_range_p): Operate directly on the
31752         encoded form, without computing elided elements.
31753         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31754         encoding.  Update for new vec_perm_indices class.
31755         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31756         the given vec_perm_builder.
31757         (expand_vec_perm_var): Update vec_perm_builder constructor.
31758         (expand_mult_highpart): Use vec_perm_builder instead of
31759         auto_vec_perm_indices.
31760         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31761         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
31762         or double series encoding as appropriate.
31763         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31764         vec_perm_indices instead of auto_vec_perm_indices.
31765         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31766         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31767         (vect_permute_store_chain): Likewise.
31768         (vect_grouped_load_supported): Likewise.
31769         (vect_permute_load_chain): Likewise.
31770         (vect_shift_permute_load_chain): Likewise.
31771         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31772         (vect_transform_slp_perm_load): Likewise.
31773         (vect_schedule_slp_instance): Likewise.
31774         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31775         (vectorizable_mask_load_store): Likewise.
31776         (vectorizable_bswap): Likewise.
31777         (vectorizable_store): Likewise.
31778         (vectorizable_load): Likewise.
31779         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31780         vec_perm_indices instead of auto_vec_perm_indices.  Use
31781         tree_to_vec_perm_builder to read the vector from a tree.
31782         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31783         vec_perm_builder instead of a vec_perm_indices.
31784         (have_whole_vector_shift): Use vec_perm_builder and
31785         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
31786         truncation to calc_vec_perm_mask_for_shift.
31787         (vect_create_epilog_for_reduction): Likewise.
31788         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31789         from auto_vec_perm_indices to vec_perm_indices.
31790         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31791         instead of changing individual elements.
31792         (aarch64_vectorize_vec_perm_const): Use new_vector to install
31793         the vector in d.perm.
31794         * config/arm/arm.c (expand_vec_perm_d::perm): Change
31795         from auto_vec_perm_indices to vec_perm_indices.
31796         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31797         instead of changing individual elements.
31798         (arm_vectorize_vec_perm_const): Use new_vector to install
31799         the vector in d.perm.
31800         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31801         Update vec_perm_builder constructor.
31802         (rs6000_expand_interleave): Likewise.
31803         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31804         (rs6000_expand_interleave): Likewise.
31806 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31808         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31809         to qimode could truncate the indices.
31810         * optabs.c (expand_vec_perm_var): Likewise.
31812 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31814         * Makefile.in (OBJS): Add vec-perm-indices.o.
31815         * vec-perm-indices.h: New file.
31816         * vec-perm-indices.c: Likewise.
31817         * target.h (vec_perm_indices): Replace with a forward class
31818         declaration.
31819         (auto_vec_perm_indices): Move to vec-perm-indices.h.
31820         * optabs.h: Include vec-perm-indices.h.
31821         (expand_vec_perm): Delete.
31822         (selector_fits_mode_p, expand_vec_perm_var): Declare.
31823         (expand_vec_perm_const): Declare.
31824         * target.def (vec_perm_const_ok): Replace with...
31825         (vec_perm_const): ...this new hook.
31826         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31827         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31828         * doc/tm.texi: Regenerate.
31829         * optabs.def (vec_perm_const): Delete.
31830         * doc/md.texi (vec_perm_const): Likewise.
31831         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31832         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31833         expand_vec_perm for constant permutation vectors.  Assert that
31834         the mode of variable permutation vectors is the integer equivalent
31835         of the mode that is being permuted.
31836         * optabs-query.h (selector_fits_mode_p): Declare.
31837         * optabs-query.c: Include vec-perm-indices.h.
31838         (selector_fits_mode_p): New function.
31839         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31840         is defined, instead of checking whether the vec_perm_const_optab
31841         exists.  Use targetm.vectorize.vec_perm_const instead of
31842         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
31843         fit in the vector mode before using a variable permute.
31844         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31845         vec_perm_indices instead of an rtx.
31846         (expand_vec_perm): Replace with...
31847         (expand_vec_perm_const): ...this new function.  Take the selector
31848         as a vec_perm_indices rather than an rtx.  Also take the mode of
31849         the selector.  Update call to shift_amt_for_vec_perm_mask.
31850         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31851         Use vec_perm_indices::new_expanded_vector to expand the original
31852         selector into bytes.  Check whether the indices fit in the vector
31853         mode before using a variable permute.
31854         (expand_vec_perm_var): Make global.
31855         (expand_mult_highpart): Use expand_vec_perm_const.
31856         * fold-const.c: Includes vec-perm-indices.h.
31857         * tree-ssa-forwprop.c: Likewise.
31858         * tree-vect-data-refs.c: Likewise.
31859         * tree-vect-generic.c: Likewise.
31860         * tree-vect-loop.c: Likewise.
31861         * tree-vect-slp.c: Likewise.
31862         * tree-vect-stmts.c: Likewise.
31863         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31864         Delete.
31865         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31866         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31867         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31868         (aarch64_vectorize_vec_perm_const): ...this new function.
31869         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31870         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31871         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31872         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31873         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31874         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31875         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31876         into...
31877         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
31878         check for NEON modes.
31879         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31880         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31881         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31882         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31883         into...
31884         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
31885         the old VEC_PERM_CONST conditions.
31886         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31887         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31888         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31889         (ia64_vectorize_vec_perm_const_ok): Merge into...
31890         (ia64_vectorize_vec_perm_const): ...this new function.
31891         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31892         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31893         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31894         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31895         * config/mips/mips.c (mips_expand_vec_perm_const)
31896         (mips_vectorize_vec_perm_const_ok): Merge into...
31897         (mips_vectorize_vec_perm_const): ...this new function.
31898         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31899         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31900         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31901         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31902         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31903         (rs6000_expand_vec_perm_const): Delete.
31904         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31905         Delete.
31906         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31907         (altivec_expand_vec_perm_const_le): Take each operand individually.
31908         Operate on constant selectors rather than rtxes.
31909         (altivec_expand_vec_perm_const): Likewise.  Update call to
31910         altivec_expand_vec_perm_const_le.
31911         (rs6000_expand_vec_perm_const): Delete.
31912         (rs6000_vectorize_vec_perm_const_ok): Delete.
31913         (rs6000_vectorize_vec_perm_const): New function.
31914         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31915         an element count and rtx array.
31916         (rs6000_expand_extract_even): Update call accordingly.
31917         (rs6000_expand_interleave): Likewise.
31918         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31919         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31920         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31921         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31922         (rs6000_expand_vec_perm_const): Delete.
31923         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31924         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31925         (altivec_expand_vec_perm_const_le): Take each operand individually.
31926         Operate on constant selectors rather than rtxes.
31927         (altivec_expand_vec_perm_const): Likewise.  Update call to
31928         altivec_expand_vec_perm_const_le.
31929         (rs6000_expand_vec_perm_const): Delete.
31930         (rs6000_vectorize_vec_perm_const_ok): Delete.
31931         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
31932         reference to the SPE evmerge intructions.
31933         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31934         an element count and rtx array.
31935         (rs6000_expand_extract_even): Update call accordingly.
31936         (rs6000_expand_interleave): Likewise.
31937         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31938         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31939         new function.
31940         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31942 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31944         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31945         vector mode and that that mode matches the mode of the data
31946         being permuted.
31947         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31948         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
31949         directly using expand_vec_perm_1 when forcing selectors into
31950         registers.
31951         (expand_vec_perm_var): New function, split out from expand_vec_perm.
31953 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31955         * optabs-query.h (can_vec_perm_p): Delete.
31956         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
31957         * optabs-query.c (can_vec_perm_p): Split into...
31958         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
31959         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
31960         particular selector is valid.
31961         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31962         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31963         (vect_grouped_load_supported): Likewise.
31964         (vect_shift_permute_load_chain): Likewise.
31965         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31966         (vect_transform_slp_perm_load): Likewise.
31967         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31968         (vectorizable_bswap): Likewise.
31969         (vect_gen_perm_mask_checked): Likewise.
31970         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
31971         implementations of variable permutation vectors into account
31972         when deciding which selector to use.
31973         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
31974         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
31975         with a false third argument.
31976         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
31977         to test whether the constant selector is valid and can_vec_perm_var_p
31978         to test whether a variable selector is valid.
31980 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31982         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
31983         * optabs-query.c (can_vec_perm_p): Likewise.
31984         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
31985         instead of vec_perm_indices.
31986         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
31987         (vect_gen_perm_mask_checked): Likewise,
31988         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
31989         (vect_gen_perm_mask_checked): Likewise,
31991 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31993         * optabs-query.h (qimode_for_vec_perm): Declare.
31994         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
31995         (qimode_for_vec_perm): ...this new function.
31996         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
31998 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32000         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32001         does not have a conditional at the top.
32003 2018-01-02  Richard Biener  <rguenther@suse.de>
32005         * ipa-inline.c (big_speedup_p): Fix expression.
32007 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32009         PR target/81616
32010         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32011         for generic 4->6.
32013 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32015         PR target/81616
32016         Generic tuning.
32017         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32018         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32019         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32020         cond_taken_branch_cost 3->4.
32022 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
32024         PR tree-optimization/83581
32025         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32026         TODO_cleanup_cfg if any changes have been made.
32028         PR middle-end/83608
32029         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32030         convert_modes if target mode has the right side, but different mode
32031         class.
32033         PR middle-end/83609
32034         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32035         last argument when extracting from CONCAT.  If either from_real or
32036         from_imag is NULL, use expansion through memory.  If result is not
32037         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32038         the parts directly to inner mode, if even that fails, use expansion
32039         through memory.
32041         PR middle-end/83623
32042         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32043         check for bswap in mode rather than HImode and use that in expand_unop
32044         too.
32046 Copyright (C) 2018 Free Software Foundation, Inc.
32048 Copying and distribution of this file, with or without modification,
32049 are permitted in any medium without royalty provided the copyright
32050 notice and this notice are preserved.