2018-10-23 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blobf0820c086afafe805491c3f08375d23aadb34695
1 2018-10-23  Richard Biener  <rguenther@suse.de>
3         * tree-vrp.c (add_assert_info): Guard dump_printf with
4         dump_enabled_p.
5         * gimple-ssa-evrp-analyze.c
6         (evrp_range_analyzer::record_ranges_from_incoming_edge):
7         Use value_range::ignore_equivs_equal_p.
9 2018-10-23  Richard Biener  <rguenther@suse.de>
11         PR tree-optimization/87105
12         PR tree-optimization/87608
13         * passes.def (pass_all_early_optimizations): Add early phi-opt
14         after dce.
15         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
16         addition to debug stmts.
17         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
18         and abs replacement early.
19         * tree-cfg.c (gimple_empty_block_p): Likewise.
21 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
23         PR target/86383
24         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
25         specified to configure.
26         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
28 2018-10-23  Richard Biener  <rguenther@suse.de>
30         PR tree-optimization/87700
31         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
33 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
35         PR target/87674
36         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
37         second argument from __mmask16 to __mmask8.
38         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
39         _mm_mask_packs_epi32): Likewise.
40         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
41         Likewise.
42         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
44 2018-10-23  Richard Biener  <rguenther@suse.de>
46         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
48 2018-10-23  Richard Biener  <rguenther@suse.de>
50         PR tree-optimization/86144
51         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
52         over simd attribute.
54 2018-10-23  Richard Biener  <rguenther@suse.de>
56         PR tree-optimization/87693
57         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
58         the case we do not find the taken edge.
60 2018-10-22  Paul Koning  <ni1d@arrl.net>
62         * symtab.c (symtab_node::increase_alignment): Correct max
63         alignment check.
65 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
67         PR tree-optimization/87633
68         * match.pd: Do not generate unordered integer comparisons.
70 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
72         PR rtl-optimization/87600
73         * combine.c: Add include of expr.h.
74         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
75         register to a pseudo.
76         (make_more_copies): New function, add a copy to a new pseudo after
77         the moves from hard registers into pseudos.
78         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
79         later.  Call make_more_copies.
81 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
83         * lra-constraints.c (process_alt_operands): New local array,
84         matching_early_clobber.  Check matching_early_clobber before
85         decrementing reject, and set matching_early_clobber after.
87 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
89         PR target/87598
90         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
91         call output_addr_const and hope for the best.
93 2018-10-22  Richard Biener  <rguenther@suse.de>
95         * gimple-ssa-evrp-analyze.c
96         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
97         smarter about what ranges to use.
98         * tree-vrp.c (add_assert_info): Dump here.
99         (register_edge_assert_for_2): Instead of here at multiple but
100         not all places.
102         * gcc.dg/tree-ssa/evrp12.c: New testcase.
103         * gcc.dg/predict-6.c: Adjust.
104         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
105         * gcc.dg/tree-ssa/vrp02.c: Likewise.
106         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
108 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
109         Richard Biener  <rguenther@suse.de>
111         * bitmap.h: Update data structure documentation, including a
112         description of bitmap views as either linked-lists or splay trees.
113         (struct bitmap_element_def): Update comments for splay tree bitmaps.
114         (struct bitmap_head_def): Likewise.
115         (bitmap_list_view, bitmap_tree_view): New prototypes.
116         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
117         tree_form fields.
118         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
119         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
120         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
121         released bitmap element here.
122         (bitmap_element_free): Remove.
123         (bitmap_elt_clear_from): Work on splay tree bitmaps.
124         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
125         this function similar ones such that linked-list bitmap implementation
126         functions are grouped.
127         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
128         and moved for grouping.
129         (bitmap_list_insert_element_after): Renamed from
130         bitmap_elt_insert_after, and moved for grouping.
131         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
132         (bitmap_tree_link_left, bitmap_tree_link_right,
133         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
134         bitmap_tree_link_element, bitmap_tree_unlink_element,
135         bitmap_tree_find_element): New functions for splay-tree bitmap
136         implementation.
137         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
138         Renamed and moved, see above entries.
139         (bitmap_tree_listify_from): New function to convert part of a splay
140         tree bitmap to a linked-list bitmap.
141         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
142         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
143         (bitmap_find_bit): Remove.
144         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
145         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
146         Handle splay tree bitmaps.
147         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
148         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
149         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
150         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
151         bitmap_intersect_compl_p, bitmap_ior_and_compl,
152         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
153         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
154         corresponding changes to use linked-list specific bitmap_element
155         manipulation functions as applicable for efficiency.
156         (bitmap_tree_to_vec): New function.
157         (debug_bitmap_elt_file): New function split out from ...
158         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
159         (bitmap_print): Likewise.
161         PR tree-optimization/63155
162         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
163         SSA edge worklists.
164         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
165         in tree-view.
167 2018-10-22  Martin Liska  <mliska@suse.cz>
169         PR tree-optimization/87686
170         Revert
171         2018-08-29  Martin Liska  <mliska@suse.cz>
173         * tree-switch-conversion.c (switch_conversion::expand):
174         Strenghten assumption about gswitch statements.
176 2018-10-22  Martin Liska  <mliska@suse.cz>
178         * ipa-icf.c (sem_item::compare_attributes): Remove.
179         (sem_item::compare_referenced_symbol_properties): Use
180         attribute_list_equal instead.
181         (sem_function::equals_wpa): Likewise.
182         * ipa-icf.h: Remove compare_attributes.
184 2018-10-22  Richard Biener  <rguenther@suse.de>
186         PR middle-end/87682
187         * mem-stats.h (mem_usage::operator==): Fix pasto.
189 2018-10-22  Richard Biener  <rguenther@suse.de>
191         PR tree-optimization/87640
192         * tree-vrp.c (set_value_range_with_overflow): Decompose
193         incomplete result.
194         (extract_range_from_binary_expr_1): Adjust.
196 2018-10-22  Martin Jambor  <mjambor@suse.cz>
198         * tree-eh.h (stmt_could_throw_p): Add function parameter.
199         (stmt_can_throw_external): Likewise.
200         (stmt_can_throw_internal): Likewise.
201         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
202         (lower_eh_constructs_2): Likewise.
203         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
204         (stmt_can_throw_external): Likewise.
205         (stmt_can_throw_internal): Likewise.
206         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
207         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
208         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
209         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
210         (pass_lower_eh_dispatch::execute): Pass cfun to
211         stmt_can_throw_external.
212         (cleanup_empty_eh): Likewise.
213         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
214         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
215         stmt_can_throw_external instead of pushing it to cfun.
216         (symbol_table::create_edge): Likewise.
217         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
218         stmt_can_throw_internal.
219         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
220         to stmt_could_throw_p.
221         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
222         stmt_can_throw_internal.
223         (pass_store_merging::execute): Likewise.
224         * gimple-ssa-strength-reduction.c
225         (find_candidates_dom_walker::before_dom_children): Pass cfun to
226         stmt_could_throw_p.
227         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
228         stmt_can_throw_internal.
229         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
230         to stmt_can_throw_external.
231         (check_stmt): Pass cfun to stmt_could_throw_p.
232         (check_stmt): Pass cfun to stmt_can_throw_external.
233         (pass_nothrow::execute): Likewise.
234         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
235         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
236         stmt_can_throw_internal.
237         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
238         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
239         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
240         * tree-complex.c (expand_complex_libcall): Pass cfun to
241         stmt_could_throw_p and to stmt_can_throw_internal.
242         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
243         * tree-inline.c (copy_edges_for_bb): Likewise.
244         (maybe_move_debug_stmts_to_successors): Likewise.
245         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
246         stmt_could_throw_p.
247         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
248         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
249         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
250         stmt_can_throw_internal.
251         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
252         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
253         stmt_could_throw_p.
254         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
255         stmt_can_throw_internal.
256         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
257         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
258         stmt_could_throw_p.
259         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
260         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
261         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
262         (convert_mult_to_fma_1): Likewise.
263         (convert_to_divmod): Likewise.
264         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
265         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
266         * tree-ssa-propagate.c
267         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
268         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
269         (maybe_optimize_range_tests): Likewise.
270         (linearize_expr_tree): Likewise.
271         (reassociate_bb): Likewise.
272         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
273         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
274         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
275         (handle_char_store): Likewise.
276         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
277         stmt_can_throw_internal.
278         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
279         stmt_could_throw_p.
280         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
281         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
282         (vectorizable_simd_clone_call): Likewise.
283         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
284         (gimple_stringop_fixed_value): Likewise.
286 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
288         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
289         literal pool references.
290         (s390_check_qrst_address): Adapt to the new behavior of
291         s390_loadrelative_operand_p ().
293 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
295         PR target/72782
296         * config/i386/sse.md (*andnot<mode>3_bcst): New.
298 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
300         PR target/72782
301         * config/i386/sse.md (*<code><mode>3_bcst): New.
303 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
305         PR target/72782
306         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
307         V4DI, V16SI and V8DI.
308         (*sub<mode>3<mask_name>_bcst): New.
309         (*add<mode>3<mask_name>_bcst): Likewise.
311 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
313         PR target/72782
314         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
315         __builtin_ia32_vfnmsubpd512_mask.
316         (_mm512_mask_fnmsub_round_pd): Likewise.
317         (_mm512_fnmsub_pd): Likewise.
318         (_mm512_mask_fnmsub_pd): Likewise.
319         (_mm512_maskz_fnmsub_round_pd): Use
320         __builtin_ia32_vfnmsubpd512_maskz.
321         (_mm512_maskz_fnmsub_pd): Likewise.
322         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
323         (_mm512_mask_fnmsub_round_ps): Likewise.
324         (_mm512_fnmsub_ps): Likewise.
325         (_mm512_mask_fnmsub_ps): Likewise.
326         (_mm512_maskz_fnmsub_round_ps): Use
327         __builtin_ia32_vfnmsubps512_maskz.
328         (_mm512_maskz_fnmsub_ps): Likewise.
329         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
330         __builtin_ia32_vfnmsubpd256_mask.
331         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
332         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
333         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
334         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
335         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
336         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
337         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
338         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
339         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
340         __builtin_ia32_vfnmsubpd.
341         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
342         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
343         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
344         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
345         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
346         * config/i386/i386-builtin.def: Add
347         __builtin_ia32_vfnmsubpd256_mask,
348         __builtin_ia32_vfnmsubpd256_maskz,
349         __builtin_ia32_vfnmsubpd128_mask,
350         __builtin_ia32_vfnmsubpd128_maskz,
351         __builtin_ia32_vfnmsubps256_mask,
352         __builtin_ia32_vfnmsubps256_maskz,
353         __builtin_ia32_vfnmsubps128_mask,
354         __builtin_ia32_vfnmsubps128_maskz,
355         __builtin_ia32_vfnmsubpd512_mask,
356         __builtin_ia32_vfnmsubpd512_maskz,
357         __builtin_ia32_vfnmsubps512_mask,
358         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
359         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
360         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
361         __builtin_ia32_vfnmsubpd256.
362         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
363         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
364         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
365         Likewise.
366         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
367         Likewise.
368         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
369         Likewise.
370         (fmai_vmfnmsub_<mode><round_name>): Likewise.
372 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
374         PR target/72782
375         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
376         __builtin_ia32_vfnmaddpd512_mask.
377         (_mm512_mask_fnmadd_round_pd): Likewise.
378         (_mm512_fnmadd_pd): Likewise.
379         (_mm512_mask_fnmadd_pd): Likewise.
380         (_mm512_maskz_fnmadd_round_pd): Use
381         __builtin_ia32_vfnmaddpd512_maskz.
382         (_mm512_maskz_fnmadd_pd): Likewise.
383         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
384         (_mm512_mask_fnmadd_round_ps): Likewise.
385         (_mm512_fnmadd_ps): Likewise.
386         (_mm512_mask_fnmadd_ps): Likewise.
387         (_mm512_maskz_fnmadd_round_ps): Use
388         __builtin_ia32_vfnmaddps512_maskz.
389         (_mm512_maskz_fnmadd_ps): Likewise.
390         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
391         __builtin_ia32_vfnmaddpd256_mask.
392         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
393         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
394         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
395         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
396         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
397         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
398         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
399         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
400         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
401         __builtin_ia32_vfnmaddpd.
402         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
403         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
404         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
405         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
406         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
407         * config/i386/i386-builtin.def: Add
408         __builtin_ia32_vfnmaddpd256_mask,
409         __builtin_ia32_vfnmaddpd256_maskz,
410         __builtin_ia32_vfnmaddpd128_mask,
411         __builtin_ia32_vfnmaddpd128_maskz,
412         __builtin_ia32_vfnmaddps256_mask,
413         __builtin_ia32_vfnmaddps256_maskz,
414         __builtin_ia32_vfnmaddps128_mask,
415         __builtin_ia32_vfnmaddps128_maskz,
416         __builtin_ia32_vfnmaddpd512_mask,
417         __builtin_ia32_vfnmaddpd512_maskz,
418         __builtin_ia32_vfnmaddps512_mask,
419         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
420         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
421         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
422         __builtin_ia32_vfnmaddpd256.
423         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
424         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
425         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
426         Likewise.
427         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
428         Likewise.
429         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
430         Likewise.
431         (fmai_vmfnmadd_<mode><round_name>): Likewise.
433 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
435         PR target/72782
436         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
437         __builtin_ia32_vfmsubpd512_mask.
438         (_mm512_mask_fmsub_round_pd): Likewise.
439         (_mm512_fmsub_pd): Likewise.
440         (_mm512_mask_fmsub_pd): Likewise.
441         (_mm512_maskz_fmsub_round_pd): Use
442         __builtin_ia32_vfmsubpd512_maskz.
443         (_mm512_maskz_fmsub_pd): Likewise.
444         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
445         (_mm512_mask_fmsub_round_ps): Likewise.
446         (_mm512_fmsub_ps): Likewise.
447         (_mm512_mask_fmsub_ps): Likewise.
448         (_mm512_maskz_fmsub_round_ps): Use
449         __builtin_ia32_vfmsubps512_maskz.
450         (_mm512_maskz_fmsub_ps): Likewise.
451         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
452         __builtin_ia32_vfmsubpd256_mask.
453         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
454         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
455         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
456         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
457         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
458         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
459         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
460         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
461         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
462         __builtin_ia32_vfmsubpd.
463         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
464         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
465         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
466         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
467         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
468         * config/i386/i386-builtin.def: Add
469         __builtin_ia32_vfmsubpd256_mask,
470         __builtin_ia32_vfmsubpd256_maskz,
471         __builtin_ia32_vfmsubpd128_mask,
472         __builtin_ia32_vfmsubpd128_maskz,
473         __builtin_ia32_vfmsubps256_mask,
474         __builtin_ia32_vfmsubps256_maskz,
475         __builtin_ia32_vfmsubps128_mask,
476         __builtin_ia32_vfmsubps128_maskz,
477         __builtin_ia32_vfmsubpd512_mask,
478         __builtin_ia32_vfmsubpd512_maskz,
479         __builtin_ia32_vfmsubps512_mask,
480         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
481         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
482         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
483         __builtin_ia32_vfmsubpd256.
484         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
485         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
486         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
487         Likewise.
488         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
489         Likewise.
490         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
491         Likewise.
492         (fmai_vmfmsub_<mode><round_name>): Likewise.
494 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
496         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
497         Remove plus.  Renamed to ...
498         (*sub<mode>3<mask_name>_bcst): This.
499         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
500         (*add<mode>3<mask_name>_bcst): This.
502 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
504         PR target/72782
505         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
507 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
509         PR target/87662
510         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
511         (_mm_or_epi32): Likewise.
512         (_mm256_xor_epi32): Likewise.
513         (_mm_xor_epi32): Likewise.
514         (_mm256_or_epi64): Likewise.
515         (_mm_or_epi64): Likewise.
516         (_mm256_xor_epi64): Likewise.
517         (_mm_xor_epi64): Likewise.
519 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
521         PR target/72782
522         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
524 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
526         PR middle-end/87647
527         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
529 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
531         * doc/ux.texi: Move @section directly after @node.
533 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
535         PR middle-end/85488
536         PR middle-end/87649
537         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
538         depend closely nested inside of loop with ordered clause with
539         a parameter.
541 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
543         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
544         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
545         * doc/ux.texi: New file.
547 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
549         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
550         be the first CR field allocated.
552 2018-10-19  Richard Biener  <rguenther@suse.de>
554         PR target/87657
555         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
556         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
558 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
560         PR target/72782
561         * config/i386/sse.md
562         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
563         (*add<mode>3<mask_name>_bcst_2): Likewise.
565 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
567         * config/i386/sse.md
568         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
569         Replace nonimmediate_operand with register_operand.
570         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
571         Likewise.
572         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
573         Likewise.
575 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
577         PR rtl-optimization/87596
578         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
579         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
580         for instructions in FROM..TO range.
582 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
584         * cfgexpand.c (expand_one_var): Use specific wording in error message
585         for non-local frame variables.
586         * stor-layout.c (layout_decl): Do not issue a warning for them.
588 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
590         * haifa-sched.c (priority): Add force_recompute parameter.
591         (apply_replacement): Call priority () with force_recompute = true.
592         (restore_pattern): Likewise.
594 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
596         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
597         HOST_BITS_PER_WIDE_INT.
598         (test_vector_ops_duplicate): Likewise.
600 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
602         PR target/72782
603         * config/i386/sse.md (VF_AVX512): New.
604         (avx512bcst): Likewise.
605         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
606         Likewise.
607         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
608         Likewise.
609         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
610         Likewise.
612 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
614         * doc/invoke.texi (-dumpversion): Improve grammar.
615         (-dumpfullversion): Make more consistent with -dumpversion.
617 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
619         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
620         Set JUMP_LABEL to the jump insn.
621         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
622         Predict emitted jump and add label to jump insn.
624 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
626         PR tree-optimization/87562
627         * input.c (get_substring_ranges_for_loc): Use
628         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
629         getting the linemap for the endpoint.  Verify that it's either
630         in the same linemap as the start point's spelling location, or
631         at least in the same file.
633 2018-10-18  Richard Biener  <rguenther@suse.de>
635         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
636         feed width-specific load/store costs through ix86_vec_cost.
637         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
638         (k8_cost): Likewise.
639         (bdver_cost): Likewise.
640         (znver1_cost): Likewise.
641         (btver1_cost): Likewise.
642         (btver2_cost): Likewise.
644 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
646         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
647         to simplify subreg of vec_merge.
649 2018-10-18  Richard Biener  <rguenther@suse.de>
651         * config/i386/i386.c: Fix costing of vector FMA.
653 2018-10-18  Richard Biener  <rguenther@suse.de>
655         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
656         and argument.
657         (ix86_builtin_vectorization_cost): For vec_construct properly
658         cost insertion into SSE regs.
659         (...): Adjust calls to ix86_vec_cost.
661 2018-10-18  Richard Biener  <rguenther@suse.de>
663         PR middle-end/87087
664         Revert
665         2018-02-07  Richard Biener  <rguenther@suse.de>
667         PR tree-optimization/84204
668         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
669         this place.
671 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
673         PR target/87537
674         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
675         of vec_duplicate.
676         (test_vector_ops_duplicate): Add test for a scalar subreg of a
677         VEC_MERGE of a VEC_DUPLICATE.
679 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
681         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
682         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
683         * doc/standards.texi (C Language): Document C2X.
684         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
685         (rl78_option_override): Handle "GNU C2X" language name.
687 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
689         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
690         Document C17 as published in 2018.
692 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
694         PR middle-end/87623
695         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
696         bail out if both sides do not have the same storage order.
698 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
700         * bitmap.c (bitmap_head::dump): New.
701         * bitmap.h (bitmap_head): Add dump().
702         * gimple-ssa-evrp-analyze.c
703         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
704         (evrp_range_analyzer::set_ssa_range_info): Same.
705         (evrp_range_analyzer::record_ranges_from_phis): Same.
706         (evrp_range_analyzer::record_ranges_from_stmt): Same.
707         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
708         * gimple-ssa-sprintf.c (get_int_range): Same.
709         (format_integer): Same.
710         (sprintf_dom_walker::handle_gimple_call): Same.
711         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
712         (ipcp_vr_lattice::top_p): Same.
713         (ipcp_vr_lattice::bottom_p): Same.
714         (ipcp_vr_lattice::set_to_bottom): Same.
715         (ipa_vr_operation_and_type_effects): Same.
716         (propagate_vr_across_jump_function): Same.
717         (ipcp_store_vr_results): Same.
718         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
719         (ipa_print_node_jump_functions_for_edge): Same.
720         (ipa_get_value_range): Same.
721         (ipa_compute_jump_functions_for_edge): Same.
722         (ipa_write_jump_function): Same.
723         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
724         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
725         Same.
726         * vr-values.c (set_value_range_to_nonnegative): Same.
727         (set_value_range_to_truthvalue): Same.
728         (vr_values::get_value_range): Same.
729         (vr_values::set_defs_to_varying): Same.
730         (vr_values::update_value_range): Same.
731         (symbolic_range_based_on_p): Same.
732         (vr_values::op_with_boolean_value_range_p): Same.
733         (vr_values::extract_range_for_var_from_comparison_expr): Same.
734         (vr_values::extract_range_from_ssa_name): Same.
735         (vr_values::extract_range_from_binary_expr): Same.
736         (vr_values::extract_range_from_unary_expr): Same.
737         (vr_values::extract_range_from_cond_expr): Same.
738         (vr_values::extract_range_from_comparison): Same.
739         (vr_values::check_for_binary_op_overflow): Same.
740         (vr_values::extract_range_basic): Same.
741         (vr_values::extract_range_from_assignment): Same.
742         (compare_ranges): Same.
743         (compare_range_with_value): Same.
744         (vr_values::adjust_range_with_scev): Same.
745         (vrp_valueize): Same.
746         (vrp_valueize_1): Same.
747         (vr_values::get_vr_for_comparison): Same.
748         (vr_values::compare_name_with_value): Same.
749         (vr_values::compare_names): Same.
750         (vr_values::vrp_evaluate_conditional): Same.
751         (find_case_label_ranges): Same.
752         (vr_values::vrp_visit_switch_stmt): Same.
753         (vr_values::extract_range_from_phi_node): Same.
754         (vr_values::simplify_div_or_mod_using_ranges): Same.
755         (vr_values::simplify_bit_ops_using_ranges): Same.
756         (test_for_singularity): Same.
757         (range_fits_type_p): Same.
758         (vr_values::simplify_cond_using_ranges_1): Same.
759         (vr_values::simplify_switch_using_ranges): Same.
760         (vr_values::simplify_float_conversion_using_ranges): Same.
761         (vr_values::two_valued_val_range_p): Same.
762         (vr_values::add_equivalence): Move to value_range::equiv_add.
763         * vr-values.h (vr_values::add_equivalence): Remove.
764         (VR_INITIALIZER): Remove.
765         * tree-vrp.c (value_range::set): New.
766         (value_range::equiv_add): New.
767         (value_range::value_range): New.
768         (value_range::deep_copy): New.
769         (value_range::check): New.
770         (value_range::equal_p): New.
771         (value_range::ignore_equivs_equal_p): New.
772         (value_range::operator==): New.
773         (value_range::operator!=): New.
774         (value_range::symbolic_p): New.
775         (value_range::numeric_p): New.
776         (value_range::set_undefined): New.
777         (value_range::set_varying): New.
778         (value_range::may_contain_p): New.
779         (value_range::equiv_clear): New.
780         (value_range::singleton_p): New.
781         (value_range::intersect): New.
782         (value_range::dump): New.
783         (value_range::set_and_canonicalize): New.
784         (set_value_range): Adjust for value_range API.
785         (set_value_range_to_undefined): Same.
786         (set_value_range_to_varying): Same.
787         (set_and_canonicalize_value_range): Same.
788         (set_value_range_to_nonnull): Same.
789         (set_value_range_to_null): Same.
790         (range_is_null): Same.
791         (range_is_nonnull): Same.
792         (range_int_cst_p): Same.
793         (range_int_cst_singleton_p): Same.
794         (symbolic_range_p): Same.
795         (range_includes_zero_p): Same.
796         (value_range_constant_singleton): Same.
797         (vrp_set_zero_nonzero_bits): Same.
798         (ranges_from_anti_range): Same.
799         (extract_range_into_wide_ints): Same.
800         (extract_range_from_multiplicative_op): Same.
801         (set_value_range_with_overflow): Same.
802         (extract_range_from_binary_expr_1): Same.
803         (extract_range_from_unary_expr): Same.
804         (dump_value_range): Same.
805         (debug_value_range): Same.
806         (vrp_prop::check_array_ref): Same.
807         (vrp_prop::check_mem_ref): Same.
808         (vrp_prop::vrp_initialize): Same.
809         (vrp_prop::visit_stmt): Same.
810         (intersect_ranges): Same.
811         (vrp_prop::visit_phi): Same.
812         (vrp_prop::vrp_finalize): Same.
813         (determine_value_range_1): Same.
814         (determine_value_range): Same.
815         (vrp_intersect_ranges_1): Rename to...
816         (vrp_intersect_1): this.
817         (vrp_intersect_ranges): Rename to...
818         (value_range::intersect_helper): ...this.
819         (vrp_meet_1): Rename to...
820         (value_range::union_helper): ...this.
821         (vrp_meet): Rename to...
822         (value_range::union_): ...this.
823         (copy_value_range): Remove.
824         * tree-vrp.h (struct value_range): Rewrite into a proper class.
825         (value_range::vrtype): New.
826         (value_range::type): New.
827         (value_range::equiv): New.
828         (value_range::min): New.
829         (value_range::max): New.
830         (value_range::varying_p): New.
831         (value_range::undefined_p): New.
832         (value_range::null_p): New.
833         (value_range::equiv_add): New.
834         (copy_value_range): Remove.
836 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
838         * Makefile.in (SELFTEST_TARGETS): New.
839         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
840         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
841         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
842         c/Make-lang.in.
843         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
844         (selftest-c++-gdb, selftest-c++-valgrind): Move to
845         cp/Make-lang.in.
846         * configure: Regenerate.
847         * configure.ac (selftest_languages): New.
849 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
851         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
852         overflow wraps argument.
853         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
854         wide_int_range_multiplicative_op.
855         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
856         overflow wraps argument.
857         (wide_int_range_multiplicative_op): Same.
858         (wide_int_range_lshift): Same.
859         (wide_int_range_div): Same.
860         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
861         (wide_int_range_lshift): Same.
862         (wide_int_range_div): Same.
864 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
866         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
867         use sign as argument.
868         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
869         wide_int_range_shift_undefined_p.
871 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
873         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
874         Rename to...
875         (@despeculate_copy<ALLI_TI:mode>): ... This.
876         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
877         switch statement.
879 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
881         * config.gcc: Obsolete *-*-solaris2.10*.
882         * doc/install.texi (Specific, *-*-solaris2*): Document it.
884 2018-10-12  Jeff Law  <law@redhat.com>
886         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
887         reg + sym +- const_int addressing modes.
889 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
891         * common.opt (fdiagnostics-minimum-margin-width=): New option.
892         * diagnostic-show-locus.c (layout::layout): Apply the minimum
893         margin width.
894         (layout::start_annotation_line): Only print up to 3 of the
895         margin character, to avoid touching the left-hand side.
896         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
897         minimum margin width, as set by test_diagnostic_context's ctor.
898         (selftest::test_fixit_insert_containing_newline): Likewise.
899         (selftest::test_fixit_insert_containing_newline_2): Likewise.
900         (selftest::test_line_numbers_multiline_range): Clear
901         dc.min_margin_width.
902         * diagnostic.c (diagnostic_initialize): Initialize
903         min_margin_width.
904         * diagnostic.h (struct diagnostic_context): Add field
905         "min_margin_width".
906         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
907         * opts.c (common_handle_option): Handle
908         OPT_fdiagnostics_minimum_margin_width_.
909         * selftest-diagnostic.c
910         (selftest::test_diagnostic_context::test_diagnostic_context):
911         Initialize min_margin_width to 6.
912         * toplev.c (general_init): Initialize global_dc->min_margin_width.
914 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
916         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
917         Fix usage of "error_at_rich_loc" in the comment.
919 2018-10-15  Renlin Li  <renlin.li@arm.com>
921         PR target/87563
922         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
923         if-conversioned loop when it contains ifn with types not
924         supported by backend.
925         * internal-fn.c (expand_direct_optab_fn): Add an assert.
926         (direct_internal_fn_supported_p): New helper function.
927         * internal-fn.h (direct_internal_fn_supported_p): Declare.
929 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
931         PR target/87572
932         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
933         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
934         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
936 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
938         PR tree-optimization/87022
939         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
940         bits in dist vector rather than the first one.
942 2018-10-15  Richard Biener  <rguenther@suse.de>
944         PR middle-end/87610
945         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
946         (visit_loadstore): When a used restrict tag escaped verify that
947         the points-to solution of "other" pointers do not include
948         escaped.
949         (compute_dependence_clique): If a used restrict tag escaped
950         communicated that down to visit_loadstore.
952 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
954         * config/s390/s390.c (s390_expand_vec_init): Force vector element
955         into reg if it isn't a general operand.
957 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
959         PR target/87599
960         * config/i386/sse.md (*vec_dupv2di): Add register source to
961         movddup.
963 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
965         PR target/87572
966         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
967         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
968         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
969         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
971 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
973         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
974         (notice_args_size): Set it in the current trace if no insn that can
975         throw internally has been seen yet.
976         (connect_traces): When connecting args_size between traces, allow the
977         incoming values not to match if there is an insn setting it before the
978         first insn that can throw internally; in that case, force the creation
979         of a CFI note on this latter insn.
981 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
983         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
984         the base class, because using the injected-class-name was not clearly
985         specified until DR 176.
987 2018-10-12  Paul Koning  <ni1d@arrl.net>
989         * config/pdp11/pdp11.md (doloop_end): New expander.
990         (doloop_end_insn): renamed from "doloop_end".
991         (addqi3): New pattern.
992         (subqi3): New pattern.
993         * config/pdp11/predicates.md (incdec_operand): New predicate.
995 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
997         PR middle-end/81376
998         * real.c (format_helper::can_represent_integral_type_p): New function
999         * real.h (format_helper::can_represent_integral_type_p): Ditto.
1000         * match.pd: New pattern.
1002 2018-10-12  Alexandre Oliva <oliva@adacore.com>
1004         * configure.ac: Introduce --enable-large-address-aware
1005         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
1006         * doc/install.texi: Document it.
1007         * configure, config.in: Rebuilt.
1008         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
1009         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
1010         (LINK_SPEC): Insert it.
1011         * config/i386/mingw-264.h: Likewise.
1013         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
1015 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
1017         PR rtl-optimization/87600
1018         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
1020 2018-10-12  Paul Koning  <ni1d@arrl.net>
1022         * doc/md.texi (doloop_end): Document that the pattern code may
1023         need to check operand mode.
1025 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
1027         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
1028         to zero-extend between int and floating-point registers.
1029         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
1030         ldp into floating-point registers.  Add type and arch attributes.
1031         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
1032         Use f_loads for type attribute.
1034 2018-10-11  Martin Sebor  <msebor@redhat.com>
1036         * doc/extend.texi (attribute packed): Correct typos.
1038 2018-10-11  Martin Sebor  <msebor@redhat.com>
1040         * doc/extend.texi (attribute flatten): Mention interaction with
1041         noinline.
1043 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
1045         PR target/87156
1046         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
1047         Set new_decl virtual flag to zero.
1049 2018-10-11  Martin Sebor  <msebor@redhat.com>
1051         PR middle-end/87593
1052         * doc/extend.texi (attribute format_arg): Discuss using multiple
1053         attributes on a single function.
1055 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1057         PR tree-optimization/86829
1058         * match.pd (sin (atan (x))): New simplification rules.
1059         (cos (atan (x))): Likewise.
1060         * real.c (build_sinatan_real): New function.
1061         * real.h (build_sinatan_real): Prototype.
1063 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
1065         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
1066         function.
1067         (fold_mergeeo_helper): New helper function.
1068         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
1069         intrinsics.  Correct some whitespace indentation issues.
1071 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
1073         PR target/87511
1074         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
1075         Use HOST_WIDE_INT_1U for shift.
1077 2018-10-11  Doug Rupp  <rupp@adacore.com>
1078             Olivier Hainque  <hainque@adacore.com>
1080         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
1081         Pass --relax to the linker for RTPs.
1082         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
1084 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
1085             Jan Hubicka  <jh@suse.cz>
1086             Martin Jambor  <mjambor@suse.cz>
1088         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
1089         the same elements are repeated rather than printing all of them.
1090         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
1091         "repeated" elements.
1092         * read-rtl-function.c (test_loading_repeat): New function.
1093         (read_rtl_function_c_tests): Call test_loading_repeat.
1094         * rtl-tests.c (test_dumping_repeat): New function.
1095         (rtl_tests_c_tests): Call test_dumping_repeat.
1097 2018-10-11  Richard Biener  <rguenther@suse.de>
1099         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
1100         bdver?_cost): Unify to ...
1101         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
1102         * config/i386/i386.c (processor_cost_table): Adjust.
1104 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
1106         PR middle-end/87574
1107         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
1108         the thunk when expanding to GIMPLE.
1110 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1112         * varasm.c (mergeable_string_section): Don't try to move zero-length
1113         strings to the merge section.
1115 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
1117         PR target/87573
1118         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
1120 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
1122         PR target/87550
1123         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
1124         to special_args set.
1126 2018-10-10  Richard Biener  <rguenther@suse.de>
1128         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
1129         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
1130         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
1131         and recursing and pattern terminating the recursion on SSE
1132         vector width using ix86_expand_reduc.
1133         (reduc_sminmax_scal_<mode>): Split into part reducing to half
1134         width and recursing and SSE2 vector variant doing the final
1135         reduction with ix86_expand_reduc.
1136         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
1137         with terminating the recursion at AVX level, splitting that
1138         to SSE there.
1140 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
1142         * genmatch.c (error_cb): Rename to...
1143         (diagnostic_cb): ...this, converting int params to enums.
1144         (fatal_at): Update for renaming.
1145         (warning_at): Likewise.
1146         (main): Likewise.
1147         * input.c (selftest::ebcdic_execution_charset::apply):
1148         Update for renaming of...
1149         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
1150         to...
1151         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
1152         converting level and reason to enums.
1153         (class selftest::lexer_error_sink): Rename to...
1154         (class selftest::lexer_test_options): ...this, renaming field
1155         "m_errors" to "m_diagnostics".
1156         (selftest::lexer_test_options::apply): Update for renaming of...
1157         (selftest::lexer_test_options::on_error): ...this, renaming to...
1158         (selftest::lexer_test_options::on_diagnostic): ...this
1159         converting level and reason to enums.
1160         (selftest::test_lexer_string_locations_raw_string_unterminated):
1161         Update for renamings.
1162         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
1163         "reason".
1165 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
1167         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
1168         * config/rs6000/pmmintrin.h: New file.
1170 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1172         PR tree-optimization/86659
1173         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
1175 2018-10-09  Richard Biener  <rguenther@suse.de>
1177         PR tree-optimization/63155
1178         * tree-ssa-structalias.c: Include tree-ssa.h.
1179         (get_constraint_for_ssa_var): For undefs return nothing_id.
1180         (find_func_aliases): Cleanup PHI handling.
1182 2018-10-09  Richard Biener  <rguenther@suse.de>
1184         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
1185         replacements.
1187 2018-10-09  Martin Liska  <mliska@suse.cz>
1189         * asan.c (asan_emit_stack_protection): If a stack variable
1190         is located in a same file as current function, then emit
1191         line info into variable definition string.
1193 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1195         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
1196         information.
1198 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1200         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
1201         on the thunk.
1203 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1205         PR tree-optimization/86659
1206         * gimple-match.h (struct gimple_match_op): Add reverse field.
1207         (gimple_match_op::set_op): New overloaded method.
1208         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
1209         the REF_REVERSE_STORAGE_ORDER flag on the value.
1210         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
1211         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
1212         
1213 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
1215         PR middle-end/63155
1216         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
1217         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
1219 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
1221         PR target/87517
1222         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
1223         Defined with __builtin_ia32_vfmaddsubpd512_mask.
1225 2018-10-08  Richard Biener  <rguenther@suse.de>
1227         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
1228         cost the same as AVX128 ones.
1230 2018-10-08  Paul Koning  <ni1d@arrl.net>
1232         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
1233         (expand_block_move): New function.
1234         * config/pdp11/pdp11.c (output_block_move): Remove.
1235         (expand_block_move): New function.
1236         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
1237         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
1238         (*movmemhi1): Remove.
1240 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
1242         * config/s390/2827.md: Increase latencies for some FP instructions.
1244 2018-10-08  Richard Biener  <rguenther@suse.de>
1246         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
1247         Open a dump scope.
1248         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
1249         * tree-vectorizer.h (dump_stmt_cost): Adjust.
1250         (add_stmt_cost): Dump return value of the hook.
1252 2018-10-08  Richard Biener  <rguenther@suse.de>
1254         PR tree-optimization/63155
1255         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
1256         (ssa_propagation_engine::ssa_propagate): Remove redundant
1257         bitmap bit clearing.
1259 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
1261         PR rtl-optimization/86939
1262         PR rtl-optimization/87479
1263         * ira.h (non_conflicting_reg_copy_p): New prototype.
1264         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
1265         (make_hard_regno_dead): Don't add conflicts for register
1266         ignore_reg_for_conflicts.
1267         (make_object_dead): Likewise.
1268         (non_conflicting_reg_copy_p): New function.
1269         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
1270         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
1271         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
1272         (make_hard_regno_dead): Don't add conflicts for register
1273         ignore_reg_for_conflicts.  Remove special conflict handling of
1274         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
1275         check_pic_pseudo_p and update callers.
1276         (mark_pseudo_dead): Don't add conflicts for register
1277         ignore_reg_for_conflicts.
1278         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
1280 2018-10-05  Andrew Waterman  <andrew@sifive.com>
1281             Jim Wilson  <jimw@sifive.com>
1283         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
1284         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
1285         new pattern using HONOR_SNANS that emits one extra instruction.
1287 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1289         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
1290         patterns): Merge SI and DI patterns to a GPR pattern.
1291         (unnamed define_insn and define_split for record form of that): Merge
1292         to a single define_insn_and_split pattern.
1294 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
1296         PR c++/56856
1297         * input.c (expand_location_to_spelling_point): Add param "aspect"
1298         and use rather than hardcoding LOCATION_ASPECT_CARET.
1299         (get_substring_ranges_for_loc): Handle the case of a single token
1300         within a macro expansion.
1301         * input.h (expand_location_to_spelling_point): Add "aspect" param,
1302         defaulting to LOCATION_ASPECT_CARET.
1304 2018-10-05  Paul Koning  <ni1d@arrl.net>
1306         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
1307         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
1308         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
1309         (pdp11_guard_type): New function.
1311 2018-10-05  Paul Koning  <ni1d@arrl.net>
1313         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
1314         * config/pdp11/pdp11.opt (mfloat32): Remove.
1315         (mfloat64): Remove.
1316         * doc/invoke.texi (pdp11 -mfloat32): Remove:
1317         (pdp11 -mfloat64): Remove.
1319 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1321         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
1322         (*cmp<mode>_cc_i387): Ditto.
1323         (*cmpu<mode>_cc_i387): Ditto.
1324         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1325         * config/i386/i386.c (ix86_expand_fp_compare): Remove
1326         "scratch" argument.
1327         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
1328         Emit x86_sahf_1 pattern.
1329         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
1330         (ix86_expand_carry_flag_compare): Ditto.
1332 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1334         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
1335         to reg_or_0_operand.  Add "C" constraint.
1336         (*cmpxf_cc_i387): Ditto.
1337         (*cmp<mode>_i387): Change operand 2 predicate
1338         to nonimm_or_0_operand.  Add "C" constraint.
1339         (*cmp<mode>_cc_i387): Ditto.
1340         (*cmp<mode>_0_i387): Remove insn pattern.
1341         (*cmp<mode>_0_cc_i387): Ditto.
1343 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
1345         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
1346         * config/i386/predicates.md (nonimm_or_0_operand): Rename
1347         from vector_move_operand.  Update all uses.
1349 2018-10-05  Martin Sebor  <msebor@redhat.com>
1351         PR tree-optimization/87490
1352         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
1353         consistently.
1355 2018-10-05  Richard Biener  <rguenther@suse.de>
1357         PR tree-optimization/63155
1358         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
1359         vertical space in dumpfiles.
1360         * tree-ssa-propagate.h
1361         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
1362         * tree-ssa-propagate.c (cfg_blocks_back): New global.
1363         (ssa_edge_worklist_back): Likewise.
1364         (curr_order): Likewise.
1365         (cfg_blocks_get): Remove abstraction.
1366         (cfg_blocks_add): Likewise.
1367         (cfg_blocks_empty_p): Likewise.
1368         (add_ssa_edge): Add to current or next worklist based on
1369         RPO index.
1370         (add_control_edge): Likewise.
1371         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
1372         into ...
1373         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
1374         iteration from CFG and SSA edge worklist so we process
1375         everything in RPO order, prioritizing forward progress
1376         over iteration.
1377         (ssa_prop_init): Allocate new worklists, do not dump
1378         immediate uses.
1379         (ssa_prop_fini): Free new worklists.
1381 2018-10-05  Richard Biener  <rguenther@suse.de>
1383         * tree-core.h (tree_block::abstract_flag): Remove.
1384         (tree_block::block_num): Make full 32bits.
1385         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
1386         * tree.h (BLOCK_ABSTRACT): Remove.
1387         * dwarf2out.c (gen_lexical_block_die): Remove dead code
1388         resulting from BLOCK_ABSTRACT being always false.
1389         (gen_inlined_subroutine_die): Likewise.
1390         (gen_block_die): Likewise.
1391         * tree.c (block_ultimate_origin): Likewise.
1392         * tree-pretty-print.c (dump_block_node): Remove code dealing
1393         with BLOCK_ABSTRACT.
1394         * tree-ssa-live.c (dump_scope_block): Likewise.
1395         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
1396         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
1398 2018-10-05   Richard Biener  <rguenther@suse.de>
1400         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
1401         is asked for initialize mode to the component mode of the
1402         vector type.
1404 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
1406         PR target/87522
1407         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
1408         assembler for -mavx.
1409         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
1411 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1413         PR target/87509
1414         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
1415         RS6000_BTM_DFP.
1416         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
1417         to be DImode.  When using mffscrn, force the operand to a register.
1419 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
1421         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
1422         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
1423         X87MODEF mode iterator.
1424         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
1425         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
1426         X87MODEF mode iterator.
1428 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
1430         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
1431         -Wno-prio-ctor-dtor.
1433 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1435         * Makefile.in (OBJS): Add opt-problem.o.
1436         * dump-context.h: Include "selftest.h.
1437         (selftest::temp_dump_context): New forward decl.
1438         (class dump_context): Make friend of class
1439         selftest::temp_dump_context.
1440         (dump_context::dump_loc_immediate): New decl.
1441         (class dump_pretty_printer): Move here from dumpfile.c.
1442         (class temp_dump_context): Move to namespace selftest.
1443         (temp_dump_context::temp_dump_context): Add param
1444         "forcibly_enable_dumping".
1445         (selftest::verify_dumped_text):
1446         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
1447         (selftest::verify_item):
1448         (ASSERT_IS_TEXT): Move here from dumpfile.c.
1449         (ASSERT_IS_TREE): Likewise.
1450         (ASSERT_IS_GIMPLE): Likewise.
1451         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
1452         to...
1453         (dump_context::dump_loc_immediate): ...this new function.
1454         (class dump_pretty_printer): Move to dump-context.h.
1455         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
1456         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
1457         (temp_dump_context::temp_dump_context): Move to "selftest"
1458         namespace.  Add param "forcibly_enable_dumping", and use it to
1459         conditionalize the use of m_pp;
1460         (selftest::verify_dumped_text): Make non-static.
1461         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
1462         (selftest::verify_item): Make non-static.
1463         (ASSERT_IS_TEXT): Move to dump-context.h.
1464         (ASSERT_IS_TREE): Likewise.
1465         (ASSERT_IS_GIMPLE): Likewise.
1466         (selftest::test_capture_of_dump_calls): Pass "true" for new
1467         param of temp_dump_context.
1468         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
1469         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
1470         TDF_COMPARE_DEBUG.
1471         * opt-problem.cc: New file.
1472         * opt-problem.h: New file.
1473         * optinfo-emit-json.cc
1474         (selftest::test_building_json_from_dump_calls): Pass "true" for
1475         new param of temp_dump_context.
1476         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
1477         (optinfo::emit_for_opt_problem): New function.
1478         (optinfo::emit): Clarity which emit_item is used.
1479         * optinfo.h (optinfo::get_dump_location): New accessor.
1480         (optinfo::emit_for_opt_problem): New decl.
1481         (optinfo::emit): Make const.
1482         * selftest-run-tests.c (selftest::run_tests): Call
1483         selftest::opt_problem_cc_tests.
1484         * selftest.h (selftest::opt_problem_cc_tests): New decl.
1485         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
1486         bool to opt_result, converting fprintf messages to
1487         opt_result::failure_at calls.  Add "stmt" param for use by the
1488         failure_at calls.
1489         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
1490         (runtime_alias_check_p): Convert return type from bool to
1491         opt_result, converting dump_printf calls to
1492         opt_result::failure_at, using the statement DDR_A for their
1493         location.
1494         (find_data_references_in_stmt): Convert return type from bool to
1495         opt_result, converting "return false" to opt_result::failure_at
1496         with a new message.
1497         * tree-data-ref.h: Include "opt-problem.h".
1498         (dr_analyze_innermost): Convert return type from bool to opt_result,
1499         and add a const gimple * param.
1500         (find_data_references_in_stmt): Convert return type from bool to
1501         opt_result.
1502         (runtime_alias_check_p): Likewise.
1503         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
1504         dr_analyze_innermost.
1505         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
1506         Convert return type from bool to opt_result, adding a message for
1507         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
1508         (vect_analyze_data_ref_dependence): Convert return type from bool
1509         to opt_result.  Change sense of return type from "false"
1510         effectively meaning "no problems" to "false" meaning a problem,
1511         so that "return false" becomes "return opt_result::success".
1512         Convert "return true" calls to opt_result::failure_at, using
1513         the location of statement A rather than vect_location.
1514         (vect_analyze_data_ref_dependences): Convert return type from bool
1515         to opt_result.
1516         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
1517         calls to opt_result::failure_at, using the stmt location rather
1518         than vect_location.
1519         (vect_verify_datarefs_alignment): Convert return type from bool
1520         to opt_result.
1521         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
1522         into multiple more-tightly-scoped copies.
1523         (vect_analyze_data_refs_alignment): Convert return type from bool
1524         to opt_result.
1525         (vect_analyze_data_ref_accesses): Likewise, converting a
1526         "return false" to a "return opt_result::failure_at", adding a
1527         new message.
1528         (vect_prune_runtime_alias_test_list): Convert return type from
1529         bool to opt_result, converting dump_printf_loc to
1530         opt_result::failure_at.  Add a %G to show the pertinent statement,
1531         and use the stmt's location rather than vect_location.
1532         (vect_find_stmt_data_reference): Convert return type from
1533         bool to opt_result, converting dump_printf_loc to
1534         opt_result::failure_at, using stmt's location.
1535         (vect_analyze_data_refs):  Convert return type from bool to
1536         opt_result.  Convert "return false" to "return
1537         opt_result::failure_at", adding messages as needed.
1538         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
1539         type from bool to opt_result.
1540         (vect_determine_vf_for_stmt): Likewise.
1541         (vect_determine_vectorization_factor): Likewise, converting
1542         dump_printf_loc to opt_result::failure_at, using location of phi
1543         rather than vect_location.
1544         (vect_analyze_loop_form_1): Convert return type from bool to
1545         opt_result, converting dump_printf_loc calls, retaining the use of
1546         vect_location.
1547         (vect_analyze_loop_form): Convert return type from loop_vec_info
1548         to opt_loop_vec_info.
1549         (vect_analyze_loop_operations): Convert return type from bool to
1550         opt_result, converting dump_printf_loc calls, using the location
1551         of phi/stmt rather than vect_location where available.  Convert
1552         various "return false" to "return opt_result::failure_at" with
1553         "unsupported phi" messages.
1554         (vect_get_datarefs_in_loop): Convert return type from bool to
1555         opt_result.  Add a message for the
1556         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
1557         (vect_analyze_loop_2): Convert return type from bool to
1558         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
1559         each "goto again;", adding new messages where needed.
1560         Add "unsupported grouped {store|load}" messages.
1561         (vect_analyze_loop): Convert return type from loop_vec_info to
1562         opt_loop_vec_info.
1563         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
1564         bool to opt_result.
1565         * tree-vect-stmts.c (process_use): Likewise, converting
1566         dump_printf_loc call and using stmt location, rather than
1567         vect_location.
1568         (vect_mark_stmts_to_be_vectorized): Likeise.
1569         (vect_analyze_stmt): Likewise, adding a %G.
1570         (vect_get_vector_types_for_stmt): Convert return type from bool to
1571         opt_result, converting dump_printf_loc calls and using stmt
1572         location, rather than vect_location.
1573         (vect_get_mask_type_for_stmt): Convert return type from tree to
1574         opt_tree, converting dump_printf_loc calls and using stmt location.
1575         * tree-vectorizer.c: Include "opt-problem.h.
1576         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
1577         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
1578         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
1579         enabled, use it to report at the top level "couldn't vectorize
1580         loop" followed by the problem.
1581         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
1582         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
1583         to opt_result.
1584         (vect_analyze_stmt): Likewise.
1585         (vect_get_vector_types_for_stmt): Likewise.
1586         (tree vect_get_mask_type_for_stmt): Likewise.
1587         (vect_analyze_data_ref_dependences): Likewise.
1588         (vect_enhance_data_refs_alignment): Likewise.
1589         (vect_analyze_data_refs_alignment): Likewise.
1590         (vect_verify_datarefs_alignment): Likewise.
1591         (vect_analyze_data_ref_accesses): Likewise.
1592         (vect_prune_runtime_alias_test_list): Likewise.
1593         (vect_find_stmt_data_reference): Likewise.
1594         (vect_analyze_data_refs): Likewise.
1595         (vect_analyze_loop): Convert return type from loop_vec_info to
1596         opt_loop_vec_info.
1597         (vect_analyze_loop_form): Likewise.
1598         (vect_analyze_slp): Convert return type from bool to opt_result.
1600 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1602         * doc/invoke.texi (-fopt-info): Document new "internals"
1603         sub-option.
1604         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
1605         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
1606         MSG_ALL_KINDS.
1607         (optinfo_verbosity_options): Add "internals".
1608         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
1609         (dump_context::apply_dump_filter_p): New member function.
1610         (dump_context::dump_loc): Use apply_dump_filter_p rather than
1611         explicitly masking the dump_kind.
1612         (dump_context::begin_scope): Increment the scope depth first.  Use
1613         apply_dump_filter_p rather than explicitly masking the dump_kind.
1614         (dump_context::emit_item): Use apply_dump_filter_p rather than
1615         explicitly masking the dump_kind.
1616         (dump_dec): Likewise.
1617         (dump_hex): Likewise.
1618         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
1619         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
1620         (opt_info_switch_p): Update handling of default
1621         MSG_OPTIMIZED_LOCATIONS to cope with default of
1622         MSG_PRIORITY_USER_FACING.
1623         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
1624         masking the dump_kind.
1625         (selftest::test_capture_of_dump_calls): Update test_dump_context
1626         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
1627         than MSG_ALL.  Generalize scope test to be run at all four
1628         combinations of with/without MSG_PRIORITY_USER_FACING and
1629         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
1630         for each of the two values.
1631         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
1632         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
1633         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
1634         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
1635         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
1636         with MSG_PRIORITY_*.
1637         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
1638         dump messages as MSG_PRIORITY_USER_FACING.
1639         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
1640         about the interaction with MSG_PRIORITY_*.
1642 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1644         * varasm.c (output_constant): Add new parameter merge_strings.
1645         Make strings properly zero terminated in merge string sections.
1646         (mergeable_string_section): Don't fail if the last char is non-zero.
1647         (assemble_variable_contents): Handle merge string sections.
1648         (assemble_variable): Likewise.
1649         (assemble_constant_contents): Likewise.
1650         (output_constant_def_contents): Likewise.
1651         (output_constructor_array_range,
1652         output_constructor_regular_field): Adjust call to output_constant.
1653         (output_object_block): Adjust call to assemble_constant_contents
1654         and assemble_variable_contents.
1656 2018-10-04  Martin Liska  <mliska@suse.cz>
1658         PR c/87483
1659         * cgraphunit.c (process_function_and_variable_attributes):
1660         Warn about a function with alias attribute and a body.
1662 2018-10-04  Martin Liska  <mliska@suse.cz>
1664         PR ipa/82625
1665         * multiple_target.c (redirect_to_specific_clone): New function.
1666         (ipa_target_clone): Use it.
1667         * tree-inline.c: Fix comment.
1669 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
1671         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
1672         fields.
1673         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
1674         (gcc::dump_manager::register_pass): New member function, adapted
1675         from loop body in gcc::pass_manager::register_pass, adding a
1676         call to update_dfi_for_opt_info.
1677         (gcc::dump_manager::opt_info_enable_passes): Store the
1678         -fopt-info options into the new fields.  Move the loop
1679         bodies into...
1680         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
1681         function.
1682         * dumpfile.h (struct opt_pass): New forward decl.
1683         (gcc::dump_manager::register_pass): New decl.
1684         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
1685         (class gcc::dump_manager): Add fields "m_optgroup_flags",
1686         "m_optinfo_flags", and "m_optinfo_filename".
1687         * passes.c (gcc::pass_manager::register_pass): Move all of the
1688         dump-handling code to gcc::dump_manager::register_pass.
1690 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
1692         PR rtl-optimization/87466
1693         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
1694         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
1695         * doc/tm.texi: Regenerate.
1696         * ira-lives.c (process_bb_node_lives): Use the new target hook.
1697         * lra-lives.c (process_bb_lives): Likewise.
1698         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
1699         Define.
1701 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
1703         * params.c (add_params): Fix initialization.
1705 2018-10-04  Martin Liska  <mliska@suse.cz>
1707         PR gcov-profile/84107
1708         * tree-profile.c (init_ic_make_global_vars):
1709         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
1710         Come up with new ic_tuple* variables.  Emit
1711         __gcov_indirect_call{,_topn} variables.
1712         (gimple_gen_ic_profiler): Access the variable
1713         and emit gimple.
1714         (gimple_gen_ic_func_profiler): Access
1715         __gcov_indirect_call.callee field.
1716         (gimple_init_gcov_profiler): Use ptr_type_node.
1717         * value-prof.c (gimple_ic): Use ptr_type_node.
1719 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1721         PR tree-optimization/85787
1722         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
1723         into this function and add support for detecting multiple phis.
1724         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
1726 2018-10-04  Martin Liska  <mliska@suse.cz>
1728         PR ipa/87491
1729         * ipa-inline.c (inline_to_all_callers_1):
1730         Call ultimate_alias_target for node being inlined.
1732 2018-10-03  Jeff Law  <law@redhat.com>
1734         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
1735         target's wchar_t.
1736         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
1737         * tree.h (get_typenode_from_name): Prototype.
1739 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1741         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1742         Change operand 2 predicate to nonimmediate_operand.
1743         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1745 2018-10-03  Martin Sebor  <msebor@redhat.com>
1746             Jeff Law  <law@redhat.com>
1748         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
1749         initialize it.
1750         (get_string_length): Detect unterminated arrays.
1751         (format_string): Same.
1752         (format_directive): Warn about unterminated arrays.
1753         (handle_gimple_call): Mark statements with no_warning as needed.
1755 2018-10-03  Jim Wilson  <jimw@sifive.com>
1757         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
1758         also define __riscv_abi_rve.  Delete trailing white space.
1760 2018-10-03  Paul Koning  <ni1d@arrl.net>
1762         Enable LRA register allocator for PDP11.
1763         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
1764         (R): Likewise.
1765         (D): Likewise.
1766         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
1767         * config/pdp11/pdp11.opt (-mlra): New option.
1768         * doc/invoke.texi (PDP-11 Options): Document -mlra.
1770 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
1772         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
1773         (*<absneg:code>extend<mode>xf2): Ditto.
1775 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1777         PR tree-optimization/87415
1778         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
1779         precision fields.
1781 2018-10-02  Jeff Law  <law@redhat.com>
1783         * gimple-fold.c (get_range_strlen): Only set *nonstr when
1784         an unterminated string is discovered.  Bubble up range
1785         even for unterminated strings.
1786         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
1787         indicates the string was not terminated via NONSTR.
1789 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
1791         * tree-vrp.c (extract_range_from_unary_expr): Special case all
1792         pointer conversions.
1793         Do not do anything special for anti-ranges.
1795 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
1797         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
1798         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
1800 2018-10-03  Martin Liska  <mliska@suse.cz>
1802         PR gcov-profile/86109
1803         * coverage.c (coverage_begin_function): Do not
1804         mark lambdas as artificial.
1805         * tree-core.h (struct GTY): Remove tm_clone_flag
1806         and introduce new lambda_function.
1807         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
1809 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1811         PR target/87474
1812         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
1813         P8_VECTOR and VSX are enabled.
1815 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1817         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
1818         0x3907 as CPU model number.
1820 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
1822         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
1823         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
1824         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
1825         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
1826         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
1827         * config/s390/s390.md: Likewise. Rename also the cpu attribute
1828         value from arch12 to z14.
1830 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1832         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
1833         (isinfxf2): Ditto.
1834         (isinf<mode>2): Ditto.
1836 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
1838         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
1839         before emitting fxam.  Perform calculations in XFmode.
1841 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1843         * match.pd (((X /[ex] A) +- B) * A): New transformation.
1845 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1847         PR middle-end/87319
1848         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
1849         * tree.c (signed_or_unsigned_type_for): Handle complex.
1851 2018-10-02  Jeff Law  <law@redhat.com>
1853         * gimple-fold.c (get_range_strlen): Remove dead code.
1855 2018-10-02  Martin Sebor  <msebor@redhat.com>
1856             Jeff Law  <law@redhat.com>
1858         * builtins.c (unterminated_array): Add new arguments.
1859         If argument is not terminated, bubble up size and exact
1860         state to callers.
1861         (expand_builtin_strnlen): Detect, avoid expanding
1862         and diagnose unterminated arrays.
1863         (c_strlen): Fill in offset of start of unterminated strings.
1864         * builtins.h (unterminated_array): Update prototype.
1866 2018-10-02  Richard Biener  <rguenther@suse.de>
1868         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
1869         of haddv4df, first reduce to SSE width and exploit the fact
1870         that we only need element zero with the reduction result.
1871         (reduc_plus_scal_v2df): Likewise.
1873 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1875         * dojump.h (do_jump): Delete.
1876         (do_jump_1): Likewise.
1877         (split_comparison): Move around.
1878         * dojump.c (do_jump): Make static.
1879         (do_jump_1): Likewise.
1880         (jumpifnot): Move around.
1881         (jumpifnot_1): Likewise.
1882         (jumpif): Likewise.
1883         (jumpif_1): Likewise.
1884         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
1886 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
1888         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1889         insns in the delay slot and add_insn_after for the jump insn.
1891 2018-10-02  Richard Biener  <rguenther@suse.de>
1893         * tree-inline.c (expand_call_inline): Use the location of
1894         the callee declaration for the inline-entry marker.
1895         * final.c (notice_source_line): Remove special-casing of
1896         NOTE_INSN_INLINE_ENTRY.
1898 2018-10-01  Carl Love  <cel@us.ibm.com>
1900         PR 69431
1901         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1902         (__builtin_mtfsb0): New.
1903         (__builtin_mtfsb1): New.
1904         ( __builtin_set_fpscr_rn): New.
1905         (__builtin_set_fpscr_drn): New.
1906         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1907         (rs6000_expand_set_fpscr_rn_builtin): Add.
1908         (rs6000_expand_set_fpscr_drn_builtin): Add.
1909         (rs6000_expand_builtin): Add case statement entries for
1910         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1911         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1912         RS6000_BUILTIN_MFFSL.
1913         (rs6000_init_builtins): Add ftype initialization and def_builtin
1914         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1915         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1916         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1917         rs6000_mffscdrn): Add define_insn.
1918         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1919         * doc/extend.texi: Add documentation for the builtins.
1921 2018-10-01  Richard Biener  <rguenther@suse.de>
1923         PR tree-optimization/87465
1924         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1925         causing branch miscounts.
1927 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1929         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1930         aarch64_option_default_param):  New.
1931         (params.h): Include.
1932         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1933         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1934         stack-clash protection validation code.
1936 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1938         * params.c (validate_param): New.
1939         (add_params): Use it.
1940         (set_param_value): Refactor param validation into validate_param.
1941         (diagnostic.h): Include.
1942         * diagnostic.h (diagnostic_ready_p): New.
1944 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1946         * params.c (set_param_value):
1947         Add index of parameter being validated.
1948         * common/common-target.def (option_validate_param): New.
1949         * common/common-targhooks.h (default_option_validate_param): New.
1950         * common/common-targhooks.c (default_option_validate_param): New.
1951         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1952         * doc/tm.texi: Regenerate.
1954 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1956         PR target/86486
1957         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1958         Add validation for stack-clash parameters and set defaults.
1960 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1962         PR target/86486
1963         * configure.ac: Add stack-clash-protection-guard-size.
1964         * doc/install.texi: Document it.
1965         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1966         * params.def: Update comment for guard-size.
1967         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1968         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1969         * configure: Regenerate.
1971 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1973         PR target/86486
1974         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1975         STACK_DYNAMIC_OFFSET): New.
1976         * config/aarch64/aarch64.c (aarch64_layout_frame):
1977         Update outgoing args size.
1978         (aarch64_stack_clash_protection_alloca_probe_range,
1979         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1981 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1983         PR target/86486
1984         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1985         probe ranges.
1986         * target.def (stack_clash_protection_alloca_probe_range): New.
1987         (stack_clash_protection_final_dynamic_probe): Remove.
1988         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1989         (default_stack_clash_protection_final_dynamic_probe): Remove.
1990         * targhooks.c: Likewise.
1991         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1992         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1993         * doc/tm.texi: Regenerate.
1995 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
1997         PR target/86486
1998         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1999         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
2000         aarch64_clamp_to_uimm12_shift): New.
2001         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
2002         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2004 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
2006         PR target/86486
2007         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2009 2018-10-01  Jeff Law  <law@redhat.com>
2010             Richard Sandiford <richard.sandiford@linaro.org>
2011             Tamar Christina  <tamar.christina@arm.com>
2013         PR target/86486
2014         * config/aarch64/aarch64.md
2015         (probe_stack_range): Add k (SP) constraint.
2016         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
2017         STACK_CLASH_MAX_UNROLL_PAGES): New.
2018         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
2019         stack probes for stack clash.
2020         (aarch64_allocate_and_probe_stack_space): New.
2021         (aarch64_expand_prologue): Use it.
2022         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
2023         (aarch64_sub_sp): Add emit_move_imm optional param.
2025 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
2027         PR tree-optimization/87261
2028         * match.pd: Remove trailing whitespace.
2029         Add (x & y) | ~(x | y) -> ~(x ^ y),
2030         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2032 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2034         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
2035         constraints.
2036         (ashlsi3_insn): Update instruction constraints.
2037         (ashrsi3_insn): Likewise.
2038         (rotrsi3): Likewise.
2039         (add_shift): Likewise.
2040         * config/arc/constraints.md (Csz): New 32 bit constraint. It
2041         avoids placing in the limm field small constants which, otherwise,
2042         could end into a small instruction.
2044 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
2046         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
2047         destination register is not odd-even.
2048         (umaddsidi4_split): Likewise.
2050 2018-10-01  Richard Biener  <rguenther@suse.de>
2052         * tree-inline.c (expand_call_inline): Store origin of fn
2053         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
2054         * tree.c (block_ultimate_origin): Simplify and do some
2055         checking.
2057 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
2059         * config/i386/mmx.md (EMMS): New int iterator.
2060         (emms): New int attribute.
2061         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
2062         EMMS int iterator.  Explicitly declare clobbers.
2063         (mmx_emms): Remove expander.
2064         (mmx_femms): Ditto.
2065         * config/i386/predicates.md (emms_operation): Remove predicate.
2066         (vzeroall_pattern): New predicate.
2067         (vzeroupper_pattern): Rename from vzeroupper_operation.
2068         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
2069         vzeroupper_pattern and vzeroall_pattern predicates.
2071 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
2073         PR rtl-optimization/86939
2074         * ira-lives.c (make_hard_regno_born): Rename from this...
2075         (make_hard_regno_live): ... to this.  Remove update to conflict
2076         information.  Update function comment.
2077         (make_hard_regno_dead): Add conflict information update.  Update
2078         function comment.
2079         (make_object_born): Rename from this...
2080         (make_object_live): ... to this.  Remove update to conflict information.
2081         Update function comment.
2082         (make_object_dead):  Add conflict information update.  Update function
2083         comment.
2084         (mark_pseudo_regno_live): Call make_object_live.
2085         (mark_pseudo_regno_subword_live): Likewise.
2086         (mark_hard_reg_dead): Update function comment.
2087         (mark_hard_reg_live): Call make_hard_regno_live.
2088         (process_bb_node_lives): Likewise.
2089         * lra-lives.c (make_hard_regno_born): Rename from this...
2090         (make_hard_regno_live): ... to this.  Remove update to conflict
2091         information.  Remove now uneeded check_pic_pseudo_p argument.
2092         Update function comment.
2093         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
2094         to conflict information.  Update function comment.
2095         (mark_pseudo_live): Remove update to conflict information.  Update
2096         function comment.
2097         (mark_pseudo_dead): Add conflict information update.
2098         (mark_regno_live): Call make_hard_regno_live.
2099         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
2100         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2102 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
2104         PR target/87370
2105         * config/i386/i386.c (construct_container): Use TImode for
2106         BLKmode values in 2 integer registers.
2108 2018-09-29  Jeff Law  <law@redhat.com>
2110         * builtins.c (unterminated_array): Pass in c_strlen_data * to
2111         c_strlen rather than just a tree *.
2112         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
2113         Update recursive calls appropriately.  If caller did not provide a
2114         suitable data pointer, create a local one.  When a non-terminated
2115         string is discovered, bubble up information about the string via the
2116         c_strlen_data object.
2117         * builtins.h (c_strlen): Update prototype.
2118         (c_strlen_data): New structure.
2119         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
2120         For a type 2 call, if c_strlen indicates a non-terminated string
2121         use the length of the non-terminated string.
2122         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2124 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
2126         PR target/87467
2127         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2128         __m512d type for __A argument rather than __m512.
2130 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
2132         * match.pd (simple_comparison): Don't optimize if either operand is
2133         a function pointer when target needs function pointer canonicalization.
2135 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2137         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
2138         power5 .. power9 to remove indirection.
2139         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
2140         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
2141         ASM_CPU_476_SPEC): Delete.
2142         (ASM_CPU_SPEC): Adjust.
2143         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
2144         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2146 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2148         * config.in: Delete HAVE_AS_DCI.
2149         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
2150         * config/rs6000/rs6000.h: Ditto.
2151         * configure.ac: Delete HAVE_AS_DCI.
2152         * configure: Regenerate.
2154 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
2156         * config.in (HAVE_AS_LWSYNC): Delete.
2157         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2158         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
2159         do it as a .long .
2160         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
2161         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
2162         as a .long .
2163         * configure.ac: Delete HAVE_AS_LWSYNC.
2164         * configure: Regenerate.
2166 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2167             Pierre-Marie de Rodat  <derodat@adacore.com>
2169         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
2170         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
2171         (cgraph_node::create_thunk): Add indirect_offset parameter.
2172         (thunk_adjust): Likewise.
2173         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
2174         and initialize the corresponding field with it.
2175         (cgraph_node::dump): Dump indirect_offset field.
2176         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
2177         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
2178         (thunk_adjust): Add indirect_offset parameter and deal with it.
2179         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
2180         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
2181         or if the thunk is external or local.  Fix formatting.  Do not chain
2182         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
2183         if any, in the GIMPLE representation.
2184         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
2185         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
2186         (input_node): Read indirect_offset field.
2187         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
2188         call to thunk_adjust.
2189         * tree-nested.c (struct nesting_info): Add thunk_p field.
2190         (create_nesting_tree): Set it.
2191         (convert_all_function_calls): Copy static chain from targets to thunks.
2192         (finalize_nesting_tree_1): Return early for thunks.
2193         (unnest_nesting_tree_1): Do not finalize thunks.
2194         (gimplify_all_functions): Do not gimplify thunks.
2196 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2198         * opt-suggestions.c (option_proposer::build_option_suggestions):
2199         Release "option_values".
2201 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
2203         * coverage.c (get_coverage_counts): Convert problem-reporting dump
2204         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
2205         * dumpfile.c (kind_as_string): New function.
2206         (dump_loc): Rather than a hardcoded prefix of "note: ", use
2207         kind_as_string to vary the prefix based on dump_kind.
2208         (selftest::test_capture_of_dump_calls): Update for above.
2210 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2212         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2213         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
2215 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
2217         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
2218         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
2219         INVALID_REGNUM instead of FPSR_REG.
2220         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
2221         * config/i386/i386.md: Update comment of FP compares.
2222         (fldenv): Do not clobber FPSR_REG.
2224 2018-09-28  Richard Biener  <rguenther@suse.de>
2226         * tree.h (BLOCK_ORIGIN): New.
2227         * omp-expand.c (grid_expand_target_grid_body): Assign
2228         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
2229         * tree-inline.c (remap_block): Likewise.
2230         * auto-profile.c (get_function_decl_from_block): Simplify
2231         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
2232         * langhooks.c (lhd_print_error_function): Likewise.
2233         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
2234         Likewise.
2235         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2236         * tree.c (block_nonartificial_location): Likewise.
2237         (block_ultimate_origin): Likewise.
2238         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
2239         no longer needed LTO case.
2241 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
2242             Jan Hubicka  <jh@suse.cz>
2243             Martin Jambor  <mjambor@suse.cz>
2245         * simplify-rtx.c (simplify_merge_mask): New function.
2246         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
2247         same masks are used in op1 or op2.
2248         (test_vec_merge): New function.
2249         (test_vector_ops): Call test_vec_merge.
2251 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
2253         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
2254         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
2255         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
2256         (cypress_costs): Set it.
2257         (supersparc_costs): Likewise.
2258         (hypersparc_costs): Likewise.
2259         (leon_cost): Likewise.
2260         (leon3_costs): Likewise.
2261         (sparclet_costs): Likewise.
2262         (ultrasparc_costs): Likewise.
2263         (ultrasparc_costs): Likewise.
2264         (niagara_costs): Likewise.
2265         (niagara2_costs): Likewise.
2266         (niagara3_costs): Likewise.
2267         (niagara4_costs): Likewise.
2268         (niagara7_costs): Likewise.
2269         (m8_costs): Likewise.
2270         (TARGET_CAN_FOLLOW_JUMP): Define.
2271         (pass_work_around_errata::gate): Minor tweak.
2272         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
2273         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
2274         Automaitcally clear MASK_FSMULD mask for V7 processors.
2275         (sparc_can_follow_jump): New static function.
2276         (output_ubranch): Deal with CROSSING_JUMP_P.
2277         (sparc_use_sched_lookahead): Rewrite using switch statement.
2278         (sparc_issue_rate): Reorder.
2279         (sparc_branch_cost): New function.
2281 2018-09-27  Martin Sebor  <msebor@redhat.com>
2283         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
2284         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
2285         (int_fits_type_p): Same.
2287 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
2289         * config/i386/i386.md (FPCR_REG): Remove.
2290         (UNSPEC_FLDCW): Remove.
2291         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
2292         (x86_fldcw_1): Remove insn pattern.
2293         (fnstenv): Do not clobber FPCR_REG.
2294         (fldenv): Ditto.
2295         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
2296         (CALL_USED_REGISTERS): Ditto.
2297         (REG_ALLOC_ORDER): Ditto.
2298         (REG_CLASS_CONTENTS): Ditto.
2299         (HI_REGISTER_NAMES): Ditto.
2300         (ADDITIONAL_REGISTER_NAMES): Use defines instead
2301         of numerical constants.
2302         * config/i386/i386.c (regclass_map): Remove fpsr register.
2303         (dbx_register_map): Ditto.
2304         (dbx64_register_map): Ditto.
2305         (svr4_dbx_register_map): Ditto.
2306         (print_reg): Do not handle FPCR_REG.
2308 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
2310         PR target/87149
2311         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
2312         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
2313         Delete, always treat as true.
2314         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
2315         Ditto.  Simplify remaining code.
2316         * config/powerpcspe/powerpcspe.h: Ditto.
2317         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
2318         Simplify remaining code.
2319         (rs6000_expand_builtin): Ditto.
2320         * config/rs6000/rs6000.h: Ditto.
2321         * configure.ac: Ditto.
2322         * configure: Regenerate.
2324 2018-09-27  Martin Liska  <mliska@suse.cz>
2326         * coverage.c (get_coverage_counts): Revert the formatting
2327         of missing profile opt info.
2329 2018-09-27  Richard Biener  <rguenther@suse.de>
2331         PR debug/37801
2332         PR debug/87440
2333         * dwarf2out.c (set_block_origin_self): Do not mark outermost
2334         block as we do not output that.
2335         (gen_inlined_subroutine_die): Elide the originally outermost
2336         block, matching what we do for concrete instances.
2337         (decls_for_scope): Add parameter specifying whether to recurse
2338         to subblocks.
2340 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
2341             Tom de Vries  <tom@codesourcery.com>
2343         PR 82089
2345         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
2346         STORE_FLAG_VALUE == 1.
2348 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
2350         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
2351         constant definitions.
2352         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
2353         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
2354         ("speculation_barrier"): New expander definition.
2356 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
2358         PR gcov-profile/86957
2359         * common.opt: New warning option -Wmissing-profile.
2360         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
2361         * doc/invoke.texi: Document -Wmissing-profile.
2363 2018-09-26  Jim Wilson  <jimw@sifive.com>
2365         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
2366         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2368 2018-09-26  Martin Sebor  <msebor@redhat.com>
2370         * tree.c (zerop): Change return type to bool.
2371         (integer_zerop, integer_onep, integer_each_onep): Same.
2372         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2373         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2374         (real_onep, real_minus_onep, chain_index): Same.
2375         (print_type_hash_statistics, type_list_equal): Same.
2376         * tree.h (zerop): Same.
2377         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
2378         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
2379         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
2380         (real_onep, real_minus_onep, chain_index): Same.
2381         (print_type_hash_statistics, type_list_equal): Same.
2383 2018-09-26  Jim Wilson  <jimw@sifive.com>
2385         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2387 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
2389         PR target/87414
2390         * config/i386/i386.c: Include debug.h and dwarf2out.h.
2391         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2392         call.
2394 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
2396         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
2398 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2400         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
2401         and FP_SECOND_SSE_REGS.
2402         (REG_CLASS_NAMES): Ditto.
2403         (REG_CLASS_CONTENTS): Ditto.
2404         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
2405         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
2406         (ix86_preferred_output_reload_class): Ditto.
2407         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
2408         clobber constraint to "=&f".
2409         (fix_truncdi_i387): Ditto.
2410         (lrintxfdi2): Ditto.
2411         (fistdi2_<rounding>): Ditto.
2412         (fpremxf4_i387): Change "=u" constraint to "=f".
2413         (fprem1xf4_i387): Ditto.
2414         (sincosxf3): Ditto.
2415         (fptanxf4_i387): Ditto.
2416         (fxtractxf3_i387): Ditto.
2417         (fscalexf4_i387): Ditto.
2418         (atan2xf3): Change "u" constraint to "f".
2419         (fyl2xxf3_i387): Ditto.
2420         (fyl2xp1xf3_i387): Ditto.
2422 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
2424         PR target/87439
2425         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
2426         for removed I387_MASK_PM entity.
2429 2018-09-26  Jeff Law  <law@redhat.com>
2430         Revert
2431         2018-09-26  Alexey Neyman  <stilor@att.net>
2433         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2434         headers are no longer pulled in by <isl/val.h>.
2436 2018-09-26  Richard Biener  <rguenther@suse.de>
2438         PR debug/87443
2439         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
2440         or concrete instance DIE to the tree.  Create abstract origin
2441         attributes also for concrete instances.
2443 2018-09-26  Alexey Neyman  <stilor@att.net>
2445         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
2446         headers are no longer pulled in by <isl/val.h>.
2448 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
2450         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
2451         Use new helper functions.
2452         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
2453         Use new helper functions.
2454         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
2455         aarch_mm_needs_release): New declarations.
2456         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
2457         aarch_mm_needs_release): New.
2459 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
2461         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
2462         (arm32_output_mi_thunk): Deal with long calls.
2464 2018-09-26  Richard Biener  <rguenther@suse.de>
2466         PR debug/87428
2467         PR debug/87362
2468         * tree-inline.c (expand_call_inline): When the location
2469         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2470         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2471         the inserted BLOCK to make inlined_function_outer_scope_p
2472         recognize it.
2473         * dwarf2out.c (add_call_src_coords_attributes): Do not add
2474         coords for reserved locations.
2476 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2478         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
2479         (*call_indirect_nonlocal_sysv<mode>): Ditto.
2480         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
2481         (*sibcall_nonlocal_sysv<mode>): Ditto.
2482         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
2483         (<bd>_<mode>): Ditto.
2484         (<bd>tf_<mode>): Ditto.
2486 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2488         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
2489         control string as a list of templates instead of as C code.
2490         (*altivec_movti): Ditto.
2491         * config/rs6000/darwin.md (movdf_low_di): Ditto.
2493 2018-09-25  Jim Wilson  <jimw@sifive.com>
2495         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
2496         when target symbol is weak.
2498 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2500         PR c/87387
2501         * builtins.c (unterminated_array): Simplify.
2502         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
2503         where pointer arithmetic is safe.
2505 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
2507         PR target/86987
2508         * config/rs6000/altivec.md (altivec_vspltb): Use
2509         const_0_to_15_operand instead of u5bit_cint_operand.
2510         (*altivec_vspltb_internal): Ditto.
2511         (altivec_vspltb_direct): Ditto.
2512         (altivec_vsplth): Use const_0_to_7_operand instead of
2513         u5bit_cint_operand.
2514         (*altivec_vsplth_internal): Ditto.
2515         (altivec_vsplth_direct): Ditto.
2516         (altivec_vspltw): Use const_0_to_3_operand instead of
2517         u5bit_cint_operand.
2518         (*altivec_vspltw_internal): Ditto.
2519         (altivec_vspltw_direct): Ditto.
2520         (altivec_vspltsf): Ditto.
2521         (*altivec_vspltsf_internal): Ditto.
2522         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
2523         various splats with the proper size immediate.  Reorder the various
2524         cases by ascending size of immediate, and put all such together.
2526 2018-09-25  Richard Biener  <rguenther@suse.de>
2528         PR debug/83941
2529         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
2530         GC-ification.
2531         (maybe_create_die_with_external_ref): Do not create
2532         DW_TAG_imported_unit here.
2533         (add_abstract_origin_attribute): Handle external BLOCK refs.
2534         (dwarf2out_abstract_function): Simplify LTO case.
2535         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
2536         rather than using maybe_create_die_with_external_ref.
2538 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
2540         PR target/71278
2541         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
2542         (frndintxf2_mask_pm_i387): Ditto.
2543         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
2544         Enable for !flag_trapping_math.
2545         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
2546         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
2547         Change operand 1 predicate to nonimmediate_operand.
2548         (attr "i387_cw"): Remove mask_pm.
2549         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
2550         (enum ix86_entity): Remove I387_MASK_PM.
2551         * config/i386/i386.c (ix86_i387_mode_needed): Do not
2552         handle I387_MASK_PM.
2553         (ix86_mode_needed): Ditto.
2554         (ix86_mode_after): Ditto.
2555         (ix86_mode_entry): Ditto.
2556         (ix86_mode_exit): Ditto.
2557         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
2559 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
2561         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
2562         to_update_switch_stmts to vNULL instead of calling create on them
2563         immediately.
2565 2018-09-25  Richard Biener  <rguenther@suse.de>
2567         PR tree-optimization/87402
2568         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
2569         (visit_phi): Re-instantiate handling of supposed to be VARYING
2570         but non-VARYING backedge value.
2572 2018-09-25  Richard Biener  <rguenther@suse.de>
2574         PR debug/83941
2575         * dwarf2out.c (struct sym_off_pair): New.
2576         (external_die_map): New global.
2577         (lookup_decl_die): When in LTO create DIEs lazily from the
2578         external_die_map.
2579         (lookup_block_die): New function, create DIEs lazily in LTO.
2580         (equate_block_to_die): New function.
2581         (dwarf2out_die_ref_for_decl): During WPA get the association
2582         from the external DIE map.
2583         (dwarf2out_register_external_die): Record mapping into the
2584         external DIE map.
2585         (maybe_create_die_with_external_ref): New function split out from
2586         DIE generation part of old dwarf2out_register_external_die.
2587         (add_abstract_origin_attribute): Do not return the DIE.  When
2588         in LTO reference externals directly.
2589         (dwarf2out_abstract_function): When in LTO ignore calls for
2590         decls with external DIEs (already present abstract instances).
2591         (gen_call_site_die): Adjust.
2592         (add_high_low_attributes): Likewise.
2593         (gen_lexical_block_die): Likewise.
2594         (gen_inlined_subroutine_die): Likewie.
2595         (gen_block_die): Likewise.
2596         (dwarf2out_inline_entry): Likewise.
2597         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
2598         DIEs.
2600 2018-09-25  Martin Liska  <mliska@suse.cz>
2602         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
2603         integers and not by a float value.
2605 2018-09-25  Martin Liska  <mliska@suse.cz>
2607         PR fortran/87394
2608         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
2609         instead of NULL.
2610         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
2611         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
2612         * godump.c (go_format_type): Remove extra parenthesis.
2614 2018-09-25  Martin Liska  <mliska@suse.cz>
2616         * alias.c (set_dest_equal_p): Remove unused function.
2617         * config/i386/i386.c (def_builtin_pure2): Likewise.
2618         * diagnostic-show-locus.c (class layout): Remove
2619         unused field.
2620         (layout::layout): Likewise here.
2621         * dump-context.h (class temp_dump_context): Likewise.
2622         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
2623         (add_AT_loclistsptr): Likewise.
2624         (add_AT_offset): Likewise.
2625         (get_AT_hi_pc): Likewise.
2626         (is_comdat_die): Likewise.
2627         (type_is_enum): Likewise.
2628         (ceiling): Likewise.
2629         (add_AT_vms_delta): Likewise.
2630         (is_class_die): Likewise.
2631         * edit-context.c (class line_event): Remove unused field.
2632         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
2633         unused function.
2634         * ipa-cp.c (ipa_get_vr_lat): Likewise.
2635         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
2636         (ok_for_base_p_nonstrict): Likewise.
2637         * tree-chrec.c (is_not_constant_evolution): Likewise.
2638         (chrec_fold_poly_cst): Likewise.
2639         * tree-if-conv.c (has_pred_critical_p): Likewise.
2640         * tree-ssa-coalesce.c (print_exprs): Likewise.
2641         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
2642         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
2643         * tree-vrp.c (value_ranges_intersect_p): Likewise.
2644         (value_range_nonnegative_p): Likewise.
2646 2018-09-25  Martin Liska  <mliska@suse.cz>
2648         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2649         Do not handle "GNU Pascal".
2650         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2651         Likewise.
2652         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
2653         from documentation. Likewise.
2654         * dbxout.c (dbxout_range_type): Likewise.
2655         * doc/cpp.texi: Likewise.
2656         * doc/extend.texi: Likewise.
2657         * doc/frontends.texi: Likewise.
2658         * doc/invoke.texi: Remove Pascal entry.
2659         * tree.def (CLEANUP_POINT_EXPR): Likewise.
2660         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
2662 2018-09-25  Martin Liska  <mliska@suse.cz>
2664         PR middle-end/86078
2665         * doc/invoke.texi: Document all parameters and remove default
2666         of the parameters.
2668 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2670         PR bootstrap/87417
2671         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
2672         contains HOST_WIDE_INTs when computing its size.
2674 2018-09-24  Jim Wilson  <jimw@sifive.com>
2676         PR target/87391
2677         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
2678         not TARGET_RVE.
2679         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
2681 2018-09-24  Andrew Pinski  <apinski@marvell.com>
2683         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2684         access prev before checking it for NULLness in the
2685         AARCH64_FUSE_CMP_BRANCH case.
2687 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
2689         PR target/82699
2690         * config/i386/i386.c (rest_of_insert_endbranch): Set
2691         endbr_queued_at_entrance to true and don't insert ENDBR if
2692         x86_function_profiler will be called.
2693         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2694         is true.
2695         * config/i386/i386.h (machine_function): Add
2696         endbr_queued_at_entrance.
2698 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2700         * genattrtab.c (mk_attr_alt): Use alternative_mask.
2701         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
2702         types.
2703         (check_attr_test): Use alternative_mask.
2704         (get_attr_value): Likewise.
2705         (compute_alternative_mask): Use alternative_mask and XWINT.
2706         (make_alternative_compare): Use alternative_mask.
2707         (attr_alt_subset_p): Use XWINT.
2708         (attr_alt_subset_of_compl_p): Likewise.
2709         (attr_alt_intersection): Use alternative_mask and XWINT.
2710         (attr_alt_union): Likewise.
2711         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
2712         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
2713         (simplify_test_exp): Use alternative_mask and XWINT.
2714         (write_test_expr): Use alternative_mask and XWINT, adjust bit
2715         number calculation to support 64 bits.  Generate code that
2716         checks 64-bit masks.
2717         (main): Use alternative_mask.
2718         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2720 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2722         PR target/80080
2723         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
2724         RETURN+USE when returning via %r14.
2726 2018-09-24  Martin Liska  <mliska@suse.cz>
2728         * gcov.c (output_lines): Print colorization legend
2729         for both flag_use_colors and flag_use_hotness_colors.
2730         Reword the help.
2732 2018-09-24  Martin Liska  <mliska@suse.cz>
2734         * coverage.c (get_coverage_counts): Use warning_at
2735         with current_function_decl location. Use %qD in warning
2736         message.
2738 2018-09-24  Martin Liska  <mliska@suse.cz>
2740         * memory-block.h (memory_block_pool::release): Annotate with
2741         valgrind that the memory is not accessible.
2743 2018-09-24  Martin Liska  <mliska@suse.cz>
2745         PR sanitizer/85774
2746         * asan.c: Make asan_handled_variables extern.
2747         * asan.h: Likewise.
2748         * cfgexpand.c (expand_stack_vars): Make sure
2749         a representative is unpoison if another
2750         variable in the partition is handled by
2751         use-after-scope sanitization.
2753 2018-09-24  Richard Biener  <rguenther@suse.de>
2755         PR tree-optimization/63155
2756         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2757         the worklist when the edge of the respective argument isn't
2758         executable.
2760 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2762         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
2763         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
2764         (MASK_CLASS_P): Update for rename.
2765         (MAYBE_MASK_CLASS_P): Ditto.
2766         (REG_CLASS_NAMES): Update.
2767         (REG_CLASS_CONTENT): Update.
2768         * config/i386/i386.c (regclass_map): Update for MASK_REG
2769         and ALL_MASK_REGS rename.
2770         * config/i386/constraints.md (Yk): Update for rename.
2771         (k): Ditto.
2773 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2775         * config/i386/i386.h (enum reg_class): Remove
2776         EVEX_SSE_REGS and MOD4_SSE_REGS.
2777         (REG_CLASS_NAMES): Update.
2778         (REG_CLASS_CONTENT): Update.
2779         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
2780         registers as ALL_SSE_REGS.
2781         (ix86_additional_allocno_class_p): Remove.
2782         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
2783         (ix86_register_priority): Lower priority of EVEX SSE registers.
2784         Use IN_RANGE macro where appropriate.
2785         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
2786         AVX-5124VNNIW checks.
2787         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
2788         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
2789         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
2790         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
2791         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
2792         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
2793         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
2794         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
2795         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
2796         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
2797         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
2798         * config/i386/constraints.md (Yh): Remove.
2800 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
2802         * config/i386/i386.c (regclass_map): Declare integer REX registers
2803         as GENERAL_REGS.
2805 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
2807         * doc/service.texi (Service): Switch the fsf.org link to https.
2809 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
2811         PR target/86798
2812         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2813         Define to speculation_safe_value_not_needed.
2815 2018-09-21  Florian Weimer  <fweimer@redhat.com>
2817         PR middle-end/81035
2818         * doc/extend.texi (Common Function Attributes): Mention that
2819         noreturn suppresses tail call optimization.
2821 2018-09-21  Jeff Law  <law@redhat.com>
2823         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
2824         vr_values::cleanup_edges_and_switches.
2825         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
2826         vr_values class.
2827         (identify_jump_threads): Remove EDGE_IGNORE handling.
2828         (execute_vrp): Move handling of to_remove_edges and
2829         to_update_switch_stmts into vr_values class member functions.
2830         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
2831         (to_update_switch_stmts): Likewise.
2832         * vr-values.c: Include cfghooks.h.
2833         (vr_values::vr_values): Initialize to_remove_edges and
2834         to_update_switch_stmts.
2835         (vr_values::~vr_values): Verify to_remove_edges and
2836         to_update_switch_stmts are empty.
2837         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
2838         (vr_values::cleanup_edges_and_switches): New member function.
2839         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
2840         function.  Add new data members.
2842 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
2844         PR tree-optimization/87309
2845         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
2846         calls with pflags and alt_flags.
2847         (selftest::test_capture_of_dump_calls): Add test of interaction of
2848         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2850 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2852         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2854 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2856         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2858 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2860         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
2861         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
2862         (VXWORKS_LIBS_RTP): Minor reordering.
2864 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2866         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
2867         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2869 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2871         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
2872         (PTRDIFF_TYPE): Likewise.
2874 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2876         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
2877         triplet, similar to support for VxWorks7.
2878         * config/vxworks-dummy.h: Provide a default definition
2879         of TARGET_VXWORKS64 to 0.
2881 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2883         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
2884         * config/vxworks-dummy.h: here.
2886 2018-09-21  Olivier Hainque  <hainque@adacore.com>
2888         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2890 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
2891             Bo Zhou  <zbo.zhou@hisilicon.com>
2893         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2894         * config/aarch64/aarch64-tune.md: Regenerated.
2895         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2896         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2897         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2899 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
2900             Julian Brown  <julian@codesourcery.com>
2902         * builtins.c (get_builtin_sync_mem): Handle address spaces.
2904 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2906         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2907         if the call takes a static chain.
2909 2018-09-21  Martin Liska  <mliska@suse.cz>
2911         * auto-profile.c (autofdo_source_profile::read): Do not
2912         set sum_all.
2913         (read_profile): Do not add working sets.
2914         (read_autofdo_file): Remove sum_all.
2915         (afdo_callsite_hot_enough_for_early_inline): Remove const
2916         qualifier.
2917         * coverage.c (struct counts_entry): Remove gcov_summary.
2918         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2919         do not support GCOV_TAG_PROGRAM_SUMMARY.
2920         (get_coverage_counts): Remove summary and expected
2921         arguments.
2922         * coverage.h (get_coverage_counts): Likewise.
2923         * doc/gcov-dump.texi: Remove -w option.
2924         * gcov-dump.c (dump_working_sets): Remove.
2925         (main): Do not support '-w' option.
2926         (print_usage): Likewise.
2927         (tag_summary): Likewise.
2928         * gcov-io.c (gcov_write_summary): Do not dump
2929         histogram.
2930         (gcov_read_summary): Likewise.
2931         (gcov_histo_index): Remove.
2932         (gcov_histogram_merge): Likewise.
2933         (compute_working_sets): Likewise.
2934         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2935         it not obsolete.
2936         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2937         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2938         (GCOV_HISTOGRAM_SIZE): Remove.
2939         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2940         (struct gcov_summary): Simplify rapidly just
2941         to runs and sum_max fields.
2942         (gcov_histo_index): Remove.
2943         (NUM_GCOV_WORKING_SETS): Likewise.
2944         (compute_working_sets): Likewise.
2945         * gcov-tool.c (print_overlap_usage_message): Remove
2946         trailing empty line.
2947         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2948         (output_lines): Remove program related line.
2949         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2950         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2951         histogram.
2952         (input_profile_summary): Do not read it.
2953         (merge_profile_summaries): And do not merge it.
2954         (input_symtab): Do not call removed function.
2955         * modulo-sched.c (sms_schedule): Do not print sum_max.
2956         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2957         removed when histogram method was invented.
2958         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2959         mode.
2960         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2961         GCOV coding style.
2962         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2963         and dump selected value.
2964         * profile.c (add_working_set): Remove.
2965         (get_working_sets): Likewise.
2966         (find_working_set): Likewise.
2967         (get_exec_counts): Do not work with working sets.
2968         (read_profile_edge_counts): Do not inform as sum_max is removed.
2969         (compute_branch_probabilities): Likewise.
2970         (compute_value_histograms): Remove argument for call of
2971         get_coverage_counts.
2972         * profile.h: Do not make gcov_summary const.
2974 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
2976         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2978 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
2980         PR tree-optimization/86990
2981         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2982         Check that the entire merged store group is made of constants only for
2983         overlapping stores.
2985 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
2987         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2988         (VTABLE_VERIFICATION_SPEC): Likewise.
2989         (SANITIZER_EARLY_SPEC): Likewise.
2990         (SANITIZER_SPEC): Likewise.
2991         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2992         * doc/invoke.texi (Link Options): Document -r.
2994 2018-09-20  Richard Biener <rguenther@suse.de>
2996         PR middle-end/87054
2997         * gimplify.c (gimplify_expr): Retain alignment of
2998         addressable lvalue in dereference.
3000 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
3002         PR bootstrap/87013
3003         * configure.ac: Check for .loc is_stmt support.
3004         * configure, config.in: Rebuilt.
3005         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
3006         if not supported.
3008 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3010         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
3011         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
3012         -misel=no.
3014 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3016         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
3017         VECTOR_OTHER.
3018         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
3019         case VECTOR_OTHER.
3021 2018-09-20  Marek Polacek  <polacek@redhat.com>
3023         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
3025 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3027         PR tree-optimization/87288
3028         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
3029         into account when determining PEELING_FOR_NITERS.
3031 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
3033         PR tree-optimization/86877
3034         * tree-vect-loop.c (vect_analyze_loop_2): Call
3035         vect_verify_datarefs_alignment.
3037 2018-09-19  Marek Polacek  <polacek@redhat.com>
3039         * doc/invoke.texi: Document -Wclass-conversion.
3041 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
3043         * config/pa/pa.c (pa_adjust_priority): Delete.
3044         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
3046         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
3047         (atomic_storehi): Likewise.
3048         (atomic_storesi): Likewise.
3049         (atomic_loaddi): Restore compare and swap exchange loop code.
3051 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
3053         PR rtl-optimization/86902
3054         * combine.c (try_combine): When changing the CC mode used, don't change
3055         an unrelated mode in other_insn to that new CC mode.
3057 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
3059         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
3060         with %T in place of calls to dump_generic_expr.
3061         (prune_runtime_alias_test_list): Likewise.
3062         (create_runtime_alias_checks): Likewise.
3063         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
3064         (vect_analyze_data_ref_dependence): Likewise.
3065         (vect_slp_analyze_data_ref_dependence): Likewise.
3066         (vect_record_base_alignment): Likewise.  Use %G in place of call
3067         to dump_gimple_stmt.
3068         (vect_compute_data_ref_alignment): Likewise.
3069         (verify_data_ref_alignment): Likewise.
3070         (vect_find_same_alignment_drs): Likewise.
3071         (vect_analyze_group_access_1): Likewise.
3072         (vect_analyze_data_ref_accesses): Likewise.
3073         (dependence_distance_ge_vf): Likewise.
3074         (dump_lower_bound): Likewise.
3075         (vect_prune_runtime_alias_test_list): Likewise.
3076         (vect_find_stmt_data_reference): Likewise.
3077         (vect_analyze_data_refs): Likewise.
3078         (vect_create_addr_base_for_vector_ref): Likewise.
3079         (vect_create_data_ref_ptr): Likewise.
3080         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
3081         (vect_can_advance_ivs_p): Likewise.
3082         (vect_update_ivs_after_vectorizer): Likewise.
3083         (vect_gen_prolog_loop_niters): Likewise.
3084         (vect_prepare_for_masked_peels): Likewise.
3085         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
3086         (vect_determine_vectorization_factor): Likewise.
3087         (vect_is_simple_iv_evolution): Likewise.
3088         (vect_analyze_scalar_cycles_1): Likewise.
3089         (vect_analyze_loop_operations): Likewise.
3090         (report_vect_op): Likewise.
3091         (vect_is_slp_reduction): Likewise.
3092         (check_reduction_path): Likewise.
3093         (vect_is_simple_reduction): Likewise.
3094         (vect_create_epilog_for_reduction): Likewise.
3095         (vect_finalize_reduction:): Likewise.
3096         (vectorizable_induction): Likewise.
3097         (vect_transform_loop_stmt): Likewise.
3098         (vect_transform_loop): Likewise.
3099         (optimize_mask_stores): Likewise.
3100         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
3101         (vect_split_statement): Likewise.
3102         (vect_recog_over_widening_pattern): Likewise.
3103         (vect_recog_average_pattern): Likewise.
3104         (vect_determine_min_output_precision_1): Likewise.
3105         (vect_determine_precisions_from_range): Likewise.
3106         (vect_determine_precisions_from_users): Likewise.
3107         (vect_mark_pattern_stmts): Likewise.
3108         (vect_pattern_recog_1): Likewise.
3109         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
3110         (vect_record_max_nunits): Likewise.
3111         (vect_build_slp_tree_1): Likewise.
3112         (vect_build_slp_tree_2): Likewise.
3113         (vect_print_slp_tree): Likewise.
3114         (vect_analyze_slp_instance): Likewise.
3115         (vect_detect_hybrid_slp_stmts): Likewise.
3116         (vect_detect_hybrid_slp_1): Likewise.
3117         (vect_slp_analyze_operations): Likewise.
3118         (vect_slp_analyze_bb_1): Likewise.
3119         (vect_transform_slp_perm_load): Likewise.
3120         (vect_schedule_slp_instance): Likewise.
3121         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
3122         (vect_mark_stmts_to_be_vectorized): Likewise.
3123         (vect_init_vector_1): Likewise.
3124         (vect_get_vec_def_for_operand): Likewise.
3125         (vect_finish_stmt_generation_1): Likewise.
3126         (vect_check_load_store_mask): Likewise.
3127         (vectorizable_call): Likewise.
3128         (vectorizable_conversion): Likewise.
3129         (vectorizable_operation): Likewise.
3130         (vectorizable_load): Likewise.
3131         (vect_analyze_stmt): Likewise.
3132         (vect_is_simple_use): Likewise.
3133         (vect_get_vector_types_for_stmt): Likewise.
3134         (vect_get_mask_type_for_stmt): Likewise.
3135         * tree-vectorizer.c (increase_alignment): Likewise.
3137 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
3139         * doc/rtl.texi: Adjust vec_select description.
3140         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
3141         non-constant selectors.
3143 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
3145         * config/aarch64/aarch64-protos.h
3146         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
3147         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
3148         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
3149         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
3150         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
3151         (AARCH64_FL_PROFILE): Move index so flags are ordered.
3152         (AARCH64_ISA_RCPC8_4): New flag.
3153         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
3154         to aarch64_offset_9bit_signed_unscaled_p.
3155         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
3156         and use stlur.
3157         * config/aarch64/constraints.md (Ust): New constraint.
3158         * config/aarch64/predicates.md.
3159         (aarch64_9bit_offset_memory_operand): New predicate.
3160         (aarch64_rcpc_memory_operand): New predicate.
3162 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3164         PR rtl-optimization/87361
3165         * rtlanal.c (nonzero_bits1): Revert accidental change.
3167 2018-09-19  Richard Biener  <rguenther@suse.de>
3169         PR tree-optimization/87349
3170         PR tree-optimization/87342
3171         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
3173 2018-09-18  Marek Polacek  <polacek@redhat.com>
3175         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
3176         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
3178 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3180         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
3182 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
3184         PR rtl-optimization/86882
3185         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
3187 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
3189         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
3190         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
3192 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
3194         PR other/87353
3195         * doc/invoke.texi (Link Options): Fix formatting and grammar.
3197 2018-09-18  Richard Biener  <rguenther@suse.de>
3199         PR middle-end/63155
3200         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
3201         (compute_samebase_partition_bases): Likewise.
3202         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
3203         (gimple_can_coalesce_p): Simplify.
3205 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
3207         Handle a library implementation of ffs calling __builtin_ffs.
3208         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
3209         (mmix_init_libfuncs): New function: make __builtin_ffs expand
3210         to __ffsdi2.
3212 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3214         * diagnostic-show-locus.c (class layout_range): Add field
3215         "m_original_idx".
3216         (layout_range::layout_range): Add "original_idx" param and use it
3217         to initialize new field.
3218         (make_range): Use 0 for original_idx.
3219         (layout::layout): Pass in index to calls to
3220         maybe_add_location_range.
3221         (layout::maybe_add_location_range): Add param "original_idx" and
3222         pass it on to layout_range.
3223         (layout::print_any_labels): Pass on range->m_original_idx to
3224         get_text call.
3225         (gcc_rich_location::add_location_if_nearby): Use 0 for
3226         original_idx.
3227         * gcc-rich-location.h (text_range_label::get_text): Update for new
3228         param.
3229         (range_label_for_type_mismatch::get_text): Likewise.
3231 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3233         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
3235 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3237         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
3238         format_string_diagnostic_t.
3239         (fmtwarn_n): Likewise.
3240         * substring-locations.c
3241         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
3242         (format_warning_n_va): Convert to...
3243         (format_string_diagnostic_t::emit_warning_n_va): ...this.
3244         (format_warning_va): Convert to...
3245         (format_string_diagnostic_t::emit_warning_va): ...this.
3246         (format_warning_at_substring): Convert to...
3247         (format_string_diagnostic_t::emit_warning): ...this.
3248         (format_warning_at_substring_n): Convert to...
3249         (format_string_diagnostic_t::emit_warning_n): ...this.
3250         * substring-locations.h (class format_string_diagnostic_t): New
3251         class.
3252         (format_warning_va): Convert to
3253         format_string_diagnostic_t::emit_warning_va.
3254         (format_warning_n_va): Convert to
3255         format_string_diagnostic_t::emit_warning_n_va.
3256         (format_warning_at_substring): Convert to
3257         format_string_diagnostic_t::emit_warning.
3258         (format_warning_at_substring_n): Convert to
3259         format_string_diagnostic_t::emit_warning_n.
3261 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
3262             Bernd Schmidt <bernds_cb1@t-online.de>
3264         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
3265         SImode args.
3267 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
3269         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
3270         operand 0 predicate to nonimmediate operand.
3271         (rint<mode>2_frndint): Remove insn pattern.
3272         (rint<mode>2): Change operand 1 predicate to general_operand.
3273         Extend operand 1 to XFmode and generate rintxf2 insn.
3274         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
3275         Do not use X87MODEF mode macro.
3276         (frndintxf2_<rounding>_i387): Rename from
3277         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
3278         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
3279         to XFmode and generate significandxf3 insn.
3281 2018-09-17  Richard Biener  <rguenther@suse.de>
3283         PR tree-optimization/87328
3284         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
3285         visiting unexecutable backedges when not iterating.
3286         (do_rpo_vn): Mark all edges not executable even when not
3287         iterating.
3289 2018-09-17  Martin Jambor  <mjambor@suse.cz>
3291         PR c/63886
3292         * doc/invoke.texi (Warning Options): Likewise.
3294 2018-09-17  Richard Biener  <rguenther@suse.de>
3296         PR tree-optimization/87301
3297         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
3298         clean EH info from leftover copy assignments.
3300 2018-09-17  Martin Liska  <mliska@suse.cz>
3302         PR gcov-profile/85871
3303         * gcov.c (output_intermediate_file): Fix out of bounds
3304         access.
3306 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
3308         * config/arc/arc.c: Object attributes for core4 not reflected
3309         correctly.
3310         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
3311         core3).
3313 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
3315         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
3317 2018-09-17  Martin Liska  <mliska@suse.cz>
3319         * doc/gcov.texi: Document new option --use-hotness-colors.
3320         * gcov.c (struct source_info): Declare new field.
3321         (source_info::source_info): Set default for maximum_count.
3322         (print_usage): Add new -q option.
3323         (process_args): Process it.
3324         (accumulate_line_info): Save src->maximum_count.
3325         (output_line_beginning): Make color line number if
3326         flag_use_hotness_colors is set.
3327         (output_line_details): Pass default argument value.
3328         (output_lines): Pass src->maximum_count.
3330 2018-09-17  Martin Liska  <mliska@suse.cz>
3332         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
3333         Use processor_names table.
3334         * config/i386/i386.c (ix86_default_align): Use
3335         processor_cost_table for alignment values.
3336         (ix86_option_override_internal): Use processor_names.
3337         (ix86_function_specific_print): Likewise.
3338         * config/i386/i386.h (struct processor_costs):
3339         Add alignment values.
3340         (struct ptt): Remove and replace with const char *.
3341         * config/i386/x86-tune-costs.h (struct processor_costs):
3342         Declare default alignments for all costs.
3344 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
3346         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
3347         symbolics or VR_VARYING ranges for ABS_EXPR.
3348         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
3349         when range will wrap.
3351 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
3353         PR middle-end/86864
3354         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
3355         before and after a JUMP_TABLE_DATA.
3357 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
3359         PR middle-end/87188
3360         * dojump.c (do_compare_and_jump): Canonicalize function pointers
3361         when one operand is a function pointer.  Use POINTER_TYPE_P and
3362         FUNC_OR_METHOD_TYPE_P.
3363         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
3364         * fold-const.c (build_range_check): Likewise.
3365         * match.pd (simple_comparison): Likewise.
3367 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
3369         PR c/82967
3370         * spellcheck.c (get_edit_distance_cutoff): New function.
3371         (selftest::test_edit_distance_unit_test_oneway): Rename to...
3372         (selftest::test_get_edit_distance_one_way): ...this.
3373         (selftest::test_get_edit_distance_unit): Rename to...
3374         (selftest::test_get_edit_distance_both_ways): ...this.
3375         (selftest::test_edit_distances): Move tests to this new function,
3376         and test some more pairs of strings.  Update for above renaming.
3377         (selftest::get_old_cutoff): New function.
3378         (selftest::test_get_edit_distance_cutoff): New function.
3379         (selftest::assert_suggested_for): New function.
3380         (ASSERT_SUGGESTED_FOR): New macro.
3381         (selftest::assert_not_suggested_for): New function.
3382         (ASSERT_NOT_SUGGESTED_FOR): New macro.
3383         (selftest::test_suggestions): New function.
3384         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
3385         tests to selftest::test_edit_distances and call it.  Add calls to
3386         selftest::test_get_edit_distance_cutoff and
3387         selftest::test_suggestions.
3388         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
3389         (best_match::consider): Replace hard-coded cutoff calculation with
3390         a call to...
3391         (best_match::get_cutoff): New declaration.
3392         (best_match::get_best_meaningful_candidate): Likewise.
3394 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3396         * builtins.c (fold_builtin_strlen): Remove TODO comment.
3398 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3400         revert:
3401         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3403         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3404         terminated string literal.
3406 2018-09-14  Martin Sebor  <msebor@redhat.com>
3408         * builtins.c (unterminated_array): Handle ARRAY_REF.
3409         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
3410         * builtins.h (unterminated_array): Declare extern.
3411         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
3412         arrays.
3413         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
3414         calls.
3416 2018-09-14  Martin Sebor  <msebor@redhat.com>
3417             Jeff Law  <law@redhat.com>
3419         * builtins.c (unterminated_array): New.
3420         (expand_builtin_strcpy): Adjust.
3421         (expand_builtin_strcpy_args): Detect unterminated arrays.
3422         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
3423         unterminated arrays.
3424         * gimple-fold.h (get_maxval_strlen): Add argument.
3425         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
3427         * gimple-fold.c (get_range_strlen): Add argument.
3428         (get_maxval_strlen): Adjust.
3429         * gimple-fold.h (get_range_strlen): Add argument.
3431 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
3433         * config/i386/movdirintrin.h: Fix copyright year.
3435 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
3437         * reg-stack.c: Include regs.h.
3438         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
3439         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
3440         FIRST_STACK_REG, not DFmode.
3441         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
3442         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
3443         (change stack): Default register mode to the reg_raw_mode of
3444         FIRST_STACK_REG, not DFmode.
3445         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
3446         (*swapxf): Rename from swapxf.
3448 2018-09-14  Carl Love  <cel@us.ibm.com>
3450         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
3451         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
3453 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
3455         PR target/87224
3456         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
3457         alternatives.
3459 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
3461         PR target/85628
3462         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
3464 2018-09-14  Jason Merrill  <jason@redhat.com>
3466         Fix --enable-gather-detailed-mem-stats.
3467         * hash-table.c (hash_table_usage): Change from variable to function.
3468         * hash-table.h: Adjust.
3469         * Makefile.in: Add missing dependencies on hash-table.h.
3471 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3473         PR tree-optimization/87259
3474         PR lto/87283
3475         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
3476         execute_cse_reciprocals_1 has tried transforming.
3478 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
3480         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
3481         VR_VARYING for PLUS/MINUS_EXPR.
3483 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
3485         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
3486         formatting.
3488 2018-09-14  Richard Biener  <rguenther@suse.de>
3490         PR middle-end/63155
3491         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
3492         bits for the merged partition.
3494 2018-09-13  Martin Sebor  <msebor@redhat.com>
3495             Bernd Edlinger  <bernd.edlinger@hotmail.de>
3497         * builtins.h (c_srlen): Add argument.
3498         * builtins.c (warn_string_no_nul): New function.
3499         (c_strlen): Add argument and use it.  Update recursive calls.
3500         Pass DECL argument to string_constant to get info on non
3501         terminated strings.  Update *NONSTR as needed.
3502         (fold_builtin_strlen): Add argument to calls to c_strlen.
3503         Warn for unterminated arrays.
3504         (warn_string_no_null): Add prototype.
3505         * expr.c (string_constant): Update arguments.  Update recursive
3506         calls appropriately.  Detect missing NUL terminator and outermost
3507         declaration its missing in.
3508         Improve checks for arrays with nonzero lower bound or elements
3509         that are not a single byte.  Simplify offset computation.
3510         Simplify checks for non-NUL terminated strings.
3511         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
3512         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
3514 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3516         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
3517         correctly.
3518         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
3519         argument.  Fix range checks.
3520         * fold-const.h (c_getstr): Adjust protoype.
3521         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
3522         string is constant but contains no NUL byte.
3524         * expr.c (string_constant): Adjust function comment.
3525         Remove bogus check for zero termination.
3527         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
3529         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
3530         (get_constant_size): Don't make STRING_CSTs larger than they are.
3531         (check_string_literal): New check function for STRING_CSTs.
3532         (output_constant): Use it.
3534 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3536         PR target/86812
3537         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
3539 2018-09-13  Richard Biener  <rguenther@suse.de>
3541         PR tree-optimization/87263
3542         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
3543         (struct unwind_state): Add max_rpo field.
3544         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
3545         Compute max_rpo, the max RPO number a block can be backwards reached
3546         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
3547         separating it from the iterating mode.
3549 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
3551         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
3552         (rfs_decision): New scheduling decision.
3554 2018-09-13  Richard Biener  <rguenther@suse.de>
3556         PR bootstrap/87134
3557         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
3558         (vn_nary_op_insert_pieces_predicated): Do not write useless
3559         valid_dominated_by_p entry outside of the allocated storage.
3561 2018-09-13  Omar Sandoval  <osandov@osandov.com>
3562             Tom de Vries  <tdevries@suse.de>
3564         PR debug/86985
3565         * dwarf2out.c (is_c): New function.
3566         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
3568 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
3570         PR target/85628
3571         * config/aarch64/aarch64.md (*aarch64_bfxil):
3572         Define.
3573         * config/aarch64/constraints.md (Ulc): Define.
3574         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
3575         Define.
3576         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
3577         New function.
3579 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
3581         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
3582         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
3583         aarch64_layout_frame call.
3584         (aarch64_expand_epilogue): Likewise.
3585         (aarch64_initial_elimination_offset): Likewise.
3586         (aarch64_get_separate_components): Likewise.
3587         (aarch64_use_return_insn_p): Likewise.
3588         (aarch64_layout_frame): Remove unneeded check.
3590 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3592         * configure.ac: Only append
3593         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
3594         gcc_config_arguments if it was never reconfigured or last reconfigure
3595         was with different arguments.
3596         * configure: Regenerated.
3598 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3599             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3601         PR middle-end/87290
3602         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
3603         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
3605 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
3607         PR tree-optimization/87287
3608         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
3609         X % C == 0 to X % (unsigned) C == 0 optimization to ...
3610         * match.pd (X % C == 0): ... here.  New optimization.
3612 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3614         PR middle-end/82853
3615         * expr.h (maybe_optimize_mod_cmp): Declare.
3616         * expr.c (mod_inv): New function.
3617         (maybe_optimize_mod_cmp): New function.
3618         (do_store_flag): Use it.
3619         * cfgexpand.c (expand_gimple_cond): Likewise.
3621 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
3622             Julian Brown  <julian@codesourcery.com>
3624         PR middle-end/86336
3625         * gimplify.c (gimplify_scan_omp_clauses): Set
3626         target_firstprivatize_array_bases in OpenACC parallel and kernels
3627         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
3628         OpenACC data regions.
3630 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
3632         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
3633         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
3635 2018-09-12  Richard Biener  <rguenther@suse.de>
3637         PR tree-optimization/87280
3638         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
3639         edge but unreachable target.
3640         (do_rpo_vn): For conservatively handling a PHI only mark
3641         the backedge executable but not the block reachable.
3643 2018-09-12  Richard Biener  <rguenther@suse.de>
3645         PR tree-optimization/87266
3646         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
3647         visited blocks.
3649 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
3651         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
3652         constants.
3653         ("trunc<BFP:mode><DFP_ALL:mode>2")
3654         ("trunc<DFP_ALL:mode><BFP:mode>2")
3655         ("extend<BFP:mode><DFP_ALL:mode>2")
3656         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
3657         according to the target operand type.
3659 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3660             Andreas Krebbel  <krebbel@linux.ibm.com>
3662         PR tree-optimization/86844
3663         * gimple-ssa-store-merging.c
3664         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
3665         there are any overlapping stores in between them, make sure they are
3666         also coalesced or we give up completely.
3668 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
3670         PR middle-end/87248
3671         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
3672         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
3674 2018-09-12  Tom de Vries  <tdevries@suse.de>
3676         * common.opt (gdescribe-dies): Add option.
3677         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
3678         attribute for artifical and nameless decls.
3679         (dwarf2out_register_external_die): Add description attribute to
3680         external reference die.
3681         (add_desc_attribute): New functions.
3682         (gen_subprogram_die): Add description attribute to
3683         DW_TAG_call_site_parameter.
3684         * tree-pretty-print.c (print_generic_expr_to_str): New function.
3685         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
3686         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
3687         -gno-describe-dies.
3688         (@item -gdescribe-dies): Add.
3690 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3692         * tree-vrp.c (vrp_shift_undefined_p): Remove.
3693         (extract_range_from_binary_expr_1: Call
3694         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
3695         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
3696         depend on sign.
3698 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
3700         * gimple-ssa-warn-alloca.c
3701         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
3702         field for ALLOCA_BOUND_*_LARGE.
3704 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3706         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
3708 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3710         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
3711         for clobbers.  Remove obsolete comment.
3713 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3715         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
3716         mpxchk, mpxld and mpxst types.
3717         (define_attr length_immediate): Remove all processing of mpx types.
3718         (define_attr prefix_0f): Ditto.
3719         (define_attr memory): Ditto.
3721 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
3723         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
3724         (log<mode>2): Change operand 1 predicate to general_operand.
3725         Extend operand 1 to XFmode and generate logxf3 insn.
3726         (log10<mode>2): Change operand 1 predicate to general_operand.
3727         Extend operand 1 to XFmode and generate log10xf3 insn.
3728         (log2<mode>2): Change operand 1 predicate to general_operand.
3729         Extend operand 1 to XFmode and generate log2xf3 insn.
3730         (fyl2xp1_extend<mode>xf3_i387): Remove.
3731         (log1p<mode>2): Change operand 1 predicate to general_operand.
3732         Extend operand 1 to XFmode and generate log1pxf3 insn.
3733         (fxtract_extend<mode>xf3_i387): Remove.
3734         (logb<mode>2): Change operand 1 predicate to general_operand.
3735         Extend operand 1 to XFmode and generate logbxf3 insn.
3736         (ilogb<mode>2): Change operand 1 predicate to general_operand.
3737         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
3738         (significand<mode>2): Change operand 1 predicate to general_operand.
3739         Extend operand 1 to XFmode and generate significandxf3 insn.
3741 2018-09-11  Nathan Sidwell  <nathan@acm.org>
3743         * gcc.c (perror_with_name, pfatal_with_name): Delete.
3744         (load_specs): Use fatal_error.
3745         (DELETE_IF_ORDINARY, process_command): Use error.
3746         (execute, run_attempt): Use fatal_error.
3748 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
3750         * diagnostic-core.h (sorry_at): New prototype.
3751         * diagnostic.c (sorry_at): New function.
3753 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
3755         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
3756         by zero as VR_UNDEFINED.
3758 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3760         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
3761         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
3762         (<sincos>mode2): New expander.
3763         (sincos_extend<mode>xf3_i387): Remove insn pattern.
3764         (sincos -> sin, cos splitters): Remove splitter patterns.
3765         (sincos<mode>3): Change operand 2 predicate to general_operand.
3766         Extend operand 2 to XFmode and generate sincosxf3 insn.
3767         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
3768         Change operand 3 predicate to const1_operand.
3769         (fptan_extend<mode>xf4_i387): Remove insn pattern.
3770         (tanxf2): Update operands in the call to fptanxf4_i387.
3771         (tan<mode>2): Change operand 1 predicate to general_operand.
3772         Extend operand 1 to XFmode and generate tanxf3 insn.
3773         (atan2xf3): Rename from *fpatanxf3_i387.
3774         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
3775         (atan2xf3): Remove expander.
3776         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
3777         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
3778         (atan<mode>2): Change operand 1 predicate to general_operand.
3779         Extend operand 1 to XFmode and generate atanxf3 insn.
3781 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
3783         * config/i386/i386.md (x87/SSE constant load splitter): Use
3784         memory_operand instead of nonimmediate_operand for input operand
3785         predicate.
3787 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
3789         * config/i386/i386.md (float partial SSE register stall splitter): Move
3790         splitter near its instruction pattern.
3791         (float_extend partial SSE register stall splitter): Ditto.
3792         (float_truncate partial SSE register stall splitter): Ditto.
3794 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
3796         PR target/86794
3797         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3798         to speculation_safe_value_not_needed.
3800         PR target/85666
3801         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
3802         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
3803         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
3804         leaf_function_p, instead use has_hard_reg_initial_val.
3806 2018-09-09  Nathan Sidwell  <nathan@acm.org>
3808         * gcc.h (pfatal_with_name): Don't declare here.
3809         * gcc.c (pfatal_with_name): Make static.
3811 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3813         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
3814         earlyclobber.
3816 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
3818         PR rtl-optimization/85458
3819         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
3820         priority hook to reduce the priority of EXPR.
3822 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
3824         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
3825         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
3826         with X87_ENABLE_FLOAT.  Remove preparation code.
3827         (*float<SWI48:mode><MODEF:mode>2): Rename from
3828         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
3829         math using "enabled" attribute.
3830         (*floatdi<MODEF:mode>2_i387): Rename from
3831         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
3832         enable for 32bit targets only.
3833         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
3834         splitter.
3835         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
3836         as operand 1 predicate.  Rewrite as define_insn_and_split.
3837         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
3839 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3841         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
3842         to fallthru to FLOAT case.
3844 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3846         PR target/86731
3847         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
3848         around folding of vec_sl to handle out of range shift values.
3850 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
3852         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
3853         Update callers to gen_fix_trunc<mode>_i387_fisttp
3854         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
3855         nonimmediate_operand.
3856         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
3857         and corresponding splitters.
3858         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
3859         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
3860         (fix_truncdi_i387_with_temp): Remove insn pattern
3861         and corresponding splitters.
3862         (fix_trunc<mode>_i387): Change operand 0 predicate to
3863         nonimmediate_operand.
3864         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
3865         and corresponding splitters.
3866         (*fistdi2_1): Remove.
3867         (fistdi2): Ditto.
3868         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
3869         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
3870         (*fist<mode>2_1): Remove.
3871         (fist<mode>2): Ditto.
3872         (fist<mode>2_with_temp): Remove insn pattern and corresponding
3873         splitters.
3874         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
3875         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
3876         (fistdi2_<rounding>): Change operand 0 predicate to
3877         nonimmediate_operand.
3878         (fistdi2_<rounding>_with_temp): Remove insn pattern
3879         and corresponding splitters.
3880         (fist<mode>2_<rounding>): Change operand 0 predicate to
3881         nonimmediate_operand.
3882         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
3883         and corresponding splitters.
3885         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
3887 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3889         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3890         the init value.
3892 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3894         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3895         early gimple folding of vec_splat().
3896         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3897         * gimple-fold.h: Add an extern define for tree_vec_extract().
3899 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
3901         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3902         wrappers around TREE_TYPE comparisons.
3904 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3906         PR target/80080
3907         * config/s390/predicates.md: Add nonsym_memory_operand.
3908         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3909         contains a SYMBOL_REF, load it into an intermediate pseudo.
3910         (s390_emit_compare_and_swap): Legitimize operand.
3911         * config/s390/s390.md: Use the new nonsym_memory_operand
3912         with UNSPECV_CAS patterns.
3914 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3916         PR target/80080
3917         * config/s390/s390-passes.def: New file.
3918         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3919         declaration.
3920         (make_pass_s390_early_mach): Add declaration.
3921         * config/s390/s390.c (make_pass_s390_early_mach):
3922         (s390_option_override): Remove dynamic registration.
3923         * config/s390/t-s390: Add s390-passes.def.
3925 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3927         * config/s390/s390.c (s390_decompose_constant_pool_ref):
3928         Remove UNSPEC_LTREL_BASE check.
3929         (annotate_constant_pool_refs): Likewise.
3930         (find_constant_pool_ref): Likewise.
3931         (find_ltrel_base): Removed.
3932         (replace_ltrel_base): Removed.
3933         (s390_mainpool_finish): Remove replace_ltrel_base call.
3934         (s390_chunkify_start): Remove pending LTREL_BASE logic.
3935         (s390_chunkify_finish): Remove replace_ltrel_base call.
3936         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3938 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
3940         PR target/86779
3941         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3942         to speculation_safe_value_not_needed.
3944 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
3945             Bernd Schmidt  <bernds_cb1@t-online.de>
3947         * config/nvptx/nvptx-opts.h: New file.
3948         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3949         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3950         (ASM_SPEC): Define.
3951         (TARGET_SM35): New macro.
3952         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3953         correct predicate.
3954         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3955         values.
3956         (misa=): New option.
3957         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3959 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
3961         * config/i386/i386.md (truncdfsf2): Remove expander.
3962         (truncdfsf2_with_temp): Ditto.
3963         (truncxf<mode>2): Ditto.
3964         (*truncdfsf_fast_mixed): Remove insn pattern.
3965         (*truncdfsf_fast_i387): Ditto.
3966         (*truncdfsf_mixed): Ditto.
3967         (*truncdfsf_i387): Ditto.
3968         (*truncdfsf2_i387_1): Ditto.
3969         (*truncxfsf2_mixed): Ditto.
3970         (*truncxfdf2_mixed): Ditto.
3971         (*truncxf<mode>2_i387_noop): Ditto. Update callers
3972         to call gen_truncxf<mode>2 instead.
3973         (*truncxf<mode>2_i387): Remove.
3974         (reg->reg splitters): Remove splitter pattern.
3975         (reg->mem splitters): Ditto.
3977         (truncdfsf2): New insn pattern.
3978         (truncxf<mode>2): Ditto.
3980 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3982         * tree-ssa-math-opts.c (is_mult_by): New function.
3983         (is_square_of): Use the above.
3984         (optimize_recip_sqrt): New function.
3985         (pass_cse_reciprocals::execute): Use the above.
3987 2018-09-05  Richard Biener  <rguenther@suse.de>
3989         PR bootstrap/87134
3990         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3991         to zero-init the emplaced vec.
3993 2018-09-05  Martin Liska  <mliska@suse.cz>
3995         PR tree-optimization/87205
3996         * tree-switch-conversion.c (pass_lower_switch::execute):
3997         Group cases for switch statements.
3999 2018-09-05  Richard Biener  <rguenther@suse.de>
4001         PR tree-optimization/87217
4002         * tree-ssa-sccvn.c (vuse_valueize): New.
4003         (vn_reference_lookup_pieces): Use it.
4004         (vn_reference_lookup): Likewise.
4006 2018-09-05  Nathan Sidwell  <nathan@acm.org>
4008         PR c++/87137
4009         * stor-layout.c (place_field): Scan forwards to check last
4010         bitfield when ms_bitfield_placement is in effect.
4012 2018-09-05  Richard Biener  <rguenther@suse.de>
4014         PR bootstrap/87225
4015         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
4016         return.
4018 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
4019             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4021         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
4022         * config.gcc (extra_objs): Build it.
4023         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
4024         Likewise.
4025         * config/aarch64/aarch64-passes.def
4026         (pass_tag_collision_avoidance): New pass.
4027         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
4028         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
4029         (aarch64_classify_address): Remove static qualifier.
4030         (aarch64_address_info, aarch64_address_type): Move to...
4031         * config/aarch64/aarch64-protos.h: ... here.
4032         (make_pass_tag_collision_avoidance): New function.
4033         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
4034         New tuning flag.
4036 2018-09-05  Martin Liska  <mliska@suse.cz>
4038         * doc/gcov.texi: Update documentation of humar
4039         readable mode.
4040         * gcov.c (format_count): Print one decimal place, it provides
4041         more fine number of situations like '1G' vs. '1.4G'.
4043 2018-09-05  Martin Liska  <mliska@suse.cz>
4045         PR target/87164
4046         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
4047         * optc-gen.awk: Allow 'Var' for Deprecated options in order
4048         to generate a MASK value.
4050 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
4052         PR debug/86593
4053         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
4054         if frame pointer isn't used.
4055         (compute_frame_pointer_to_fb_displacement): Likewise.
4057 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
4059         PR target/87198
4060         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
4061         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
4062         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
4063         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
4064         and OPTION_MASK_ISA_XSAVEC_UNSET.
4066 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
4068         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
4069         XOR operations in NAND case.
4071 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4073         * wide-int-range.cc (wide_int_range_convert): New.
4074         * wide-int-range.h (wide_int_range_convert): New.
4075         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
4076         code into wide_int_range_convert.
4077         (extract_range_into_wide_ints): Do not munge anti range constants
4078         into the entire domain.  Just return the range back.
4080 2018-09-04  Martin Liska  <mliska@suse.cz>
4082         * genmatch.c (output_line_directive): Add new argument
4083         fnargs.
4084         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
4086 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4088         * doc/invoke.texi (Option Summary): Add whitespace.
4090         * doc/invoke.texi (Option Summary): Add -Waligned-new.
4092 2018-09-04  Richard Biener  <rguenther@suse.de>
4094         PR tree-optimization/87211
4095         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
4096         backedge value we're supposed to treat as VARYING also number
4097         the PHI to VARYING in case it got a different value-number already.
4099 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
4101         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
4102         (extract_range_from_binary_expr_1): Do not call
4103         vrp_can_optimize_bit_op.
4104         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
4105         static.
4106         (wide_int_range_get_mask_and_bounds): New.
4107         (wide_int_range_optimize_bit_op): New.
4108         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
4109         (wide_int_range_bit_and): Same.
4110         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
4111         (wide_int_range_optimize_bit_op): New.
4112         (wide_int_range_get_mask_and_bounds): New.
4114 2018-09-04  Richard Biener  <rguenther@suse.de>
4116         PR tree-optimization/87176
4117         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
4118         variable.  When value-numbering a virtual PHI node make sure
4119         to not value-number to the backedge value.
4121 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
4123         * doc/extend.texi (Long Long, Hex Floats): Document support for
4124         long long and hex floats in more recent versions of ISO C++.
4126 2018-09-03  Richard Biener  <rguenther@suse.de>
4128         PR tree-optimization/87177
4129         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
4130         cleanup.
4132 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4134         * bb-reorder.c (edge_order): Convert to C-qsort-style
4135         tri-state comparator.
4136         (reorder_basic_blocks_simple): Change std::stable_sort to
4137         gcc_stablesort.
4139 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4141         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
4142         tri-state comparator.
4143         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
4145 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4147         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
4148         (mergesort): ... here as maximum count for using netsort.
4149         (gcc_qsort): Set nlim to 3 if stable sort is requested.
4150         (gcc_stablesort): New.
4151         * system.h (gcc_stablesort): Declare.
4153 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
4155         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
4156         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
4157         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
4159 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
4161         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
4162         lxsdx and stxsdx alternatives.
4163         (*mov<mode>_hardfloat64): Ditto.
4164         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
4166 2018-09-03  Richard Biener  <rguenther@suse.de>
4168         PR tree-optimization/87200
4169         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
4170         simplify result.
4172 2018-09-03  Martin Liska  <mliska@suse.cz>
4174         PR tree-optimization/87201
4175         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4176         Fix parenthesis in an expression.
4178 2018-09-03  Richard Biener  <rguenther@suse.de>
4180         PR tree-optimization/87197
4181         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
4182         visited.  CSE the VN_INFO hashtable lookup.
4184         PR tree-optimization/87169
4185         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
4186         iterating make sure there's no extra backedges from irreducible
4187         regions feeding the header.  Mark the destination block
4188         executable.
4190 2018-09-03  Martin Liska  <mliska@suse.cz>
4192         PR driver/83193
4193         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
4194         * common/common-targhooks.c (default_get_valid_option_values):
4195         New function.
4196         * common/common-targhooks.h (default_get_valid_option_values):
4197         Likewise.
4198         * common/config/i386/i386-common.c: Move processor_target_table
4199         from i386.c.
4200         (ix86_get_valid_option_values): New function.
4201         (TARGET_GET_VALID_OPTION_VALUES): New macro.
4202         * config/i386/i386.c (struct ptt): Move to i386-common.c.
4203         (PTA_*): Move all defined masks into i386-common.c.
4204         (ix86_function_specific_restore): Use new processor_cost_table.
4205         * config/i386/i386.h (struct ptt): Moved from i386.c.
4206         (struct pta): Likewise.
4207         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
4208         * doc/tm.texi.in: Likewise.
4209         * opt-suggestions.c (option_proposer::suggest_option):
4210         Pass prefix to build_option_suggestions.
4211         (option_proposer::get_completions): Likewise.
4212         (option_proposer::build_option_suggestions): Use the new target
4213         hook.
4214         * opts.c (struct option_help_tuple): New struct.
4215         (print_filtered_help): Use the new target hook.
4217 2018-09-03  Martin Liska  <mliska@suse.cz>
4219         PR middle-end/59521
4220         * predict.c (set_even_probabilities): Add likely_edges
4221         argument and handle cases where we have precisely one
4222         likely edge.
4223         (combine_predictions_for_bb): Catch also likely_edges.
4224         (tree_predict_by_opcode): Handle gswitch statements.
4225         * tree-cfg.h (find_case_label_for_value): New declaration.
4226         (find_taken_edge_switch_expr): Likewise.
4227         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
4228         Find pivot in decision tree based on probabily, not by number of
4229         nodes.
4231 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
4233         * doc/standards.texi (Standards): Update Objective-C reference.
4235 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4237         * doc/install.texi (Prerequisites): Update link for MPC.
4239 2018-09-01  Michael Matz  <matz@suse.de>
4241         PR tree-optimization/87074
4242         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
4243         PHIs for outer-loop uses.
4245 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4247         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
4248         * doc/invoke.texi (C Dialect Options): Ditto.
4250 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
4252         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
4254 2018-08-31  Richard Biener  <rguenther@suse.de>
4256         PR tree-optimization/87168
4257         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
4258         (rpo_elim::eliminate_avail): When OP was not visited it must
4259         be available.
4261 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
4263         * tree-vrp.c (copy_value_range): Convert param "from" from
4264         "value_range *" to "const value_range *".
4265         (range_is_null): Likewise for param "vr".
4266         (range_int_cst_p): Likewise.
4267         (range_int_cst_singleton_p): Likewise.
4268         (symbolic_range_p): Likewise.
4269         (value_ranges_intersect_p): Likewise for both params.
4270         (value_range_nonnegative_p): Likewise for param "vr".
4271         (value_range_constant_singleton): Likewise.
4272         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
4273         (extract_range_into_wide_ints): Likewise for param "vr".
4274         (extract_range_from_multiplicative_op): Likewise for params "vr0"
4275         and "vr1".
4276         (vrp_can_optimize_bit_op): Likewise.
4277         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
4278         "vr1_".
4279         (extract_range_from_unary_expr): Likewise.
4280         (debug_value_range): Likewise for param "vr".
4281         (value_range::dump): Add "const" qualifier.
4282         (vrp_prop::check_array_ref): Convert local "vr" from
4283         "value_range *" to "const value_range *".
4284         (vrp_prop::check_mem_ref): Likewise.
4285         (vrp_prop::visit_stmt): Likewise for local "old_vr".
4286         (vrp_intersect_ranges_1): Likewise for param "vr_1".
4287         (vrp_intersect_ranges): Likewise.
4288         (simplify_stmt_for_jump_threading): Likewise for local "vr".
4289         (vrp_prop::vrp_finalize): Likewise.
4290         * tree-vrp.h (value_range::dump): Add "const" qualifier.
4291         (vrp_intersect_ranges): Add "const" qualifier to params as above.
4292         (extract_range_from_unary_expr): Likewise.
4293         (value_range_constant_singleton): Likewise.
4294         (symbolic_range_p): Likewise.
4295         (copy_value_range): Likewise.
4296         (extract_range_from_binary_expr_1): Likewise.
4297         (range_int_cst_p): Likewise.
4298         (vrp_set_zero_nonzero_bits): Likewise.
4299         (range_int_cst_singleton_p): Likewise.
4301 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
4303         * config/aarch64/arm_neon.h (vabsd_s64): New.
4304         (vnegd_s64): Likewise.
4306 2018-08-31  Martin Jambor  <mjambor@suse.cz>
4308         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
4310 2018-08-31  Martin Liska  <mliska@suse.cz>
4312         * ipa-icf.c (sem_item::add_type): Use
4313         sem_item::m_type_hash_cache.
4314         * ipa-icf.h: Move the cache from sem_item_optimizer
4315         to sem_item.
4317 2018-08-31  Nathan Sidwell  <nathan@acm.org>
4319         * doc/extend.texi (Backwards Compatibility): Remove implicit
4320         extern C leeway of () being (...).
4322 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4324         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
4326 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
4328         PR target/86684
4329         PR target/87149
4330         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
4332 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
4334         PR middle-end/87138
4335         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
4336         gen_int_mode.  Formatting fixes.
4338 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
4340         * target.def (custom_function_descriptors): Improve documentation.
4341         * doc/tm.texi.in (Trampolines): Expand discussion of function
4342         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
4343         beginning of the section.
4344         * doc/tm.texi: Regenerated.
4346 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
4348         * cfg.h (class auto_edge_flag): Spell out the template-id of the
4349         base class in the initializer list.  This is a workaround for
4350         building with older GCC.
4351         (class auto_bb_flag): Likewise.
4353 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
4355         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
4356         (altivec_vcmpequ<VI_char>_p): Remove star.
4357         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
4358         vector load modes.
4359         (expand_strncmp_vec_sequence): New function.
4360         (emit_final_str_compare_vec): New function.
4361         (expand_strn_compare): Add support for vector strncmp.
4362         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
4363         length specification to bytes.
4364         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
4365         (vcmpnezb_p): New pattern.
4366         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
4367         for option -mstring-compare-inline-limit.
4369 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
4371         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
4372         (PTA_SKYLAKE): Add PTA_AES.
4373         (PTA_GOLDMONT): Likewise.
4375 2018-08-29  Jan Hubicka  <jh@suse.cz>
4377         PR lto/86517
4378         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
4379         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
4381 2018-08-29  Jan Hubicka  <jh@suse.cz>
4383         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
4384         TYPE_STUB_DECL.
4385         (hash_tree): Do not visit TYPE_STUB_DECL.
4386         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
4387         stream TYPE_STUB_DECL.
4388         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
4389         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
4390         after free_lang_data.
4391         (type_in_anonymous_namespace_p): Likewise.
4393 2018-08-29  Jan Hubicka  <jh@suse.cz>
4395         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4396         comment that it has to be even number.
4397         (class sreal): Change m_sig type to int32_t.
4398         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4399         int64_t for temporary calculations.
4400         (sreal_verify_basics): Drop one bit from minimum and maximum.
4402 2018-08-30  Richard Biener  <rguenther@suse.de>
4404         PR tree-optimization/87147
4405         * tree-ssa-sccvn.c (SSA_VISITED): New function.
4406         (visit_phi): When the degenerate result is from the backedge and
4407         we didn't visit its definition yet drop to VARYING.
4408         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
4410 2018-08-29  Jan Hubicka  <jh@suse.cz>
4412         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
4413         DECL_VINDEX.
4414         (hash_tree): Likewise.
4416 2018-08-29  Jan Hubicka  <jh@suse.cz>
4418         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
4419         and TYPE_NEXT_REF_TO.
4421 2018-08-29  Jan Hubicka  <jh@suse.cz>
4423         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
4424         comment that it has to be even number.
4425         (class sreal): Change m_sig type to int32_t.
4426         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
4427         int64_t for temporary calculations.
4428         (sreal_verify_basics): Drop one bit from minimum and maximum.
4430 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
4432         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
4434 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
4436         PR middle-end/86995
4437         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
4438         if to_add is negative.
4440 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4442         PR middle-end/87053
4443         * builtins.c (c_strlen): Improve range checks.
4445 2018-08-29  Martin Sebor  <msebor@redhat.com>
4446             Jeff Law  <law@redhat.com>
4448         PR tree-optimization/86714
4449         PR tree-optimization/86711
4450         * builtins.c (c_strlen): Add arguments to call to string_constant.
4451         * expr.c (string_constant): Add argument.  Detect missing nul
4452         terminator and outermost declaration it's missing in.
4453         * expr.h (string_constant): Add argument.
4454         * fold-const.c (read_from_constant_string): Add arguments to call to
4455         string_constant.
4456         (c_getstr): Likewise.
4457         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4458         to string_constant.
4459         * tree-ssa-strlen.c (get_stridx): Likewise.
4461 2018-08-29  Jan Hubicka  <jh@suse.cz>
4463         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
4464         Do not stream DECL_VINDEX.
4465         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
4466         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
4467         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
4469 2018-08-29  Richard Biener  <rguenther@suse.de>
4471         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
4472         virtual operands that are not default defs to honor region
4473         boundaries.
4474         (rpo_vn_valueize): Remove ineffective code here.
4476 2018-08-29  Richard Biener  <rguenther@suse.de>
4478         PR tree-optimization/87132
4479         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
4480         when skipping defs reachable over backedges.
4482 2018-08-29  Richard Biener  <rguenther@suse.de>
4484         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
4485         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
4486         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
4487         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
4488         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
4489         (vn_reference_lookup_3): Remove use of const_parms.
4490         (free_rpo_vn): Do not free const_parms.
4491         (do_rpo_vn): Do not call init_const_parms.
4492         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
4493         SSA_NAME_POINTS_TO_READONLY_MEMORY.
4494         (call_may_clobber_ref_p_1): Likewise.
4496 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
4498         PR other/86726
4499         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
4500         (-O): Ditto.
4501         (-ftree-scev-cprop): Document.
4503 2018-08-29  Jan Hubicka  <jh@suse.cz>
4505         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
4506         parameters.
4507         (sreal constructor): Update.
4508         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
4509         sreal:operator/): Update.
4511 2018-08-29  Martin Liska  <mliska@suse.cz>
4513         * tree-switch-conversion.c (switch_conversion::expand):
4514         Strenghten assumption about gswitch statements.
4516 2018-08-29  Richard Biener  <rguenther@suse.de>
4518         PR tree-optimization/87117
4519         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
4520         re-value-number released SSA VDEFs.
4522 2018-08-29  Richard Biener  <rguenther@suse.de>
4524         PR tree-optimization/87126
4525         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
4527 2018-08-28  Jim Wilson  <jimw@sifive.com>
4529         * config/riscv/pic.md: Rewrite.
4530         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
4531         invalid address.
4532         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
4533         (SOFTF, default_load, softload, softstore): New.
4535 2018-08-28  Jeff Law  <law@redhat.com>
4537         * fold-const.c (fold_binary_loc): Remove recently added assert.
4539 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
4541         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
4542         to OP parmeter of generated function.
4544 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
4546         PR tree-optimization/87009
4547         * match.pd: Add boolean optimizations.
4549 2018-08-28  Martin Sebor  <msebor@redhat.com>
4551         PR middle-end/86631
4552         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
4553         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
4554         (pass_walloca::gate): Use it.
4555         (alloca_call_type): Same.
4556         (pass_walloca::execute): Same.
4557         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
4559 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
4561         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
4562         GCC_VERSION for usage of "__gcc_dump_printf__" format from
4563         >= 3005 to >= 9000.
4565 2018-08-28  Richard Biener  <rguenther@suse.de>
4567         PR tree-optimization/87124
4568         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
4569         constants before looking up avail.
4571 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
4573         PR middle-end/87099
4574         * calls.c (maybe_warn_nonstring_arg): Punt early if
4575         warn_stringop_overflow is zero.  Don't call get_range_strlen
4576         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
4577         Swap comparison operands to have constants on rhs.  Only use
4578         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
4579         increment lenrng[0].
4581 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
4583         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
4584         use of tree_to_shwi.  Remove duplicated test for the size being
4585         a whole number of bytes.
4587 2018-08-28  Richard Biener  <rguenther@suse.de>
4589         PR tree-optimization/87117
4590         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
4591         Handle removed stmt without LHS (GIMPLE_NOP).
4593 2018-08-28  Richard Biener  <rguenther@suse.de>
4595         PR tree-optimization/87117
4596         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
4597         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
4599 2018-08-28  Richard Biener  <rguenther@suse.de>
4601         PR tree-optimization/87117
4602         * tree-ssa-pre.c (compute_avail): Do not make expressions
4603         with predicated values available.
4604         (get_expr_value_id): Assert we do not run into predicated value
4605         expressions.
4607 2018-08-28  Richard Biener  <rguenther@suse.de>
4609         PR tree-optimization/87117
4610         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
4611         get virtual operands.
4612         (get_expr_operands): Handle STRING_CST like other decls.
4614 2018-08-28  Martin Liska  <mliska@suse.cz>
4616         * tree.h: Update documentation of fndecl_built_in_p
4617         functions.
4620 2018-08-27  Jeff Law  <law@redhat.com>
4621         PR tree-optimization/87110
4622         * tree-ssa-dse.c (compute_trims): Handle non-constant
4623         TYPE_SIZE_UNIT.
4625 2018-08-27  Martin Sebor  <msebor@redhat.com>
4627         PR tree-optimization/86914
4628         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
4630 2018-08-27  Martin Sebor  <msebor@redhat.com>
4632         PR tree-optimization/87112
4633         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
4634         the type of the bound argument.
4636 2018-08-27  Jeff Law  <law@redhat.com>
4638         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
4639         type does not have a TYPE_SIZE_UNIT.
4641 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
4643         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
4644         with include of backend.h.
4646 2018-08-27  Richard Biener  <rguenther@suse.de>
4648         PR tree-optimization/86927
4649         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
4650         use const cond reduction code.
4652 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
4654         PR tree-optimization/85758
4655         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
4657 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4659         PR c++/87091
4660         * diagnostic-show-locus.c (class layout_range): Update for
4661         conversion of show_caret_p to a tri-state.
4662         (layout_range::layout_range): Likewise.
4663         (make_range): Likewise.
4664         (layout::maybe_add_location_range): Likewise.
4665         (layout::should_print_annotation_line_p): Don't show annotation
4666         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
4667         (layout::get_state_at_point): Update for conversion of
4668         show_caret_p to a tri-state.  Bail out early for
4669         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
4670         underlining or source colorization.
4671         (gcc_rich_location::add_location_if_nearby): Update for conversion
4672         of show_caret_p to a tri-state.
4673         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
4674         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
4675         Likewise.
4676         (selftest::test_one_liner_labels): Likewise.
4677         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
4678         conversion of show_caret_p to a tri-state.
4679         * pretty-print.c (text_info::set_location): Likewise.
4680         * pretty-print.h (text_info::set_location): Likewise.
4681         * substring-locations.c (format_warning_n_va): Likewise.
4682         * tree-diagnostic.c (default_tree_printer): Likewise.
4683         * tree-pretty-print.c (newline_and_indent): Likewise.
4685 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
4687         PR c++/87091
4688         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
4689         line above for line-insertion fix-it hints.
4690         (selftest::test_fixit_insert_containing_newline): Update the
4691         expected results, and add a test with line-numbering enabled.
4693 2018-08-27  Martin Liska  <mliska@suse.cz>
4695         PR sanitizer/86962
4696         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
4697         params with DECL_HAS_VALUE_EXPR_P.
4699 2018-08-27  Martin Liska  <mliska@suse.cz>
4701         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
4702         selected expansion strategy.
4704 2018-08-27  Martin Liska  <mliska@suse.cz>
4706         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
4707         * builtins.c (is_builtin_fn): Likewise.
4708         * attribs.c (diag_attr_exclusions): Use new function
4709         fndecl_built_in_p and remove check for FUNCTION_DECL if
4710         possible.
4711         (builtin_mathfn_code): Likewise.
4712         (fold_builtin_expect): Likewise.
4713         (fold_call_expr): Likewise.
4714         (fold_builtin_call_array): Likewise.
4715         (fold_call_stmt): Likewise.
4716         (set_builtin_user_assembler_name): Likewise.
4717         (is_simple_builtin): Likewise.
4718         * calls.c (gimple_alloca_call_p): Likewise.
4719         (maybe_warn_nonstring_arg): Likewise.
4720         * cfgexpand.c (expand_call_stmt): Likewise.
4721         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
4722         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
4723         (cgraph_node::verify_node): Likewise.
4724         * cgraphclones.c (build_function_decl_skip_args): Likewise.
4725         (cgraph_node::create_clone): Likewise.
4726         * config/arm/arm.c (arm_insert_attributes): Likewise.
4727         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
4728         * dse.c (scan_insn): Likewise.
4729         * expr.c (expand_expr_real_1): Likewise.
4730         * fold-const.c (operand_equal_p): Likewise.
4731         (fold_binary_loc): Likewise.
4732         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4733         * gimple-low.c (lower_stmt): Likewise.
4734         * gimple-pretty-print.c (dump_gimple_call): Likewise.
4735         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
4736         Likewise.
4737         * gimple.c (gimple_build_call_from_tree): Likewise.
4738         (gimple_call_builtin_p): Likewise.
4739         (gimple_call_combined_fn): Likewise.
4740         * gimplify.c (gimplify_call_expr): Likewise.
4741         (gimple_boolify): Likewise.
4742         (gimplify_modify_expr): Likewise.
4743         (gimplify_addr_expr): Likewise.
4744         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
4745         * ipa-cp.c (determine_versionability): Likewise.
4746         * ipa-fnsummary.c (compute_fn_summary): Likewise.
4747         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
4748         * ipa-split.c (visit_bb): Likewise.
4749         (split_function): Likewise.
4750         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
4751         * lto-cgraph.c (input_node): Likewise.
4752         * lto-streamer-out.c (write_symbol): Likewise.
4753         * omp-low.c (setjmp_or_longjmp_p): Likewise.
4754         (lower_omp_1): Likewise.
4755         * predict.c (strip_predict_hints): Likewise.
4756         * print-tree.c (print_node): Likewise.
4757         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
4758         * trans-mem.c (is_tm_irrevocable): Likewise.
4759         (is_tm_load): Likewise.
4760         (is_tm_simple_load): Likewise.
4761         (is_tm_store): Likewise.
4762         (is_tm_simple_store): Likewise.
4763         (is_tm_abort): Likewise.
4764         (tm_region_init_1): Likewise.
4765         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
4766         * tree-cfg.c (verify_gimple_call): Likewise.
4767         (move_stmt_r): Likewise.
4768         (stmt_can_terminate_bb_p): Likewise.
4769         * tree-eh.c (lower_eh_constructs_2): Likewise.
4770         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
4771         * tree-inline.c (remap_gimple_stmt): Likewise.
4772         (copy_bb): Likewise.
4773         (estimate_num_insns): Likewise.
4774         (fold_marked_statements): Likewise.
4775         * tree-sra.c (scan_function): Likewise.
4776         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
4777         (optimize_stack_restore): Likewise.
4778         (pass_fold_builtins::execute): Likewise.
4779         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
4780         (mark_all_reaching_defs_necessary_1): Likewise.
4781         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
4782         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
4783         (pass_forwprop::execute): Likewise.
4784         * tree-ssa-loop-im.c (stmt_cost): Likewise.
4785         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4786         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
4787         * tree-ssa-strlen.c (get_string_length): Likewise.
4788         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
4789         (find_func_aliases_for_call): Likewise.
4790         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
4791         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
4792         * tree-tailcall.c (find_tail_calls): Likewise.
4793         * tree.c (need_assembler_name_p): Likewise.
4794         (free_lang_data_in_decl): Likewise.
4795         (get_call_combined_fn): Likewise.
4796         * ubsan.c (is_ubsan_builtin_p): Likewise.
4797         * varasm.c (incorporeal_function_p): Likewise.
4798         * tree.h (DECL_BUILT_IN): Remove and replace with
4799         fndecl_built_in_p.
4800         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
4801         (fndecl_built_in_p): New.
4803 2018-08-27  Martin Liska  <mliska@suse.cz>
4805         PR tree-optimization/86847
4806         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
4807         Dump also subtree probability.
4808         (switch_decision_tree::do_jump_if_equal): New function.
4809         (switch_decision_tree::emit_case_nodes): Handle special
4810         situations in balanced tree that can be emitted much simpler.
4811         Fix calculation of probabilities that happen in tree expansion.
4812         * tree-switch-conversion.h (struct cluster): Add
4813         is_single_value_p.
4814         (struct simple_cluster): Likewise.
4815         (struct case_tree_node): Add new function has_child.
4816         (do_jump_if_equal): New.
4818 2018-08-27  Martin Liska  <mliska@suse.cz>
4820         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
4821         Add new argument to bit_test_cluster constructor.
4822         (bit_test_cluster::emit): Set bits really number of values
4823         handlel by a test.
4824         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
4825         probability argument.
4826         * tree-switch-conversion.h (struct bit_test_cluster):
4827         Add m_handles_entire_switch.
4829 2018-08-27  Martin Liska  <mliska@suse.cz>
4831         PR tree-optimization/86702
4832         * tree-switch-conversion.c (jump_table_cluster::emit):
4833         Make probabilities even for values in jump table
4834         according to number of cases handled.
4835         (switch_decision_tree::compute_cases_per_edge): Pass
4836         argument to reset_out_edges_aux function.
4837         (switch_decision_tree::analyze_switch_statement): Likewise.
4838         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
4839         Make it static.
4841 2018-08-27  Martin Liska  <mliska@suse.cz>
4843         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
4844         cfun argument explicitly.
4845         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
4846         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
4847         function gimple_switch_default_bb.
4848         (convert_switch_statements):
4849         (expand_builtins):
4850         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
4851         * stmt.c (label_to_block_fn): Use label_to_block and pass
4852         cfun argument explicitly and use gimple_switch_label_bb.
4853         (expand_case): Likewise.
4854         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
4855         cfun argument explicitly. Likewise.
4856         (make_edges_bb): Likewise.
4857         (make_cond_expr_edges): Likewise.
4858         (get_cases_for_edge): Likewise.
4859         (make_gimple_switch_edges): Likewise.
4860         (label_to_block_fn): Likewise.
4861         (label_to_block): Likewise.
4862         (make_goto_expr_edges): Likewise.
4863         (make_gimple_asm_edges): Likewise.
4864         (main_block_label): Likewise.
4865         (group_case_labels_stmt): Likewise.
4866         (find_taken_edge_computed_goto): Likewise.
4867         (find_taken_edge_switch_expr): Likewise.
4868         (gimple_verify_flow_info): Likewise.
4869         (gimple_redirect_edge_and_branch): Likewise.
4870         (gimple_switch_label_bb): New function.
4871         (gimple_switch_default_bb): Likewise.
4872         (gimple_switch_edge): Likewise.
4873         (gimple_switch_default_edge): Likewise.
4874         * tree-cfg.h (label_to_block_fn): Remove and replace ...
4875         (label_to_block): ... with this.
4876         (gimple_switch_label_bb): New.
4877         (gimple_switch_default_bb): Likewise.
4878         (gimple_switch_edge): Likewise.
4879         (gimple_switch_default_edge): Likewise.
4880         * tree-cfgcleanup.c (convert_single_case_switch): Use
4881         new gimple functions and pass new argument to label_to_block.
4882         (cleanup_control_flow_bb):
4883         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
4884         cfun argument explicitly.
4885         (make_eh_edges): Likewise.
4886         (redirect_eh_dispatch_edge): Likewise.
4887         (lower_resx): Likewise.
4888         (lower_eh_dispatch): Likewise.
4889         (maybe_remove_unreachable_handlers): Likewise.
4890         (unsplit_eh): Likewise.
4891         (cleanup_empty_eh): Likewise.
4892         (verify_eh_edges): Likewise.
4893         (verify_eh_dispatch_edge): Likewise.
4894         * tree-ssa-dom.c (record_edge_info): Likewise.
4895         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4896         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4897         (thread_through_normal_block): Likewise.
4898         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4899         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4900         * tree-switch-conversion.c (switch_conversion::collect): Use new
4901         gimple functions.
4902         (switch_conversion::check_final_bb): Likewise.
4903         (switch_conversion::gather_default_values): Pass new argument
4904         to label_to_block.
4905         (switch_conversion::build_constructors): Likewise.
4906         (switch_decision_tree::compute_cases_per_edge): Use new
4907         gimple_switch_edge function.
4908         (switch_decision_tree::analyze_switch_statement): Pass new argument
4909         to label_to_block.
4910         (switch_decision_tree::try_switch_expansion): Use
4911         gimple_switch_default_edge.
4912         * tree-vrp.c (find_switch_asserts): Pass new argument
4913         to label_to_block.
4914         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4915         (vr_values::simplify_switch_using_ranges): Likewise.
4917 2018-08-27  Richard Biener  <rguenther@suse.de>
4919         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4920         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4922         * tree-ssa-sccvn.h (struct vn_pval): New structure.
4923         (struct vn_nary_op_s): Add unwind_to member.  Add
4924         predicated_values flag and put result into a union together
4925         with a linked list of vn_pval.
4926         (struct vn_ssa_aux): Add name member to make maintaining
4927         a map of SSA name to vn_ssa_aux possible.  Remove no longer
4928         needed info, dfsnum, low, visited, on_sccstack, use_processed
4929         and range_info_anti_range_p members.
4930         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4931         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4932         New functions.
4933         (vn_valueize): New global.
4934         (vn_context_bb): Likewise.
4935         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4936         VN_INFO_PTR_INFO): Remove.
4937         * tree-ssa-sccvn.c: ... (rewrite)
4938         (pass_fre::execute): For -O2+ initialize loops and run
4939         RPO VN in optimistic mode (iterating).  For -O1 and -Og
4940         run RPO VN in non-optimistic mode.
4941         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4942         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4943         * doc/invoke.texi (sccvn-max-scc-size): Remove.
4944         (rpo-vn-max-loop-depth): Document.
4945         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4946         when valuezing the VUSE signals we walked out of the region.
4947         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4948         (phi_translate): Set VN context block to use for availability
4949         lookup.
4950         (compute_avail): Likewise.
4951         (pre_valueize): New function.
4952         (pass_pre::execute): Adjust to the RPO VN API.
4954         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4955         (propagate_constants_for_unrolling): Remove.
4956         (tree_unroll_loops_completely): Perform value-numbering
4957         on the unrolled bodies loop parent.
4959 2018-08-27  Richard Biener  <rguenther@suse.de>
4961         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4962         for partial antic compute.
4964 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
4966         PR rtl-optimization/87065
4967         * combine.c (simplify_if_then_else): Formatting fix.
4968         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4969         check.
4970         (known_cond): Don't return const_true_rtx for vector modes.  Use
4971         CONST0_RTX instead of const0_rtx.  Formatting fixes.
4973 2018-08-27  Martin Liska  <mliska@suse.cz>
4975         PR gcov-profile/87069
4976         * gcov.c (process_file): Record files already processed
4977         and warn about a file being processed multiple times.
4979 2018-08-27  Martin Liska  <mliska@suse.cz>
4981         PR driver/83193
4982         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4983         Set default values for x_aarch64_*_string strings.
4984         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4985         prefix.  For -mabi do not print '=ABI' in help and use
4986         <option_value> format for -msve-vector-bits and -moverride
4987         options.
4989 2018-08-26  Jeff Law  <law@redhat.com>
4991         * config/mips/frame-header-opt.c: Include "backend.h" rather than
4992         "cfg.h"
4994 2018-08-26  Marek Polacek  <polacek@redhat.com>
4996         PR c++/87029, Implement -Wredundant-move.
4997         * doc/invoke.texi: Document -Wredundant-move.
4999 2018-08-25  Martin Sebor  <msebor@redhat.com>
5001         PR tree-optimization/87059
5002         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
5003         to the same type as the other.
5004         * fold-const.c (fold_binary_loc): Assert expectation.
5006 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
5008         * config/darwin.c (machopic_legitimize_pic_address): Clean up
5009         extraneous parentheses, dead code section and formatting.
5011 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
5013         PR c++/87091
5014         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
5015         wide enough for jumps in the line-numbering to be visible.
5016         (layout::print_gap_in_line_numbering): New member function.
5017         (layout::calculate_line_spans): When using line numbering, merge
5018         line spans that are only 1 line apart.
5019         (diagnostic_show_locus): When printing line numbers, show gaps in
5020         line numbering directly, rather than printing headers.
5021         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
5022         line-numbering with multiple line spans.
5023         (selftest::test_fixit_insert_containing_newline_2): Add test of
5024         line-numbering, in which the spans are close enough to be merged.
5026 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5028         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
5029         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
5030         * tree-vrp.c (range_is_nonnull): Remove.
5031         (range_includes_zero_p): Accept value_range instead of min/max.
5032         (extract_range_from_binary_expr_1): Do not early bail on
5033         POINTER_PLUS_EXPR.
5034         Use range_includes_zero_p instead of range_is_nonnull.
5035         (extract_range_from_unary_expr): Use range_includes_zero_p instead
5036         of range_is_nonnull.
5037         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
5038         special case VR_ANTI_RANGE.
5039         (vrp_finalize): Same.
5040         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
5041         instead of min/max.
5042         (range_is_nonnull): Remove.
5043         * vr-values.c (vrp_stmt_computes_nonzero): Use
5044         range_includes_zero_p instead of range_is_nonnull.
5045         (extract_range_basic): Pass value_range to range_includes_zero_p
5046         instead of range_is_nonnull.
5048 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
5050         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
5051         * emit-rtl.h (rtl_data): Remove return_bnd.
5052         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
5053         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
5054         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
5055         (POINTER_BOUNDS_MODE): Remove definition.
5056         (make_pointer_bounds_mode): Remove.
5057         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
5058         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
5059         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
5060         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
5061         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
5062         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
5063         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
5065         * config/i386/i386-modes.def (BND32, BND64): Remove.
5066         * config/i386/i386.c (dbx_register_map): Remove bound registers.
5067         (dbx64_register_map): Ditto.
5068         (svr4_dbx_register_map): Ditto.
5069         (indirect_thunk_bnd_needed): Remove.
5070         (indirect_thunks_bnd_used): Ditto.
5071         (indirect_return_bnd_needed): Ditto.
5072         (indirect_return_via_cx_bnd): Ditto.
5073         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
5074         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
5075         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
5076         (output_indirect_thunk_function): Remove handling of
5077         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
5078         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
5079         (ix86_save_reg): Remove handling of crtl->return_bnd.
5080         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
5081         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
5082         and UNSPEC_BNDLX_ADDR.
5083         (ix86_output_indirect_branch_via_reg): Remove handling of
5084         indirect_thunk_prefix_bnd.
5085         (ix86_output_indirect_branch_via_push): Ditto.
5086         (ix86_output_function_return): Ditto.
5087         (ix86_output_indirect_function_return): Ditto.
5088         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
5089         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
5090         (CALL_USED_REGISTERS): Ditto.
5091         (REG_ALLOC_ORDER): Update for removal of bound registers.
5092         (HI_REGISTER_NAMES): Ditto.
5093         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
5094         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
5095         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
5096         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
5097         (FIRST_PSEUDO_REG): Update.
5098         (BND): Remove mode iterator.
5099         * config/i386/predicates.md (bnd_mem_operator): Remove.
5101 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5103         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
5104         vectors.
5106 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
5108         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
5109         the case in which the permute needs only a single element and
5110         repeats for every vector of the result.  Extend that case to
5111         handle variable-length vectors.
5112         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
5114 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
5116         PR debug/79342
5117         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
5118         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
5120 2018-08-24  Richard Biener  <rguenther@suse.de>
5122         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
5123         bb_flags_allocated members.
5124         (auto_flag): New RAII class for allocating flags.
5125         (auto_edge_flag): New RAII class for allocating edge flags.
5126         (auto_bb_flag): New RAII class for allocating bb flags.
5127         * cfgloop.c (verify_loop_structure): Allocate temporary edge
5128         flag dynamically.
5129         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
5130         in favor of temporarily allocated BB flag.
5131         * hsa-brig.c: Re-order includes.
5132         * hsa-dump.c: Likewise.
5133         * hsa-regalloc.c: Likewise.
5134         * print-rtl.c: Likewise.
5135         * profile-count.c: Likewise.
5137 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
5139         PR target/86989
5140         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
5141         the TOC register.
5143 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
5145         PR 87073/bootstrap
5146         * wide-int-range.cc (wide_int_range_div): Do not ignore result
5147         from wide_int_range_multiplicative_op.
5149 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5151         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
5152         "permutaion".
5154 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
5156         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
5157         to 'expanded'.
5159 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
5161         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
5162         full GENERIC expression used for replacement.
5164 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
5166         * tree-vrp.c (abs_extent_range): Remove.
5167         (extract_range_into_wide_ints): Pass wide ints by reference.
5168         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
5169         Pass wide ints by reference in all calls to
5170         extract_range_into_wide_ints.
5171         * wide-int-range.cc (wide_int_range_div): New.
5172         * wide-int-range.h (wide_int_range_div): New.
5173         (wide_int_range_includes_zero_p): New.
5174         (wide_int_range_zero_p): New.
5176 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
5178         * config/aarch64/aarch64.md (arches): New enum.
5179         (arch): New enum attr.
5180         (arch_enabled): New attr.
5181         (enabled): Now uses arch_enabled only.
5182         (simd, sve, fp16): Removed attribute.
5183         (fp): Attr now defined in terms of 'arch'.
5184         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
5185         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
5186         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
5187         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
5188         attributes into 'arch'.
5189         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
5190         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
5191         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
5192         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
5193         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
5194         'simd' attribute into 'arch'.
5195         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
5196         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
5197         Convert use of 'fp' attribute to 'arch'.
5198         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
5199         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
5200         into 'arch'.
5201         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
5202         (different modes) Merge 'fp' and 'simd' into 'arch'.
5203         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
5204         'simd' into 'arch'.
5206 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
5208         PR rtl-optimization/87026
5209         * expmed.c (canonicalize_comparison): If we can no longer create
5210         pseudoregisters, don't.
5212 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
5214         PR target/86951
5215         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
5216         prototype.
5217         * config/arm/arm.c (speculation_barrier_libfunc): New static
5218         variable.
5219         (arm_init_libfuncs): Initialize it.
5220         (arm_emit_speculation_barrier): New function.
5221         * config/arm/arm.md (speculation_barrier): Call
5222         arm_emit_speculation_barrier for architectures that do not have
5223         DSB or ISB.
5224         (speculation_barrier_insn): Only match on Armv7 or later.
5226 2018-08-23  Richard Biener  <rguenther@suse.de>
5228         PR middle-end/87024
5229         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
5230         calls.
5232 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5234         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
5235         of single-vector TBLs.
5236         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
5237         one input is given.
5239 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
5241         PR target/85910
5242         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
5243         aarch64_evpc_tbl guard.
5245 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5247         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
5248         behaviour.
5250 2018-08-22  Martin Sebor  <msebor@redhat.com>
5252         PR middle-end/87052
5253         * tree-pretty-print.c (pretty_print_string): Add argument.
5254         (dump_generic_node): Call to pretty_print_string with string size.
5256 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
5258         PR rtl-optimization/86771
5259         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
5260         of two SETs into those two SETs, one to be placed at i2, if that SETs
5261         destination is modified between i2 and i3.
5263 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5265         PR tree-optimization/86725
5266         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
5267         function.
5268         (vect_analyze_scalar_cycles_1): Check it.
5270 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5272         PR tree-optimization/86725
5273         * tree-vect-loop.c (vect_is_simple_reduction): When treating
5274         an outer loop phi as a double reduction, make sure that the
5275         single user of the phi result is an inner loop phi.
5277 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5279         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
5280         grouped stores with gaps to a strided group.
5282 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
5284         * tree-vect-stmts.c (get_group_load_store_type)
5285         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
5286         first statement in a group.
5288 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5290         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
5291         the sequence used in gcc/gcc.c.
5293 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5295         PR other/704
5296         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
5297         building it.
5299 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5301         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
5302         Darwin10-specific unwinder-shim.
5303         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
5304         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
5305         New to cater for Darwin10 Rosetta.
5307 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5309         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
5310         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
5312 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
5314         PR bootstrap/81033
5315         PR target/81733
5316         PR target/52795
5317         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
5318         (dwarf2out_switch_text_section): Generate a local label for the
5319         second function sub-section and apply it as the second FDE start
5320         label.
5321         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
5322         second sub-section start.
5324 2018-08-22  Richard Biener  <rguenther@suse.de>
5326         PR tree-optimization/86988
5327         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
5329 2018-08-22  Richard Biener  <rguenther@suse.de>
5331         PR tree-optimization/86945
5332         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
5334 2018-08-22  Alexandre Oliva <oliva@adacore.com>
5336         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
5337         a comment about how uses of r2 for .sdata2 come about.
5339 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
5341         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
5343 2018-08-21  Marek Polacek  <polacek@redhat.com>
5345         PR c++/86981, Implement -Wpessimizing-move.
5346         * doc/invoke.texi: Document -Wpessimizing-move.
5348 2018-08-21  Jan Hubicka  <jh@suse.cz>
5350         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
5351         * tree.h (is_redundant_typedef): Remove.
5352         * dwarf2out.c (is_redundant_typedef): Turn into static function.
5354 2018-08-21  Jan Hubicka  <jh@suse.cz>
5356         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
5357         when possible.
5359 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
5361         * expmed.c (extract_low_bits): Reject invalid subregs early.
5363 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5365         PR middle-end/86121
5366         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
5367         behaviour.
5369 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5371         * config/vxworks.h: Guard vxworks_asm_out_constructor and
5372         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
5373         * config/vxworks.c: Likewise.
5375 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5377         * config/vxworks.c: Set targetm.have_ctors_dtors
5378         if HAVE_INITFINI_ARRAY_SUPPORT.
5379         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
5380         if HAVE_INITFINI_ARRAY_SUPPORT.
5382 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5384         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
5385         default search path for VxWorks < 7.
5387 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5389         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
5390         (get_format_string): Refer to c_getstr.
5392 2018-08-21  Tom de Vries  <tdevries@suse.de>
5394         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5395         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5396         (debuginfo_early_stop): Declare.
5397         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
5398         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5399         (debuginfo_early_stop): New function.
5400         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
5401         and debuginfo_early_stop.
5402         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
5403         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
5404         (general_init): Call debuginfo_early_init.
5405         (finalize): Call debuginfo_fini.
5406         (do_compile): Call debuginfo_init.
5407         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
5408         -fdump-early-debug.
5409         (@item -fdump-debug, @item -fdump-earlydebug): Add.
5411 2018-08-21  Tom de Vries  <tdevries@suse.de>
5413         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
5414         flag_dump_noaddr and flag_dump_unnumbered.
5416 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
5418         * wide-int-range.cc (wide_int_range_abs): New.
5419         (wide_int_range_order_set): Rename from wide_int_range_min_max.
5420         * wide-int-range.h (wide_int_range_abs): New.
5421         (wide_int_range_min_max): New.
5422         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
5423         case to call wide_int_range_abs.
5424         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
5425         (extract_range_from_abs_expr): Delete.
5427 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
5429         PR target/87033
5430         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
5431         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
5432         for indexed loads.
5434 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5435             Jeff Law <law@redhat.com>
5437         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
5438         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
5440 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
5442         PR other/84889
5443         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
5444         (decl_attributes): Likewise.
5445         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
5446         instance.
5447         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5448         * diagnostic-core.h (class auto_diagnostic_group): New class.
5449         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
5450         (diagnostic_report_diagnostic): Handle the first diagnostics within
5451         a group.
5452         (emit_diagnostic): Add auto_diagnostic_group instance.
5453         (inform): Likewise.
5454         (inform_n): Likewise.
5455         (warning): Likewise.
5456         (warning_at): Likewise.
5457         (warning_n): Likewise.
5458         (pedwarn): Likewise.
5459         (permerror): Likewise.
5460         (error): Likewise.
5461         (error_n): Likewise.
5462         (error_at): Likewise.
5463         (sorry): Likewise.
5464         (fatal_error): Likewise.
5465         (internal_error): Likewise.
5466         (internal_error_no_backtrace): Likewise.
5467         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
5468         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
5469         * diagnostic.h (struct diagnostic_context): Add fields
5470         "diagnostic_group_nesting_depth",
5471         "diagnostic_group_emission_count", "begin_group_cb",
5472         "end_group_cb".
5473         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
5474         Add auto_diagnostic_group instance(s).
5475         (find_explicit_erroneous_behavior): Likewise.
5476         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
5477         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
5478         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
5479         (gimplify_va_arg_expr): Likewise.
5480         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
5481         (HSA_SORRY_AT): Likewise.
5482         * ipa-devirt.c (compare_virtual_tables): Likewise.
5483         (warn_odr): Likewise.
5484         * multiple_target.c (expand_target_clones): Likewise.
5485         * opts-common.c (cmdline_handle_error): Likewise.
5486         * reginfo.c (globalize_reg): Likewise.
5487         * substring-locations.c (format_warning_n_va): Likewise.
5488         * tree-inline.c (expand_call_inline): Likewise.
5489         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
5490         * tree-ssa-loop-niter.c
5491         (do_warn_aggressive_loop_optimizations): Likewise.
5492         * tree-ssa-uninit.c (warn_uninit): Likewise.
5493         * tree.c (warn_deprecated_use): Likewise.
5495 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
5497         PR target/87014
5498         * config/i386/i386.md (eh_return): Always update EH return
5499         address in word_mode.
5501 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
5503         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
5504         TARGET_SPLIT_COMPLEX_ARG is defined.
5506 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5508         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
5510 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5512         PR target/86984
5513         * expr.c (expand_assignment): Assert that bitpos is positive.
5514         (store_field): Likewise
5515         (expand_expr_real_1): Make sure that bitpos is positive.
5516         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
5517         integer overflow.
5519 2018-08-20  Nathan Sidwell  <nathan@acm.org>
5521         * Makefile.in (CPP_ID_DATA_H): Delete.
5522         (CPP_INTERNAL_H): Don't add it.
5523         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
5524         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
5526 2018-08-20  Richard Biener  <rguenther@suse.de>
5528         PR tree-optimization/78655
5529         * tree-vrp.c (extract_range_from_binary_expr_1): Make
5530         pointer + offset nonnull if either operand is nonnull work.
5532 2018-08-20  Tom de Vries  <tdevries@suse.de>
5534         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
5535         unless the referenced die describes the added property using
5536         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
5537         Otherwise, add a DW_AT_location to the referenced die.
5539 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
5541         PR target/86994
5542         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
5543         register_operand when calling ix86_set_reg_reg_cost.
5544         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
5545         Set *total to 0 for operands that satisfy x86_64_immediate_operand
5546         predicate and to 1 otherwise.
5548 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
5550         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
5551         emit a diagnostic that it is not supported and reset the option.
5552         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
5553         supported and consume the option.  (ASM_FINAL_SPEC): New.
5555 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
5557         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
5558         a sentence.
5560 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
5562         C-SKY port: Documentation
5564         * doc/extend.texi (C-SKY Function Attributes): New section.
5565         * doc/invoke.texi (Option Summary): Add C-SKY options.
5566         (C-SKY Options): New section.
5567         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
5569 2018-08-17  Jojo  <jijie_rong@c-sky.com>
5570             Huibin Wang  <huibin_wang@c-sky.com>
5571             Sandra Loosemore  <sandra@codesourcery.com>
5572             Chung-Lin Tang  <cltang@codesourcery.com>
5574         C-SKY port: Backend implementation
5576         * config/csky/*: New.
5577         * common/config/csky/*: New.
5579 2018-08-17  Jojo  <jijie_rong@c-sky.com>
5580             Huibin Wang  <huibin_wang@c-sky.com>
5581             Sandra Loosemore  <sandra@codesourcery.com>
5582             Chung-Lin Tang  <cltang@codesourcery.com>
5583             Andrew Jenner  <andrew@codesourcery.com>
5585         C-SKY port: Configury
5587         * config.gcc (csky-*-*): New.
5588         * configure.ac: Add csky to targets for dwarf2 debug_line support.
5589         * configure: Regenerated.
5591 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
5593         * dump-context.h: Include "dumpfile.h".
5594         (dump_context::dump_printf_va): Convert final param from va_list
5595         to va_list *.  Convert from ATTRIBUTE_PRINTF to
5596         ATTRIBUTE_GCC_DUMP_PRINTF.
5597         (dump_context::dump_printf_loc_va): Likewise.
5598         * dumpfile.c: Include "stringpool.h".
5599         (make_item_for_dump_printf_va): Delete.
5600         (make_item_for_dump_printf): Delete.
5601         (class dump_pretty_printer): New class.
5602         (dump_pretty_printer::dump_pretty_printer): New ctor.
5603         (dump_pretty_printer::emit_items): New member function.
5604         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
5605         function.
5606         (dump_pretty_printer::emit_item): New member function.
5607         (dump_pretty_printer::stash_item): New member function.
5608         (dump_pretty_printer::format_decoder_cb): New member function.
5609         (dump_pretty_printer::decode_format): New member function.
5610         (dump_context::dump_printf_va): Reimplement in terms of
5611         dump_pretty_printer.
5612         (dump_context::dump_printf_loc_va): Convert final param from va_list
5613         to va_list *.
5614         (dump_context::begin_scope): Reimplement call to
5615         make_item_for_dump_printf.
5616         (dump_printf): Update for change to dump_printf_va.
5617         (dump_printf_loc): Likewise.
5618         (selftest::test_capture_of_dump_calls): Convert "stmt" from
5619         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
5620         with %T, %E, and %G.
5621         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
5622         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
5623         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
5624         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
5625         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
5626         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
5627         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
5628         within a dump_printf_loc call to "%wu".
5629         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
5630         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
5631         missing space after "=".
5632         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
5633         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
5634         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
5635         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
5636         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
5637         duplicate "vectorized" from message.
5639 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
5641         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
5642         polyNxK_t element's TYPE_STRING_FLAG.
5644 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
5646         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
5647         (they were unnamed before).  Fix comments.
5649 2018-08-17  Nathan Sidwell  <nathan@acm.org>
5651         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
5653 2018-08-17  Richard Biener  <rguenther@suse.de>
5655         PR tree-optimization/86841
5656         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
5658 2018-08-17  Martin Liska  <mliska@suse.cz>
5660         * common.opt: Remove Warn, Init and Report for options with
5661         Ignore/Deprecated flag. Warning is done automatically for
5662         Deprecated flags.
5663         * config/i386/i386.opt: Likewise.
5664         * config/ia64/ia64.opt: Likewise.
5665         * config/rs6000/rs6000.opt: Likewise.
5666         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
5667         Remove usage of flag_check_pointer_bounds.
5668         * lto-wrapper.c (merge_and_complain): Do not handle
5669         OPT_fcheck_pointer_bounds.
5670         (append_compiler_options): Likewise.
5671         * opt-functions.awk: Do not handle Deprecated.
5672         * optc-gen.awk: Check that Var, Report and Init are not
5673         used for an option with Ignore/Deprecated flag.
5674         * opts-common.c (decode_cmdline_option): Do not report
5675         CL_ERR_DEPRECATED.
5676         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
5677         options.
5678         * opts.h (struct cl_option): Remove cl_deprecated flag.
5679         (CL_ERR_DEPRECATED): Remove error enum value.
5681 2018-08-17  Richard Biener  <rguenther@suse.de>
5683         PR middle-end/86505
5684         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
5685         across a va-arg-pack using call adjust its return value accordingly.
5687 2018-08-16  Martin Sebor  <msebor@redhat.com>
5689         PR tree-optimization/86853
5690         * gimple-ssa-sprintf.c (struct format_result): Rename member.
5691         (struct fmtresult): Add member and initialize it in ctors.
5692         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
5693         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
5694         (format_directive): Set POSUNDER4K when MAYFAIL is set.
5695         (parse_directive): Handle %C same as %c.
5696         (sprintf_dom_walker::compute_format_length): Adjust.
5697         (is_call_safe): Adjust.
5699 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5701         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
5702         for determining how to count the elements.
5703         * builtins.h (c_strlen): Adjust prototype.
5704         * expr.c (string_constant): Add new parameter mem_size.
5705         Set *mem_size appropriately.
5706         * expr.h (string_constant): Adjust protoype.
5707         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
5708         * gimple-fold.h (get_range_strlen): Adjust prototype.
5709         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
5710         (format_string): Call get_string_length with eltsize.
5712 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5714         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
5715         to emit the span, rather than setting it as the prefix.
5717 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
5719         * diagnostic-show-locus.c (layout::start_annotation_line): Add
5720         "margin_char" parameter, defaulting to space.  Use it in place
5721         of pp_space for the initial part of the margin.
5722         (layout::print_leading_fixits): Use '+' when filling the margin
5723         of line-insertion fix-it hints.
5725 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5727         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
5728         Delete.
5730 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5732         * config/rs6000/altivec.md: Don't set length attribute to the default
5733         value.
5734         * config/rs6000/darwin.md: Ditto.
5735         * config/rs6000/dfp.md: Ditto.
5736         * config/rs6000/htm.md: Ditto.
5737         * config/rs6000/rs6000.md: Ditto.
5738         * config/rs6000/sync.md: Ditto.
5739         * config/rs6000/vsx.md: Ditto.
5741 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5743         * config/rs6000/altivec.md: Don't set length attribute to the default
5744         value, for branch instructions.
5745         * config/rs6000/darwin.md: Ditto.
5746         * config/rs6000/rs6000.md: Ditto.
5748 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
5750         * config/rs6000/rs6000.md (length): Always define as const_int 4.
5751         (unnamed conditional branch define_insn): Set length to 4 or 8
5752         depending on offset.
5753         (<bd>_<mode>): Similar, for alternative 0.
5754         (<bd>tf_<mode>): Ditto.
5756 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5758         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
5760 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
5762         * doc/rtl.texi: Replace old RTX class names with new names.
5765 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
5767         * expmed.h (canonicalize_comparison): New declaration.
5768         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
5769         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
5770         * optabs.c (prepare_cmp_insn): Likewise.
5771         * rtl.h (unsigned_condition_p): New function which checks if a
5772         comparison operator is unsigned.
5774 2018-08-16  Nathan Sidwell  <nathan@acm.org>
5776         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
5777         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
5779 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5781         PR target/84711
5782         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
5783         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
5784         (mov<mov>): ..this and enable unconditionally.
5786 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
5788         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
5790 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
5792         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
5793         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
5794         "Common" with "Target".
5796 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5798         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
5799         * doc/invoke.texi (mmitigate-rop): Remove.
5800         * config/i386/i386.c: Do not include "regrename.h".
5801         (ix86_rop_should_change_byte_p, reg_encoded_number)
5802         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
5803         Remove.
5804         (ix86_reorg): Remove call to ix86_mitigate_rop.
5805         * config/i386/i386.md (attr "modrm_class"): Remove.
5806         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
5807         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
5808         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
5810 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
5812         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
5813         allow folding of mergeh() and mergel() for the float and double types.
5814         (fold_mergehl_helper): Rework to handle building a permute tree
5815         for float vectors.
5817 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
5819         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
5820         for TARGET_SSE.
5822 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
5824         * common.opt (fdiagnostics-show-labels): New option.
5825         * diagnostic-show-locus.c (class layout_range): Add field
5826         "m_label".
5827         (class layout): Add field "m_show_labels_p".
5828         (layout_range::layout_range): Add param "label" and use it to
5829         initialize m_label.
5830         (make_range): Pass in NULL for new "label" param of layout_range's
5831         ctor.
5832         (layout::layout): Initialize m_show_labels_p.
5833         (layout::maybe_add_location_range): Pass in loc_range->m_label
5834         when constructing layout_range instances.
5835         (struct line_label): New struct.
5836         (layout::print_any_labels): New member function.
5837         (layout::print_line): Call it if label-printing is enabled.
5838         (selftest::test_one_liner_labels): New test.
5839         (selftest::test_diagnostic_show_locus_one_liner): Call it.
5840         * diagnostic.c (diagnostic_initialize): Initialize
5841         context->show_labels_p.
5842         * diagnostic.h (struct diagnostic_context): Add field
5843         "show_labels_p".
5844         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5845         -fno-diagnostics-show-labels.
5846         * dwarf2out.c (gen_producer_string): Add
5847         OPT_fdiagnostics_show_labels to the ignored options.
5848         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
5849         param.
5850         (gcc_rich_location::maybe_add_expr): Likewise.
5851         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
5852         label" param, defaulting to NULL.
5853         (gcc_rich_location::add_expr): Add "label" param.
5854         (gcc_rich_location::maybe_add_expr): Likewise.
5855         (class text_range_label): New class.
5856         (class range_label_for_type_mismatch): New class.
5857         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
5858         of format_warning_va.
5859         (fmtwarn_n): Likewise for new params of format_warning_n_va.
5860         * lto-wrapper.c (merge_and_complain): Add
5861         OPT_fdiagnostics_show_labels to the "pick one setting" options.
5862         (append_compiler_options): Likewise to the dropped options.
5863         (append_diag_options): Likewise to the passed-on options.
5864         * opts.c (common_handle_option): Handle the new option.
5865         * selftest-diagnostic.c
5866         (test_diagnostic_context::test_diagnostic_context): Enable
5867         show_labels_p.
5868         * substring-locations.c: Include "gcc-rich-location.h".
5869         (format_warning_n_va): Add "fmt_label" and "param_label" params
5870         and use them as appropriate.
5871         (format_warning_va): Add "fmt_label" and "param_label" params,
5872         passing them on to format_warning_n_va.
5873         (format_warning_at_substring): Likewise.
5874         (format_warning_at_substring_n): Likewise.
5875         * substring-locations.h (format_warning_va): Add "fmt_label" and
5876         "param_label" params.
5877         (format_warning_n_va): Likewise.
5878         (format_warning_at_substring): Likewise.
5879         (format_warning_at_substring_n): Likewise.
5880         * toplev.c (general_init): Initialize global_dc->show_labels_p.
5882 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
5884         PR testsuite/86519
5885         * builtins.c (expand_builtin_memcmp): Do not expand the call
5886         when overflow is detected.
5888 2018-08-15  Martin Sebor  <msebor@redhat.com>
5890         PR tree-optimization/71625
5891         * config/aarch64/aarch64-builtins.c
5892         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5894 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
5896         * config/s390/s390.c (s390_reorg): Remove loop.
5898 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5900         * config/darwin.c
5901          (darwin_function_switched_text_sections): Delete.
5902         * gcc/config/darwin.h
5903          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5905 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
5907         PR target/81685
5908         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5909         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
5910         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5912 2018-08-15  Martin Liska  <mliska@suse.cz>
5914         PR tree-optimization/86925
5915         * predict.c (expr_expected_value_1): When taking
5916         later predictor, assign also probability.
5917         Use fold_build2_initializer_loc in order to fold
5918         the expression in -frounding-math.
5920 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
5922         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5923         patterns.
5924         (expand_vec_perm_1): Try the new method.
5926 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
5928         PR target/86547
5929         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5930         Check whether lra_live_max_point is 0 before dividing.
5932 2018-08-14  Martin Sebor  <msebor@redhat.com>
5934         PR tree-optimization/86650
5935         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5936         (vrp_prop::check_mem_ref): Same.
5938 2018-08-13  Liu Hao <lh_mouse@126.com>
5940         * pretty-print.c (eat_esc_sequence): Swap the foreground and
5941         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5942         and clear it thereafter, as it only works for DBCS.
5944 2018-08-13  Liu Hao <lh_mouse@126.com>
5946         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5947         handle returned by _get_osf_handle().
5949 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5951         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5952         for folding vec_perm.
5954 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
5956         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5957         Add support for gimple-folding of vec_pack() and vec_unpack()
5958         intrinsics.
5960 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
5962         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5963         vec_xst variants to the list.
5964         (rs6000_gimple_fold_builtin): Add support for folding unaligned
5965         vector loads and stores.
5967 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
5969         * config.gcc (rs6000-ibm-aix4.x): Delete.
5970         (rs6000-ibm-aix5.1): Delete.
5971         (rs6000-ibm-aix5.2): Delete.
5972         (rs6000-ibm-aix5.3): Delete.
5973         * config/rs6000/aix43.h: Delete.
5974         * config/rs6000/aix51.h: Delete.
5975         * config/rs6000/aix52.h: Delete.
5976         * config/rs6000/t-aix43: Delete.
5978 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
5980         * config/s390/s390.c (s390_decompose_constant_pool_ref):
5981         New function.
5982         (s390_decompose_address): Factor out constant pool ref
5983         decomposition.
5985 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
5987         * config/nds32/nds32-predicates.c
5988         (nds32_can_use_bclr_p): Change return type as bool.
5989         (nds32_can_use_bset_p): Ditto.
5990         (nds32_can_use_btgl_p): Ditto.
5991         (nds32_can_use_bitci_p): Ditto.
5992         * config/nds32/nds32-protos.h
5993         (nds32_can_use_bclr_p): Change declaration.
5994         (nds32_can_use_bset_p): Ditto.
5995         (nds32_can_use_btgl_p): Ditto.
5996         (nds32_can_use_bitci_p): Ditto.
5998 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6000         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
6001         Support -msched-prolog-epilog option.
6002         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
6004 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6006         * common/config/nds32/nds32-common.c
6007         (nds32_option_optimization_table): Enalbe -malways-align.
6009 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
6011         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
6012         extra_headers.
6013         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
6014         OPT_misr_secure_ case.
6015         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
6016         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
6017         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
6018         secure attribute.
6019         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
6020         (nds32_isr_info): New field security_level.
6021         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
6022         * config/nds32/nds32.md (return_internal): Consider critical attribute.
6023         * config/nds32/nds32.opt (misr-secure): New option.
6024         * config/nds32/nds32_init.inc: New file.
6025         * config/nds32/nds32_isr.h: New file.
6027 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
6029         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
6030         Update comment for atomic instructions.
6031         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
6032         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
6033         Remove.
6034         (atomic_loaddi): Revise fence expansion to only emit fence prior to
6035         load for __ATOMIC_SEQ_CST model.
6036         (atomic_loaddi_1): Remove float register target.
6037         (atomic_storedi): Handle CONST_INT values.
6038         (atomic_storedi_1): Remove float register source.  Add special case
6039         for zero value.
6040         (memory_barrier): New expander and insn.
6042 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
6044         PR tree-optimization/86835
6045         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
6046         new_stmt after def_gsi, make sure to insert new_square_stmt after
6047         that stmt, not 2 stmts before it.
6049 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
6051         PR target/82418
6052         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
6053         instead of SWI48.
6055 2018-08-10  Martin Liska  <mliska@suse.cz>
6057         PR target/83610
6058         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
6059         function type.
6060         * builtins.c (expand_builtin_expect_with_probability):
6061         New function.
6062         (expand_builtin_expect_with_probability): New function.
6063         (build_builtin_expect_predicate): Add new argumnet probability
6064         for BUILT_IN_EXPECT_WITH_PROBABILITY.
6065         (fold_builtin_expect):
6066         (fold_builtin_2):
6067         (fold_builtin_3):
6068         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
6069         * builtins.h (fold_builtin_expect): Set new argument.
6070         * doc/extend.texi: Document __builtin_expect_with_probability.
6071         * doc/invoke.texi: Likewise.
6072         * gimple-fold.c (gimple_fold_call): Pass new argument.
6073         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
6074         also BUILT_IN_EXPECT_WITH_PROBABILITY.
6075         * predict.c (get_predictor_value): New function.
6076         (expr_expected_value): Add new argument probability. Assume
6077         that predictor and probability are always non-null.
6078         (expr_expected_value_1): Likewise.  For __builtin_expect and
6079         __builtin_expect_with_probability set probability.  Handle
6080         combination in binary expressions.
6081         (tree_predict_by_opcode): Simplify code by simply calling
6082         get_predictor_value.
6083         (pass_strip_predict_hints::execute): Add handling of
6084         BUILT_IN_EXPECT_WITH_PROBABILITY.
6085         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
6086         new predictor.
6087         * tree.h (DECL_BUILT_IN_P): New function.
6089 2018-08-10  Martin Liska  <mliska@suse.cz>
6091         PR tree-optimization/85799
6092         * passes.def: Add argument for pass_strip_predict_hints.
6093         * predict.c (class pass_strip_predict_hints): Add new argument
6094         early_p.
6095         (strip_predictor_early): New function.
6096         (pass_strip_predict_hints::execute): Call the function to
6097         strip predictors.
6098         (strip_predict_hints): New function.
6099         * predict.def: Fix comment.
6101 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
6103         * Makefile.in: Clarify which tm.texi to copy over to assert the
6104         right to grant a GFDL license for all.
6106 2018-08-09  Jeff Law  <law@redhat.com>
6108         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
6109         unused variable.
6111 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
6113         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
6114         prototype.
6116 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6118         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
6119         reductions for variable-length vectors.
6121 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
6123         PR other/84889
6124         * common.opt (fdiagnostics-show-line-numbers): New option.
6125         * diagnostic-show-locus.c (class layout): Add fields
6126         "m_show_line_numbers_p" and "m_linenum_width";
6127         (num_digits): New function.
6128         (test_num_digits): New function.
6129         (layout::layout): Initialize new fields.  Update m_x_offset
6130         logic to handle any left margin.
6131         (layout::print_source_line): Print line number when requested.
6132         (layout::start_annotation_line): New member function.
6133         (layout::print_annotation_line): Call it.
6134         (layout::print_leading_fixits): Likewise.
6135         (layout::print_trailing_fixits): Likewise.  Update calls to
6136         move_to_column for new parameter.
6137         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
6138         it to potentially call start_annotation_line.
6139         (layout::show_ruler): Call start_annotation_line.
6140         (selftest::test_line_numbers_multiline_range): New selftest.
6141         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
6142         and selftest::test_line_numbers_multiline_range.
6143         * diagnostic.c (diagnostic_initialize): Initialize
6144         show_line_numbers_p.
6145         * diagnostic.h (struct diagnostic_context): Add field
6146         "show_line_numbers_p".
6147         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
6148         -fno-diagnostics-show-line-numbers.
6149         * dwarf2out.c (gen_producer_string): Add
6150         OPT_fdiagnostics_show_line_numbers to the ignored options.
6151         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
6152         one setting" options.
6153         (append_compiler_options): Likewise to the dropped options.
6154         (append_diag_options): Likewise to the passed-on options.
6155         * opts.c (common_handle_option): Handle the new option.
6156         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
6158 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6160         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
6161         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
6162         third argument of type "const signed char" to descriptions of
6163         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
6164         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
6165         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
6166         __builtin_bcdsub_ov functions.
6168 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6170         PR tree-optimization/86858
6171         * tree-vect-loop.c (vect_is_simple_reduction): Restore
6172         flow_bb_inside_loop_p calls.
6174 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
6176         PR tree-optimization/86871
6177         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
6178         instead of gimple_assign_lhs.
6180 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
6182         PR target/86887
6183         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
6184         register constraint to operand 0.
6185         (add<mode>3_carryinC): Likewise.
6186         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
6188 2018-08-09  Martin Liska  <mliska@suse.cz>
6190         PR c/86895
6191         * common.opt: Remove extra line.
6193 2018-08-09  Martin Liska  <mliska@suse.cz>
6195         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
6196         at the end of a line, make first letter capital and end up
6197         a sentence with a dot.
6198         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
6199         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
6200         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
6201         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
6202         (PARAM_MAX_ISL_OPERATIONS): Likewise.
6203         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
6204         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
6205         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
6206         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
6207         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
6208         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
6209         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
6210         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
6211         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
6212         (PARAM_TREE_REASSOC_WIDTH): Likewise.
6213         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
6214         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
6215         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
6217 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
6219         PR target/84332
6220         * config/s390/s390.c (s390_option_override_internal): Reduce the
6221         stack-clash-protection-probe-interval param if it would be too big
6222         for z900.
6224 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
6226         PR target/46179
6227         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
6228         * config/m68k/m68k.c (handle_move_double): Don't call
6229         m68k_final_prescan_insn.
6230         (m68k_adjust_decorated_operand): Renamed from
6231         m68k_final_prescan_insn, remove first and third operand and
6232         simplify.
6233         (print_operand): Call it.
6234         (print_operand_address): Call it.
6236 2018-08-08  Nathan Sidwell  <nathan@acm.org>
6238         * diagnostic.c (diagnostic_report_current_module): Use
6239         linemap_included_from & linemap_included_from_linemap.
6241 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
6243         * config/aarch64/aarch64-cores.def: Add phecda core.
6244         * config/aarch64/aarch64-tune.md: Regenerate.
6245         * doc/invoke.texi: Add phecda core.
6247 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6249         PR target/85295
6250         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
6251         definitions.
6252         * config/s390/s390.md ("movti"): Add more alternatives for
6253         constant to GPR copies.
6255 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
6257         * config/s390/s390.c: Fix whitespace damage throughout the file.
6258         * config/s390/s390.h: Likewise.
6259         * config/s390/tpf.h: Likewise.
6261 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6263         * config/s390/s390.c (s390_loadrelative_operand_p):
6264         Remove TARGET_CPU_ZARCH usages.
6265         (s390_rtx_costs): Likewise.
6266         (s390_legitimate_constant_p): Likewise.
6267         (s390_cannot_force_const_mem): Likewise.
6268         (legitimate_reload_constant_p): Likewise.
6269         (s390_preferred_reload_class): Likewise.
6270         (legitimize_pic_address): Likewise.
6271         (legitimize_tls_address): Likewise.
6272         (s390_split_branches): Removed.
6273         (s390_add_execute): Removed.
6274         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
6275         (s390_mainpool_start): Likewise.
6276         (s390_mainpool_finish): Likewise.
6277         (s390_mainpool_cancel): Removed.
6278         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
6279         (s390_chunkify_cancel): Likewise.
6280         (s390_return_addr_rtx): Likewise.
6281         (s390_register_info): Remove split_branches_pending_p uages.
6282         (s390_optimize_register_info): Likewise.
6283         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
6284         split_branches_pending_p usages.
6285         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
6286         (s390_load_got): Likewise.
6287         (s390_expand_split_stack_prologue): Likewise.
6288         (output_asm_nops): Likewise.
6289         (s390_function_profiler): Likewise.
6290         (s390_emit_call): Likewise.
6291         (s390_conditional_register_usage): Likewise.
6292         (s390_optimize_prologue): Likewise.
6293         (s390_reorg): Remove TARGET_CPU_ZARCH and
6294         split_branches_pending_p usages.
6295         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
6296         usages.
6297         (s390_output_indirect_thunk_function): Likewise.
6298         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
6299         (TARGET_CPU_ZARCH_P): Removed.
6300         (struct machine_function): Remove split_branches_pending_p.
6301         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
6303 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
6305         * common/config/s390/s390-common.c (processor_flags_table):
6306         Remove flags.
6307         * config.gcc: Remove with_arch/with_tune support.
6308         * config/s390/2064.md: Remove cpu attribute comparisons.
6309         * config/s390/driver-native.c (s390_host_detect_local_cpu):
6310         Remove MTN.
6311         * config/s390/linux.h (ASM_SPEC):
6312         Remove -march support.
6313         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
6314         Use a table to get an arch level.
6315         * config/s390/s390-opts.h (enum processor_type):
6316         Remove enum values.
6317         * config/s390/s390.c
6318         (processor_table): Remove entries, add arch_level values.
6319         (s390_issue_rate): Remove cases.
6320         (s390_option_override): Adjust
6321         s390_option_override_internal() call.
6322         (s390_option_override_internal): Remove deprecation warning.
6323         (s390_valid_target_attribute_tree): Adjust
6324         s390_option_override_internal() call.
6325         * config/s390/s390.h (struct s390_processor):
6326         Share with s390-c.c, add arch_level field.
6327         * config/s390/s390.md:
6328         Remove occurrences in cpu attribute.
6329         * config/s390/s390.opt: Remove -march/-mtune support.
6330         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
6331         * doc/invoke.texi: Remove deprecation warning.
6333 2018-08-08  Luis Machado  <luis.machado@linaro.org>
6335         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
6336         global.
6337         (qdf24xx_tunings): Set vector cost structure to
6338         qdf24xx_vector_cost.
6340         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
6341         <register_sextend>: Set to 3.
6343 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
6345         PR target/86838
6346         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
6347         * config/aarch64/aarch64-simd.md
6348         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
6349         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
6350         (aarch64_frecpx<mode>): ...this new pattern.
6351         * config/aarch64/aarch64-simd-builtins.def: Remove comment
6352         about aarch64_frecp<FRECP:frecp_suffix><mode>.
6354 2018-08-07  Martin Liska  <mliska@suse.cz>
6356         PR middle-end/83023
6357         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
6358         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
6359         * predict.def (PRED_MALLOC_NONNULL): New predictor.
6360         * doc/extend.texi: Document that malloc attribute adds
6361         hit to compiler.
6363 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
6365         PR target/86785
6366         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6367         Define to speculation_safe_value_not_needed.
6369 2018-08-06  Jeff Law  <law@redhat.com>
6371         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
6372         the vr_values instance to cprop_into_stmt.
6373         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
6374         (cprop_operand): Also query EVRP to determine if OP is a constant.
6376 2018-08-06  Nathan Sidwell  <nathan@acm.org>
6378         * diagnostic.c (diagnostic_report_current_module): Reroll
6379         included-at loop.  Translate text.
6381 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
6383         * function-tests.c (selftest::test_expansion_to_rtl): Call
6384         free_after_compilation.
6386 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6388         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
6390 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
6392         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
6393         loops with memory block operations from getting unrolled.
6395 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
6397         PR target/86807
6398         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6399         Define to speculation_safe_value_not_needed.
6401 2018-08-06  Jeff Law  <law@redhat.com>
6403         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
6404         assert.
6406 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
6408         PR target/86662
6409         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
6410         with all enabled __intN types.
6412         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
6414 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6416         * alias.c (record_set): Check for clobber high.
6417         * cfgexpand.c (expand_gimple_stmt): Likewise.
6418         * combine-stack-adj.c (single_set_for_csa): Likewise.
6419         * combine.c (find_single_use_1): Likewise.
6420         (set_nonzero_bits_and_sign_copies): Likewise.
6421         (get_combine_src_dest): Likewise.
6422         (is_parallel_of_n_reg_sets): Likewise.
6423         (try_combine): Likewise.
6424         (record_dead_and_set_regs_1): Likewise.
6425         (reg_dead_at_p_1): Likewise.
6426         (reg_dead_at_p): Likewise.
6427         * dce.c (deletable_insn_p): Likewise.
6428         (mark_nonreg_stores_1): Likewise.
6429         (mark_nonreg_stores_2): Likewise.
6430         * df-scan.c (df_find_hard_reg_defs): Likewise.
6431         (df_uses_record): Likewise.
6432         (df_get_call_refs): Likewise.
6433         * dwarf2out.c (mem_loc_descriptor): Likewise.
6434         * haifa-sched.c (haifa_classify_rtx): Likewise.
6435         * ira-build.c (create_insn_allocnos): Likewise.
6436         * ira-costs.c (scan_one_insn): Likewise.
6437         * ira.c (equiv_init_movable_p): Likewise.
6438         (rtx_moveable_p): Likewise.
6439         (interesting_dest_for_shprep): Likewise.
6440         * jump.c (mark_jump_label_1): Likewise.
6441         * postreload-gcse.c (record_opr_changes): Likewise.
6442         * postreload.c (reload_cse_simplify): Likewise.
6443         (struct reg_use): Add source expr.
6444         (reload_combine): Check for clobber high.
6445         (reload_combine_note_use): Likewise.
6446         (reload_cse_move2add): Likewise.
6447         (move2add_note_store): Likewise.
6448         * print-rtl.c (print_pattern): Likewise.
6449         * recog.c (decode_asm_operands): Likewise.
6450         (store_data_bypass_p): Likewise.
6451         (if_test_bypass_p): Likewise.
6452         * regcprop.c (kill_clobbered_value): Likewise.
6453         (kill_set_value): Likewise.
6454         * reginfo.c (reg_scan_mark_refs): Likewise.
6455         * reload1.c (maybe_fix_stack_asms): Likewise.
6456         (eliminate_regs_1): Likewise.
6457         (elimination_effects): Likewise.
6458         (mark_not_eliminable): Likewise.
6459         (scan_paradoxical_subregs): Likewise.
6460         (forget_old_reloads_1): Likewise.
6461         * reorg.c (find_end_label): Likewise.
6462         (try_merge_delay_insns): Likewise.
6463         (redundant_insn): Likewise.
6464         (own_thread_p): Likewise.
6465         (fill_simple_delay_slots): Likewise.
6466         (fill_slots_from_thread): Likewise.
6467         (dbr_schedule): Likewise.
6468         * resource.c (update_live_status): Likewise.
6469         (mark_referenced_resources): Likewise.
6470         (mark_set_resources): Likewise.
6471         * rtl.c (copy_rtx): Likewise.
6472         * rtlanal.c (reg_referenced_p): Likewise.
6473         (single_set_2): Likewise.
6474         (noop_move_p): Likewise.
6475         (note_stores): Likewise.
6476         * sched-deps.c (sched_analyze_reg): Likewise.
6477         (sched_analyze_insn): Likewise.
6479 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6481         * cse.c (invalidate_reg): New function extracted from...
6482         (invalidate): ...here.
6483         (canonicalize_insn): Check for clobber high.
6484         (invalidate_from_clobbers): invalidate clobber highs.
6485         (invalidate_from_sets_and_clobbers): Likewise.
6486         (count_reg_usage): Check for clobber high.
6487         (insn_live_p): Likewise.
6488         * cselib.c (cselib_expand_value_rtx_1):Likewise.
6489         (cselib_invalidate_regno): Check for clobber in setter.
6490         (cselib_invalidate_rtx): Pass through setter.
6491         (cselib_invalidate_rtx_note_stores):
6492         (cselib_process_insn): Check for clobber high.
6493         * cselib.h (cselib_invalidate_rtx): Add operand.
6495 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6497         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
6498         (mark_not_eliminable): Likewise.
6499         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
6500         * lra-lives.c (process_bb_lives): Check for clobber high.
6501         * lra.c (new_insn_reg): Remember clobber highs.
6502         (collect_non_operand_hard_regs): Check for clobber high.
6503         (lra_set_insn_recog_data): Likewise.
6504         (add_regs_to_insn_regno_info): Likewise.
6505         (lra_update_insn_regno_info): Likewise.
6507 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6509         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
6510         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
6512 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6514         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
6515         (copy_insn_1): Likewise.
6516         (gen_hard_reg_clobber_high): New gen function.
6517         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
6518         * genemit.c (gen_exp): Likewise.
6519         (gen_emit_seq): Pass through info.
6520         (gen_insn): Check for CLOBBER_HIGH.
6521         (gen_expand): Pass through info.
6522         (gen_split): Likewise.
6523         (output_add_clobbers): Likewise.
6524         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
6525         (remove_clobbers): Likewise.
6526         * rtl.h (gen_hard_reg_clobber_high): New declaration.
6528 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
6530         * doc/rtl.texi (clobber_high): Add.
6531         (parallel): Add in clobber high
6532         * rtl.c (rtl_check_failed_code3): Add function.
6533         * rtl.def (CLOBBER_HIGH): Add expression.
6534         * rtl.h (RTL_CHECKC3): Add macro.
6535         (rtl_check_failed_code3): Add declaration.
6536         (XC3EXP): Add macro.
6538 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
6540         PR target/86386
6541         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
6542         cfun->machine->max_used_stack_alignment if needed.
6544 2018-08-04  Martin Sebor  <msebor@redhat.com>
6546         PR tree-optimization/86571
6547         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
6548         NaN output to 4.
6550 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
6552         PR target/86799
6553         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6554         Define.
6556 2018-08-03  Jeff Law  <law@redhat.com>
6558         PR target/86795
6559         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6560         Define to speculation_safe_value_not_needed.
6562 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
6564         * doc/gcov.texi (-x): Remove duplicate "to".
6565         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
6566         (-Wif-not-aligned): Remove duplicate "is".
6567         (-flto): Remove duplicate "the".
6568         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
6569         duplicate "v5.00.b".
6570         (MSP430 Options): Remove duplicate "and" from the description
6571         of "-mgprel-sec=regexp".
6572         (x86 Options): Remove duplicate copies of "vmldLog102" and
6573         vmlsLog104 from description of "-mveclibabi=type".
6575 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
6577         * internal-fn.h (first_commutative_argument): Declare.
6578         * internal-fn.c (first_commutative_argument): New function.
6579         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
6580         restrictions for pattern statements.  Use first_commutative_argument
6581         to look for commutative operands in calls to internal functions.
6583 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
6585         * Makefile.in (wide-int-range.o): New.
6586         * tree-vrp.c: Move all the wide_int_* functions to...
6587         * wide-int-range.cc: ...here.
6588         * tree-vrp.h: Move all the wide_int_* prototypes to...
6589         * wide-int-range.h: ...here.
6591 2018-08-03  Tom de Vries  <tdevries@suse.de>
6593         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
6594         UI_NONE.
6595         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
6596         * except.c (output_function_exception_table): Do early exit if
6597         targetm_common.except_unwind_info (&global_options) == UI_NONE.
6599 2018-08-03  Martin Liska  <mliska@suse.cz>
6601         * predict.c (dump_prediction): Change to 2 digits
6602         in fraction part.
6604 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6606         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
6607         neon_dup_q to...
6608         (falkor_am_1_gtov_gtov): ... a new insn reservation.
6610 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
6612         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
6613         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
6614         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
6615         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
6616         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
6618 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
6620         * diagnostic-show-locus.c (diagnostic_show_locus): Use
6621         pp_take_prefix when saving the existing prefix.
6622         * diagnostic.c (diagnostic_append_note): Likewise.
6623         * langhooks.c (lhd_print_error_function): Likewise.
6624         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
6625         param's type.  Free the existing prefix.
6626         (pp_take_prefix): New function.
6627         (pretty_printer::pretty_printer): Drop the prefix parameter.
6628         Rename the length parameter to match the comment.
6629         (pretty_printer::~pretty_printer): Free the prefix.
6630         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
6631         parameter.
6632         (struct pretty_printer): Drop the "const" from "prefix" field's
6633         type and clarify memory management.
6634         (pp_set_prefix): Drop the "const" from the 2nd param.
6635         (pp_take_prefix): New decl.
6637 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
6639         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
6640         for word_mode_ok here instead of passing as argument.
6641         (expand_block_compare): Change select_block_compare_mode() call.
6642         (expand_strncmp_gpr_sequence): New function.
6643         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
6645 2018-08-02  Jeff Law  <law@redhat.com>
6647         PR target/86790
6648         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6649         Define to speculation_safe_value_not_needed.
6651         PR target/86784
6652         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6653         Define to speculation_safe_value_not_needed.
6655 2018-08-02  Tom de Vries  <tdevries@suse.de>
6657         PR target/86660
6658         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
6659         function.  Return UI_TARGET unconditionally.
6660         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
6661         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
6663 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6665         * genemit.c (print_overload_test): Fix typo.
6667 2018-08-02  Richard Biener  <rguenther@suse.de>
6669         PR tree-optimization/86816
6670         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
6671         which checks for value availability before querying it.
6672         (gvn_uses_equal): Use it.
6673         (same_succ_hash): Likewise.
6674         (gimple_equal_p): Likewise.
6676 2018-08-02  Nick Clifton  <nickc@redhat.com>
6678         PR target/86813
6679         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6680         Define to speculation_safe_value_not_needed.
6682         PR target/86810
6683         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6684         Define to speculation_safe_value_not_needed.
6686         PR target/86810
6687         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6688         Define to speculation_safe_value_not_needed.
6690         PR target/86803
6691         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6692         Define to speculation_safe_value_not_needed.
6694         PR target/86797
6695         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6696         Define to speculation_safe_value_not_needed.
6698         PR target/86791
6699         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6700         Define to speculation_safe_value_not_needed.
6702         PR target/86789
6703         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6704         Define to speculation_safe_value_not_needed.
6706         PR target/86787
6707         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6708         Define to speculation_safe_value_not_needed.
6710         PR target/86782
6711         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6712         speculation_safe_value_not_needed.
6714         PR target/86781
6715         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
6716         to speculation_safe_value_not_needed.
6718 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6720         * doc/md.texi: Expand the documentation of instruction names
6721         to mention port-local uses.  Document '@' in pattern names.
6722         * read-md.h (overloaded_instance, overloaded_name): New structs.
6723         (mapping): Declare.
6724         (md_reader::handle_overloaded_name): New member function.
6725         (md_reader::get_overloads): Likewise.
6726         (md_reader::m_first_overload): New member variable.
6727         (md_reader::m_next_overload_ptr): Likewise.
6728         (md_reader::m_overloads_htab): Likewise.
6729         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
6730         m_next_overload_ptr and m_overloads_htab.
6731         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
6732         (get_mode_token, get_code_token, get_int_token): New functions.
6733         (map_attr_string): Add an optional argument that passes back
6734         the associated iterator.
6735         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
6736         (md_reader::handle_overloaded_name, add_overload_instance): New
6737         functions.
6738         (apply_iterators): Handle '@' names.  Report an error if '@'
6739         is used without iterators.
6740         (initialize_iterators): Initialize the new iterator_group fields.
6741         * genopinit.c (handle_overloaded_code_for)
6742         (handle_overloaded_gen): New functions.
6743         (main): Use them to print declarations of maybe_code_for_* and
6744         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
6745         * genemit.c (print_overload_arguments, print_overload_test)
6746         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
6747         (main): Use it to print definitions of maybe_code_for_* and
6748         maybe_gen_* functions.
6749         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
6750         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
6751         instead of explicit mode checks.
6752         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
6753         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
6754         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
6755         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
6756         (aarch64_expand_compare_and_swap): Likewise
6757         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
6758         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
6759         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
6760         (aarch64_constant_pool_reload_icode): Delete.
6761         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
6762         instead of aarch64_constant_pool_reload_icode.  Use
6763         code_for_aarch64_reload_mov instead of explicit mode checks.
6764         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
6765         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
6766         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
6767         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
6768         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
6769         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
6770         (aarch64_atomic_load_op_code): Delete.
6771         (aarch64_emit_atomic_load_op): Likewise.
6772         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
6773         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
6774         instead of aarch64_emit_atomic_load_op.
6775         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
6776         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
6777         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
6778         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
6779         character before the pattern name.
6780         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
6781         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
6782         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
6783         (aarch64_frecps<mode>): Likewise.
6784         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
6785         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
6786         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
6787         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
6788         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
6790 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
6792         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
6793         Allow HFmode constants if TARGET_FP_F16INST.
6795 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
6797         PR target/86014
6798         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
6799         No longer check last store for clobber of address register.
6801 2018-08-02  Martin Liska  <mliska@suse.cz>
6803         PR gcov-profile/86817
6804         * gcov.c (process_all_functions): New function.
6805         (main): Call it.
6806         (process_file): Move functions processing to
6807         process_all_functions.
6809 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
6811         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
6812         "const" to the "gimple *" and "rtx_insn *" parameters.
6813         * dumpfile.h (dump_user_location_t::dump_user_location_t):
6814         Likewise.
6815         (dump_location_t::dump_location_t): Likewise.
6817 2018-08-01  Martin Sebor  <msebor@redhat.com>
6819         PR tree-optimization/86650
6820         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
6821         rather than a "gcall *".  Directly pass the data of interest
6822         to percent_K_format, rather than building a temporary CALL_EXPR
6823         to hold it.
6824         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
6825         (gimple_fold_builtin_strncat): Adjust.
6826         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
6827         gcall* argument with gimple*.
6828         * gimple-ssa-warn-restrict.c (check_call): Same.
6829         (wrestrict_dom_walker::before_dom_children): Same.
6830         (builtin_access::builtin_access): Same.
6831         (check_bounds_or_overlap): Same
6832         (maybe_diag_overlap): Same.
6833         (maybe_diag_offset_bounds): Same.
6834         * tree-diagnostic.c (default_tree_printer): Move usage of
6835         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
6836         to this callsite.
6837         * tree-pretty-print.c (percent_K_format): Add argument.
6838         * tree-pretty-print.h: Add argument.
6839         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
6840         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
6841         (maybe_diag_stxncpy_trunc): Same.
6842         (handle_builtin_stxncpy): Same.
6843         (handle_builtin_strcat): Same.
6845 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6847         * match.pd: Optimise pointer range checks.
6849 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6851         PR tree-optimization/86758
6852         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
6853         to remove pattern statements.
6855 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6857         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
6858         result of dfs_enumerate_from when constructing stmt_vec_infos,
6859         instead of additionally calling get_loop_body.
6861 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6863         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
6864         parameter.
6865         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
6866         When creating an iv, assert that the step is not known to be zero.
6867         (vect_setup_realignment): Update call accordingly.
6868         * tree-vect-stmts.c (vectorizable_store): Likewise.
6869         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
6871 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6873         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
6874         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
6875         (vectorizable_reduction): Likewise.
6876         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6877         (vect_detect_hybrid_slp_stmts): Likewise.
6878         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6880 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
6882         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
6883         (wide_int_set_zero_nonzero_bits): ...this.
6884         (zero_nonzero_bits_from_vr): Rename to...
6885         (vrp_set_zero_nonzero_bits): ...this.
6886         (extract_range_from_multiplicative_op_1): Abstract wide int
6887         code...
6888         (wide_int_range_multiplicative_op): ...here.
6889         (extract_range_from_binary_expr_1): Extract wide int binary
6890         operations into their own functions.
6891         (wide_int_range_lshift): New.
6892         (wide_int_range_can_optimize_bit_op): New.
6893         (wide_int_range_shift_undefined_p): New.
6894         (wide_int_range_bit_xor): New.
6895         (wide_int_range_bit_ior): New.
6896         (wide_int_range_bit_and): New.
6897         (wide_int_range_trunc_mod): New.
6898         (extract_range_into_wide_ints): New.
6899         (vrp_shift_undefined_p): New.
6900         (extract_range_from_multiplicative_op): New.
6901         (vrp_can_optimize_bit_op): New.
6902         * tree-vrp.h (value_range::dump): New.
6903         (wide_int_range_multiplicative_op): New.
6904         (wide_int_range_lshift):New.
6905         (wide_int_range_shift_undefined_p): New.
6906         (wide_int_range_bit_xor): New.
6907         (wide_int_range_bit_ior): New.
6908         (wide_int_range_bit_and): New.
6909         (wide_int_range_trunc_mod): New.
6910         (zero_nonzero_bits_from_bounds): Rename to...
6911         (wide_int_set_zero_nonzero_bits): ...this.
6912         (zero_nonzero_bits_from_vr): Rename to...
6913         (vrp_set_zero_nonzero_bits): ...this.
6914         (range_easy_mask_min_max): Rename to...
6915         (wide_int_range_can_optimize_bit_op): this.
6916         * vr-values.c (simplify_bit_ops_using_ranges): Rename
6917         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6919 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6921         * tree-vectorizer.h (vect_orig_stmt): New function.
6922         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6923         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6924         (vect_create_epilog_for_reduction): Likewise.
6925         (vectorizable_live_operation): Likewise.
6926         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6927         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6928         * tree-vect-stmts.c (vectorizable_call): Likewise.
6929         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6931 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6933         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6934         argument.
6935         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6936         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6937         (vect_transform_loop): Likewise.
6938         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6940 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6942         * tree-vectorizer.h (vect_schedule_slp): Return void.
6943         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6944         (vect_schedule_slp): Likewise.
6946 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6948         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6949         argument.
6950         (vect_transform_loop): Update calls accordingly.  Schedule SLP
6951         instances before the main loop, if any exist.
6953 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
6955         PR tree-optimization/86749
6956         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6957         If the lhs is used in a COND_EXPR, check that it is being used
6958         as the "then" or "else" value.
6960 2018-08-01  Tom de Vries  <tdevries@suse.de>
6962         PR target/86800
6963         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6964         speculation_safe_value_not_needed.
6966 2018-08-01  Richard Biener  <rguenther@suse.de>
6968         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6969         as base and offset.
6971 2018-08-01  Martin Liska  <mliska@suse.cz>
6973         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6974         format how successful transformation is dumped.
6975         (gimple_mod_pow2_value_transform): Likewise.
6976         (gimple_mod_subtract_transform): Likewise.
6977         (gimple_stringops_transform): Likewise.
6979 2018-08-01  Martin Liska  <mliska@suse.cz>
6981         PR value-prof/35543
6982         * value-prof.c (interesting_stringop_to_profile_p):
6983         Simplify the code and add BUILT_IN_MEMMOVE.
6984         (gimple_stringops_transform): Likewise.
6986 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
6988         * config/aarch64/aarch64-simd.md
6989         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6990         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6991         use GPI iterator instead of SI mode.
6993 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
6995         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6996         rs6000_speculation_barrier.
6997         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6998         new barrier pattern name.
7000 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
7002         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
7003         (speculation_barrier): New insn.
7005 2018-08-01  Richard Biener  <rguenther@suse.de>
7007         PR bootstrap/86724
7008         * graphite.h: Include isl/id.h and isl/space.h to allow build
7009         with ISL 0.20.
7011 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
7013         PR target/86651
7014         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7015         mode for COFF targets.
7016         * defaults.h (TARGET_COFF): Define.
7017         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
7018         TARGET_COFF): Define.
7019         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
7020         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
7021         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
7023 2018-07-31  Alexandre Oliva <oliva@adacore.com>
7025         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
7026         * gimple-streamer-out.c (output_bb): Save it.
7027         * lto-streamer-in.c (input_struct_function_base): Restore
7028         instance discriminator if available.  Create map on demand.
7029         * lto-streamer-out.c (output_struct_function_base): Save it if
7030         available.
7031         * final.c (decl_to_instance_map): Document LTO strategy.
7033 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
7034             Olivier Hainque  <hainque@adacore.com>
7036         * debug.h (decl_to_instance_map_t): New type.
7037         (decl_to_instance_map): Declare.
7038         (maybe_create_decl_to_instance_map): New inline function.
7039         * final.c (bb_discriminator, last_bb_discriminator): New statics,
7040         to track basic block discriminators.
7041         (final_start_function_1): Initialize them.
7042         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
7043         bb_discriminator.
7044         (decl_to_instance_map): New variable.
7045         (map_decl_to_instance, maybe_set_discriminator): New functions.
7046         (notice_source_line): Set discriminator.
7048 2018-07-31  Ian Lance Taylor  <iant@golang.org>
7050         * targhooks.c (default_have_speculation_safe_value): Add
7051         ATTRIBUTE_UNUSED.
7053 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7055         * dump-context.h: Include "pretty-print.h".
7056         (dump_context::refresh_dumps_are_enabled): New decl.
7057         (dump_context::emit_item): New decl.
7058         (class dump_context): Add fields "m_test_pp" and
7059         "m_test_pp_flags".
7060         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7061         (temp_dump_context::get_dumped_text): New decl.
7062         (class temp_dump_context): Add field "m_pp".
7063         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
7064         (dump_context::refresh_dumps_are_enabled): ...and add a test for
7065         m_test_pp.
7066         (set_dump_file): Update for above change.
7067         (set_alt_dump_file): Likewise.
7068         (dump_loc): New overload, taking a pretty_printer *.
7069         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
7070         to any test pretty-printer.
7071         (make_item_for_dump_gimple_stmt): New function, adapted from
7072         optinfo::add_gimple_stmt.
7073         (dump_context::dump_gimple_stmt): Call it, and use the result,
7074         eliminating the direct usage of dump_file and alt_dump_file in
7075         favor of indirectly using them via emit_item.
7076         (make_item_for_dump_gimple_expr): New function, adapted from
7077         optinfo::add_gimple_expr.
7078         (dump_context::dump_gimple_expr): Call it, and use the result,
7079         eliminating the direct usage of dump_file and alt_dump_file in
7080         favor of indirectly using them via emit_item.
7081         (make_item_for_dump_generic_expr): New function, adapted from
7082         optinfo::add_tree.
7083         (dump_context::dump_generic_expr): Call it, and use the result,
7084         eliminating the direct usage of dump_file and alt_dump_file in
7085         favor of indirectly using them via emit_item.
7086         (make_item_for_dump_printf_va): New function, adapted from
7087         optinfo::add_printf_va.
7088         (make_item_for_dump_printf): New function.
7089         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
7090         and use the result, eliminating the direct usage of dump_file and
7091         alt_dump_file in favor of indirectly using them via emit_item.
7092         (make_item_for_dump_dec): New function.
7093         (dump_context::dump_dec): Call it, and use the result,
7094         eliminating the direct usage of dump_file and alt_dump_file in
7095         favor of indirectly using them via emit_item.
7096         (make_item_for_dump_symtab_node): New function, adapted from
7097         optinfo::add_symtab_node.
7098         (dump_context::dump_symtab_node): Call it, and use the result,
7099         eliminating the direct usage of dump_file and alt_dump_file in
7100         favor of indirectly using them via emit_item.
7101         (dump_context::begin_scope): Reimplement, avoiding direct usage
7102         of dump_file and alt_dump_file in favor of indirectly using them
7103         via emit_item.
7104         (dump_context::emit_item): New member function.
7105         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
7106         Set up test pretty-printer on the underlying context.  Call
7107         refresh_dumps_are_enabled.
7108         (temp_dump_context::~temp_dump_context): Call
7109         refresh_dumps_are_enabled.
7110         (temp_dump_context::get_dumped_text): New member function.
7111         (selftest::verify_dumped_text): New function.
7112         (ASSERT_DUMPED_TEXT_EQ): New macro.
7113         (selftest::test_capture_of_dump_calls): Run all tests twice, with
7114         and then without optinfo enabled.  Add uses of
7115         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
7116         * dumpfile.h: Update comment for the dump_* API.
7117         * optinfo-emit-json.cc
7118         (selftest::test_building_json_from_dump_calls): Update for new
7119         param for temp_dump_context ctor.
7120         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
7121         and "m_owned" field.
7122         (optinfo_item::~optinfo_item): Likewise.
7123         (optinfo::add_item): New member function.
7124         (optinfo::emit): Update comment.
7125         (optinfo::add_string): Delete.
7126         (optinfo::add_printf): Delete.
7127         (optinfo::add_printf_va): Delete.
7128         (optinfo::add_gimple_stmt): Delete.
7129         (optinfo::add_gimple_expr): Delete.
7130         (optinfo::add_tree): Delete.
7131         (optinfo::add_symtab_node): Delete.
7132         (optinfo::add_dec): Delete.
7133         * optinfo.h (class dump_context): New forward decl.
7134         (optinfo::add_item): New decl.
7135         (optinfo::add_string): Delete.
7136         (optinfo::add_printf): Delete.
7137         (optinfo::add_printf_va): Delete.
7138         (optinfo::add_gimple_stmt): Delete.
7139         (optinfo::add_gimple_expr): Delete.
7140         (optinfo::add_tree): Delete.
7141         (optinfo::add_symtab_node): Delete.
7142         (optinfo::add_dec): Delete.
7143         (optinfo::add_poly_int): Delete.
7144         (optinfo_item::optinfo_item): Remove "owned" param.
7145         (class optinfo_item): Remove field "m_owned".
7147 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7149         PR middle-end/86705
7150         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
7151         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
7152         requested variable alignment.
7153         (expand_one_ssa_partition): Likewise.
7154         (expand_one_var): Likewise.
7156 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7158         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7159         to speculation_safe_value_not_needed.
7161 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7163         * targhooks.h (speculation_safe_value_not_needed): New prototype.
7164         * targhooks.c (speculation_safe_value_not_needed): New function.
7165         * target.def (have_speculation_safe_value): Update documentation.
7166         * doc/tm.texi: Regenerated.
7168 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7170         * config/aarch64/iterators.md (ALLI_TI): New iterator.
7171         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
7172         expand.
7173         (despeculate_copy<ALLI:mode>_insn): New insn.
7174         (despeculate_copyti_insn): New insn.
7175         (despeculate_simple<ALLI:mode>): New insn
7176         (despeculate_simpleti): New insn.
7177         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
7178         function.
7179         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
7180         aarch64_speculation_safe_value.
7181         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
7183 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7185         * config/aarch64/aarch64-speculation.cc: New file.
7186         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
7187         before pass_reorder_blocks.
7188         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
7189         prototype.
7190         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
7191         X14 and X15 when tracking speculation.
7192         * config/aarch64/aarch64.md (register name constants): Add
7193         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
7194         (unspec): Add UNSPEC_SPECULATION_TRACKER.
7195         (speculation_barrier): New insn attribute.
7196         (cmp<mode>): Allow SP in comparisons.
7197         (speculation_tracker): New insn.
7198         (speculation_barrier): Add speculation_barrier attribute.
7199         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
7200         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
7201         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
7203 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7205         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
7206         aarch64_track_speculation is true.
7207         (tb<optab><mode>1): Likewise.
7208         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
7209         generate CB[N]Z when tracking speculation.
7210         (aarch64_split_compare_and_swap): Likewise.
7211         (aarch64_split_atomic_op): Likewise.
7213 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7215         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
7217 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7219         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
7220         (speculation_barrier): New insn.
7222 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7224         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
7225         * config/arm/arm.md (speculation_barrier): New expand.
7226         (speculation_barrier_insn): New pattern.
7228 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
7230         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
7231         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
7232         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
7233         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
7234         list.
7235         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
7236         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
7237         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
7238         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
7239         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
7240         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
7241         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
7242         * builtins.c (expand_speculation_safe_value): New function.
7243         (expand_builtin): Call it.
7244         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
7245         * doc/extend.texi: Document __builtin_speculation_safe_value.
7246         * doc/md.texi: Document "speculation_barrier" pattern.
7247         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
7248         TARGET_HAVE_SPECULATION_SAFE_VALUE.
7249         * doc/tm.texi: Regenerated.
7250         * target.def (have_speculation_safe_value, speculation_safe_value): New
7251         hooks.
7252         * targhooks.c (default_have_speculation_safe_value): New function.
7253         (default_speculation_safe_value): New function.
7254         * targhooks.h (default_have_speculation_safe_value): Add prototype.
7255         (default_speculation_safe_value): Add prototype.
7257 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
7259         * dump-context.h (dump_context::dump_loc): New decl.
7260         * dumpfile.c (dump_context::dump_loc): New member function.
7261         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
7262         and dump_gimple_stmt.
7263         (dump_context::dump_gimple_expr_loc): Likewise, using
7264         dump_gimple_expr.
7265         (dump_context::dump_generic_expr_loc): Likewise, using
7266         dump_generic_expr.
7267         (dump_context::dump_printf_loc_va): Likewise, using
7268         dump_printf_va.
7269         (dump_context::begin_scope): Explicitly using the global function
7270         "dump_loc", rather than the member function.
7272 2018-07-31  Martin Sebor  <msebor@redhat.com>
7274         PR tree-optimization/86741
7275         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
7277 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
7279         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
7280         depend on whether prefetch instructions will be emitted or not.
7281         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
7282         will be emitted or not.
7283         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
7284         (TARGET_SETMEM_PFD): New macros.
7286 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7288         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
7289         (NULL_STMT_VEC_INFO): Delete.
7290         (stmt_vec_info::operator*): Likewise.
7291         (stmt_vec_info::operator gimple *): Likewise.
7292         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
7293         of NULL_STMT_VEC_INFO.
7294         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7295         (vect_reassociating_reduction_p): Likewise.
7296         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7297         (vectorizable_store): Likewise.
7298         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
7299         (vec_info::free_stmt_vec_infos): Likewise.
7301 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7303         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
7304         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
7306 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7308         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
7309         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7310         (vec_info::free_stmt_vec_info): New private member functions.
7311         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
7312         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
7313         * tree-parloops.c (gather_scalar_reductions): Remove calls to
7314         set_stmt_vec_info_vec and free_stmt_vec_infos.
7315         * tree-vect-loop.c (_loop_vec_info): Remove call to
7316         set_stmt_vec_info_vec.
7317         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
7318         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
7319         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
7320         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
7321         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
7322         assignments in {vec_info::,}new_stmt_vec_info that are redundant
7323         with the clearing in the xcalloc.
7324         (stmt_vec_info_vec): Delete.
7325         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
7326         (vectorize_loops): Likewise.
7327         (vec_info::~vec_info): Remove argument from call to
7328         free_stmt_vec_infos.
7329         (vec_info::add_stmt): Remove vinfo argument from call to
7330         new_stmt_vec_info.
7332 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7334         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
7335         rather than a gimple stmt.
7336         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
7337         information for pattern statements when passed the original
7338         statement; instead wait to be passed the pattern statement itself.
7339         Don't call set_vinfo_for_stmt here.
7340         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
7341         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
7342         stmt_vec_infos here.
7343         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
7344         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
7345         stmt_vec_infos entry.
7347 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7349         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
7350         * tree-vectorizer.c (vec_info::replace_stmt): New function.
7351         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
7352         * tree-vect-stmts.c (vectorizable_call): Likewise.
7353         (vectorizable_simd_clone_call): Likewise.
7355 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7357         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
7358         * tree-vectorizer.c (vec_info::remove_stmt): New function.
7359         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
7360         * tree-vect-loop.c (vect_transform_loop): Likewise.
7361         * tree-vect-slp.c (vect_schedule_slp): Likewise.
7362         * tree-vect-stmts.c (vect_remove_stores): Likewise.
7364 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7366         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
7367         (vect_dr_stmt): Delete.
7368         * tree-vectorizer.c (vec_info::lookup_dr): New function.
7369         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
7370         of DR_VECT_AUX.
7371         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
7372         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
7373         (vect_verify_datarefs_alignment, vect_peeling_supportable)
7374         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7375         (vect_analyze_data_refs): Likewise.
7376         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
7377         argument.
7378         (vect_find_same_alignment_drs): Likewise.
7379         (vect_slp_analyze_node_dependences): Update calls accordingly.
7380         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7381         instead of DR_VECT_AUX.
7382         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
7383         of a vector data references.  Use vec_info::lookup_dr instead of
7384         DR_VECT_AUX.
7385         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
7386         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
7387         instead of DR_VECT_AUX.
7389 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7391         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
7392         dr_vec_info.
7393         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7394         accordingly.
7395         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7396         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7397         (vect_gen_prolog_loop_niters): Likewise.
7399 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7401         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
7402         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
7403         (vect_known_alignment_in_bytes, vect_dr_behavior)
7404         (vect_get_scalar_dr_size): Take references as dr_vec_infos
7405         instead of data_references.  Update calls to other routines for
7406         which the same change has been made.
7407         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
7408         dr_vec_infos instead of stmt_vec_infos.
7409         (vect_analyze_data_ref_dependence): Update call accordingly.
7410         (vect_slp_analyze_data_ref_dependence)
7411         (vect_record_base_alignments): Use DR_VECT_AUX.
7412         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
7413         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
7414         (vector_alignment_reachable_p, vect_get_data_access_cost)
7415         (vect_peeling_supportable, vect_analyze_group_access_1)
7416         (vect_analyze_group_access, vect_analyze_data_ref_access)
7417         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
7418         (vect_compile_time_alias, vect_small_gap_p)
7419         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
7420         (vect_supportable_dr_alignment): Take references as dr_vec_infos
7421         instead of data_references.  Update calls to other routines for
7422         which the same change has been made.
7423         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
7424         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7425         (vect_slp_analyze_and_verify_node_alignment)
7426         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
7427         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7428         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
7429         above changes.
7430         (_vect_peel_info::dr): Replace with...
7431         (_vect_peel_info::dr_info): ...this new field.
7432         (vect_peeling_hash_get_most_frequent)
7433         (vect_peeling_hash_choose_best_peeling): Update accordingly.
7434         (vect_peeling_hash_get_lowest_cost):
7435         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
7436         routines for which the same change has been made.
7437         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
7438         data_reference.
7439         * tree-vect-loop-manip.c (get_misalign_in_elems)
7440         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
7441         above changes.
7442         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7443         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
7444         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
7445         (get_group_load_store_type, get_negative_load_store_type)
7446         (vect_get_data_ptr_increment, vectorizable_store)
7447         (vectorizable_load): Likewise.
7448         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
7449         Update calls to other routines for which the same change has been made.
7451 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7453         * tree-vectorizer.h (vec_info::move_dr): New member function.
7454         (dataref_aux): Rename to...
7455         (dr_vec_info): ...this and add "dr" and "stmt" fields.
7456         (_stmt_vec_info::dr_aux): Update accordingly.
7457         (_stmt_vec_info::data_ref_info): Delete.
7458         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
7459         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
7460         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
7461         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
7462         of data_ref.
7463         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
7464         (STMT_VINFO_DR_INFO): New macro.
7465         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
7466         (set_dr_misalignment): Update after rename of dataref_aux.
7467         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
7468         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
7469         initialization of STMT_VINFO_DATA_REF.
7470         * tree-vectorizer.c (vec_info::move_dr): New function.
7471         * tree-vect-patterns.c (vect_recog_bool_pattern)
7472         (vect_recog_mask_conversion_pattern)
7473         (vect_recog_gather_scatter_pattern): Use it.
7474         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
7475         the "dr" and "stmt" fields of dr_vec_info instead of
7476         STMT_VINFO_DATA_REF.
7478 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7480         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
7481         (is_pattern_stmt_p): Use it.
7482         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
7483         on pattern statements.
7485 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7487         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
7488         original stmt as a stmt_vec_info rather than a gimple stmt.
7489         (vect_pattern_recog_1): Take the statement directly as a
7490         stmt_vec_info, rather than via a gimple_stmt_iterator.
7491         Update call to vect_mark_pattern_stmts.
7492         (vect_pattern_recog): Update calls accordingly.
7494 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7496         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
7497         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
7498         a vect_def_type for the first argument.
7499         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
7500         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
7501         operand if it isn't defined by a vectorized statement.
7502         (vect_build_gather_load_calls): Remove the mask_dt argument and
7503         update calls to vect_get_vec_def_for_stmt_copy.
7504         (vectorizable_bswap): Likewise the dt argument.
7505         (vectorizable_call): Update calls to vectorizable_bswap and
7506         vect_get_vec_def_for_stmt_copy.
7507         (vectorizable_simd_clone_call, vectorizable_assignment)
7508         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
7509         (vectorizable_comparison): Update calls to
7510         vect_get_vec_def_for_stmt_copy.
7511         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
7512         vect_is_simple_use.
7513         (vect_get_loop_based_defs): Remove dt argument and update call
7514         to vect_get_vec_def_for_stmt_copy.
7515         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
7516         and vect_get_vec_def_for_stmt_copy.
7517         (vectorizable_load): Update calls to vect_build_gather_load_calls
7518         and vect_get_vec_def_for_stmt_copy.
7519         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7520         (vectorizable_reduction, vectorizable_live_operation): Update calls
7521         to vect_get_vec_def_for_stmt_copy.
7523 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7525         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
7526         and gimple stmt arguments with a stmt_vec_info.
7527         (vect_record_base_alignments): Update calls accordingly.
7528         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
7529         and gimple stmt arguments with a stmt_vec_info.
7530         (vect_build_slp_tree_1): Remove vinfo argument and update call
7531         to vect_record_max_nunits.
7532         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
7533         and vect_record_max_nunits.
7535 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7537         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
7538         file and take a stmt_vec_info instead of a gimple stmt.
7539         (supportable_widening_operation, vect_finish_replace_stmt)
7540         (vect_finish_stmt_generation, vect_get_store_rhs)
7541         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
7542         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
7543         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
7544         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
7545         (vect_create_data_ref_ptr, bump_vector_ptr)
7546         (vect_permute_store_chain, vect_setup_realignment)
7547         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
7548         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
7549         (vectorizable_reduction, vectorizable_induction)
7550         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
7551         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
7552         than gimple stmts as arguments.
7553         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
7554         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
7555         (can_group_stmts_p, vect_check_gather_scatter)
7556         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
7557         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
7558         (vect_permute_load_chain, vect_shift_permute_load_chain)
7559         (vect_transform_grouped_load)
7560         (vect_record_grouped_load_vectors): Likewise.
7561         * tree-vect-loop.c (vect_fixup_reduc_chain)
7562         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
7563         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
7564         (vectorizable_reduction, vectorizable_induction)
7565         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
7566         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
7567         (vect_get_load_store_mask): Likewise.
7568         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
7569         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
7570         * tree-vect-stmts.c (vect_mark_relevant)
7571         (is_simple_and_all_uses_invariant)
7572         (exist_non_indexing_operands_for_use_p, process_use)
7573         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
7574         (vect_get_vec_def_for_operand, vect_get_vec_defs)
7575         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
7576         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
7577         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
7578         (get_negative_load_store_type, get_load_store_type)
7579         (vect_check_load_store_mask, vect_check_store_rhs)
7580         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
7581         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7582         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7583         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7584         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
7585         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
7586         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
7587         (supportable_widening_operation): Likewise.
7589 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7591         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
7592         a stmt_vec_info instead of a gcall.
7593         (vect_check_gather_scatter): Update call accordingly.
7594         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
7595         of a gphi.
7596         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
7597         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
7598         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
7599         instead of a gimple stmt.
7600         (vect_transform_loop): Update calls accordingly.
7601         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
7602         stmt_vec_infos instead of gimple stmts.
7603         (vect_analyze_slp_instance): Update use accordingly.
7604         * tree-vect-stmts.c (read_vector_array, write_vector_array)
7605         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
7606         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
7607         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
7608         (vect_gen_widened_results_half, vect_get_loop_based_defs)
7609         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
7610         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
7611         down to subroutines.
7613 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7615         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
7616         of the worklist from a vector of gimple stmts to a vector of
7617         stmt_vec_infos.
7618         * tree-vect-stmts.c (vect_mark_relevant, process_use)
7619         (vect_mark_stmts_to_be_vectorized): Likewise
7621 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7623         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
7624         statement before passing it to vect_analyze_stmt.
7625         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
7626         the chain of phi vector definitions.  Track the exit phi via its
7627         stmt_vec_info.
7628         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
7629         STMT_VINFO_REDUC_DEF.
7630         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
7631         stmt_vec_infos to handle the statement chains.
7632         (vect_get_slp_defs): Record the first statement in the node
7633         using a stmt_vec_info.
7634         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
7635         statements here and pass their stmt_vec_info down to subroutines.
7636         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
7637         down to vect_finish_stmt_generation.
7638         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
7639         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
7640         stmt_vec_infos to subroutines.
7641         (vect_remove_stores): Use stmt_vec_infos to handle the statement
7642         chains.
7644 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7646         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
7647         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
7648         (vect_permute_store_chain, vect_setup_realignment)
7649         (vect_permute_load_chain, vect_shift_permute_load_chain)
7650         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
7651         stmts internally, and when passing values to other vectorizer routines.
7652         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7653         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
7654         (vect_analyze_loop_operations, get_initial_def_for_reduction)
7655         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
7656         (vectorizable_reduction, vectorizable_induction)
7657         (vectorizable_live_operation, vect_transform_loop_stmt)
7658         (vect_transform_loop): Likewise.
7659         * tree-vect-patterns.c (vect_reassociating_reduction_p)
7660         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
7661         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
7662         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7663         (vect_slp_analyze_node_operations_1): Likewise.
7664         * tree-vect-stmts.c (vect_mark_relevant, process_use)
7665         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
7666         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
7667         (vect_finish_stmt_generation_1, get_group_load_store_type)
7668         (get_load_store_type, vect_build_gather_load_calls)
7669         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7670         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7671         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7672         (vectorizable_store, vectorizable_load, vectorizable_condition)
7673         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
7674         (supportable_widening_operation): Likewise.
7675         (vect_get_vector_types_for_stmt): Likewise.
7676         * tree-vectorizer.h (vect_dr_behavior): Likewise.
7678 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7680         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7681         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
7682         (vect_permute_store_chain, vect_permute_load_chain)
7683         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
7684         repeated stmt_vec_info lookups.
7685         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
7686         (vect_update_ivs_after_vectorizer): Likewise.
7687         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
7688         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7689         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
7690         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7691         (vect_bb_slp_scalar_cost): Likewise.
7692         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
7694 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7696         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
7697         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
7698         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
7699         to get gassigns and gcalls, rather than operating on generc gimple
7700         stmts.
7701         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
7702         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
7703         (vectorizable_load, vect_analyze_stmt): Likewise.
7704         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
7706 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7708         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
7709         return stmt_vec_infos rather than gimple stmts.  Do not accept
7710         null arguments.
7711         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
7712         of a gimple stmt.
7713         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
7714         Update use of get_later_stmt.
7715         (vect_get_constant_vectors): Update call accordingly.
7716         (vect_schedule_slp_instance): Likewise
7717         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
7718         (vect_slp_analyze_instance_dependence): Likewise.
7719         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
7721 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7723         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
7724         (stmt_info_for_cost::stmt_info): ...this new field.
7725         (add_stmt_costs): Update accordingly.
7726         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7727         (vect_get_known_peeling_cost): Likewise.
7728         (vect_estimate_min_profitable_iters): Likewise.
7729         * tree-vect-stmts.c (record_stmt_cost): Likewise.
7731 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7733         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
7734         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7735         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
7736         accordingly.
7737         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
7739 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7741         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
7742         a gimple stmt to a stmt_vec_info.
7743         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7745 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7747         * tree-vectorizer.h (vec_info::grouped_stores): Change from
7748         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7749         (_loop_vec_info::reduction_chains): Likewise.
7750         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
7751         accordingly.
7752         * tree-vect-slp.c (vect_analyze_slp): Likewise.
7754 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7756         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
7757         a gimple stmt to a stmt_vec_info.
7758         (_stmt_vec_info::next_element): Likewise.
7759         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
7760         (vect_slp_analyze_and_verify_node_alignment)
7761         (vect_analyze_group_access_1, vect_analyze_group_access)
7762         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
7763         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
7764         (vect_supportable_dr_alignment): Update accordingly.
7765         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
7766         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
7767         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
7768         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
7769         * tree-vect-slp.c (vect_build_slp_tree_1)
7770         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
7771         (vect_split_slp_store_group, vect_analyze_slp_instance)
7772         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
7773         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
7774         (get_group_load_store_type, get_load_store_type)
7775         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
7776         (vect_transform_stmt, vect_remove_stores): Likewise.
7778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7780         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
7781         than a gimple stmt.
7782         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7783         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
7784         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
7785         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
7786         (vector_alignment_reachable_p, vect_get_data_access_cost)
7787         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
7788         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
7789         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
7790         (vect_analyze_group_access_1, vect_analyze_group_access)
7791         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
7792         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
7793         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
7794         result of vect_dr_stmt and use the stmt_vec_info instead of
7795         the associated gimple stmt.
7796         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
7797         (vect_gen_prolog_loop_niters): Likewise.
7798         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
7800 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7802         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
7803         to a vec<stmt_vec_info>.
7804         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
7805         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
7806         vec<stmt_vec_info>.
7807         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
7808         to a vec<stmt_vec_info>.
7809         (bst_traits::value_type, bst_traits::value_type): Likewise.
7810         (bst_traits::hash): Update accordingly.
7811         (vect_get_and_check_slp_defs): Change the stmts parameter from
7812         a vec<gimple *> to a vec<stmt_vec_info>.
7813         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
7814         (vect_build_slp_tree): Likewise.
7815         (vect_build_slp_tree_2): Likewise.  Update uses of
7816         SLP_TREE_SCALAR_STMTS.
7817         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
7818         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
7819         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
7820         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
7821         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
7822         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
7823         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
7824         (vect_get_constant_vectors, vect_get_slp_defs)
7825         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
7826         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
7827         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
7828         instead of gimple stmts.
7829         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
7830         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
7831         (vect_slp_analyze_instance_dependence): Update uses of
7832         SLP_TREE_SCALAR_STMTS.
7833         (vect_slp_analyze_and_verify_node_alignment): Likewise.
7834         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
7835         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
7836         (get_initial_defs_for_reduction): Likewise.
7837         (vect_create_epilog_for_reduction): Likewise.
7838         (vectorize_fold_left_reduction): Likewise.
7839         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
7840         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
7841         (can_vectorize_live_stmts): Likewise.
7843 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7845         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
7846         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
7847         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
7848         than gimple stmts.
7849         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
7850         of a gimple stmt.
7851         (gather_scalar_reductions): Update after above interface changes.
7852         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
7853         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
7854         than gimple stmts.
7855         (vect_force_simple_reduction): Likewise.
7856         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
7857         LOOP_VINFO_REDUCTIONS.
7858         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
7860 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7862         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
7863         a gimple stmt to a stmt_vec_info.
7864         * tree-vect-loop.c (vect_active_double_reduction_p)
7865         (vect_force_simple_reduction, vectorizable_reduction): Update
7866         accordingly.
7868 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7870         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
7871         vec<gimple *> to a vec<stmt_vec_info>.
7872         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
7873         the reduction_phis argument from a vec<gimple *> to a
7874         vec<stmt_vec_info>.
7875         (vectorizable_reduction): Likewise the phis local variable that
7876         is passed to vect_create_epilog_for_reduction.  Update for new type
7877         of SLP_TREE_VEC_STMTS.
7878         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
7879         (vectorizable_live_operation): Likewise.
7880         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
7881         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
7883 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7885         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
7886         a gimple stmt to a stmt_vec_info.
7887         (vectorizable_condition, vectorizable_live_operation)
7888         (vectorizable_reduction, vectorizable_induction): Pass back the
7889         vectorized statement as a stmt_vec_info.
7890         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7891         use of STMT_VINFO_VEC_STMT.
7892         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7893         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7894         as stmt_vec_infos rather than gimple stmts.
7895         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7896         to a stmt_vec_info.
7897         (vectorizable_live_operation): Likewise.
7898         (vectorizable_reduction, vectorizable_induction): Likewise,
7899         updating use of STMT_VINFO_VEC_STMT.
7900         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7901         of STMT_VINFO_VEC_STMT.
7902         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7903         (vectorizable_simd_clone_call, vectorizable_conversion)
7904         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7905         (vectorizable_store, vectorizable_load, vectorizable_condition)
7906         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7907         from a gimple stmt to a stmt_vec_info.
7908         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
7909         pointer to a stmt_vec_info to the vectorizable_* routines.
7911 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7913         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7914         a gimple stmt to a stmt_vec_info.
7915         (is_pattern_stmt_p): Update accordingly.
7916         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7917         (vect_record_grouped_load_vectors): Likewise.
7918         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7919         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7920         (vect_model_reduction_cost): Likewise.
7921         (vect_create_epilog_for_reduction): Likewise.
7922         (vectorizable_reduction, vectorizable_induction): Likewise.
7923         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7924         Return the stmt_vec_info for the pattern statement.
7925         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7926         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7927         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7928         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7929         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7930         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7931         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7932         (free_stmt_vec_info, vect_is_simple_use): Likewise.
7934 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7936         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7937         (vect_finish_stmt_generation): Likewise.
7938         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7939         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7940         (vect_build_gather_load_calls): Use the return value of the above
7941         functions instead of a separate call to vinfo_for_stmt.  Use narrow
7942         scopes for the input gimple stmt and wider scopes for the associated
7943         stmt_vec_info.  Use vec_info::lookup_def when setting these
7944         stmt_vec_infos from an SSA_NAME definition.
7945         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7946         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7947         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7948         (vectorizable_store, vectorizable_load, vectorizable_condition)
7949         (vectorizable_comparison): Likewise.
7950         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7951         (vectorizable_reduction): Likewise.
7953 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7955         * tree-vectorizer.h (vect_is_simple_use): Add an optional
7956         stmt_vec_info * parameter before the optional gimple **.
7957         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7958         (process_use, vect_get_vec_def_for_operand_1): Update callers.
7959         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7960         * tree-vect-loop.c (vectorizable_reduction): Likewise.
7961         (vectorizable_live_operation): Likewise.
7962         * tree-vect-patterns.c (type_conversion_p): Likewise.
7963         (vect_look_through_possible_promotion): Likewise.
7964         (vect_recog_rotate_pattern): Likewise.
7965         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7967 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7969         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7970         a typedef to a wrapper class.
7971         (NULL_STMT_VEC_INFO): New macro.
7972         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7973         (stmt_vec_info::operator*): New function.
7974         (stmt_vec_info::operator gimple *): Likewise.
7975         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7976         (add_stmt_costs): Likewise.
7977         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7978         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7979         (vect_get_known_peeling_cost): Likewise.
7980         (vect_estimate_min_profitable_iters): Likewise.
7981         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7982         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7983         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7984         (vectorizable_store, free_stmt_vec_infos): Likewise.
7985         (new_stmt_vec_info): Change return type of xcalloc to
7986         _stmt_vec_info *.
7988 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7990         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7991         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7992         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7993         a single_imm_use-based sequence.
7994         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7996 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
7998         * tree-vectorizer.h (vec_info::lookup_def): Declare.
7999         * tree-vectorizer.c (vec_info::lookup_def): New function.
8000         * tree-vect-patterns.c (vect_get_internal_def): Use it.
8001         (vect_widened_op_tree): Likewise.
8002         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8003         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
8004         (vectorizable_reduction): Likewise.
8005         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
8006         of a gimple *.
8007         (vect_is_slp_reduction): Update calls accordingly.  Use
8008         vec_info::lookup_def.
8009         (vect_is_simple_reduction): Likewise
8010         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
8012 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8014         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
8015         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
8016         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
8017         of vinfo_for_stmt.
8018         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
8019         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
8020         (vect_update_vf_for_slp, vect_analyze_loop_operations)
8021         (vect_is_slp_reduction, vectorizable_induction)
8022         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
8023         * tree-vect-patterns.c (vect_init_pattern_stmt):
8024         (vect_determine_min_output_precision_1, vect_determine_precisions)
8025         (vect_pattern_recog): Likewise.
8026         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
8027         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
8028         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
8029         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
8030         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
8031         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
8032         info field from a loop to a loop_vec_info.
8034 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8036         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
8037         (vec_info::add_stmt): Declare.
8038         * tree-vectorizer.c (vec_info::add_stmt): New function.
8039         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
8040         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
8041         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8042         (vectorizable_induction): Likewise.
8043         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
8044         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
8045         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
8046         (vectorizable_load): Likewise.
8047         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8048         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
8049         (vect_recog_gather_scatter_pattern): Likewise.
8050         (append_pattern_def_seq): Likewise.  Remove a check that is
8051         performed by add_stmt itself.
8053 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8055         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
8056         which make_ssa_name was called with new_stmt before new_stmt
8057         had been created.
8059 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8061         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
8062         split out from...
8063         (vect_is_slp_reduction): ...here...
8064         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
8065         that are already known to be false.
8067 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8069         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
8070         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
8071         STMT_VINFO_NUM_SLP_USES when it's true.
8072         (vect_free_slp_instance): Add a final_p parameter and pass it to
8073         vect_free_slp_tree.
8074         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
8075         (vect_analyze_slp_instance): Likewise.
8076         (vect_slp_analyze_operations): Likewise.
8077         (vect_slp_analyze_bb_1): Likewise.
8078         * tree-vectorizer.c (vec_info): Likewise.
8079         * tree-vect-loop.c (vect_transform_loop): Likewise.
8081 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8083         * tree-vect-loop.c (vectorizable_reduction): Assert that the
8084         function is not called for second and subsequent members of
8085         a reduction group.
8087 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
8089         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
8090         cases for nested loops from here to ...
8091         (vect_create_epilog_for_reduction): ...here.  Only call
8092         vect_is_simple_use for inner-loop reductions.
8094 2018-07-31  Martin Liska  <mliska@suse.cz>
8096         PR gcov-profile/85338
8097         PR gcov-profile/85350
8098         PR gcov-profile/85372
8099         * profile.c (struct location_triplet): New.
8100         (struct location_triplet_hash): Likewise.
8101         (output_location): Do not output a BB that
8102         is already recorded for a line.
8103         (branch_prob): Use streamed_locations.
8105 2018-07-31  Martin Liska  <mliska@suse.cz>
8107         PR gcov-profile/85370
8108         * coverage.c (coverage_begin_function): Do not mark target
8109         clones as artificial functions.
8111 2018-07-31  Martin Liska  <mliska@suse.cz>
8113         PR gcov-profile/83813
8114         PR gcov-profile/84758
8115         PR gcov-profile/85217
8116         PR gcov-profile/85332
8117         * profile.c (branch_prob): Do not record GOTO expressions
8118         for GIMPLE statements which locations are already streamed.
8120 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8122         * gcc.c (handle_spec_function): Accept a soft_matched_part
8123         argument, as do_spec_1.  Pass it down to ...
8124         (eval_spec_function): Accept a soft_matched_part argument,
8125         and pass it down to ...
8126         (do_spec_2): Accept a soft_matched_part argument, and pass
8127         it down to do_spec_1.
8128         (do_spec_1): Pass soft_matched_part to handle_spec_function.
8129         (handle_braces): Update call to handle_spec_function.
8130         (driver::set_up_specs): Update calls to do_spec_2.
8131         (compare_debug_dump_opt_spec_function): Likewise.
8132         (compare_debug_self_opt_spec_function): Likewise.
8134 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8136         * common.opt (nolibc): New option.
8137         * doc/invoke.texi (Link Options): Document it.
8138         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
8139         * config/alpha/linux.h: Likewise.
8140         * config/arc/elf.h: Likewise.
8141         * config/arm/uclinux-elf.h: Likewise.
8142         * config/arm/unknown-elf.h: Likewise.
8143         * config/avr/avrlibc.h: Likewise.
8144         * config/bfin/bfin.h: Likewise.
8145         * config/bfin/linux.h: Likewise.
8146         * config/bfin/uclinux.h: Likewise.
8147         * config/darwin.h: Likewise.
8148         * config/darwin10.h: Likewise.
8149         * config/darwin12.h: Likewise.
8150         * config/gnu-user.h: Likewise.
8151         * config/lm32/uclinux-elf.h: Likewise.
8152         * config/pa/pa-hpux11.h: Likewise.
8153         * config/pa/pa64-hpux.h: Likewise.
8154         * config/sparc/sparc.h: Likewise.
8156 2018-07-31  Olivier Hainque  <hainque@adacore.com>
8158         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
8159         undefined variables.
8161 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8163         PR target/86640
8164         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
8165         instead of GEN_INT.
8167 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8169         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8170         terminated string literal.
8172 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
8174         PR rtl-optimization/85160
8175         * combine.c (is_just_move): New function.
8176         (try_combine): Allow combining two instructions into two if neither of
8177         the original instructions was a move.
8179 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
8181         PR target/86673
8182         * doc/extend.texi (Global Register Variables): Discourage use of type
8183         qualifiers.
8184         (Local Register Variables): Likewise.
8186 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
8188         PR tree-optimization/86506
8189         * hwint.h (ceil_log2): Resync with hwint.c implementation.
8191 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
8193         PR target/86547
8194         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
8195         hard_regno, make sure no insn between `from` and `to` clobbers it.
8197 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
8198             Tom de Vries  <tdevries@suse.de>
8200         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
8201         (PTX_DEFAULT_RUNTIME_DIM): ... this.
8202         (nvptx_goacc_validate_dims): Set default worker and gang dims to
8203         PTX_DEFAULT_RUNTIME_DIM.
8204         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
8206 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
8208         * config/pa/pa.c (pa_output_addr_vec): Align address table.
8209         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
8210         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
8212 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
8214         * config/rs6000/constraints.md (wG constraint): Delete, no longer
8215         used.
8216         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
8217         predicate to reflect toc fusion has been deleted.
8218         (toc_fusion_mem_raw): Delete, no longer used.
8219         (toc_fusion_mem_wrapped): Likewise.
8220         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
8221         fusion mask bit.
8222         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
8223         Delete, no longer used.
8224         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
8225         meant to be used for toc fusion.
8226         (rs6000_debug_print_mode): Delete toc fusion debugging.
8227         (rs6000_debug_reg_global): Likewise.
8228         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
8229         fusion and secondary reload support that were never used.
8230         (rs6000_option_override_internal): Delete TOC fusion, that was only
8231         partially defined, and it did not work unless you also used the
8232         -mcmodel= switch.
8233         (rs6000_legitimate_address_p): Delete TOC fusion support.
8234         (rs6000_opt_masks): Likewise.
8235         (fusion_wrap_memory_address): Delete function, no longer used.
8236         (fusion_split_address); Delete TOC fusion support.
8237         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
8238         longer used with toc fusion being deleted.
8239         (TARGET_TOC_FUSION_FP): Likewise.
8240         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
8241         UNSPEC.
8242         (toc fusion spliter): Delete TOC fusion support.
8243         (toc_fusionload_<mode>): Likewise.
8244         (toc_fusionload_di): Likewise.
8245         (fusion_gpr_load_<mode>): Delete generator function, this insn no
8246         longer needs to be named.  Rename predicate to delete TOC fusion.
8247         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8248         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8249         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
8250         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
8251         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
8253 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8255         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
8256         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
8257         __int128 in built-in function prototypes.
8258         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
8259         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
8261 2018-07-27  Martin Sebor  <msebor@redhat.com>
8263         PR tree-optimization/86696
8264         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
8265         types, including enums.
8266         (handle_char_store): Be prepared for the above function to fail.
8268 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
8270         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
8271         when optimization level is lower than 2 or optimize for size.
8273 2018-07-26  Martin Sebor  <msebor@redhat.com>
8275         PR tree-optimization/86043
8276         PR tree-optimization/86042
8277         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
8278         (get_string_cst_length): Rename...
8279         (get_min_string_length): ...to this.  Add argument.
8280         (handle_char_store): Extend to handle multi-character stores by
8281         MEM_REF.
8282         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
8283         * tree.h (initializer_zerop): Add argument.
8285 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
8287         PR middle-end/86660
8288         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
8289         declare target to variables if they have always,{to,from,tofrom} map
8290         kinds.
8292 2018-07-26  Martin Liska  <mliska@suse.cz>
8294         PR lto/86548
8295         * lto-wrapper.c: Add linker_output as prefix
8296         for ltrans_output_file.
8298 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
8300         PR rtl-optimization/85805
8301         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
8302         value for hard registers if that was written in the same mode.
8304 2018-07-26  Martin Liska  <mliska@suse.cz>
8306         PR gcov-profile/86536
8307         * gcov.c (format_gcov): Use printf format %.*f directly
8308         and do not handle special values.
8310 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8312         * common/config/arc/arc-common.c (arc_option_optimization_table):
8313         Update default optimizations for size.
8315 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8317         * config/arc/arc.md (movsf_insn): Add short instruction selection.
8318         * config/arc/constraints.md (CfZ): New constraint.
8319         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
8320         (subsf3_fpu): Likewise.
8321         (cmpsf_fpu): Likewise.
8322         (cmpsf_fpu_uneq): Likewise.
8324 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8326         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
8327         accesses as well.
8328         (arc_is_uncached_mem_p): uncached applies to both the variable and
8329         the pointer.
8331 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
8333         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
8334         register names.
8336 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
8338         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
8339         field "m_scopes" from vec to auto_vec.
8341 2018-07-25  Martin Liska  <mliska@suse.cz>
8343         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
8344         return type.
8346 2018-07-25  Richard Biener  <rguenther@suse.de>
8348         PR debug/86654
8349         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
8350         special wrt context_die late.
8351         (gen_subprogram_die): Re-use DIEs in local scope.
8353 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
8355         PR tree-optimization/86644
8356         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
8358 2018-07-25  Martin Liska  <mliska@suse.cz>
8360         PR middle-end/86645
8361         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
8362         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
8364 2018-07-25  Martin Liska  <mliska@suse.cz>
8366         PR sanitizer/79635
8367         * params.def: Explain ASan abbreviation and provide
8368         a documentation link.
8370 2018-07-24  Martin Sebor  <msebor@redhat.com>
8372         PR tree-optimization/86622
8373         PR tree-optimization/86532
8374         * builtins.h (string_length): Declare.
8375         * builtins.c (c_strlen): Correct handling of non-constant offsets.
8376         (check_access): Be prepared for non-constant length ranges.
8377         (string_length): Make extern.
8378         * expr.c (string_constant): Only handle the minor non-constant
8379         array index.  Use string_constant to compute the length of
8380         a generic string constant.
8382 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
8384         PR tree-optimization/86618
8385         * tree-vect-stmts.c (vectorizable_call): Don't take the address
8386         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
8388 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
8390         PR tree-optimization/86636
8391         * json.cc (json::object::set): Fix comment.  Add assertions.
8392         (json::array::append): Move here from json.h.  Add comment and an
8393         assertion.
8394         (json::string::string): Likewise.
8395         * json.h (json::array::append): Move to json.cc.
8396         (json::string::string): Likewise.
8397         * optinfo-emit-json.cc
8398         (optrecord_json_writer::impl_location_to_json): Assert that we
8399         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
8400         wrapper around it.  Expand the location once, rather than three
8401         times.
8402         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
8403         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
8404         wrappers.
8405         (optrecord_json_writer::optinfo_to_json): Likewise, in four
8406         places.  Fix some overlong lines.
8408 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
8410         * config/aarch64/aarch64-simd.md
8411         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
8412         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
8413         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
8414         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
8415         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
8416         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
8417         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
8418         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
8419         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
8421 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
8423         PR middle-end/86627
8424         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
8425         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
8426         and abs_d == d, do the power of two handling if profitable.
8428 2018-07-24  Richard Biener  <rguenther@suse.de>
8430         * match.pd: Add BIT_FIELD_REF canonicalizations.
8432 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8434         PR c/86617
8435         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
8437 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8439         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
8440         terminated STRING_CST object.
8442 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8444         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
8446 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8448         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
8449         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
8450         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
8451         the elements into a register.
8452         (rs6000_split_v4si_init_di_reg): Delete.
8453         (rs6000_split_v4si_init): Delete.
8454         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
8455         (vsx_init_v4si): Rewrite as a define_expand.
8457 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
8459         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
8460         zero_extend argument from memory): New.
8462 2018-07-22  Martin Sebor  <msebor@redhat.com>
8464         PR bootstrap/86621
8465         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
8466         diagnosing calls with unknown arguments unless -Walloca-larger-than
8467         is restricted to less than PTRDIFF_MAX bytes.
8469 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
8471         * doc/gcov.texi (Invoking Gcov): Editorial changes.
8473 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
8475         * pretty-print.c (text_info::set_location): Remove redundant
8476         "line_table" parameter from call to rich_location::set_range.
8478 2018-07-20  Martin Sebor  <msebor@redhat.com>
8480         PR middle-end/82063
8481         * builtins.c (expand_builtin_alloca): Adjust.
8482         * calls.c (alloc_max_size): Simplify.
8483         * cgraphunit.c (cgraph_node::expand): Adjust.
8484         * common.opt (larger_than_size, warn_frame_larger_than): Remove
8485         variables.
8486         (frame_larger_than_size): Same.
8487         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
8488         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
8489         Initialize.
8490         * doc/invoke.texi (GCC Command Options): Document option arguments.
8491         Explain byte-size arguments and suffixes.
8492         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
8493         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
8494         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
8495         * doc/options.texi (UInteger): Expand.
8496         (Host_Wide_Int, ByteSize): Document new properties.
8497         * final.c (final_start_function_1): Include sizes in an error message.
8498         * function.c (frame_offset_overflow): Same.
8499         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
8500         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
8501         Diagnose unbounded alloca calls only for limits of less than
8502         PTRDIFF_MAX.
8503         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
8504         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
8505         for alloca(0).
8506         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
8507         only for limits of less than PTRDIFF_MAX.
8508         * langhooks-def.h (lhd_handle_option): Change function argument
8509         to HOST_WIDE_INT.
8510         * langhooks.c (lhd_handle_option): Same.
8511         * langhooks.h (handle_option): Same.
8512         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
8513         ByteSize flags.
8514         (var_type, var_type_struct): Same.
8515         (var_set): Handle ByteSize flag.
8516         * optc-gen.awk: Add comments to output to ease debugging.  Make
8517         use of HOST_WIDE_INT where appropriate.
8518         * opts-gen-save.awk:  Use %lx to format unsigned long.
8519         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
8520         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
8521         arguments.  Parse bytes-size suffixes.
8522         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
8523         (enum_value_to_arg): Same.
8524         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
8525         (handle_option): Adjust.
8526         (generate_option): Change function argument to HOST_WIDE_INT.
8527         (cmdline_handle_error): Adjust.
8528         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
8529         (set_option): Change function argument to HOST_WIDE_INT.
8530         (option_enabled): Handle cl_host_wide_int.
8531         (get_option_state): Handle CLVC_SIZE.
8532         (control_warning_option): Same.
8533         * opts.c (common_handle_option): Change function argument to
8534         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
8535         OPT_Wvla_larger_than_.
8536         * opts.h (enum cl_var_type): Add an enumerator.
8537         * stor-layout.c (layout_decl): Print a more meaningful warning.
8538         * toplev.c (output_stack_usage): Adjust.
8540 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
8542         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
8543         call to inline_expand_builtin_string_cmp.
8544         (expand_builtin_strcmp): Likewise.
8545         (expand_builtin_strncmp): Likewise.
8546         (inline_string_cmp): Delete the last parameter, change char_type_node
8547         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
8548         two operands.
8549         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
8550         the inlining expansion on target where the type of the call has same or
8551         narrower precision than unsigned char.
8553 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
8555         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
8556         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
8557         * common.opt (fsave-optimization-record): New option.
8558         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
8559         * doc/invoke.texi (-fsave-optimization-record): New option.
8560         * dumpfile.c: Include "optinfo-emit-json.h".
8561         (struct kv_pair): Move to coretypes.h.
8562         (optgroup_options): Make non-static.
8563         (dump_context::end_scope): Call
8564         optimization_records_maybe_pop_dump_scope.
8565         * dumpfile.h (optgroup_options): New decl.
8566         * json.cc: New file.
8567         * json.h: New file.
8568         * optinfo-emit-json.cc: New file.
8569         * optinfo-emit-json.h: New file.
8570         * optinfo.cc: Include "optinfo-emit-json.h".
8571         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
8572         (optinfo_enabled_p): Check optimization_records_enabled_p.
8573         (optinfo_wants_inlining_info_p): Likewise.
8574         * optinfo.h: Update comment.
8575         * profile-count.c (profile_quality_as_string): New function.
8576         * profile-count.h (profile_quality_as_string): New decl.
8577         (profile_count::quality): New accessor.
8578         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
8579         and optinfo_emit_json_cc_tests.
8580         * selftest.h (selftest::json_cc_tests): New decl.
8581         (selftest::optinfo_emit_json_cc_tests): New decl.
8582         * toplev.c: Include "optinfo-emit-json.h".
8583         (compile_file): Call optimization_records_finish.
8584         (do_compile): Call optimization_records_start.
8585         * tree-ssa-live.c: Include optinfo.h.
8586         (remove_unused_scope_block_p): Retain inlining information if
8587         optinfo_wants_inlining_info_p returns true.
8589 2018-07-20  Richard Biener  <rguenther@suse.de>
8591         PR debug/86585
8592         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
8593         to cover -flto-partition=none.
8595 2018-07-20  Martin Liska  <mliska@suse.cz>
8597         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
8598         (get_decl_source_range): Remove unused function.
8600 2018-07-20  Richard Biener  <rguenther@suse.de>
8602         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
8603         (struct vn_phi_s): Likewise.
8604         (struct vn_reference_s): Likewise.
8605         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
8606         for searching the slot of an entry known to be in the hash itself.
8607         (vn_phi_hasher::equal): Likewise.
8608         (vn_reference_hasher::equal): Likewise.
8609         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
8610         globals.
8611         (optimistic_info, current_info): Remove, keeping only valid_info.
8612         (vn_reference_lookup_1): Remove fallback lookup.
8613         (vn_reference_lookup_2): Likewise.
8614         (vn_nary_op_lookup_1): Likewise.
8615         (vn_phi_lookup): Likewise.
8616         (vn_nary_build_or_lookup_1): Make sure to not chain the built
8617         hash element.
8618         (vn_reference_insert): Adjust, chain the inserted hash element
8619         at last_inserted_ref.
8620         (vn_reference_insert_pieces): Likewise.
8621         (visit_reference_op_call): Likewise.
8622         (vn_nary_op_insert_into): Chain the inserted hash element at
8623         last_inserted_nary.
8624         (vn_nary_op_insert_pieces): Adjust.
8625         (vn_nary_op_insert): Likewise.
8626         (vn_nary_op_insert_stmt): Likewise.
8627         (vn_phi_insert): Adjust, chain the inserted hash element at
8628         last_inserted_phi.
8629         (process_scc): Remove clearing and copying the optimistic
8630         table.  Instead remove elements inserted during an optimistic
8631         iteration from the single table we maintain.
8632         (init_scc_vn): Adjust.
8633         (free_scc_vn): Likewise.
8634         (sccvn_dom_walker::record_cond): Likewise.
8635         (sccvn_dom_walker::after_dom_children): Likewise.
8637 2018-07-19  Martin Sebor  <msebor@redhat.com>
8639         PR tree-optimization/84047
8640         PR tree-optimization/83776
8641         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
8642         (check_array_bounds): Call it.
8644 2018-07-19  Martin Sebor  <msebor@redhat.com>
8646         * align.h (align_flags): Use member initialization.
8648 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
8650         * Makefile.in (OBJS): Add optinfo.o.
8651         * coretypes.h (class symtab_node): New forward decl.
8652         (struct cgraph_node): New forward decl.
8653         (class varpool_node): New forward decl.
8654         * dump-context.h: New file.
8655         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
8656         "tree-pass.h".
8657         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
8658         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
8659         (set_alt_dump_file): Likewise.
8660         (dump_context::~dump_context): New dtor.
8661         (dump_gimple_stmt): Move implementation to...
8662         (dump_context::dump_gimple_stmt): ...this new member function.
8663         Add the stmt to any pending optinfo, creating one if need be.
8664         (dump_gimple_stmt_loc): Move implementation to...
8665         (dump_context::dump_gimple_stmt_loc): ...this new member function.
8666         Start a new optinfo and add the stmt to it.
8667         (dump_gimple_expr): Move implementation to...
8668         (dump_context::dump_gimple_expr): ...this new member function.
8669         Add the stmt to any pending optinfo, creating one if need be.
8670         (dump_gimple_expr_loc): Move implementation to...
8671         (dump_context::dump_gimple_expr_loc): ...this new member function.
8672         Start a new optinfo and add the stmt to it.
8673         (dump_generic_expr): Move implementation to...
8674         (dump_context::dump_generic_expr): ...this new member function.
8675         Add the tree to any pending optinfo, creating one if need be.
8676         (dump_generic_expr_loc): Move implementation to...
8677         (dump_context::dump_generic_expr_loc): ...this new member
8678         function.  Add the tree to any pending optinfo, creating one if
8679         need be.
8680         (dump_printf): Move implementation to...
8681         (dump_context::dump_printf_va): ...this new member function.  Add
8682         the text to any pending optinfo, creating one if need be.
8683         (dump_printf_loc): Move implementation to...
8684         (dump_context::dump_printf_loc_va): ...this new member function.
8685         Start a new optinfo and add the stmt to it.
8686         (dump_dec): Move implementation to...
8687         (dump_context::dump_dec): ...this new member function.  Add the
8688         value to any pending optinfo, creating one if need be.
8689         (dump_context::dump_symtab_node): New member function.
8690         (dump_context::get_scope_depth): New member function.
8691         (dump_context::begin_scope): New member function.
8692         (dump_context::end_scope): New member function.
8693         (dump_context::ensure_pending_optinfo): New member function.
8694         (dump_context::begin_next_optinfo): New member function.
8695         (dump_context::end_any_optinfo): New member function.
8696         (dump_context::s_current): New global.
8697         (dump_context::s_default): New global.
8698         (dump_scope_depth): Delete global.
8699         (dumpfile_ensure_any_optinfo_are_flushed): New function.
8700         (dump_symtab_node): New function.
8701         (get_dump_scope_depth): Reimplement in terms of dump_context.
8702         (dump_begin_scope): Likewise.
8703         (dump_end_scope): Likewise.
8704         (selftest::temp_dump_context::temp_dump_context): New ctor.
8705         (selftest::temp_dump_context::~temp_dump_context): New dtor.
8706         (selftest::verify_item): New function.
8707         (ASSERT_IS_TEXT): New macro.
8708         (ASSERT_IS_TREE): New macro.
8709         (ASSERT_IS_GIMPLE): New macro.
8710         (selftest::test_capture_of_dump_calls): New test.
8711         (selftest::dumpfile_c_tests): Call it.
8712         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
8713         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
8714         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
8715         descriptive comment.
8716         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
8717         (dump_node, dump_bb): Move these unrelated decls.
8718         (class dump_manager): Add leading comment.
8719         * optinfo.cc: New file.
8720         * optinfo.h: New file.
8722 2018-07-19  Michael Collison  <michael.collison@arm.com>
8723             Richard Henderson <rth@redhat.com>
8725         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
8726         (subti): Handle op1 zero.
8727         (subvti4, usub4ti4): New.
8728         (*sub<GPI>3_compare1_imm): New.
8729         (sub<GPI>3_carryinCV): New.
8730         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
8731         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
8733 2018-07-19  Michael Collison  <michael.collison@arm.com>
8734             Richard Henderson <rth@redhat.com>
8736         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
8737         (addti3): Create simpler code if low part is already known to be 0.
8738         (addvti4, uaddvti4): New.
8739         (*add<GPI>3_compareC_cconly_imm): New.
8740         (*add<GPI>3_compareC_cconly): New.
8741         (*add<GPI>3_compareC_imm): New.
8742         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
8743         handle constants within this pattern..
8744         (*add<GPI>3_compareV_cconly_imm): New.
8745         (*add<GPI>3_compareV_cconly): New.
8746         (*add<GPI>3_compareV_imm): New.
8747         (add<GPI>3_compareV): New.
8748         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
8749         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
8750         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
8751         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
8752         with 'comparison' operator.
8753         (*add<GPI>3_compareV_cconly_imm): Ditto.
8754         (*add<GPI>3_compareV_cconly): Ditto.
8755         (*add<GPI>3_compareV_imm): Ditto.
8756         (add<GPI>3_compareV): Ditto.
8757         (add<mode>3_carryinC): Ditto.
8758         (*add<mode>3_carryinC_zero): Ditto.
8759         (*add<mode>3_carryinC): Ditto.
8760         (add<mode>3_carryinV): Ditto.
8761         (*add<mode>3_carryinV_zero): Ditto.
8762         (*add<mode>3_carryinV): Ditto.
8764 2018-07-19  Michael Collison  <michael.collison@arm.com>
8765             Richard Henderson <rth@redhat.com>
8767         * config/aarch64/aarch64-modes.def (CC_V): New.
8768         * config/aarch64/aarch64-protos.h
8769         (aarch64_addti_scratch_regs): Declare
8770         (aarch64_subvti_scratch_regs): Declare.
8771         (aarch64_expand_subvti): Declare.
8772         (aarch64_gen_unlikely_cbranch): Declare
8773         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
8774         for signed overflow using CC_Vmode.
8775         (aarch64_get_condition_code_1): Handle CC_Vmode.
8776         (aarch64_gen_unlikely_cbranch): New function.
8777         (aarch64_addti_scratch_regs): New function.
8778         (aarch64_subvti_scratch_regs): New function.
8779         (aarch64_expand_subvti): New function.
8781 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8783         * config/aarch64/aarch64-option-extensions.def: New entry for profile
8784         extension.
8785         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
8786         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
8787         extension.
8789 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8791         PR target/83009
8792         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8793         address check not strict.
8795 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8797         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
8798         Umq with Umn.
8799         (store_pair_lanes<mode>): Likewise.
8800         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
8801         enum value 'ADDR_QUERY_LDP_STP_N'.
8802         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
8803         (aarch64_print_address_internal): Add declaration.
8804         (aarch64_print_ldpstp_address): Remove.
8805         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
8806         (aarch64_print_operand): Change printing of 'y'.
8807         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
8808         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
8809         'true' rather than '1'.
8810         * config/aarch64/constraints.md (Uml): Likewise.
8811         (Uml): Rename to Umn.
8812         (Umq): Remove.
8814 2018-07-19  Richard Biener  <rguenther@suse.de>
8816         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
8817         a trailing array.
8818         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
8819         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
8820         (vn_reference_hasher): Likewise.
8821         (struct vn_tables_s): Remove obstack and alloc-pool members.
8822         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
8823         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
8824         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
8825         (vn_reference_insert_pieces): Likewise.
8826         (alloc_vn_nary_op_noinit): Adjust.
8827         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
8828         (vn_phi_eq): Adjust.
8829         (shared_lookup_phiargs): Remove.
8830         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
8831         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
8832         (visit_reference_op_call): Likewise.
8833         (copy_nary, copy_phi, copy_reference): Remove.
8834         (process_scc): Rewind the obstack when iterating.  Do not
8835         copy the elements to valid_info but just move them from one
8836         hashtable to the other.
8837         (allocate_vn_table): Adjust.
8838         (free_vn_table): Likewise.
8839         (init_scc_vn): Likewise.
8840         (free_scc_vn): Likewise.
8842 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
8844         PR target/86560
8845         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
8846         indirect_return as function type attribute.
8847         (ix86_attribute_table): Change indirect_return to function
8848         type attribute.
8849         * doc/extend.texi: Update indirect_return attribute.
8851 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
8853         * wide-int.h (widest2_int): New.
8854         * gimple-fold.c (arith_overflowed_p): Use it.
8855         * tree.h (widest2_int_cst): New.
8856         * tree-vrp.c (wide_int_binop_overflow): Rename from
8857         vrp_int_const_binop.
8858         Rewrite to work on trees.
8859         (extract_range_from_multiplicative_op_1): Abstract code to...
8860         (wide_int_range_min_max): ...here.
8861         (wide_int_range_cross_product): ...and here.
8862         (extract_range_from_binary_expr_1): Abstract overflow code to...
8863         (wide_int_range_mult_wrapping): ...here.
8864         * tree-vrp.h (wide_int_range_cross_product): New.
8865         (wide_int_range_mult_wrapping): New.
8867 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
8868             Julia Koval  <julia.koval@intel.com>
8870         * config/i386/x86-tune-costs.h (skylake_memcpy,
8871         skylake_memset): Replace rep_prefix with unrolling for size 512.
8873 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
8875         PR middle-end/86544
8876         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
8877         comparision with EQ_EXPR in last stmt.
8879 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8881         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
8882         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
8883         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
8884         previously known as "PowerPC AltiVec Built-in Functions".  Move
8885         some material to new subsubsections "PowerPC AltiVec Built-in
8886         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8887         ISA 2.07".
8888         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8889         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8890         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8891         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8893 2018-07-18  Richard Biener  <rguenther@suse.de>
8895         PR tree-optimization/86557
8896         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8897         EXACT_DIV_EXPR.
8899 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
8901         * config/s390/s390.c (s390_function_profiler): Generate CFI.
8903 2018-07-17  Jeff Law  <law@redhat.com>
8905         * config/arm/arm.c (get_label_padding): Update for recent
8906         changes to label_to_alignment.
8908         PR tree-optimization/86010
8909         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8911         * config/mips/mips.c (vr4130_align_insns): Update for recent
8912         changes to label_to_alignment.
8914         * config/frv/frv.c (frv_label_align): Update for recent changes
8915         to label_to_alignment.
8917         * config/nios2/nios2.c (nios2_label_align): Update for recent
8918         changes which dropped ALIGN_LABELS_LOG.
8920 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
8922         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8923         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8925 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
8927         * config/arc/arc.c (arc_label_align): Use align_labels instead of
8928         deprecated align_labels_log.
8930 2018-07-17  Richard Biener  <rguenther@suse.de>
8932         PR lto/86456
8933         * dwarf2out.c (init_sections_and_labels): Always generate
8934         a debug_line_str_section for early LTO debug.
8935         (dwarf2out_finish): Reset debug_line_str_hash output early.
8936         Bump counter for extra dwarf5 .debug_loc labels to not conflict
8937         with fat LTO part.
8938         (dwarf2out_early_finish): Output debug_line_str.
8940 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8942         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8943         index register on z196 or later.
8945 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
8947         * config/s390/s390.c (s390_default_align): Set default function
8948         alignment to 16.
8949         (s390_override_options_after_change): Call s390_default align.
8950         (s390_option_override_internal): Call s390_default_align.
8951         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8953 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
8955         PR middle-end/86542
8956         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8957         to _looptemp_ clauses, other than the first two.
8959 2018-07-17  Martin Liska  <mliska@suse.cz>
8961         * opts.c: Do not enable OPT_falign_* for -Os.
8963 2018-07-17  Martin Liska  <mliska@suse.cz>
8965         * align.h (MAX_CODE_ALIGN): New.
8966         (MAX_CODE_ALIGN_VALUE): New.
8967         * common/config/i386/i386-common.c (ix86_handle_option):
8968         (MAX_CODE_ALIGN): Moved to align.h.
8969         * final.c (MAX_CODE_ALIGN): Likewise.
8970         * opts.c (parse_and_check_align_values):
8971         (MAX_CODE_ALIGN): Likewise.
8972         (MAX_CODE_ALIGN_VALUE): Likewise.
8974 2018-07-17  Martin Liska  <mliska@suse.cz>
8976         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8977         in order to fulfil coding style.
8978         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8979         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8980         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8981         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8982         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8983         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8984         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8985         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8986         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8988 2018-07-17  Martin Liska  <mliska@suse.cz>
8990         * align.h: New file.
8991         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8992         directly.
8993         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8994         align_flags of label_to_alignment.
8995         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8996         align_flags class.
8997         * config/m68k/m68k.c: Do not use removed align_labels_value and
8998         align_loops_value.
8999         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
9000         (LOOP_ALIGN): Likewise.
9001         (LABEL_ALIGN): Likewise.
9002         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9003         Remove not used macro.
9004         (rs6000_loop_align): Change return type to align_flags.
9005         (rs6000_loop_align_max_skip): Remove.
9006         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
9007         Change return type to align_flags.
9008         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
9009         Remove not used macro.
9010         (rs6000_loop_align):  Change return type to align_flags.
9011         (rs6000_loop_align_max_skip): Remove.
9012         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
9013         * config/rx/rx-protos.h (rx_align_for_label): Make it
9014         static function.
9015         * config/rx/rx.c (rx_align_for_label): Change return type
9016         to align_flags.
9017         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
9018         macro definitions.
9019         into align_flags class.
9020         (LABEL_ALIGN): Likewise.
9021         (LOOP_ALIGN): Likewise.
9022         * config/s390/s390.c (s390_label_align): Use align_flags
9023         class member.
9024         (s390_asm_output_function_label): Likewise.
9025         * config/sh/sh.c (sh_override_options_after_change):
9026         Use align_flags class directly without macros.
9027         (find_barrier): Likewise.
9028         (barrier_align): Likewise.
9029         (sh_loop_align): Likewise.
9030         * config/spu/spu.c (spu_option_override):
9031         Use align_flags_tuple::get_value instead of removed macros.
9032         (spu_sched_init): Likewise.
9033         * config/spu/spu.h (GTY): Likewise.
9034         * config/visium/visium.c (visium_option_override):
9035         Set "8" as default secondary alignment.
9036         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
9037         in order to guarantee secondary alignment of 8.
9038         * coretypes.h: Include align.h header file.
9039         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
9040         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
9041         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
9042         * doc/tm.texi.in: Likewise.
9043         * final.c (struct label_alignment): Remove not used structure.
9044         (LABEL_ALIGN): Change type to align_flags.
9045         (LOOP_ALIGN): Likewise.
9046         (JUMP_ALIGN): Likewise.
9047         (default_loop_align_max_skip): Remove.
9048         (default_label_align_max_skip): Likewise.
9049         (default_jump_align_max_skip): Likewise.
9050         (default_label_align_after_barrier_max_skip):
9051         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
9052         (LABEL_TO_MAX_SKIP): Remove.
9053         (label_to_alignment): Return align_flags type instead of integer.
9054         (label_to_max_skip): Remove.
9055         (align_fuzz): Use align_flags type.
9056         (compute_alignments): Use align_flags type and use align_flags::max
9057         to combine multiple alignments.
9058         (grow_label_align): Grow vec instead of C array.
9059         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
9060         (shorten_branches):  Use align_flags type and use align_flags::max
9061         to combine multiple alignments.
9062         (final_scan_insn_1): Remove usage of secondary alignment that comes
9063         from label alignment, but instead use proper secondary alignment
9064         which is computed in grow_label_align.
9065         * flags.h (struct align_flags_tuple): Move to align.h.
9066         (struct align_flags): Likewise.
9067         (state_align_loops): Rename to align_loops.
9068         (state_align_jumps): Rename to align_jumps.
9069         (state_align_labels): Rename to align_labels.
9070         (state_align_functions): Rename to align_functions.
9071         (align_loops_log): Remove.
9072         (align_jumps_log): Remove.
9073         (align_labels_log): Remove.
9074         (align_functions_log): Remove.
9075         (align_loops_max_skip): Remove.
9076         (align_jumps_max_skip): Remove.
9077         (align_labels_max_skip): Remove.
9078         (align_functions_max_skip): Remove.
9079         (align_loops_value): Remove.
9080         (align_jumps_value): Remove.
9081         (align_labels_value): Remove.
9082         (align_functions_value): Remove.
9083         * output.h (label_to_alignment): Change return type to align_flags.
9084         (label_to_max_skip): Remove.
9085         * target.def: Remove loop_align_max_skip, label_align_max_skip,
9086         jump_align_max_skip macros.
9087         * targhooks.h (default_loop_align_max_skip): Remove.
9088         (default_label_align_max_skip): Likewise.
9089         (default_jump_align_max_skip): Likewise.
9090         (default_label_align_after_barrier_max_skip): Remove.
9091         * toplev.c (read_log_maxskip): Use ::normalize function.
9092         (parse_N_M): Remove not used argument and also call ::normalize.
9093         (parse_alignment_opts): Do not pass unused arguments.
9094         * varasm.c (assemble_start_function): Use directly align_functions
9095         instead of removed macros.
9096         * system.h: Do not poison removed macros.
9098 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
9100         PR middle-end/86539
9101         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
9102         and cond temporaries don't have reference type if iterator has
9103         pointer type.  For init use &for_pre_body instead of pre_p if
9104         for_pre_body is non-empty.
9106 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9108         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
9109         double-double modes to SFmode directly directly.
9110         (trunc<mode>sf2_fprs): Delete.
9112 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9114         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
9115         for conversions between IFmode and the decimal floating point modes.
9116         (init_float128_ieee): Use the correct names for conversions between
9117         KFmode and the decimal floating point modes.
9119 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
9121         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
9122         for the conversions between TDmode and IFmode.
9123         (init_float128_ieee): Use more correct names for the conversions
9124         between TDmode and KFmode.
9126 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
9128         PR tree-optimization/86526
9129         * builtins.c (expand_builtin_memcmp): Formatting fixes.
9130         (inline_expand_builtin_string_cmp): Likewise.
9131         (inline_string_cmp): Likewise.  Use c_readstr instead of
9132         builtin_memcpy_read_str.  Add unit_mode temporary.
9134 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9136         PR middle-end/86528
9137         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
9138         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
9140 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9142         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
9143         Alphabetize prototypes of built-in functions, separating out
9144         built-in functions that are listed in this section but should be
9145         described elsewhere.
9147 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
9149         PR target/86511
9150         * expmed.c (emit_store_flag): Do not emit setcc followed by a
9151         conditional move when trapping comparison was split to a
9152         non-trapping one (and vice versa).
9154 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9156         * config/s390/s390.c (s390_function_profiler): Generate nops
9157         instead of profiler call sequences.
9158         * config/s390/s390.opt: Add the new option.
9160 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9162         * config/s390/s390.c (s390_function_profiler): Generate
9163         __mcount_loc section.
9164         * config/s390/s390.opt: Add the new option.
9166 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
9168         * common.opt: Add the new warning.
9169         * config/s390/s390.c (s390_function_profiler): Emit "brasl
9170         %r0,__fentry__" when -mfentry is specified.
9171         (s390_option_override_internal): Disallow -mfentry for 31-bit
9172         CPUs.
9173         * config/s390/s390.opt: Add the new option.
9175 2018-07-16  Richard Biener  <rguenther@suse.de>
9177         PR lto/86523
9178         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
9179         for function-local FUNCTION_DECL and RESULT_DECL immediately.
9181 2018-07-16  Martin Liska  <mliska@suse.cz>
9183         PR ipa/86529
9184         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
9185         to ::get_create.
9187 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9189         * config/arc/arcHS.md: Update ARCHS scheduling rules.
9191 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
9193         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
9194         for ARCHS4x.
9195         * config/arc/arc-cpus.def (hs4x): New cpu.
9196         (hs4xd): Likewise.
9197         * config/arc/arc-tables.opt: Regenerate.
9198         * config/arc/arc.c (arc_sched_issue_rate): New function.
9199         (TARGET_SCHED_ISSUE_RATE): Define.
9200         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
9201         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
9202         fpu_cvt.
9203         (attr tune): Add ARCHS4x tune values.
9204         (attr tune_dspmpy): Define.
9205         (*tst): Correct instruction type.
9206         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
9207         * config/arc/arcHS4x.md: New file.
9208         * config/arc/fpu.md: Update instruction type attributes.
9209         * config/arc/t-multilib: Regenerate.
9211 2018-07-16  Tom de Vries  <tdevries@suse.de>
9213         PR debug/86455
9214         * var-tracking.c (vt_initialize): Fix pre_dec handling.
9216 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
9218         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
9219         early clobber.
9221 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
9223         PR tree-optimization/86514
9224         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
9225         conversion to a boolean type from a type with greater precision.
9227 2018-07-16  Tom de Vries  <tdevries@suse.de>
9229         * var-tracking.c (vt_initialize): Print adjusted insn slim if
9230         dump_flags request TDF_SLIM.
9232 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
9234         * fold-const.c (int_const_binop_1): Abstract...
9235         (wide_int_binop): ...wide int code here.
9236         (poly_int_binop): ...poly int code here.
9237         Abstract the rest of int_const_binop_1 into int_const_binop.
9238         * fold-const.h (wide_int_binop): New.
9239         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
9240         Remove useless PLUS/MINUS_EXPR case.
9241         (zero_nonzero_bits_from_vr): Move wide int code...
9242         (zero_nonzero_bits_from_bounds): ...here.
9243         (extract_range_from_binary_expr_1): Move mask optimization code...
9244         (range_easy_mask_min_max): ...here.
9245         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
9246         (range_easy_mask_min_max): New.
9248 2018-07-15  Jeff Law  <law@redhat.com>
9250         PR target/85993
9251         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
9252         block.
9254 2018-07-14  Jim Wilson  <jimw@sifive.com>
9256         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
9258 2018-07-14  Paul Koning  <ni1d@arrl.net>
9260         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
9262 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
9264         * lto-streamer-out.c (copy_function_or_variable): Dump info about
9265         copying section.
9267 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
9268             Steve Munroe  <munroesj52@gmail.com>
9270         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
9271         (_mm_andnot_si128): Likewise.
9272         (_mm_or_si128): Likewise.
9273         (_mm_xor_si128): Likewise.
9275 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
9277         PR middle-end/78809
9278         * builtins.c (expand_builtin_memcmp): Inline the calls first
9279         when result_eq is false.
9280         (expand_builtin_strcmp): Inline the calls first.
9281         (expand_builtin_strncmp): Likewise.
9282         (inline_string_cmp): New routine. Expand a string compare
9283         call by using a sequence of char comparison.
9284         (inline_expand_builtin_string_cmp): New routine. Inline expansion
9285         a call to str(n)cmp/memcmp.
9286         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
9287         New option.
9288         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
9290 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
9292         * config/arm/driver-arm.c: Include arm-native.h.
9293         (host_detect_local_cpu): Use auto-generated data tables.
9294         (vendors, arm_cpu_table): Delete.  Move part information to ...
9295         * config/arm/arm-cpus.in: ... here.
9296         * config/arm/parsecpu.awk (gen_native): New function.
9297         (vendor, part): New CPU fields.
9298         (END): Add support for building the native CPU detection tables.
9299         * config/arm/t-arm (arm-native.h): Add build rule.
9300         (driver-arm.o): Add dependency on arm-native.h.
9302 2018-07-13  Richard Biener  <rguenther@suse.de>
9304         PR middle-end/85974
9305         * match.pd (addr1 - addr2): Allow either of the operand to
9306         have a conversion.
9308 2018-07-13  Tom de Vries  <tdevries@suse.de>
9310         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
9311         in remap_ssa_name.
9313 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
9315         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
9316         arrays instead of numbered variables.
9318 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
9320         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
9321         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
9323 2018-07-13  Richard Biener  <rguenther@suse.de>
9325         PR debug/86452
9326         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
9327         instead of get_context_die.
9329 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
9330             Richard Biener  <rguenther@suse.de>
9332         PR middle-end/86489
9333         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
9334         that the loop latch destination where phi is defined.
9336 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
9338         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
9339         (riscv_expand_epilogue): Add assertion to check interrupt mode.
9340         (riscv_set_current_function): Extract getting interrupt type to new
9341         function.
9342         (riscv_get_interrupt_type): New function.
9343         (riscv_merge_decl_attributes): New function, checking interrupt type is
9344         same.
9345         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
9347 2018-07-12  Paul Koning  <ni1d@arrl.net>
9349         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
9350         directive.
9352 2018-07-12  Paul Koning  <ni1d@arrl.net>
9354         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
9355         zero reference, add doloop_end instead.
9356         * doc/md.texi (decrement_and_branch_until_zero): Remove.
9357         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
9358         detail for doloop_end.
9360 2018-07-12  Martin Sebor  <msebor@redhat.com>
9362         PR c/86453
9363         * attribs.c (decl_attributes): Reject conflicting attributes before
9364         calling attribute handlers.
9366 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
9368         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
9369          parameter.
9370         (gcc::dump_manager::get_dump_file_name): likewise.
9371         (dump_begin): Likewise.
9372         * dumpfile.h (dump_begin): Update prototype.
9373         (gcc::dump_manager::get_dump_file_name,
9374         gcc::dump_manager::get_dump_file_name): Update prototype.
9376 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9378         * internal-fn.h (vectorizable_internal_fn_p): New function.
9379         * tree-vect-slp.c (compatible_calls_p): Likewise.
9380         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
9381         to internal functions.
9382         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
9384 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9386         * fold-const.h (inverse_conditions_p): Declare.
9387         * fold-const.c (inverse_conditions_p): New function.
9388         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
9389         that test the inverse condition of a conditional internal function.
9390         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
9391         * internal-fn.c (internal_fn_mask_index): Handle conditional
9392         internal functions.
9393         (vectorized_internal_fn_supported_p): New function.
9394         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
9395         (any_pred_load_store): Replace with...
9396         (need_to_predicate): ...this new variable.
9397         (redundant_ssa_names): New variable.
9398         (ifcvt_can_use_mask_load_store): Move initial checks to...
9399         (ifcvt_can_predicate): ...this new function.  Handle tree codes
9400         for which a conditional internal function exists.
9401         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
9402         instead of ifcvt_can_use_mask_load_store.  Update after variable
9403         name change.
9404         (predicate_load_or_store): New function, split out from
9405         predicate_mem_writes.
9406         (check_redundant_cond_expr): New function.
9407         (value_available_p): Likewise.
9408         (predicate_rhs_code): Likewise.
9409         (predicate_mem_writes): Rename to...
9410         (predicate_statements): ...this.  Use predicate_load_or_store
9411         and predicate_rhs_code.
9412         (combine_blocks, tree_if_conversion): Update after above name changes.
9413         (ifcvt_local_dce): Handle redundant_ssa_names.
9414         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
9415         general conditional functions.
9416         * tree-vect-stmts.c (vectorizable_call): Likewise.
9418 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9419             Alan Hayward  <alan.hayward@arm.com>
9420             David Sherwood  <david.sherwood@arm.com>
9422         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
9423         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
9424         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
9425         plus and minus and convert them into IFN_COND_FMA-based sequences.
9426         (convert_mult_to_fma): Handle conditional plus and minus.
9428 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9430         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
9431         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
9432         (cond_fnms_optab): New optabs.
9433         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
9434         internal functions.
9435         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
9436         * internal-fn.h (get_conditional_internal_fn): Declare.
9437         (get_unconditional_internal_fn): Likewise.
9438         * internal-fn.c (cond_ternary_direct): New macro.
9439         (expand_cond_ternary_optab_fn): Likewise.
9440         (direct_cond_ternary_optab_supported_p): Likewise.
9441         (FOR_EACH_COND_FN_PAIR): Likewise.
9442         (get_conditional_internal_fn): New function.
9443         (get_unconditional_internal_fn): Likewise.
9444         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
9445         (gimple_match_op::gimple_match_op): Add a new overload for 5
9446         operands.
9447         (gimple_match_op::set_op): Likewise.
9448         (gimple_resimplify5): Declare.
9449         * genmatch.c (decision_tree::gen): Generate simplifications for
9450         5 operands.
9451         * gimple-match-head.c (gimple_simplify): Define an overload for
9452         5 operands.  Handle calls with 5 arguments in the top-level overload.
9453         (convert_conditional_op): Handle conversions from unconditional
9454         internal functions to conditional ones.
9455         (gimple_resimplify5): New function.
9456         (build_call_internal): Pass a fifth operand.
9457         (maybe_push_res_to_seq): Likewise.
9458         (try_conditional_simplification): Try converting conditional
9459         internal functions to unconditional internal functions.
9460         Handle 3-operand unconditional forms.
9461         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
9462         Define ternary equivalents of the current rules for binary conditional
9463         internal functions.
9464         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
9465         ternary operations.
9466         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
9467         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
9468         (optab): Handle them.
9469         (SVE_COND_FP_TERNARY): New int iterator.
9470         (sve_fmla_op, sve_fmad_op): New int attributes.
9471         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
9472         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
9473         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
9475 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
9477         * target.def (preferred_else_value): New target hook.
9478         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
9479         * doc/tm.texi: Regenerate.
9480         * targhooks.h (default_preferred_else_value): Declare.
9481         * targhooks.c (default_preferred_else_value): New function.
9482         * internal-fn.h (conditional_internal_fn_code): Declare.
9483         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
9484         (get_conditional_internal_fn): Use it.
9485         (conditional_internal_fn_code): New function.
9486         * gimple-match.h (gimple_match_cond): New struct.
9487         (gimple_match_op): Add a cond member function.
9488         (gimple_match_op::gimple_match_op): Update all forms to take a
9489         gimple_match_cond.
9490         * genmatch.c (expr::gen_transform): Use the same condition as res_op
9491         for the suboperation, but don't specify a particular else_value.
9492         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
9493         (visit_nary_op, visit_reference_op_load): Pass
9494         gimple_match_cond::UNCOND to the gimple_match_op constructor.
9495         * gimple-match-head.c: Include tree-eh.h
9496         (convert_conditional_op): New function.
9497         (maybe_resimplify_conditional_op): Likewise.
9498         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
9499         (gimple_resimplify2): Likewise.
9500         (gimple_resimplify3): Likewise.
9501         (gimple_resimplify4): Likewise.
9502         (maybe_push_res_to_seq): Return null for conditional operations.
9503         (try_conditional_simplification): New function.
9504         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
9505         constructor.
9506         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
9507         IFN_COND_* call.
9508         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
9509         function.
9510         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
9512 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
9514         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
9515         DECL_FCONTEXT
9516         (hash_tree): Do not hash DECL_FCONTEXT
9517         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
9518         Do not stream DECL_FCONTEXT.
9519         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
9520         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
9522 2018-07-12  Richard Biener  <rguenther@suse.de>
9524         PR debug/86462
9525         * dwarf2out.c (gen_block_die): Only output blocks when they have
9526         at least one !DECL_IGNORED_P variable.
9528 2018-07-12  Richard Biener  <rguenther@suse.de>
9530         PR target/84829
9531         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
9532         Remove -mieee-fp handling.
9534 2018-07-12  Richard Biener  <rguenther@suse.de>
9536         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
9537         left-over from last patch.
9539 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
9541         PR tree-optimization/86492
9542         * gimple-ssa-store-merging.c
9543         (imm_store_chain_info::coalesce_immediate_stores): Call
9544         check_no_overlap even for the merge_overlapping case.  Formatting fix.
9546 2018-07-12  Richard Biener  <rguenther@suse.de>
9548         PR middle-end/86479
9549         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
9550         move possibly trapping operations into the conditional.
9552 2018-07-12  Richard Biener  <rguenther@suse.de>
9554         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
9555         (vn_lookup_simplify_result): Remove recursion limit applied
9556         here.
9557         (vn_nary_build_or_lookup_1): Adjust.
9558         (try_to_simplify): Likewise.
9559         * gimple-match-head.c (gimple_resimplify1): Instead apply one
9560         here.
9561         (gimple_resimplify2): Likewise.
9562         (gimple_resimplify3): Likewise.
9563         (gimple_resimplify4): Likewise.
9565 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
9567         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
9568         Use __mmask64 type instead of __mmask8 for __M argument.
9569         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
9570         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
9571         __U argument.
9572         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
9573         __mmask16 for __M argument.
9574         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
9575         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
9576         to __mmask16 instead of __mmask8.
9577         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
9578         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
9579         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
9580         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
9581         instead of __mmask16 for __U argument.
9582         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
9583         __mmask16 instead of __mmask8 for __U argument.
9584         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
9585         __U argument.
9586         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
9587         __mmask16.
9588         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
9589         argument.
9590         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
9591         __U argument.
9592         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
9593         __mmask16.
9594         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
9595         of __mmask16.
9596         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
9597         __U argument.
9598         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
9599         __U argument.
9600         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
9601         __U argument.
9602         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
9603         __U argument.
9604         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
9605         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
9606         return type as well as __M argument type and all casts from __mmask8
9607         to __mmask32.
9608         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
9609         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
9610         return type as well as __M argument type and all casts from __mmask8
9611         to __mmask16.
9612         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
9613         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
9614         return type as well as __M argument type and all casts from __mmask8
9615         to __mmask32.
9616         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
9617         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
9618         return type as well as __M argument type and all casts from __mmask8
9619         to __mmask16.
9620         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
9621         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
9622         __mmask16.
9624 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
9626         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
9627         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
9628         for __U argument.
9630 2018-07-11  Paul Koning  <ni1d@arrl.net>
9632         * doc/md.texi (define_subst): Document how multiple occurrences of
9633         the same argument in the replacement pattern are handled.
9635 2018-07-11  Paul Koning  <ni1d@arrl.net>
9637         * doc/extend.texi (Common Variable Attributes): Move "mode" into
9638         alphabetical order.
9639         (Common Type Attributes): Add "mode" attribute.
9641 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
9643         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
9644         stream DECL_ORIGINAL_TYPE.
9645         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
9646         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
9647         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
9648         Do not walk original type.
9649         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
9650         external decls.
9651         (write_ts_decl_non_common_tree_pointers): Do not stream
9652         DECL_ORIGINAL_TYPE
9653         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
9654         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
9656 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9658         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
9659         thread twice from the same starting edge.
9661 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
9663         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
9664         * gimple.c (gimple_call_nonnull_result_p): ...here...
9665         (gimple_call_nonnull_arg): ...and here.
9666         * gimple.h (gimple_call_nonnull_result_p): New.
9667         (gimple_call_nonnull_arg): New.
9669 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
9671         * config/arm/arm-cpus.in: Move information from fpu field of each
9672         cpu definition to the isa field.
9673         * config/arm/parsecpu.awk (fpu): Delete match rule.
9674         (gen_comm_data): Don't add bits from the CPU's FPU entry.
9676 2018-07-11  Richard Biener  <rguenther@suse.de>
9678         PR debug/86457
9679         * dwarf2out.c (init_sections_and_labels): Use
9680         output_asm_line_debug_info consistently.
9681         (dwarf2out_early_finish): Likewise.
9682         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
9683         type units.
9685 2018-07-11  Richard Biener  <rguenther@suse.de>
9687         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
9688         Rework father_bb setting in a way to avoid propagating constants
9689         multiple times on a loop body.
9691 2018-07-10  Mark Wielaard  <mark@klomp.org>
9693         PR debug/86459
9694         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
9696 2018-07-10  Richard Biener  <rguenther@suse.de>
9698         * hash-map.h (hash_map::iterator::operator*): Return
9699         references to key and value.
9701 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
9703         PR c++/86443
9704         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
9705         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
9706         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
9707         (gimplify_omp_for): For composite loops, move outer
9708         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
9709         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
9710         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
9711         TREE_LIST for both the original class iterator and the "last" helper
9712         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
9713         loop, remember has_decl_expr from outer composite loops for the
9714         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
9716 2018-07-09  Martin Sebor  <msebor@redhat.com>
9718         PR middle-end/77357
9719         PR middle-end/86428
9720         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
9721         accessing implicitly initialized array elements.
9722         * expr.c (string_constant): Handle string initializers of
9723         character arrays within aggregates.
9724         * gimple-fold.c (fold_array_ctor_reference): Add argument.
9725         Store element offset.  As a special case, handle zero size.
9726         (fold_nonarray_ctor_reference): Same.
9727         (fold_ctor_reference): Add argument.  Store subobject offset.
9728         * gimple-fold.h (fold_ctor_reference): Add argument.
9730 2018-07-09  Paul Koning  <ni1d@arrl.net>
9732         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
9733         (pdp11_insn_cost): New function.
9734         (pdp11_md_asm_adjust): New function.
9735         (TARGET_INVALID_WITHIN_DOLOOP): Define.
9736         (pdp11_rtx_costs): Update to match machine better.
9737         (output_addr_const_pdp11): Correct format mismatch warnings.
9738         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
9739         * config/pdp11/pdp11.md: General change to add base_cost and/or
9740         length attributes for use by new pdp11_insn_cost function.
9741         (MIN_BRANCH): Correct definition.
9742         (MIN_SOB): Ditto.
9743         (doloop_end): Use standard pattern name for looping pattern.
9744         (doloop_end_nocc): New.
9745         (movsf): Add another constraint alternative.
9746         (zero_extendqihi2): Add constraint alternatives for not in place
9747         extend.
9748         (zero_extendhisi2): Remove.
9749         (shift patterns): Add CC handling variants.
9750         (bswaphi2): New.
9751         (bswapsi2): New.
9752         (rothi3): New.
9753         (define_peephole2): New peephole to recognize mov that sets CC for
9754         subsequent test.
9756 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9758         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
9759         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
9760         wi::add.
9762 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
9764         PR c/86420
9765         * real.c (real_nextafter): Return true if result is denormal.
9767 2018-07-09  Martin Liska  <mliska@suse.cz>
9769         * common.opt: Add back wrongly removed attribute.
9771 2018-07-09  Richard Biener  <rguenther@suse.de>
9773         PR debug/86413
9774         * dwarf2out.c (gen_block_die): For an early generated DIE
9775         always output high/low PC attributes.
9777 2018-07-09  Tom de Vries  <tdevries@suse.de>
9779         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
9780         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
9781         onto VAR_DECL with abstract origin.
9783 2018-07-07  Jim Wilson  <jimw@sifive.com>
9785         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
9787 2018-07-07  Tom de Vries  <tdevries@suse.de>
9789         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
9791 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
9793         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
9794         overflow_type.
9795         (combine_bound): Use wide-int overflow calculation instead of
9796         rolling our own.
9797         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
9798         overflow_type.
9799         * fold-const.c (int_const_binop_2): Same.
9800         (extract_muldiv_1): Same.
9801         (fold_div_compare): Same.
9802         (fold_abs_const): Same.
9803         * match.pd: Same.
9804         * poly-int.h (add): Same.
9805         (sub): Same.
9806         (neg): Same.
9807         (mul): Same.
9808         * predict.c (predict_iv_comparison): Same.
9809         * profile-count.c (slow_safe_scale_64bit): Same.
9810         * simplify-rtx.c (simplify_const_binary_operation): Same.
9811         * tree-chrec.c (tree_fold_binomial): Same.
9812         * tree-data-ref.c (split_constant_offset_1): Same.
9813         * tree-if-conv.c (idx_within_array_bound): Same.
9814         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
9815         * tree-ssa-phiopt.c (minmax_replacement): Same.
9816         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
9817         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
9818         * vr-values.c (vr_values::adjust_range_with_scev): Same.
9819         * wide-int.cc (wi::add_large): Same.
9820         (wi::mul_internal): Same.
9821         (wi::sub_large): Same.
9822         (wi::divmod_internal): Same.
9823         * wide-int.h: Change overflow type to overflow_type for neg, add,
9824         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
9825         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
9826         mul_internal, divmod_internal.
9827         (overflow_type): New enum.
9828         (accumulate_overflow): New.
9830 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9832         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
9833         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
9835 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9837         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
9838         argument is checked for zero before entering loop, avoid checking again.
9840 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
9842         * gimplify.h (generic_expr_could_trap_p): Set as global function.
9843         * gimplify.h (generic_expr_could_trap_p): Likwise.
9844         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
9846 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
9848         PR tree-optimization/86401
9849         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
9850         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
9851         (fold_bit_and_mask): ... here.  New helper function for match.pd.
9852         * fold-const.h (fold_bit_and_mask): Declare.
9853         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
9855 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
9857         PR target/86324
9858         * target.def (translate_mode_attribute): New hook.
9859         * targhooks.h (default_translate_mode_attribute): Declare.
9860         * targhooks.c (default_translate_mode_attribute): New function.
9861         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
9862         * doc/tm.texi: Regenerate.
9863         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
9864         (rs6000_translate_mode_attribute): New function.
9866 2018-07-06  Paul Koning  <ni1d@arrl.net>
9868         * doc/md.texi (define_split): Document DONE and FAIL.
9869         (define_peephole2): Ditto.
9871 2018-07-05  Jeff Law  <law@redhat.com>
9873         PR tree-optimization/86010
9874         * tree-ssa-dse.c (compute_trims): More aggressively trim at
9875         both the head and tail of mem* and str* calls.
9877 2018-07-05  Jim Wilson  <jimw@sifive.com>
9879         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
9881 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
9883         * config/aarch64/aarch64-simd.md: correct flags text for
9884         MIN_EXPR replacement.
9886 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
9888         * configure: Regenerated.
9890 2018-07-05  Carl Love  <cel@us.ibm.com>
9892         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9893         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9894         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9895         VSX_BUILTIN_DOUBLEL_V4SF.
9897 2018-07-05  Martin Sebor  <msebor@redhat.com>
9899         PR c++/86400
9900         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9901         than its domain to compute its the upper bound of a char array.
9903 2018-07-05  Nathan Sidwell  <nathan@acm.org>
9905         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9906         * doc/cpp.texi: Update comment.
9907         * doc/tm.texi: Rebuilt.
9908         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9909         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9910         * doc/extend.texi (Backwards Compatibility): Clarify it is system
9911         headers affected by extern "C".
9912         * system.h: Poison NO_IMPLICIT_EXTERN_C.
9913         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9914         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9915         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9916         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9917         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9918         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9919         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9920         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9921         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9922         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9923         config/sparc/sp64-elf.h, config/spu/spu.h,
9924         config/stormy16/stormy16.h, config/v850/v850.h,
9925         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9926         define NO_IMPLICIT_EXTERN_C.
9927         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9929 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9931         PR target/84711
9932         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9933         instead of GET_MODE_SIZE when comparing Units.
9935 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9937         PR target/84711
9938         * rtlanal.c (set_noop_p): Constrain on mode change,
9939         include hard-reg-set.h
9941 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
9943         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9945 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
9947         Revert
9948         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9950         PR sanitizer/84250
9951         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9952         libasan.
9953         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9955 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
9957         PR sanitizer/84250
9958         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9959         libasan.
9960         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9962 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
9964         PR middle-end/86380
9965         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9967 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
9969         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9970         neg_*_op* variables.
9972 2018-07-04  Martin Liska  <mliska@suse.cz>
9974         * tree-switch-conversion.c: Define
9975         max_ratio_for_speed and max_ratio_for_size constants.
9977 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
9978             Martin Liska  <mliska@suse.cz>
9980         PR middle-end/66240
9981         PR target/45996
9982         PR c/84100
9983         * common.opt: Rename align options with 'str_' prefix.
9984         * common/config/i386/i386-common.c (set_malign_value): New
9985         function.
9986         (ix86_handle_option): Use it to set -falign-* options/
9987         * config/aarch64/aarch64-protos.h (struct tune_params): Change
9988         type from int to string.
9989         * config/aarch64/aarch64.c: Update default values from int
9990         to string.
9991         * config/alpha/alpha.c (alpha_override_options_after_change):
9992         Likewise.
9993         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9994         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9995         max skip conditionally.
9996         * config/i386/freebsd.h (SUBALIGN_LOG): New.
9997         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9998         max skip conditionally.
9999         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10000         max skip conditionally.
10001         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
10002         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10003         max skip conditionally.
10004         * config/i386/i386.c (struct ptt): Change type from int to
10005         string.
10006         (ix86_default_align): Set default values.
10007         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
10008         max skip conditionally.
10009         * config/i386/iamcu.h (SUBALIGN_LOG): New.
10010         (ASM_OUTPUT_MAX_SKIP_ALIGN):
10011         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
10012         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10013         max skip conditionally.
10014         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
10015         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
10016         * config/i386/x86-64.h (SUBALIGN_LOG): New.
10017         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
10018         max skip conditionally.
10019         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10020         * config/ia64/ia64.c (ia64_option_override): Set default values
10021         for alignment options.
10022         * config/m68k/m68k.c: Handle new str_align_* options.
10023         * config/mips/mips.c (mips_set_compression_mode): Change
10024         type of constants.
10025         (mips_option_override): Set default values for options.
10026         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
10027         Likewise.
10028         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10029         Likewise.
10030         * config/rx/rx.c (rx_option_override): Likewise.
10031         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
10032         (LABEL_ALIGN): Use align_labels_log.
10033         (LOOP_ALIGN): Use align_loops_align.
10034         * config/s390/s390.c (s390_asm_output_function_label): Use new
10035         macros.
10036         * config/sh/sh.c (sh_override_options_after_change):
10037         Change type of constants.
10038         * config/spu/spu.c (spu_sched_init): Likewise.
10039         * config/sparc/sparc.c (sparc_option_override): Set default
10040         values for options.
10041         * config/visium/visium.c (visium_option_override): Likewise.
10042         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
10043         emit p2align format with last argument if it's not needed.
10044         * doc/invoke.texi: Document extended format of -falign-*.
10045         * final.c: Use align_labels alignment.
10046         * flags.h (struct target_flag_state): Change type to use
10047         align_flags.
10048         (struct align_flags_tuple): New.
10049         (struct align_flags): Likewise.
10050         (align_loops_log): Redefine macro to use new types.
10051         (align_loops_max_skip): Redefine macro to use new types.
10052         (align_jumps_log): Redefine macro to use new types.
10053         (align_jumps_max_skip): Redefine macro to use new types.
10054         (align_labels_log): Redefine macro to use new types.
10055         (align_labels_max_skip): Redefine macro to use new types.
10056         (align_functions_log): Redefine macro to use new types.
10057         (align_loops): Redefine macro to use new types.
10058         (align_jumps): Redefine macro to use new types.
10059         (align_labels): Redefine macro to use new types.
10060         (align_functions): Redefine macro to use new types.
10061         (align_functions_max_skip): Redefine macro to use new types.
10062         (align_loops_value): New macro.
10063         (align_jumps_value): New macro.
10064         (align_labels_value): New macro.
10065         (align_functions_value): New macro.
10066         * function.c (invoke_set_current_function_hook): Propagate
10067         alignment values from flags to global variables default in
10068         topleev.h.
10069         * ipa-icf.c (sem_function::equals_wpa): Use
10070         cl_optimization_option_eq instead of memcmp.
10071         * lto-streamer.h (cl_optimization_stream_out): Support streaming
10072         of string types.
10073         (cl_optimization_stream_in): Likewise.
10074         * optc-save-gen.awk: Support strings in cl_optimization.
10075         * opth-gen.awk: Likewise.
10076         * opts.c (finish_options): Remove error checking of invalid
10077         value ranges.
10078         (MAX_CODE_ALIGN): Remove.
10079         (MAX_CODE_ALIGN_VALUE): Likewise.
10080         (parse_and_check_align_values): New function.
10081         (check_alignment_argument): Likewise.
10082         (common_handle_option): Use check_alignment_argument.
10083         * opts.h (parse_and_check_align_values): Declare.
10084         * toplev.c (init_alignments): Remove.
10085         (read_log_maxskip): New.
10086         (parse_N_M): Likewise.
10087         (parse_alignment_opts): Likewise.
10088         (backend_init_target): Remove usage of init_alignments.
10089         * toplev.h (parse_alignment_opts): Declare.
10090         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
10091         argument.
10092         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
10093         * tree.c (cl_option_hasher::equal): New.
10094         * varasm.c: Use new global macros.
10096 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
10098         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
10099         Use a simpler align directive also if MAXSKIP = ALIGN-1.
10100         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10101         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10102         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10103         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10104         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
10105         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
10106         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
10107         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10108         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10109         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10110         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10112 2018-07-04  Martin Liska  <mliska@suse.cz>
10113             Jonathan Wakely  <jwakely@redhat.com>
10115         * coverage.c: Use correct type.
10116         * doc/invoke.texi: Language correction.
10118 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
10120         PR target/85620
10121         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
10122         ENDBRANCH for non-tail call which may return via indirect branch.
10123         * doc/extend.texi: Document indirect_return attribute.
10125 2018-07-03  Martin Sebor  <msebor@redhat.com>
10127         PR tree-optimization/86274
10128         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
10129         precondition.
10130         (format_floating): Correct handling of infinities and NaNs.
10132 2018-07-03  Martin Sebor  <msebor@redhat.com>
10134         * print-tree.c (print_real_cst): New function.
10135         (print_node_brief): Call it.
10136         (print_node): Ditto.
10138 2018-07-03  Jeff Law  <law@redhat.com>
10140         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
10141         into a single pattern.
10143         * config/h8300/h8300.md (ors code_iterator): New.
10144         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
10145         a single pattern and single splitter.
10146         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
10147         (iorqi3_1, xorqi3_1): Likewise.
10148         (iorqi3, xorqi3 expanders): Similarly.
10150         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
10151         (movmd_internal) into a single pattern using the P mode iterator.
10152         (movmd splitters): Similarly.
10153         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
10154         (movsd splitters): Similarly.
10156         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
10157         ADDB, ADDW and ADDL into a single ADD attribute which selects the
10158         right table based on the size of the operand.
10159         * config/h8300/h8300.md (length_table): Corresponding changes. All
10160         references to "addb", "addw" and "addl" changed to "add".
10161         (btst patterns): Merge two variants into a single pattern.
10162         (tstqi, tsthi): Likewise.
10163         (addhi3_incdec, addsi3_incdec): Likewise.
10164         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
10165         (mulhi3, mulsi3): Likewise.
10166         (udivhi3, udivsi3): Likewise.
10167         (divhi3, divsi3): Likewise.
10168         (andorqi3, andorhi3, andorsi3): Likewise.
10170 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
10172         PR target/85694
10173         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
10174         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
10176 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10178         PR tree-optimization/85694
10179         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
10180         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
10181         UNSPEC_URHADD.
10182         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
10183         (<u>avg<mode>3_ceil): New patterns.
10185 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
10187         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
10188         scan-tree-dump directive.
10189         * gcc.dg/vect/slp-perm-2.c: Likewise.
10190         * gcc.dg/vect/slp-perm-3.c: Likewise.
10191         * gcc.dg/vect/slp-perm-5.c: Likewise.
10192         * gcc.dg/vect/slp-perm-6.c: Likewise.
10193         * gcc.dg/vect/slp-perm-7.c: Likewise.
10194         * gcc.dg/vect/slp-perm-8.c: Likewise.
10196 2018-07-03  Marek Polacek  <polacek@redhat.com>
10198         PR middle-end/86202
10199         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
10201 2018-07-03  Richard Biener  <rguenther@suse.de>
10203         PR ipa/86389
10204         * tree-ssa-structalias.c (find_func_clobbers): Properly
10205         handle indirect calls.
10207 2018-07-03  Jeff Law  <law@redhat.com>
10209         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
10210         (shifts): New code iterator.
10211         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
10212         expander.  Fix HImode handling on H8/SX.
10213         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
10214         (subqi3, subhi3, subsi3 expanders): Likewise.
10215         (andqi3, andhi3, andsi3 expanders): Likewise.
10216         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
10217         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
10218         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
10219         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
10220         (zero_extendqihi2, zero_extendqisi2): Likewise.
10221         (extendqihi2, extendqisi2): Likewise.
10222         (rotlqi3, rotlhi3, rotlsi3): Likewise.
10223         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
10224         (rotlqi3_1, rotlhi3_1): Likewise.
10225         (logicalhi3_sn, logicalsi3_sn): Likewise.
10226         (logicalhi3, logicalsi3): Likewise.
10228 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10230         * tree-vect-patterns.c (vect_recog_rotate_pattern)
10231         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10232         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
10233         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
10234         type to append_pattern_def_seq instead of creating a stmt_vec_info
10235         directly.
10236         (build_mask_conversion): Likewise.  Remove vinfo argument.
10237         (vect_add_conversion_to_patterm): Likewise, renaming to...
10238         (vect_add_conversion_to_pattern): ...this.
10239         (vect_recog_mask_conversion_pattern): Update call to
10240         build_mask_conversion.  Pass the vector type to
10241         append_pattern_def_seq here too.
10242         (vect_recog_gather_scatter_pattern): Update call to
10243         vect_add_conversion_to_pattern.
10245 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10247         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
10248         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10249         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
10250         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
10251         STMT_VINFO_PATTERN_DEF_SEQ to null here.
10252         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
10253         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
10254         append_pattern_def_seq instead of new_pattern_def_seq.
10255         (vect_recog_divmod_pattern): Do both of the above.
10256         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
10257         is null.
10259 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10261         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
10262         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
10263         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
10264         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
10265         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
10266         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10267         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
10268         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10269         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10270         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
10271         parameter with a single stmt_vec_info.
10272         (vect_recog_func_ptr): Likewise.
10273         (vect_recog_gather_scatter_pattern): Likewise, folding in...
10274         (vect_try_gather_scatter_pattern): ...this.
10275         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
10276         the stmt_vec_info of the statement to be matched.  Don't clear
10277         STMT_VINFO_RELATED_STMT.
10278         (vect_pattern_recog): Update call accordingly.
10280 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10282         PR tree-optimization/85694
10283         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
10284         (uavgM3_ceil): Document new optabs.
10285         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
10286         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
10287         functions.
10288         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
10289         (savg_ceil_optab): New optabs.
10290         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
10291         (vect_vect_recog_func_ptrs): Add it.
10292         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
10293         constant directly from the associated lhs.
10295 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10297         * tree-vect-patterns.c (vect_split_statement): New function.
10298         (vect_convert_input): Use it to try to split an existing cast.
10300 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10302         * poly-int.h (print_hex): New function.
10303         * dumpfile.h (dump_dec, dump_hex): Declare.
10304         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
10305         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
10306         min_input_precision, operation_precision and operation_sign.
10307         * tree-vect-patterns.c (vect_get_range_info): New function.
10308         (vect_same_loop_or_bb_p, vect_single_imm_use)
10309         (vect_operation_fits_smaller_type): Delete.
10310         (vect_look_through_possible_promotion): Add an optional
10311         single_use_p parameter.
10312         (vect_recog_over_widening_pattern): Rewrite to use new
10313         stmt_vec_info infomration.  Handle one operation at a time.
10314         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
10315         (vect_truncatable_operation_p, vect_set_operation_type)
10316         (vect_set_min_input_precision): New functions.
10317         (vect_determine_min_output_precision_1): Likewise.
10318         (vect_determine_min_output_precision): Likewise.
10319         (vect_determine_precisions_from_range): Likewise.
10320         (vect_determine_precisions_from_users): Likewise.
10321         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
10322         (vect_vect_recog_func_ptrs): Put over_widening first.
10323         Add cast_forwprop.
10324         (vect_pattern_recog): Call vect_determine_precisions.
10326 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
10328         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
10329         statements that have been replaced by further pattern statements.
10330         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
10332 2018-07-03  Richard Biener  <rguenther@suse.de>
10334         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
10335         always set *dt.  Dump vectype in vectype overload.
10336         * dumpfile.h (dump_gimple_expr): New function.
10337         (dump_gimple_expr_loc): Likewise.
10338         * dumpfile.c (dump_gimple_expr): New function.
10339         (dump_gimple_expr_loc): Likewise.
10341 2018-07-02  Jeff Law  <law@redhat.com>
10343         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
10344         the H8/300, H8/300H and H8/S variants into a single pattern.
10345         (movhi_h8300, movqi_h8300hs): Similarly.
10346         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
10347         (QHI mode iterator): New.
10349         * config/h8300/h8300.md: Remove trailing whitespace.
10351 2018-07-02  Jim Wilson  <jimw@sifive.com>
10353         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
10354         instead of emit_insn for interrupt returns.
10355         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
10356         (riscv_sret, riscv_uret): Likewise.
10358 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10360         * pretty-print.c (selftest::test_pp_format): Move save and restore
10361         of quotes to class auto_fix_quotes, and add an instance.
10362         * selftest.c: Include "intl.h".
10363         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
10364         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
10365         * selftest.h (selftest::auto_fix_quotes): New class.
10367 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
10369         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
10370         (aarch64_sve_prepare_conditional_op): Remove.
10371         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
10372         Allow aarch64_simd_reg_or_zero as select operand; remove
10373         the aarch64_sve_prepare_conditional_op call.
10374         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
10375         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10376         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
10377         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
10378         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
10379         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
10380         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
10381         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
10382         and a splitters to match all of the *_any patterns.
10383         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
10385         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
10386         (SVE_COND_FP_BINARY_REV): Remove.
10387         (sve_int_op_rev, sve_fp_op_rev): New.
10388         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
10389         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
10390         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
10391         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
10392         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
10393         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
10394         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
10395         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
10396         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
10398         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
10399         Remove match_dup 1 from the inner unspec.
10400         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
10402         * config/aarch64/aarch64.md (movprfx): New attr.
10403         (length): Default movprfx to 8.
10404         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
10405         (*madd<SVE_I>, *msub<SVE_I): Likewise.
10406         (*<su>mul<SVE_I>3_highpart): Likewise.
10407         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
10408         (*v<ASHIFT><SVE_I>3): Likewise.
10409         (*<su><MAXMIN><SVE_I>3): Likewise.
10410         (*<su><MAXMIN><SVE_F>3): Likewise.
10411         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
10412         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
10413         (*div<SVE_F>4): Likewise.
10415 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
10417         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
10418         in dump string.
10420 2018-07-02  Richard Biener  <rguenther@suse.de>
10422         PR tree-optimization/86363
10423         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
10424         memset argument refers to a non-variable address.
10426 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10428         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
10429         {PLUS,MINUS}_EXPR code to...
10430         (adjust_symbolic_bound): ...here,
10431         (combine_bound): ...here,
10432         (set_value_range_with_overflow): ...and here.
10434 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
10436         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
10437         code...
10438         (extract_range_from_abs_expr): ...here.
10440 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
10442         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
10443         -fno-omit-frame-pointer when not optimizing.
10445 2018-07-02  Martin Liska  <mliska@suse.cz>
10447         PR ipa/86279
10448         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
10449         (propagate_nothrow): Likewise.
10451 2018-07-02  Martin Liska  <mliska@suse.cz>
10453         PR ipa/86323
10454         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
10456 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
10458         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
10459         function in r262149, changing "loc" param from source_location to
10460         const dump_location_t &.
10461         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
10462         declaration, as above.
10464 2018-07-01  Paul Koning  <ni1d@arrl.net>
10466         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10467         -munit-asm, -mgnu-asm, -mdec-asm.
10468         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
10469         (pdp11_output_labelref): New.
10470         (pdp11_output_def): New.
10471         (pdp11_output_addr_vec_elt): New.
10472         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
10473         %# and %@ format codes.
10474         (pdp11_option_override): New.
10475         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
10476         (pdp11_output_ident): New.
10477         (pdp11_asm_named_section): New.
10478         (pdp11_asm_init_sections): New.
10479         (pdp11_file_start): New.
10480         (pdp11_file_end): New.
10481         (output_ascii): Use .ascii/.asciz for -mdec-asm.
10482         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
10483         %o, like %c but octal.
10484         (pdp11_option_override): New.
10485         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
10486         -mdec-asm.
10487         (DATA_SECTION_ASM_OP): Ditto.
10488         (READONLY_DATA_SECTION_ASM_OP): New.
10489         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
10490         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
10491         (ASM_OUTPUT_LABELREF): Ditto.
10492         (ASM_OUTPUT_DEF): Ditto.
10493         (ASM_OUTPUT_EXTERNAL): New.
10494         (ASM_OUTPUT_SOURCE_FILENAME): New.
10495         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
10496         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
10497         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
10498         %# and %@ format codes.
10499         * config/pdp11/pdp11.opt (mgnu-asm): New.
10500         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
10501         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
10502         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
10504 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
10506         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
10507         dereferencing path[] beyond its length.
10508         (debug_path): New.
10509         (debug_all_paths): New.
10510         (rewire_first_differing_edge): New.
10511         (adjust_paths_after_duplication): New.
10512         (duplicate_thread_path): Call adjust_paths_after_duplication.
10513         Add new argument.
10514         (thread_through_all_blocks): Add new argument to
10515         duplicate_thread_path.
10517 2018-06-30  Jim Wilson  <jimw@sifive.com>
10519         * config/riscv/predicates.md (p2m1_shift_operand): New.
10520         (high_mask_shift_operand): New.
10521         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
10522         pattern using p2m1_shift_operand.
10523         (lshsi3_zero_extend_3+2): New combiner pattern using
10524         high_mask_shift_operand.
10526 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10528         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
10529         split out from...
10530         (vect_recog_rotate_pattern): ...here.
10531         (vect_convert_input): Try to insert casts of invariants in the
10532         preheader.
10533         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
10534         preheader to be empty.
10536 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10538         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
10539         vector type.  If given, install it in the new statement's
10540         STMT_VINFO_VECTYPE.
10541         (vect_element_precision): New function.
10542         (vect_unpromoted_value): New struct.
10543         (vect_unpromoted_value::vect_unpromoted_value): New function.
10544         (vect_unpromoted_value::set_op): Likewise.
10545         (vect_look_through_possible_promotion): Likewise.
10546         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
10547         (vect_widened_op_tree, vect_convert_input): Likewise.
10548         (vect_convert_inputs, vect_convert_output): Likewise.
10549         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
10550         to handle the optional cast of the multiplication result and
10551         vect_widened_op_tree to detect the widened multiplication itself.
10552         Do not require the input and output of promotion casts to have
10553         the same sign, but base the signedness of the operation on the
10554         input rather than the result.  If the pattern includes two
10555         promotions, check that those promotions have the same sign.
10556         Do not restrict the MULT_EXPR handling to a double-width result;
10557         handle quadruple-width results and wider.  Use vect_convert_inputs
10558         to convert the inputs to the common type.
10559         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
10560         to handle the optional cast of the ABS result.  Also allow a sign
10561         change or a sign extension between the ABS and MINUS.
10562         Use vect_widened_op_tree to detect the widened subtraction and use
10563         vect_convert_inputs to convert the inputs to the common type.
10564         (vect_handle_widen_op_by_const): Delete.
10565         (vect_recog_widen_op_pattern): New function.
10566         (vect_recog_widen_mult_pattern): Use it.
10567         (vect_recog_widen_shift_pattern): Likewise.
10568         (vect_recog_widen_sum_pattern): Use
10569         vect_look_through_possible_promotion to handle the promoted
10570         PLUS_EXPR operand.
10572 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10574         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
10575         the containing gimple_seq *.
10576         * gimple-iterator.h (gsi_for_stmt): Declare it.
10577         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
10578         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
10579         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
10580         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
10581         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
10582         checks.
10583         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
10584         split out from...
10585         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
10586         statement being replaced is part of an existing pattern
10587         definition sequence, inserting the new pattern statements before
10588         the original one.
10589         (vect_pattern_recog_1): Don't return a bool.  If the statement
10590         is already part of a pattern, instead apply pattern matching
10591         to the pattern definition statements.  Don't clear the
10592         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
10593         (vect_pattern_recog): Don't break after the first match;
10594         continue processing the pattern definition statements instead.
10595         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
10597 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10599         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10600         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10601         (vect_recog_widen_sum_pattern): Use it.
10603 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10605         * tree-vect-loop.c (vectorizable_reduction): Assert that the
10606         phi is not a pattern statement and has not been replaced by
10607         a pattern statement.
10608         * tree-vect-patterns.c (type_conversion_p): Don't check
10609         STMT_VINFO_IN_PATTERN_P.
10610         (vect_recog_vector_vector_shift_pattern): Likewise.
10611         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
10612         the pattern statement rather than the original statement; check
10613         directly for a WIDEN_MULT_EXPR here.
10614         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
10615         vect_is_simple_use to return the pattern statement rather
10616         than the original statement; use is_pattern_stmt_p to check
10617         for such a pattern statement.
10618         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
10619         to return the pattern statement rather than the original statement;
10620         don't do the same transformation here.
10621         (vect_is_simple_use): If the defining statement has been replaced
10622         by a pattern statement, return the pattern statement instead.
10623         Remove the corresponding (local) transformation from the vectype
10624         overload.
10626 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
10628         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
10629         end and default to null.
10630         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10631         (vectorizable_reduction): Update calls accordingly, dropping the
10632         gimple ** argument if the passed-back statement isn't needed.
10633         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
10634         (vect_recog_rotate_pattern): Likewise.
10635         (vect_recog_mask_conversion_pattern): Likewise.
10636         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10637         (vect_mask_constant_operand_p): Likewise.
10638         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
10639         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
10640         (get_group_load_store_type, get_load_store_type): Likewise.
10641         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
10642         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
10643         (vectorizable_conversion, vectorizable_assignment): Likewise.
10644         (vectorizable_shift, vectorizable_operation): Likewise.
10645         (vectorizable_store, vect_is_simple_cond): Likewise.
10646         (vectorizable_condition, vectorizable_comparison): Likewise.
10647         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
10648         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
10649         and move it to the end.  Cope with null def_stmt_outs.
10651 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10653         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
10655 2018-06-29  Jeff Law  <law@redhat.com>
10657         * config/v850/v850.c (v850_legitimate_address_p): Handle large
10658         displacements for TARGET_V850E2V3 and newer.
10659         (TARGET_LRA_P): Remove.  Defaults to LRA now.
10660         * config/v850/v850.md (sign23byte_load): Remove.
10661         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
10662         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
10664 2018-06-29  Martin Liska  <mliska@suse.cz>
10666         PR lto/85759
10667         * coverage.c (coverage_init): Mangle full path name.
10668         * doc/invoke.texi: Document the change.
10669         * gcov-io.c (mangle_path): New.
10670         * gcov-io.h (mangle_path): Likewise.
10671         * gcov.c (mangle_name): Use mangle_path for path mangling.
10673 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10675         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
10676         if starting source register is not even.
10678 2018-06-29  Martin Liska  <mliska@suse.cz>
10680         PR tree-optimization/86263
10681         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
10682         Make edge redirection.
10684 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
10686         * dumpfile.c (dump_loc): Add indentation based on scope depth.
10687         (dump_scope_depth): New variable.
10688         (get_dump_scope_depth): New function.
10689         (dump_begin_scope): New function.
10690         (dump_end_scope): New function.
10691         * dumpfile.h (get_dump_scope_depth): New declaration.
10692         (dump_begin_scope): New declaration.
10693         (dump_end_scope): New declaration.
10694         (class auto_dump_scope): New class.
10695         (AUTO_DUMP_SCOPE): New macro.
10696         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
10697         AUTO_DUMP_SCOPE.
10699 2018-06-29  Richard Biener  <rguenther@suse.de>
10701         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
10702         compute_all_dependences succeeds.
10703         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
10704         exceed --param loop-max-datarefs-for-datadeps.
10706 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
10708         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
10710 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
10712         PR target/86348
10713         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
10714         alternative 0 in preferred_for_speed attribute.
10716 2018-06-28  Paul Koning  <ni1d@arrl.net>
10718         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
10719         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
10720         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
10721         * config/pdp11/pdp11.md: Correct "length" attribute calculation
10722         for shift insn patterns.
10724 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
10726         * cgraph.c (cgraph_node::get_body): Replace assignments to
10727         "dump_file" with calls to set_dump_file.
10728         * dumpfile.c (alt_dump_file): Make static, and group with...
10729         (alt_flags): ...this definition.
10730         (dumps_are_enabled): New variable.
10731         (refresh_dumps_are_enabled): New function.
10732         (set_dump_file): New function.
10733         (set_alt_dump_file): New function.
10734         (gcc::dump_manager::dump_start): Replace assignments to
10735         "dump_file" and "alt_dump_file" with calls to set_dump_file and
10736         set_alt_dump_file.
10737         (gcc::dump_manager::dump_finish): Likewise.
10738         * dumpfile.h (alt_dump_file): Delete decl.
10739         (dumps_are_enabled): New variable decl.
10740         (set_dump_file): New function decl.
10741         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
10742         global.
10743         * tree-nested.c (lower_nested_functions): Replace assignments to
10744         "dump_file" with calls to set_dump_file.
10746 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10748         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
10749         goto_locus of each outgoing edge of each basic block.
10751 2018-06-28  Richard Biener  <rguenther@suse.de>
10753         * dwarf2out.c (decl_scope_table): Remove.
10754         (push_decl_scope): Likewise.
10755         (pop_decl_scope): Likewise.
10756         (gen_type_die_for_member): Do not call push/pop_decl_scope.
10757         (gen_struct_or_union_type_die): Likewise.
10758         (gen_tagged_type_die): Likewise.
10759         (dwarf2out_init): Do not initialize decl_scope_table.
10760         (dwarf2out_c_finalize): Do not free it.
10762 2018-06-28  Richard Biener  <rguenther@suse.de>
10764         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
10765         deciding whether to not re-use a DIE.
10767 2018-06-28  Richard Biener  <rguenther@suse.de>
10769         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
10770         DW_AT_abstract_origin attribute.
10772 2018-06-28  Martin Liska  <mliska@suse.cz>
10774         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10775         Use newly introduced constants.
10776         * tree-switch-conversion.h (struct jump_table_cluster):
10777         Define max_ratio_for_size and max_ratio_for_speed.
10779 2018-06-28  Martin Liska  <mliska@suse.cz>
10781         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10782         Add new checking assert to catch invalid state.
10783         (jump_table_cluster::can_be_handled): Handle single case
10784         clusters.
10785         (jump_table_cluster::is_beneficial): Bail out for such case.
10786         (bit_test_cluster::find_bit_tests):
10787         Add new checking assert to catch invalid state.
10788         (bit_test_cluster::can_be_handled): Handle single case
10789         clusters.
10790         (bit_test_cluster::is_beneficial): Bail out for such case.
10791         (switch_decision_tree::analyze_switch_statement):
10792         Fix comment.
10794 2018-06-28  Martin Liska  <mliska@suse.cz>
10796         * common.opt: Introduce -completion option.
10797         * gcc.c (driver_handle_option): Handle it.
10798         (driver::main): Print completions if completion
10799         is set.
10800         * opt-suggestions.c (option_proposer::get_completions):
10801         New function.
10802         (option_proposer::suggest_completion): Likewise.
10803         (option_proposer::find_param_completions): Likewise.
10804         (verify_autocompletions): Likewise.
10805         (test_completion_valid_options): Likewise.
10806         (test_completion_valid_params): Likewise.
10807         (in_completion_p): Likewise.
10808         (empty_completion_p): Likewise.
10809         (test_completion_partial_match): Likewise.
10810         (test_completion_garbage): Likewise.
10811         (opt_proposer_c_tests): Likewise.
10812         * opt-suggestions.h: Declare new functions.
10813         * opts.c (common_handle_option): Handle OPT__completion_.
10814         * selftest-run-tests.c (selftest::run_tests): Add
10815         opt_proposer_c_tests.
10816         * selftest.c (assert_str_startswith): New.
10817         * selftest.h (assert_str_startswith): Likewise.
10818         (opt_proposer_c_tests): New.
10819         (ASSERT_STR_STARTSWITH): Likewise.
10821 2018-06-28  Martin Liska  <mliska@suse.cz>
10823         * Makefile.in: Add opt-suggestions.o.
10824         * gcc-main.c: Include opt-suggestions.h.
10825         * gcc.c (driver::driver): Likewise.
10826         (driver::~driver): Remove m_option_suggestions.
10827         (driver::build_option_suggestions): Moved to option_proposer.
10828         (driver::suggest_option): Likewise.
10829         (driver::handle_unrecognized_options): Use option_proposer.
10830         * gcc.h (class driver): Add new memver m_option_proposer.
10831         * opt-suggestions.c: New file.
10832         * opt-suggestions.h: New file.
10834 2018-06-28  Martin Liska  <mliska@suse.cz>
10836         * vec.h (class auto_string_vec): New (moved from auto_argvec).
10837         (auto_string_vec::~auto_string_vec): Likewise.
10839 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
10841         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
10842         prevent_decl_creation_for_types fields up and add reset_location field.
10843         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
10844         statement if id->reset_location is true.
10845         (copy_edges_for_bb): Do not set goto_locus on the new edges if
10846         id->reset_location is true.
10847         (copy_phis_for_bb): Force input_location on the arguments if
10848         id->reset_location is true.
10849         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
10850         is set on the function to be inlined.
10852 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
10854         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
10856 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
10858         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
10859         registers for Pmode.
10860         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
10861         hard registers for the clobbered pseudo.
10863 2018-06-27  Paul Koning  <ni1d@arrl.net>
10865         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
10866         mutually exclusive options.
10867         * config/pdp11/constraints.md (h): New constraint.
10868         (O): Update definition to match shift code generation.
10869         (D): New constraint.
10870         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
10871         (CCFP): Remove.
10872         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
10873         function.
10874         (output_jump): Change arguments.
10875         (pdp11_fixed_cc_regs): New function.
10876         (pdp11_cc_mode): Ditto.
10877         (pdp11_expand_shift): Ditto.
10878         (pdp11_assemble_shift): Ditto.
10879         (pdp11_small_shift): Ditto.
10880         (pdp11_branch_cost): Remove.
10881         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
10882         from output.
10883         (pdp11_register_move_cost): Update for CC registers.
10884         (pdp11_rtx_costs): Add case for LSHIFTRT.
10885         (pdp11_output_jump): Add CCNZ mode conditional branches.
10886         (notice_update_cc_on_set): Remove.
10887         (pdp11_cc_mode): New function.
10888         (simple_memory_operand): Correct pre/post decrement case.
10889         (no_side_effect_operand): New function.
10890         (pdp11_regno_reg_class): Add CC_REGS class.
10891         (pdp11_fixed_cc_regs): New function.
10892         (pdp11_small_shift): New function.
10893         (pdp11_expand_shift): New function to expand shift insns.
10894         (pdp11_assemble_shift): New function to output shifts.
10895         (pdp11_branch_cost): Remove.
10896         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10897         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10898         (WCHAR_TYPE): Ditto.
10899         (PTRDIFF_TYPE): Ditto.
10900         (ADJUST_INSN_LENGTH): New macro.
10901         (FIXED_REGISTERS): Add CC registers.
10902         (CALL_USED_REGISTERS): Ditto.
10903         (reg_class): Ditto.
10904         (REG_CLASS_NAMES): Ditto.
10905         (REG_CLASS_CONTENTS): Ditto.
10906         (SELECT_CC_MODE): Use new function.
10907         (TARGET_FLAGS_REGNUM): New macro.
10908         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10909         (cc0_reg_rtx): Remove.
10910         (CC_STATUS_MDEP): Remove.
10911         (CC_STATUS_MDEFP_INIT): Remove.
10912         (CC_IN_FPU): Remove.
10913         (NOTICE_UPDATE_CC): Remove.
10914         (REGISTER_NAMES): Add CC registers.
10915         (BRANCH_COST): Change to constant 1.
10916         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10917         handling.
10918         * config/pdp11/pdp11.opt (mbcopy): Remove.
10919         (mbcopy-builtin): Remove.
10920         (mbranch-cheap): Remove.
10921         (mbranch-expensive): Remove.
10922         * config/pdp11/predicates.md (expand_shift_operand): Update to
10923         match shift code generation.
10924         (ccnz_operator): New predicate.
10925         * doc/invoke.texi (PDP-11 Options): Remove deleted options
10926         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10927         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
10928         exclusive options.
10929         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
10930         description of O constraint.
10932 2018-06-27  Jeff Law  <law@redhat.com>
10933             Austin Law  <austinklaw@gmail.com>
10935         * config/v850/v850.md (addsi3_set_flags): New pattern.
10936         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10937         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10938         (zero_extendhisi2_v850_set_flags): Likewise.
10939         (zero_extendqisi2_v850_set_flags): Likewise.
10940         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10941         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10942         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10944         * config/v850/v850-protos.h (notice_update_cc): Remove.
10945         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10946         (v850_print_operand): Handle 'D' and "d".
10947         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10948         Add handling of arithmetic/logical operations compared against zero.
10949         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10950         Do not look at v850_compare_op, instead get mode from last argument.
10951         (v850_gen_compare): Remove
10952         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10953         after reload for prologue insns.
10954         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10955         patterns.
10956         (construct_save_jarl): Likewise.
10957         (TARGET_FLAGS_REGNUM): Define.
10958         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10959         (NOTICE_UPDATE_CC): Remove.
10960         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10961         than cc0.  Conditionalize on reload_completed.
10962         (cmpsi_insn, setfcc_insn): Likewise.
10963         (tst1 splitter): Turn into define_and_split which sets the flags
10964         after reload.
10965         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10966         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10967         (cstoresf4, cstoredf4): Clobber the flags.
10968         (cmpsi, cmpsf, cmpdf): Remove expanders.
10969         (setf_insn): Remove pattern.
10970         (addsi3): Turn into define_and_split which clobbers the flags after
10971         reload and a suitable pattern (addsi3_clobber_flags) for use after
10972         reload.
10973         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10974         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10975         (ashrsi3, ashrsi3_v850e2): Likewise.
10976         (bins): Clobber the flags.
10977         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10978         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10979         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10980         (call_value_internal_short, call_value_internal_long): Likewise.
10981         (callt_save_interrupt, callt_return_interrupt): Likewise.
10982         (save_interrupt, return_interrupt): Likewise.
10983         (callt_save_all_interrupt, save_all_interrupt): Likewise.
10984         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10985         (restore_all_interrupt, _restore_all_interrupt): Likewise.
10986         (All FP comparisons): Only allow after reload has completed.
10987         (trfsr): Likewise.
10988         (divh, divhu): Tweak output template.
10989         (branch_z_normal, branch_z_invert): Remove
10990         (branch_nz_normal, branch_nz_invert): Likewise.
10991         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10993         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10994         * config/v850/v850.c (notice_update_cc): Remove.
10995         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
10996         (CC_NO_CARRY): Likewise.
10997         (NOTICE_UPDATE_CC): Define to nothing.
10998         * config/v850/v850.md: Remove block comment on cc0 handling
10999         Remove "cc" attribute from all patterns.  Remove cc_status handling
11000         from all patterns.  Minor formatting fixes.
11002 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11004         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
11005         (cortex-a76.cortex-a55): Likewise.
11006         * config/aarch64/aarch64-tune.md: Regenerate.
11007         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
11008         cortex-a76.cortex-a55.
11010 2018-06-27  Jeff Law  <law@redhat.com>
11012         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
11013         (MULTILIB_DIRNAMES): Similarly.
11015 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
11017         * gimple.h (gimple_return_retbnd): Delete.
11018         (gimple_return_set_retbnd): Likewise.
11019         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
11020         gimple_return_set_retbnd.
11021         * gimple-pretty-print.c (dump_gimple_return): Remove call to
11022         gimple_return_retbnd and adjust.
11023         * tree-inline.h (struct copy_body_data): Remove retbnd field.
11024         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
11025         Explicitly return NULL in a couple more cases.  Move assertion
11026         on debug statements and remove unreachable code.
11027         (reset_debug_binding): Do not test id->retbnd.
11028         (expand_call_inline): Do not set it.
11030 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11032         * configure.ac: Add --disable-gcov option.
11033         * configure: Regenerate.
11034         * Makefile.in: Honour @enable_gcov@.
11035         * doc/install.texi: Document --disable-gcov.
11037 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11039         * config/arm/arm-cpus.in (cortex-a76): New entry.
11040         (cortex-a76.cortex-a55): Likewise.
11041         * config/arm/arm-tables.opt: Regenerate.
11042         * config/arm/arm-tune.md: Likewise.
11043         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
11044         * doc/invoke.texi (ARM Options): Document cortex-a76 and
11045         cortex-a76.cortex-a55.
11047 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
11049         PR target/85769
11050         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
11052 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
11054         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
11055         comment.
11056         (EPILOGUE_USES): Likewise.
11058 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
11060         * tree-inline.c (remap_location): New function extracted from...
11061         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
11062         (copy_phis_for_bb): ...here.  Call remap_location.
11063         (copy_cfg_body): Adjust call to copy_edges_for_bb.
11065 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
11067         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
11068         unaligned vsx for 16B memset.
11070 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
11072         PR target/86285
11073         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
11074         ieee128_float_type_node to long_double_type_node unless
11075         TARGET_LONG_DOUBLE_128 is set.
11077 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
11079         * cfgloop.c (get_loop_location): Convert return type from
11080         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
11081         by implicit construction from rtx_insn *, and using
11082         dump_user_location_t::from_function_decl for the fallback case.
11083         * cfgloop.h (get_loop_location): Convert return type from
11084         location_t to dump_user_location_t.
11085         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
11086         dump_printf_loc to pass in a dump_location_t rather than a
11087         location_t, via the gimple stmt.
11088         * coverage.c (get_coverage_counts): Update calls to
11089         dump_printf_loc to pass in dump_location_t rather than a
11090         location_t.
11091         * doc/optinfo.texi (Dump types): Convert example of
11092         dump_printf_loc from taking "locus" to taking "insn".  Update
11093         description of the "_loc" calls to cover dump_location_t.
11094         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
11095         "selftest.h".
11096         (dump_user_location_t::dump_user_location_t): New constructors,
11097         from gimple *stmt and rtx_insn *.
11098         (dump_user_location_t::from_function_decl): New function.
11099         (dump_loc): Make static.
11100         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
11101         const dump_location_t &.
11102         (dump_generic_expr_loc): Delete.
11103         (dump_printf_loc): Convert param "loc" from location_t to
11104         const dump_location_t &.
11105         (selftest::test_impl_location): New function.
11106         (selftest::dumpfile_c_tests): New function.
11107         * dumpfile.h: Include "profile-count.h".
11108         (class dump_user_location_t): New class.
11109         (struct dump_impl_location_t): New struct.
11110         (class dump_location_t): New class.
11111         (dump_printf_loc): Convert 2nd param from source_location to
11112         const dump_location_t &.
11113         (dump_generic_expr_loc): Delete.
11114         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
11115         const dump_location_t &.
11116         * gimple-fold.c (fold_gimple_assign): Update call to
11117         dump_printf_loc to pass in a dump_location_t rather than a
11118         location_t, via the gimple stmt.
11119         (gimple_fold_call): Likewise.
11120         * gimple-loop-interchange.cc
11121         (loop_cand::analyze_iloop_reduction_var): Update for change to
11122         check_reduction_path.
11123         (tree_loop_interchange::interchange): Update for change to
11124         find_loop_location.
11125         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
11126         change in return-type of find_loop_location.
11127         (graphite_regenerate_ast_isl): Likewise.
11128         * graphite-optimize-isl.c (optimize_isl): Likewise.
11129         * graphite.c (graphite_transform_loops): Likewise.
11130         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
11131         pass in a dump_location_t rather than a location_t, via the
11132         gimple stmt.
11133         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11134         * ipa.c (walk_polymorphic_call_targets): Likewise.
11135         * loop-unroll.c (report_unroll): Convert "locus" param from
11136         location_t to dump_location_t.
11137         (decide_unrolling): Update for change to get_loop_location's
11138         return type.
11139         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
11140         location_t to dump_user_location_t.
11141         (grid_find_single_omp_among_assignments_1): Updates calls to
11142         dump_printf_loc to pass in a dump_location_t rather than a
11143         location_t, via the gimple stmt.
11144         (grid_parallel_clauses_gridifiable): Convert "tloc" from
11145         location_t to dump_location_t.  Updates calls to dump_printf_loc
11146         to pass in a dump_location_t rather than a location_t, via the
11147         gimple stmt.
11148         (grid_inner_loop_gridifiable_p): Likewise.
11149         (grid_dist_follows_simple_pattern): Likewise.
11150         (grid_gfor_follows_tiling_pattern): Likewise.
11151         (grid_target_follows_gridifiable_pattern): Likewise.
11152         (grid_attempt_target_gridification): Convert initialization
11153         of local "grid" from memset to zero-initialization; FIXME: does
11154         this require C++11?  Update call to dump_printf_loc to pass in a
11155         optinfo_location rather than a location_t, via the gimple stmt.
11156         * profile.c (read_profile_edge_counts): Updates call to
11157         dump_printf_loc to pass in a dump_location_t rather than a
11158         location_t
11159         (compute_branch_probabilities): Likewise.
11160         * selftest-run-tests.c (selftest::run_tests): Call
11161         dumpfile_c_tests.
11162         * selftest.h (dumpfile_c_tests): New decl.
11163         * tree-loop-distribution.c (pass_loop_distribution::execute):
11164         Update for change in return type of find_loop_location.
11165         * tree-parloops.c (parallelize_loops): Likewise.
11166         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
11167         "locus" from location_t to dump_user_location_t.
11168         (canonicalize_loop_induction_variables): Likewise.
11169         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
11170         for change in return type of find_loop_location.
11171         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
11172         to dump_printf_loc to pass in a dump_location_t rather than a
11173         location_t, via the stmt.
11174         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
11175         Likewise.
11176         * tree-vect-loop-manip.c (find_loop_location): Convert return
11177         type from source_location to dump_user_location_t.
11178         (vect_do_peeling): Update for above change.
11179         (vect_loop_versioning): Update for change in type of
11180         vect_location.
11181         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
11182         from location_t to dump_user_location_t.
11183         (vect_estimate_min_profitable_iters): Update for change in type
11184         of vect_location.
11185         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
11186         location_t to dump_location_t.
11187         (vect_slp_bb): Update for change in type of vect_location.
11188         * tree-vectorizer.c (vect_location): Convert from source_location
11189         to dump_user_location_t.
11190         (try_vectorize_loop_1): Update for change in vect_location's type.
11191         (vectorize_loops): Likewise.
11192         (increase_alignment): Likewise.
11193         * tree-vectorizer.h (vect_location): Convert from source_location
11194         to dump_user_location_t.
11195         (find_loop_location): Convert return type from source_location to
11196         dump_user_location_t.
11197         (check_reduction_path): Convert 1st param from location_t to
11198         dump_user_location_t.
11199         * value-prof.c (check_counter): Update call to dump_printf_loc to
11200         pass in a dump_user_location_t rather than a location_t; update
11201         call to error_at for change in type of "locus".
11202         (check_ic_target): Update call to dump_printf_loc to
11203         pass in a dump_user_location_t rather than a location_t, via the
11204         call_stmt.
11206 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
11208         * config/s390/s390.h (enum processor_flags): Do not use
11209         default tune parameter when -march was specified.
11211 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
11213         PR target/86314
11214         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
11215         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
11216         operands.
11218 2018-06-26  Richard Biener  <rguenther@suse.de>
11220         PR tree-optimization/86287
11221         PR bootstrap/86316
11222         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
11223         (vect_analyze_loop): Initialize n_stmts.
11225 2018-06-26  Richard Biener  <rguenther@suse.de>
11227         PR middle-end/86271
11228         * fold-const.c (fold_convertible_p): Pointer extension
11229         isn't valid.
11231 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
11233         PR debug/86064
11234         * dwarf2out.c (loc_list_has_views): Adjust comments.
11235         (dw_loc_list): Split single cross-partition range with
11236         nonzero locview.
11238 2018-06-25  Jeff Law  <law@redhat.com>
11240         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
11241         on -mbig-switch by default.
11243         * config/v850/predicates.md (const_float_1_operand): Fix match_code
11244         test.
11245         (const_float_0_operand): Remove unused predicate.
11246         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
11247         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
11248         (recipsf2): New expander.  Original pattern now called
11249         (recipsf2_insn).
11250         (recipdf2, recipdf2_insn): Similarly.
11251         (rsqrtsf2, rsqrtsf2_insn): Similarly
11252         (rsqrtdf2, rsqrtdf2_insn): Similarly
11254 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
11256         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
11257         Simplify logic for FreeBSD (twice).
11259 2018-06-25  Martin Sebor  <msebor@redhat.com>
11261         PR tree-optimization/86204
11262         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
11263         a strnlen result if it's less than the length of the string.
11265 2018-06-25  Martin Sebor  <msebor@redhat.com>
11267         PR tree-optimization/85700
11268         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
11269         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
11270         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
11272 2018-06-25  Martin Sebor  <msebor@redhat.com>
11274         * doc/extend.texi (Zero-length arrays): Update and clarify.
11276 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
11278         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
11279         added IEEE/IBM long double multilib support on PowerPC little
11280         endian Linux systems.
11281         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
11282         (MULTILIB_DEFAULTS): Likewise.
11283         * config/rs6000/rs6000.c (rs6000_option_override_internal):
11284         Likewise.
11285         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
11286         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
11287         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
11289 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
11291         PR middle-end/86311
11292         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
11293         (REORDER_45): Likewise.
11295 2018-06-25  Jeff Law  <law@redhat.com>
11297         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
11298         dividend to 32 bits.  Adjust length.
11299         (udivmodhi4): Cleanup output template.  Fix length.
11301 2018-06-25  Carl Love  <cel@us.ibm.com>
11303         * config/rs6000/vsx.md: Change word selector to prefered location.
11305 2018-06-25  Richard Biener  <rguenther@suse.de>
11307         PR tree-optimization/86304
11308         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
11309         epilogue-if-converted loops as well.
11311 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
11313         * lto-section-out.c (lto_begin_section): Do not print section
11314         name for noaddr and unnumbered dumps.
11316 2018-06-25  Richard Biener  <rguenther@suse.de>
11318         * tree-vectorizer.h (struct vec_info_shared): New structure
11319         with parts split out from struct vec_info and loop_nest from
11320         struct _loop_vec_info.
11321         (struct vec_info): Adjust accordingly.
11322         (struct _loop_vec_info): Likewise.
11323         (LOOP_VINFO_LOOP_NEST): Adjust.
11324         (LOOP_VINFO_DATAREFS): Likewise.
11325         (LOOP_VINFO_DDRS): Likewise.
11326         (struct _bb_vec_info): Likewise.
11327         (BB_VINFO_DATAREFS): Likewise.
11328         (BB_VINFO_DDRS): Likewise.
11329         (struct _stmt_vec_info): Add dr_aux member.
11330         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
11331         (DR_MISALIGNMENT_UNINITIALIZED): New.
11332         (set_dr_misalignment): Adjust.
11333         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
11334         (vect_analyze_loop): Adjust prototype.
11335         (vect_analyze_loop_form): Likewise.
11336         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11337         Compute dependences lazily.
11338         (vect_record_base_alignments): Use shared datarefs/ddrs.
11339         (vect_verify_datarefs_alignment): Likewise.
11340         (vect_analyze_data_refs_alignment): Likewise.
11341         (vect_analyze_data_ref_accesses): Likewise.
11342         (vect_analyze_data_refs): Likewise.
11343         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
11344         constructor parameter for shared part.
11345         (vect_analyze_loop_form): Pass in shared part and adjust.
11346         (vect_analyze_loop_2): Pass in storage for the number of
11347         stmts.  Move loop nest finding to the caller.  Compute
11348         datarefs lazily.
11349         (vect_analyze_loop): Pass in shared part.
11350         (vect_transform_loop): Verify shared datarefs are unchanged.
11351         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
11352         constructor parameter for shared part.
11353         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
11354         (vect_slp_bb): Verify shared datarefs are unchanged before
11355         transform.
11356         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
11357         change.
11358         (new_stmt_vec_info): Initialize DR_AUX misalignment to
11359         DR_MISALIGNMENT_UNINITIALIZED.
11360         * tree-vectorizer.c (vec_info::vec_info): Add constructor
11361         parameter for shared part.
11362         (vec_info::~vec_info): Adjust.
11363         (vec_info_shared::vec_info_shared): New.
11364         (vec_info_shared::~vec_info_shared): Likewise.
11365         (vec_info_shared::save_datarefs): Likewise.
11366         (vec_info_shared::check_datarefs): Likewise.
11367         (try_vectorize_loop_1): Construct shared part live for analyses
11368         of a single loop for multiple vector sizes.
11369         * tree-parloops.c (gather_scalar_reductions): Adjust.
11371 2018-06-25  Richard Biener  <rguenther@suse.de>
11373         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
11374         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
11375         (vect_analyze_data_refs): Remove similar code from here and
11376         simplify accordingly.
11378 2018-06-25  Richard Biener  <rguenther@suse.de>
11380         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
11381         for reverse storage order accesses rather than asserting
11382         they cannot happen here.
11384 2018-06-25  Tom de Vries  <tdevries@suse.de>
11386         PR debug/86257
11387         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
11388         Use data16 instead of .byte for insn prefix.
11390 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
11392         PR C++/86082
11393         * parser.c (make_char_string_pack): Pass this literal chars
11394         through cpp_interpret_string.
11395         (cp_parser_userdef_numeric_literal): Check the result of
11396         make_char_string_pack.
11398 2018-06-24  Maya Rashish  <coypu@sdf.org>
11400         * ginclude/stddef.h: Simplify conditions around avoiding
11401         re-definition of __size_t.
11403 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11405         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
11406         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
11408 2018-06-22  Maya Rashish  <coypu@sdf.org>
11410         * doc/invoke.texi (mno-fancy-math-387): Update for changes
11411         made to OpenBSD and NetBSD through the years.
11413 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11415         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11416         behavior of vec_pack (vector double, vector double) to match
11417         behavior of vec_float2 (vector double, vector double).
11419 2018-06-22  Olivier Hainque  <hainque@adacore.com>
11421         * gimplify.c (gimplify_function_tree): Prevent creation
11422         of a trampoline for the address of the current function
11423         passed to entry/exit instrumentation hooks.
11425 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
11427         PR target/86222
11428         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
11429         correctly.
11431 2018-06-22  Martin Liska  <mliska@suse.cz>
11433         PR tree-optimization/86263
11434         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11435         Bail out if is_enabled is false.
11436         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
11437         New declaration.
11438         (jump_table_cluster::is_enabled): New function.
11440 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11442         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11443         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
11444         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
11445         (lto_input_ts_binfo_tree_pointers): Likewise.
11446         * tree-streamer-out.c (streamer_write_tree_bitfields,
11447         write_ts_binfo_tree_pointers): Likewise.
11448         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
11450 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
11452         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
11454 2018-06-22  Martin Liska  <mliska@suse.cz>
11456         * symbol-summary.h (get): Make it pure and inline move
11457         functionality from ::get function.
11458         (get): Remove and inline into ::get and ::get_create.
11459         (get_create): Move code from ::get function.
11461 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11463         PR target/85994
11464         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
11465         -x assembler-with-cpp.
11467 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11469         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
11470         _FILE_OFFSET_BITS=64 for C++.
11472 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
11474         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
11475         conversion insn that shows up when pr85657-3.c is compiled using
11476         IEEE 128-bit long double.
11477         (neg<mode>2_internal): Use the correct mode to check whether the
11478         mode is IBM extended.
11479         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
11480         multiply and divide external functions from being created more
11481         than once.
11483 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11485         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
11486         functions.
11487         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
11488         the edge can be forwarded.
11489         (cfg_layout_merge_blocks): Likewise.
11491 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11493         * except.c (finish_eh_generation): Commit edge insertions only after
11494         the EH edges have been redirected from post-landing to landing pads.
11496 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11498         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
11499         create_tmp_var_for to create the FRAME decl.
11500         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
11502 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
11504         * tree-inline.c (copy_edges_for_bb): Minor tweak.
11505         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
11506         debug statement when resetting its value.
11507         (expand_call_inline): Copy the locus of the call onto the assignment
11508         of the return value, if any.  Use local variable in more cases.
11510 2018-06-21  Martin Liska  <mliska@suse.cz>
11512         * ipa-pure-const.c (propagate_nothrow): Use
11513         funct_state_summaries->get.
11514         (dump_malloc_lattice): Likewise.
11515         (propagate_malloc): Likewise.
11517 2018-06-21  Richard Biener  <rguenther@suse.de>
11519         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
11520         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
11521         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
11522         comment.
11523         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
11524         BLOCK_ABSTRACT_ORIGIN unconditionally.
11526 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
11528         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
11529         deleting it.
11530         * ipa-reference.c (ipa_reference_c_finalize): Delete
11531         ipa_ref_opt_sum_summaries and set it to NULL.
11533 2018-06-21  Tom de Vries  <tdevries@suse.de>
11535         PR tree-optimization/85859
11536         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
11537         test with comment from bb_no_side_effects_p.
11539 2018-06-21  Richard Biener  <rguenther@suse.de>
11541         PR tree-optimization/86232
11542         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
11543         max for constant niter.
11545 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11547         * config/aarch64/aarch64-simd.md
11548         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
11550 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11552         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
11553         Make opernads of the unspec commutative.
11555 2018-06-21  Richard Biener  <rguenther@suse.de>
11557         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
11558         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
11559         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
11560         (vect_analyze_data_ref_dependence): Re-order checks to deal with
11561         NULL DR_STEP.
11562         (vect_record_base_alignments): Do not record base alignment
11563         for gathers or scatters.
11564         (vect_compute_data_ref_alignment): Drop return value that is always
11565         true.  Bail out early for gathers or scatters.
11566         (vect_enhance_data_refs_alignment): Bail out early for gathers
11567         or scatters.
11568         (vect_find_same_alignment_drs): Likewise.
11569         (vect_analyze_data_refs_alignment): Remove dead code.
11570         (vect_slp_analyze_and_verify_node_alignment): Likewise.
11571         (vect_analyze_data_refs): For possible gathers or scatters do
11572         not create an alternate DR, just check their possible validity
11573         and mark them.  Adjust DECL_NONALIASED handling to not rely
11574         on DR_BASE_ADDRESS.
11575         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
11576         update inits of gathers or scatters.
11577         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
11578         Also copy gather/scatter flag to pattern vinfo.
11580 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11582         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
11583         behavior of vec_packsu (vector unsigned long long, vector unsigned
11584         long long) to match behavior of vec_packs with same signature.
11586 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
11587             Thomas Schwinge <thomas@codesourcery.com>
11588             Cesar Philippidis  <cesar@codesourcery.com>
11590         * gimplify.c (gimplify_scan_omp_clauses): Add support for
11591         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11592         (gimplify_adjust_omp_clauses): Likewise.
11593         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
11594         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
11595         (gimplify_omp_target_update): Update handling of acc update and
11596         enter/exit data.
11597         * omp-low.c (install_var_field): Remove unused parameter
11598         base_pointers_restrict.
11599         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
11600         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
11601         FINALIZE}
11602         (omp_target_base_pointers_restrict_p): Delete.
11603         (scan_omp_target): Update call to scan_sharing_clauses.
11604         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
11605         FINALIZE}.
11606         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
11607         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
11608         (convert_local_omp_clauses): Likewise.
11609         * tree-pretty-print.c (dump_omp_clause): Likewise.
11610         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
11611         FINALIZE}.
11612         (omp_clause_code_name): Likewise.
11614 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
11616         PR debug/86194
11617         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
11618         be narrowed.
11620         PR tree-optimization/86231
11621         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
11622         anti-range don't overwrite *vr0min before using it to compute *vr0max.
11624 2018-06-20  Tom de Vries  <tdevries@suse.de>
11626         PR tree-optimization/86097
11627         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
11628         iv type if signedness of iv type is not the same as that of *nit.
11630 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
11632         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
11633         EDGE_EH edges, verify they are all EDGE_EH.
11635 2018-06-20  Maya Rashish  <coypu@sdf.org>
11637         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
11639 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11641         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
11642         * config/aarch64/aarch64.c (xgene1_tunings): Add
11643         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
11644         (aarch64_mode_valid_for_sched_fusion_p):
11645         Allow 16-byte modes.
11646         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
11647         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
11648         128-bit modes.
11649         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
11650         New pattern.
11651         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
11652         * config/aarch64/iterators.md (VQ2): New mode iterator.
11654 2018-06-20  Martin Liska  <mliska@suse.cz>
11656         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11657         Change default ratio from 10 to 8.
11659 2018-06-20  Martin Liska  <mliska@suse.cz>
11661         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11662         New.
11663         (bit_test_cluster::find_bit_tests): Likewise.
11664         (switch_decision_tree::analyze_switch_statement): Find clusters.
11665         * tree-switch-conversion.h (struct jump_table_cluster): Document
11666         hierarchy.
11668 2018-06-20  Martin Liska  <mliska@suse.cz>
11670         * tree-switch-conversion.c (switch_conversion::collect):
11671         Record m_uniq property.
11672         (switch_conversion::expand): Bail out for special conditions.
11673         (group_cluster::~group_cluster): New.
11674         (group_cluster::group_cluster): Likewise.
11675         (group_cluster::dump): Likewise.
11676         (jump_table_cluster::emit): New.
11677         (switch_decision_tree::fix_phi_operands_for_edges): New.
11678         (struct case_node): Remove struct.
11679         (jump_table_cluster::can_be_handled): New.
11680         (case_values_threshold): Moved to header.
11681         (reset_out_edges_aux): Likewise.
11682         (jump_table_cluster::is_beneficial): New.
11683         (bit_test_cluster::can_be_handled): Likewise.
11684         (add_case_node): Remove.
11685         (bit_test_cluster::is_beneficial): New.
11686         (case_bit_test::cmp): New.
11687         (bit_test_cluster::emit): New.
11688         (expand_switch_as_decision_tree_p): Remove.
11689         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
11690         (fix_phi_operands_for_edge): Likewise.
11691         (switch_decision_tree::analyze_switch_statement): New.
11692         (compute_cases_per_edge): Move ...
11693         (switch_decision_tree::compute_cases_per_edge): ... here.
11694         (try_switch_expansion): Likewise.
11695         (switch_decision_tree::try_switch_expansion): Likewise.
11696         (record_phi_operand_mapping): Likewise.
11697         (switch_decision_tree::record_phi_operand_mapping): Likewise.
11698         (emit_case_decision_tree): Likewise.
11699         (switch_decision_tree::emit): Likewise.
11700         (balance_case_nodes): Likewise.
11701         (switch_decision_tree::balance_case_nodes): Likewise.
11702         (dump_case_nodes): Likewise.
11703         (switch_decision_tree::dump_case_nodes): Likewise.
11704         (emit_jump): Likewise.
11705         (switch_decision_tree::emit_jump): Likewise.
11706         (emit_cmp_and_jump_insns): Likewise.
11707         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
11708         (emit_case_nodes): Likewise.
11709         (switch_decision_tree::emit_case_nodes): Likewise.
11710         (conditional_probability): Remove.
11711         * tree-switch-conversion.h (enum cluster_type): New.
11712         (PRINT_CASE): New.
11713         (struct cluster): Likewise.
11714         (cluster::cluster): Likewise.
11715         (struct simple_cluster): Likewise.
11716         (simple_cluster::simple_cluster): Likewise.
11717         (struct group_cluster): Likewise.
11718         (struct jump_table_cluster): Likewise.
11719         (struct bit_test_cluster): Likewise.
11720         (struct min_cluster_item): Likewise.
11721         (struct case_tree_node): Likewise.
11722         (case_tree_node::case_tree_node): Likewise.
11723         (jump_table_cluster::case_values_threshold): Likewise.
11724         (struct case_bit_test): Likewise.
11725         (struct switch_decision_tree): Likewise.
11726         (struct switch_conversion): Likewise.
11727         (switch_decision_tree::reset_out_edges_aux): Likewise.
11729 2018-06-20  Martin Liska  <mliska@suse.cz>
11731         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
11732         (hoist_edge_and_branch_if_true): Likewise.
11733         (expand_switch_using_bit_tests_p): Likewise.
11734         (struct case_bit_test): Likewise.
11735         (case_bit_test_cmp): Likewise.
11736         (emit_case_bit_tests): Likewise.
11737         (switch_conversion::switch_conversion): New class.
11738         (struct switch_conv_info): Remove old struct.
11739         (collect_switch_conv_info): More to ...
11740         (switch_conversion::collect): ... this.
11741         (check_range): Likewise.
11742         (switch_conversion::check_range): Likewise.
11743         (check_all_empty_except_final): Likewise.
11744         (switch_conversion::check_all_empty_except_final): Likewise.
11745         (check_final_bb): Likewise.
11746         (switch_conversion::check_final_bb): Likewise.
11747         (create_temp_arrays): Likewise.
11748         (switch_conversion::create_temp_arrays): Likewise.
11749         (free_temp_arrays): Likewise.
11750         (gather_default_values): Likewise.
11751         (switch_conversion::gather_default_values): Likewise.
11752         (build_constructors): Likewise.
11753         (switch_conversion::build_constructors): Likewise.
11754         (constructor_contains_same_values_p): Likewise.
11755         (switch_conversion::contains_same_values_p): Likewise.
11756         (array_value_type): Likewise.
11757         (switch_conversion::array_value_type): Likewise.
11758         (build_one_array): Likewise.
11759         (switch_conversion::build_one_array): Likewise.
11760         (build_arrays): Likewise.
11761         (switch_conversion::build_arrays): Likewise.
11762         (gen_def_assigns): Likewise.
11763         (switch_conversion::gen_def_assigns): Likewise.
11764         (prune_bbs): Likewise.
11765         (switch_conversion::prune_bbs): Likewise.
11766         (fix_phi_nodes): Likewise.
11767         (switch_conversion::fix_phi_nodes): Likewise.
11768         (gen_inbound_check): Likewise.
11769         (switch_conversion::gen_inbound_check): Likewise.
11770         (process_switch): Use the newly created class.
11771         (switch_conversion::expand): New.
11772         (switch_conversion::~switch_conversion): New.
11773         * tree-switch-conversion.h: New file.
11775 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11777         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
11778         tree-vect-patterns.c.
11779         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
11780         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
11781         (vect_recog_sad_pattern): Likewise.
11782         (vect_recog_widen_sum_pattern): Likewise.
11783         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
11784         (vect_recog_widen_shift_pattern): Remove the type_in argument.
11785         (vect_recog_rotate_pattern): Likewise.
11786         (vect_recog_mult_pattern): Likewise.
11787         (vect_recog_vector_vector_shift_pattern): Likewise.
11788         (vect_recog_divmod_pattern): Likewise.
11789         (vect_recog_mixed_size_cond_pattern): Likewise.
11790         (vect_recog_bool_pattern): Likewise.
11791         (vect_recog_mask_conversion_pattern): Likewise.
11792         (vect_try_gather_scatter_pattern): Likewise.
11793         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
11794         (vect_recog_over_widening_pattern): Likewise.
11795         (vect_recog_gather_scatter_pattern): Likewise.
11796         (vect_recog_func_ptr): Move from tree-vectorizer.h
11797         (vect_vect_recog_func_ptrs): Move further down the file.
11798         (vect_recog_func): Likewise.  Remove the third argument.
11799         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
11800         (vect_pattern_recog_1): Expect the pattern function to do any
11801         necessary target tests.  Also expect it to provide a vector type.
11802         Remove the type_in handling.
11804 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11806         * tree-vect-patterns.c (vect_pattern_detected): New function.
11807         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
11808         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
11809         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
11810         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
11811         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11812         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11813         (vect_recog_mask_conversion_pattern)
11814         (vect_try_gather_scatter_pattern): Likewise.
11816 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11818         * tree-vect-patterns.c (vect_get_internal_def): New function.
11819         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11820         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
11821         (search_type_for_mask_1): Use it.
11823 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11825         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11826         redundant WIDEN_SUM_EXPR handling.
11827         (vect_recog_sad_pattern): Likewise.
11829 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11831         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
11832         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
11833         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
11834         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
11835         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
11837 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11839         * tree-vect-stmts.c (vectorizable_call): Make sure that we
11840         use the stmt_vec_info of the original bb statement for the
11841         new zero assignment, even if the call is part of a pattern.
11843 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11845         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
11846         that the sequence is attached to the original statement rather
11847         than the pattern statement.
11848         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
11849         PATTERN_DEF_SEQ from the original statement rather than
11850         the main pattern statement.
11851         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
11852         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
11853         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
11855 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
11857         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
11858         definition statements before the early exit for statements that aren't
11859         live or relevant.
11860         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
11861         split out from...
11862         (vect_transform_loop): ...here.  Process pattern definition
11863         statements without first checking whether the main pattern
11864         statement is live or relevant.
11866 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11868         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
11869         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
11871 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
11873         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
11874         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
11875         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
11876         (expand_block_compare): Change select_block_compare_mode call.
11877         (expand_strncmp_align_check): Use new functions, fix comment.
11878         (emit_final_str_compare_gpr): New function.
11879         (expand_strn_compare): Refactor and clean up code.
11880         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
11882 2018-06-19  Tony Reix  <tony.reix@atos.com>
11883             Damien Bergamini  <damien.bergamini@atos.com>
11884             David Edelsohn  <dje.gcc@gmail.com>
11886         * collect2.c (static_obj): New variable.
11887         (static_libs): New variable.
11888         (is_in_list): Uncomment declaration.
11889         (main): Track AIX libraries linked statically.
11890         (is_in_list): Uncomment definition.
11891         (scan_prog_file): Don't add AIX shared libraries initializer
11892         to constructor list if linking statically.
11894 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
11896         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11897         constant.
11898         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11900 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
11902         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11903         blocks.
11905 2018-06-19  Martin Liska  <mliska@suse.cz>
11907         * config/i386/i386.c (ix86_can_inline_p): Do not use
11908         ipa_fn_summaries::get_create.
11909         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11910         get.
11911         (devirtualization_time_bonus): Likewise.
11912         (ipcp_propagate_stage): Likewise.
11913         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11914         (edge_set_predicate): Likewise.
11915         (evaluate_conditions_for_known_args): Likewise.
11916         (evaluate_properties_for_edge): Likewise.
11917         (ipa_call_summary::reset): Tranform to ...
11918         (ipa_call_summary::~ipa_call_summary): ... this.
11919         (ipa_fn_summary::reset): Transform to ...
11920         (ipa_fn_summary::~ipa_fn_summary): ... this.
11921         (ipa_fn_summary_t::remove): Rename to ...
11922         (ipa_fn_summary_t::remove_callees): ... this.
11923         (ipa_fn_summary_t::duplicate): Use placement new
11924         instead of memory copy.
11925         (ipa_call_summary_t::duplicate): Likewise.
11926         (ipa_call_summary_t::remove): Remove.
11927         (dump_ipa_call_summary): Change get_create to get.
11928         (ipa_dump_fn_summary): Dump only when summary exists.
11929         (analyze_function_body): Use symbol_summary::get instead
11930         of get_create.
11931         (compute_fn_summary): Likewise.
11932         (estimate_edge_devirt_benefit): Likewise.
11933         (estimate_edge_size_and_time): Likewise.
11934         (inline_update_callee_summaries): Likewise.
11935         (remap_edge_change_prob): Likewise.
11936         (remap_edge_summaries): Likewise.
11937         (ipa_merge_fn_summary_after_inlining): Likewise.
11938         (write_ipa_call_summary): Likewise.
11939         (ipa_fn_summary_write): Likewise.
11940         (ipa_free_fn_summary): Likewise.
11941         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11942         (struct ipa_call_summary): Likewise.
11943         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11944         of get_create.
11945         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11946         (estimate_size_after_inlining): Likewise.
11947         (estimate_growth): Likewise.
11948         (growth_likely_positive): Likewise.
11949         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11950         (inline_call): Likewise.
11951         * ipa-inline.c (caller_growth_limits): Likewise.
11952         (can_inline_edge_p): Likewise.
11953         (can_inline_edge_by_limits_p): Likewise.
11954         (compute_uninlined_call_time): Likewise.
11955         (compute_inlined_call_time): Likewise.
11956         (want_inline_small_function_p): Likewise.
11957         (edge_badness): Likewise.
11958         (update_caller_keys): Likewise.
11959         (update_callee_keys): Likewise.
11960         (inline_small_functions): Likewise.
11961         (inline_to_all_callers_1): Likewise.
11962         (dump_overall_stats): Likewise.
11963         (early_inline_small_functions): Likewise.
11964         (early_inliner): Likewise.
11965         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11966         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11967         * ipa-pure-const.c (malloc_candidate_p): Likewise.
11968         * ipa-split.c (execute_split_functions): Likewise.
11969         * symbol-summary.h: Likewise.
11970         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11972 2018-06-19  Richard Biener  <rguenther@suse.de>
11974         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11975         (vectorize_loops): ... here.  Fix dbgcnt handling.
11976         (try_vectorize_loop): Wrap try_vectorize_loop_1.
11978 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
11980         PR target/86197
11981         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11982         ieee128 argument takes up only one (vector) register, not two (floating
11983         point) registers.
11985 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
11987         * gimplify.c (gimplify_init_constructor): Really never clear for an
11988         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11990 2018-06-19  Richard Biener  <rguenther@suse.de>
11992         PR tree-optimization/86179
11993         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11994         after failed recognition.
11996 2018-06-18  Martin Sebor  <msebor@redhat.com>
11998         PR middle-end/85602
11999         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
12000         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
12001         Handle integer subtraction.
12002         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
12003         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
12005 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
12007         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
12008         param from rtx to rtx_insn *.
12009         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
12010         param.
12011         (frv_ifcvt_modify_insn): Likwise.
12012         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
12013         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
12014         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
12015         as_a <rtx_insn *> cast to local "unprotected_region" once
12016         it's been established that it's not NULL or pc_rtx.
12017         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
12018         param "sethi" from rtx to rtx_insn *.
12019         (nds32_group_float_insns): Likewise for param "insn".
12020         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
12021         param.
12022         (vax_output_int_subtract): Likewise.
12023         * config/vax/vax.c (vax_output_int_add): Likewise for param
12024         "insn".
12025         (vax_output_int_subtract): Likewise.
12026         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
12027         (emit_pattern_after): Likewise for param "after".
12028         (emit_insn_after): Likewise.
12029         (emit_jump_insn_after): Likewise.
12030         (emit_call_insn_after): Likewise.
12031         (emit_debug_insn_after): Likewise.
12032         (emit_pattern_before): Likewise for param "before".
12033         (emit_insn_before): Likewise.
12034         (emit_jump_insn_before): Likewise.
12035         * final.c (get_insn_template): Likewise for param "insn", removing
12036         a cast.
12037         * output.h (get_insn_template): Likewise for 2nd param.
12038         * rtl.h (emit_insn_before): Likewise.
12039         (emit_jump_insn_before): Likewise.
12040         (emit_debug_insn_before_noloc): Likewise.
12041         (emit_insn_after): Likewise.
12042         (emit_jump_insn_after): Likewise.
12043         (emit_call_insn_after): Likewise.
12044         (emit_debug_insn_after): Likewise.
12045         (set_insn_deleted): Likewise for param.
12047 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
12049         PR target/85358
12050         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
12051         floating point modes, so that IFmode is numerically greater than
12052         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
12053         to declare the ordering.  This prevents IFmode from being
12054         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
12055         machine.  Include rs6000-modes.h to share the fractional values
12056         between genmodes* and the rest of the compiler.
12057         (IFmode): Likewise.
12058         (KFmode): Likewise.
12059         (TFmode): Likewise.
12060         * config/rs6000/rs6000-modes.h: New file.
12061         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
12062         meaning of rs6000_long_double_size so that 126..128 selects an
12063         appropriate 128-bit floating point type.
12064         (rs6000_option_override_internal): Likewise.
12065         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
12066         (TARGET_LONG_DOUBLE_128): Change the meaning of
12067         rs6000_long_double_size so that 126..128 selects an appropriate
12068         128-bit floating point type.
12069         (LONG_DOUBLE_TYPE_SIZE): Update comment.
12070         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
12071         source and destination to match the standard usage.
12072         (truncifkf2): Likewise.
12073         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
12074         ISA 2.07 to use an explicit clobber, instead of passing in a
12075         temporary.
12076         (copysign<mode>3_soft): Likewise.
12078 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
12080         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12081         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
12082         (vect_slp_analyze_instance_dependence): Likewise.
12083         (vect_enhance_data_refs_alignment): Likewise.
12084         (vect_analyze_data_refs_alignment): Likewise.
12085         (vect_slp_analyze_and_verify_instance_alignment
12086         (vect_analyze_data_ref_accesses): Likewise.
12087         (vect_prune_runtime_alias_test_list): Likewise.
12088         (vect_analyze_data_refs): Likewise.
12089         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
12090         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12091         (vect_analyze_scalar_cycles_1): Likewise.
12092         (vect_get_loop_niters): Likewise.
12093         (vect_analyze_loop_form_1): Likewise.
12094         (vect_update_vf_for_slp): Likewise.
12095         (vect_analyze_loop_operations): Likewise.
12096         (vect_analyze_loop): Likewise.
12097         (vectorizable_induction): Likewise.
12098         (vect_transform_loop): Likewise.
12099         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
12100         * tree-vect-slp.c (vect_analyze_slp): Likewise.
12101         (vect_make_slp_decision): Likewise.
12102         (vect_detect_hybrid_slp): Likewise.
12103         (vect_slp_analyze_operations): Likewise.
12104         (vect_slp_bb): Likewise.
12105         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
12106         (vectorizable_bswap): Likewise.
12107         (vectorizable_call): Likewise.
12108         (vectorizable_simd_clone_call): Likewise.
12109         (vectorizable_conversion): Likewise.
12110         (vectorizable_assignment): Likewise.
12111         (vectorizable_shift): Likewise.
12112         (vectorizable_operation): Likewise.
12113         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
12115 2018-06-18  Martin Sebor  <msebor@redhat.com>
12117         PR tree-optimization/81384
12118         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
12119         * builtins.c (expand_builtin_strnlen): New function.
12120         (expand_builtin): Call it.
12121         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
12122         * builtins.def (BUILT_IN_STRNLEN): New.
12123         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
12124         Warn for bounds in excess of maximum object size.
12125         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
12126         single-value ranges.  Handle strnlen.
12127         (handle_builtin_strlen): Handle strnlen.
12128         (strlen_check_and_optimize_stmt): Same.
12129         * doc/extend.texi (Other Builtins): Document strnlen.
12131 2018-06-18  Maya Rashish  <coypu@sdf.org>
12133         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
12134         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
12135         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
12137         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
12138         here to ...
12139         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
12141 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12143         * tree.c (escaped_string::escape): Replace cast to char * by
12144         const_cast<char *> (unescaped).
12146 2018-06-18  Nick Clifton  <nickc@redhat.com>
12148         PR 84195
12149         * tree.c (escaped_string): New class.  Converts an unescaped
12150         string into its escaped equivalent.
12151         (warn_deprecated_use): Use the new class to convert the
12152         deprecation message, if present.
12153         (test_escaped_strings): New self test.
12154         (test_c_tests): Add test_escaped_strings.
12155         * doc/extend.texi (deprecated): Add a note that the
12156         deprecation message is affected by the -fmessage-length
12157         option, and that control characters will be escaped.
12158         (#pragma GCC error): Document this pragma.
12159         (#pragma GCC warning): Likewise.
12160         * doc/invoke.texi (-fmessage-length): Document this option's
12161         effect on the #warning and #error preprocessor directives and
12162         the deprecated attribute.
12164 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
12166         * tree.c (decl_value_expr_lookup): Revert latest change.
12167         (decl_value_expr_insert): Likewise.
12169 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
12171         * gimplify.c (nonlocal_vlas): Delete.
12172         (nonlocal_vla_vars): Likewise.
12173         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
12174         referenced VLAs.
12175         (gimplify_body): Do not create and destroy nonlocal_vlas.
12176         * tree-nested.c: Include diagnostic.h.
12177         (use_pointer_in_frame): Tweak.
12178         (lookup_field_for_decl): Add assertion and declare the transformation.
12179         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
12180         internal error when the reference is in a wrong context.  Do not
12181         create a debug decl by default.
12182         (note_nonlocal_block_vlas): Delete.
12183         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
12184         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
12185         create a debug decl by default.
12186         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
12187         call is in a wrong context.
12188         (fixup_vla_decls): New function.
12189         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
12190         debug variables were created.
12191         * tree.c (decl_value_expr_lookup): Add checking assertion.
12192         (decl_value_expr_insert): Likewise.
12194 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12196         PR middle-end/82479
12197         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
12198         * tree-scalar-evolution.c (interpret_expr): Likewise.
12199         (expression_expensive_p): Likewise.
12200         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
12201         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
12202         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
12203         (ssa_defined_by_minus_one_stmt_p): New.
12205 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
12207         PR middle-end/64946
12208         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
12209         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
12210         * dojump.c (do_jump): Likewise.
12211         * expr.c (expand_expr_real_2): Check operand type's sign.
12212         * fold-const.c (const_unop): Handle ABSU_EXPR.
12213         (fold_abs_const): Likewise.
12214         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
12215         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
12216         (strip_sign_op_1): Likesise.
12217         * match.pd: Add new pattern to generate ABSU_EXPR.
12218         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
12219         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
12220         * tree-eh.c (operation_could_trap_helper_p): Likewise.
12221         * tree-inline.c (estimate_operator_cost): Likewise.
12222         * tree-pretty-print.c (dump_generic_node): Likewise.
12223         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
12224         * tree.def (ABSU_EXPR): New.
12226 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
12228         PR middle-end/86095
12229         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
12230         documented as preserved for backward compatibility only.
12231         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
12233         PR rtl-optimization/86108
12234         * bb-reorder.c (create_forwarder_block): Renamed to ...
12235         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
12236         jump from new landing pad to the second part.
12237         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
12238         Adjust callers.
12240 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
12242         PR middle-end/85878
12243         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
12244         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
12245         Only call store_expr for halves if the mode is the same.
12247         PR middle-end/86123
12248         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
12249         Fix up comment formatting.
12251 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12253         * typed-splay-tree.h (typed_splay_tree::remove): New function.
12254         (typed_splay_tree::closure,
12255         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
12256         (typed_splay_tree::typed_splay_tree,
12257         typed_splay_tree::operator =): Declared private.
12258         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
12259         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
12260         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
12261         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
12262         typed_splay_tree::splay_tree_splay,
12263         typed_splay_tree::splay_tree_foreach_helper,
12264         typed_splay_tree::splay_tree_insert,
12265         typed_splay_tree::splay_tree_remove,
12266         typed_splay_tree::splay_tree_lookup,
12267         typed_splay_tree::splay_tree_predecessor,
12268         typed_splay_tree::splay_tree_successor,
12269         typed_splay_tree::splay_tree_min,
12270         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
12271         (typed_splay_tree::root, typed_splay_tree::comp,
12272         typed_splay_tree::delete_key,
12273         typed_splay_tree::delete_value): New data members.
12274         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
12275         typed_splay_tree::remove.
12277 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
12279         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
12280         -mginv and -mno-ginv to the assembler.
12281         * config/mips/mips.opt (-mcrc): New option.
12282         (-mginv): Likewise.
12283         * doc/invoke.text (-mcrc): Document.
12284         (-mginv): Likewise.
12286 2018-06-15  Nick Clifton  <nickc@redhat.com>
12288         PR 84195
12289         * tree.c (escaped_string): New class.  Converts an unescaped
12290         string into its escaped equivalent.
12291         (warn_deprecated_use): Use the new class to convert the
12292         deprecation message, if present.
12293         (test_escaped_strings): New self test.
12294         (test_c_tests): Add test_escaped_strings.
12295         * doc/extend.texi (deprecated): Add a note that the
12296         deprecation message is affected by the -fmessage-length
12297         option, and that control characters will be escaped.
12298         (#pragma GCC error): Document this pragma.
12299         (#pragma GCC warning): Likewise.
12300         * doc/invoke.texi (-fmessage-length): Document this option's
12301         effect on the #warning and #error preprocessor directives and
12302         the deprecated attribute.
12304 2018-06-15  Richard Biener  <rguenther@suse.de>
12306         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
12307         here, also noting vector size used.
12308         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
12309         size used in MSG_OPTIMIZED_LOCATIONS dump.
12310         (pass_slp_vectorize::execute): Adjust.
12312 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
12314         PR target/85968
12315         * config/arc/arc.c (arc_return_address_register): Fix
12316         if-condition.
12318 2018-06-15  Richard Biener  <rguenther@suse.de>
12320         PR middle-end/86159
12321         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
12322         leave useless conversion stripping to force_gimple_operand_gsi.
12323         (gimplify_build2): Likewise.
12324         (gimplify_build1): Likewise.
12326 2018-06-15  Richard Biener  <rguenther@suse.de>
12328         PR middle-end/86076
12329         * tree-cfg.c (move_stmt_op): unshare invariant addresses
12330         before adjusting their block.
12332 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12334         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
12335         multilibs for *-*-rtems*.
12336         * config/riscv/t-rtems: New file.
12338 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
12340         PR middle-end/86122
12341         * match.pd ((A +- CST1) +- CST2): Punt if last resort
12342         unsigned_type_for returns NULL.
12344         PR target/85945
12345         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
12346         subregs of multi-word pseudos unless the float mode has word size.
12348 2018-06-14  Richard Biener  <rguenther@suse.de>
12350         PR middle-end/86139
12351         * tree-vect-generic.c (build_word_mode_vector_type): Remove
12352         duplicate and harmful type_hash_canon.
12353         * tree.c (type_hash_canon): Assert we didn't find ourselves.
12355 2018-06-14  Richard Biener  <rguenther@suse.de>
12357         PR ipa/86124
12358         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
12359         NULL cgraph_node.
12361 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12363         * config/rtems.h (STDINT_LONG32): Define.
12365 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
12366             Prachi Godbole  <prachi.godbole@imgtec.com>
12368         * config/mips/mips-cpus.def: Define P6600.
12369         * config/mips/mips-tables.opt: Regenerate.
12370         * config/mips/mips.c (mips_ucbranch_type): New enum.
12371         (mips_rtx_cost_data): Add support for P6600.
12372         (mips_issue_rate): Likewise.
12373         (mips_multipass_dfa_lookahead): Likewise.
12374         (mips_avoid_hazard): Likewise.
12375         (mips_reorg_process_insns): Likewise.
12376         (mips_classify_branch_p6600): New function.
12377         * config/mips/mips.h (TUNE_P6600): New define.
12378         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
12379         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
12380         * config/mips/mips.md: Include p6600.md.
12381         (processor): Add p6600.
12382         * config/mips/p6600.md: New file.
12383         * doc/invoke.texi: Add p6600 to supported architectures.
12385 2018-06-13  Martin Sebor  <msebor@redhat.com>
12387         PR tree-optimization/86114
12388         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
12389         of integer types.
12390         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
12392 2018-06-13  Richard Biener  <rguenther@suse.de>
12394         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
12395         Properly set vector type of the intermediate stmt.
12396         * tree-vect-stmts.c (vectorizable_operation): The destination
12397         var always has vectype_out type.
12399 2018-06-13  Jeff Law  <law@redhat.com>
12401         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
12402         integer 0 for argument to print_rtl_with_bb.
12403         (rl78_reorg): Likewise.
12405 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
12407         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
12408         from rtx to rtx_insn *.
12409         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
12410         "label".
12411         (add_sched_insns_for_speculation): Likewise for local "target",
12412         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12413         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
12414         from rtx_insn ** to rtx_code_label **.
12415         (reorg_emit_nops): Likewise.
12416         (c6x_reorg): Likewise for local "call_labels".
12417         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
12418         rtx to rtx_insn *.
12419         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
12420         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
12421         the loops over LABEL_REFS.
12422         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
12423         braf_label.
12424         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
12425         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
12426         (split_branches): Strengthen local "olabel" from rtx to
12427         rtx_insn *, adding a safe_as_a cast.
12428         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
12429         to "rtx_insn *".
12430         (add_insn_after): Likewise for first two params.
12431         (add_insn_before): Likewise.
12432         (remove_insn): Likewise for param.
12433         (emit_pattern_before_noloc): Likewise for second and third params.
12434         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
12435         (emit_call_insn_before_noloc): Likewise.
12436         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
12437         to "rtx_insn *".
12438         (emit_barrier_before): Likewise.
12439         (emit_label_before): Strengthen "label" param from "rtx" to
12440         "rtx_code_label *".  Strengthen "before" param from "rtx" to
12441         "rtx_insn *".
12442         (emit_insn_after_1): Strengthen "after" param from "rtx" to
12443         "rtx_insn *".
12444         (emit_pattern_after_noloc): Likewise.
12445         (emit_insn_after_noloc): Likewise.
12446         (emit_jump_insn_after_noloc): Likewise.
12447         (emit_call_insn_after_noloc): Likewise.
12448         (emit_debug_insn_after_noloc): Likewise.
12449         (emit_barrier_after): Likewise.
12450         (emit_label_after): Likewise for both params.
12451         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
12452         "loc" param from "int" to "location_t".
12453         (emit_insn_after_setloc): Likewise.
12454         (emit_jump_insn_after_setloc): Likewise.
12455         (emit_call_insn_after_setloc): Likewise.
12456         (emit_debug_insn_after_setloc): Likewise.
12457         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
12458         "loc" param from "int" to "location_t".
12459         (emit_pattern_before): Convert NULL_RTX to NULL.
12460         (emit_insn_before_setloc): Convert "loc" param from "int" to
12461         "location_t".
12462         (emit_jump_insn_before_setloc): Likewise.
12463         (emit_call_insn_before_setloc): Likewise.
12464         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
12465         rtx_insn *.  Convert "loc" param from "int" to "location_t".
12466         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
12467         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
12468         Convert 3rd param from "int" to "location_t".
12469         (emit_barrier_before, emit_barrier_after, next_real_insn):
12470         Strengthen param from rtx to rtx_insn *.
12471         (emit_label_before): Strengthen 1st param from "rtx" to
12472         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
12473         "rtx_insn *".
12474         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
12475         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
12476         Strengthen 2nd param from "rtx" to "rtx_insn *".
12477         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
12478         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
12479         Likewise. Convert 3rd param from "int" to "location_t".
12480         (emit_label_after): Strengthen 1st param from "rtx" to
12481         "rtx_code_label *".
12482         (next_real_insn, remove_insn): Strengthen param from "rtx" to
12483         "rtx_insn *".
12484         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
12485         from "rtx" to "rtx_insn *".
12487 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
12489         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
12490         bodies streamed in with -Q.
12491         * dumpfile.c (dump_files): Add lto-stream-out dump file.
12492         * dumpfile.h (tree_dump_index): Add lto_stream_out.
12493         * gimple-streamer-out.c: Include gimple-pretty-print.h
12494         (output_bb): Dump stmts streamed.
12495         * lto-section-out.c: Include print-tree.h
12496         (lto_begin_section): Dump sections created.
12497         (lto_output_decl_index): Dump decl encoded.
12498         * lto-streamer-out.c: Include print-tree.h
12499         (create_output_block): Dump output block created.
12500         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
12501         (output_function): Dump function output.
12502         (output_constructor): Dump constructor streamed.
12503         (write_global_stream): Output indexes encoded.
12504         (produce_asm_for_decls): Dump streams encoded.
12505         * lto-streamer.c (streamer_dump_file): New global var.
12506         * lto-streamer.h (streamer_dump_file): Declare.
12507         * passes.c (ipa_write_summaries): Initialize streamer dump.
12508         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
12509         in.
12511 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
12513         PR target/86048
12514         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
12515         offsets for register save directives.  Emit a second batch of save
12516         directives, if need be, when the function accesses prior frames.
12518 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12520         * config/arc/fpu.md (fmasf4): Force operand to register.
12521         (fnmasf4): Likewise.
12523 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12525         * config/arc/arc-protos.h (arc_pad_return): Remove.
12526         * config/arc/arc.c (machine_function): Remove force_short_suffix
12527         and size_reason.
12528         (arc_print_operand): Adjust printing of '&'.
12529         (arc_verify_short): Remove conditional printing of short suffix.
12530         (arc_final_prescan_insn): Remove reference to size_reason.
12531         (pad_return): New function.
12532         (arc_reorg): Call pad_return.
12533         (arc_pad_return): Remove.
12534         (arc_init_machine_status): Remove reference to force_short_suffix.
12535         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
12536         (attr length): When attribute iscompact is true force to 2
12537         regardless; in the case of maybe check if we want to force the
12538         instruction to have 4 bytes length.
12539         (nopv): Change it to generate 4 byte long nop as well.
12540         (blockage): New pattern.
12541         (simple_return): Remove call to arc_pad_return.
12542         (p_return_i): Likewise.
12544 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12546         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
12548 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12550         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
12551         ARC cores.
12553 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12555         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
12556         for ARC700 and ARCv2.
12558 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
12560         PR target/86076
12561         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
12562         operands[2] instead of operands[1].
12565 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
12567         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
12568         case, check whether the outer register overlaps an unallocatable
12569         register, not just whether it fits the required class.
12571 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
12573         * poly-int.h (can_div_trunc_p): Add new overload in which all values
12574         are poly_ints.
12575         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
12576         (memrefs_conflict_p): Likewise.
12577         (init_alias_analysis): Likewise.
12578         * cfgexpand.c (expand_debug_expr): Likewise.
12579         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
12580         * cse.c (fold_rtx): Likewise.
12581         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
12582         * expr.c (emit_block_move_hints): Likewise.
12583         (clear_storage_hints, push_block, emit_push_insn): Likewise.
12584         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
12585         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
12586         (emit_group_store): Likewise.
12587         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
12588         to read the PRE/POST_MODIFY increment.
12589         * calls.c (store_one_arg): Use strip_offset.
12590         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
12591         poly_int_rtx_p.
12592         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
12593         by a VEC_SELECT.
12594         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
12595         (simplify_binary_operation_1): Extend CONST_INT handling to
12596         poly_int_rtx_p.
12597         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
12598         than a HOST_WIDE_INT.
12599         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
12600         poly_int64.
12601         (adjust_mems, add_stores): Update accodingly.
12602         (vt_canonicalize_addr): Track polynomial offsets.
12603         (emit_note_insn_var_location): Likewise.
12604         (vt_add_function_parameter): Likewise.
12605         (vt_initialize): Likewise.
12607 2018-06-12  Jeff Law  <law@redhat.com>
12609         * config.gcc (alpha*-*-freebsd*): Remove.
12610         * config/alpha/freebsd.h: Remove.
12612 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
12614         PR other/69968
12615         * spellcheck-tree.c (levenshtein_distance): Rename to...
12616         (get_edit_distance): ...this, and update for underlying renaming.
12617         * spellcheck-tree.h (levenshtein_distance): Rename to...
12618         (get_edit_distance): ...this.
12619         * spellcheck.c (levenshtein_distance): Rename to...
12620         (get_edit_distance): ...this.  Convert from Levenshtein distance
12621         to Damerau-Levenshtein distance by supporting transpositions of
12622         adjacent characters.  Rename "v1" to "v_next" and "v0" to
12623         "v_one_ago".
12624         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
12625         (selftest::test_edit_distance_unit_test_oneway): ...this, and
12626         update for underlying renaming.
12627         (selftest::levenshtein_distance_unit_test): Rename to...
12628         (selftest::test_get_edit_distance_unit): ...this, and update for
12629         underlying renaming.
12630         (selftest::test_find_closest_string): Add example from PR 69968
12631         where transposition helps
12632         (selftest::test_metric_conditions): Update for renaming.
12633         (selftest::test_metric_conditions): Likewise.
12634         (selftest::spellcheck_c_tests): Likewise.
12635         * spellcheck.h (levenshtein_distance): Rename both overloads to...
12636         (get_edit_distance): ...this.
12637         (best_match::consider): Update for renaming.
12639 2018-06-12  Martin Sebor  <msebor@redhat.com>
12641         PR tree-optimization/85259
12642         * builtins.c (compute_objsize): Handle constant offsets.
12643         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
12644         true iff a warning has been issued.
12645         * gimple.h (gimple_nonartificial_location): New function.
12646         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
12647         gimple_nonartificial_location and handle -Wno-system-headers.
12648         (handle_builtin_stxncpy): Same.
12650 2018-06-12  Martin Sebor  <msebor@redhat.com>
12652         PR c/85931
12653         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
12655 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
12657         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12658         BUILTIN_VEC_XST entries for pointer to double and long long.
12660 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
12662         PR target/85990
12663         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12664         Update comments.
12665         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
12666         Likewise.
12668 2018-06-12  Martin Liska  <mliska@suse.cz>
12670         * doc/options.texi: Document IntegerRange.
12672 2018-06-12  Martin Liska  <mliska@suse.cz>
12674         * config/i386/i386.opt: Make MPX-related options as Deprecated.
12675         * opt-functions.awk: Handle Deprecated flag.
12676         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
12677         and report error.
12678         (read_cmdline_option): Report warning for a deprecated option.
12679         * opts.h (struct cl_option): Add new field cl_deprecated.
12680         (CL_ERR_DEPRECATED): New.
12682 2018-06-12  Martin Liska  <mliska@suse.cz>
12684         * doc/options.texi: Document Deprecated option flag.
12686 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12688         * config/arc/arc-arch.h (arc_extras): New enum.
12689         (arc_cpu_t):Add field extra.
12690         (arc_cpu_types): Consider the extras.
12691         * config/arc/arc-cpus.def: Add extras info.
12692         * config/arc/arc-opts.h (processor_type): Consider extra field.
12693         * config/arc/arc.c (arc_override_options): Handle extra field.
12695 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
12697         * config/arc/arc-arch.h: Update ARC_OPTX macro.
12698         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
12699         field.
12700         * config/arc/arc.c (arc_init): Update pic warning.
12701         (irq_range): Update irq range parsing warnings.
12702         (arc_override_options): Update various warning messages.
12703         (arc_handle_aux_attribute): Likewise.
12705 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
12707         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
12709 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12711         * doc/sourcebuild.texi: Document usage of line number 0 in verify
12712         compiler messages directives.
12714 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
12716         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
12717         * config/mips/mips-tables.opt: Regenerate.
12718         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
12719         mips64r6.
12720         * doc/invoke.texi: Document -march=i6500.
12722 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
12724         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
12725         (i6400_gpmul): Add cpu_unit.
12726         (i6400_gpdiv): Likewise.
12727         (i6400_msa_add_d): Update reservations.
12728         (i6400_msa_int_add) Likewise.
12729         (i6400_msa_short_logic3) Likewise.
12730         (i6400_msa_short_logic2) Likewise.
12731         (i6400_msa_short_logic) Likewise.
12732         (i6400_msa_move) Likewise.
12733         (i6400_msa_cmp) Likewise.
12734         (i6400_msa_short_float2) Likewise.
12735         (i6400_msa_div_d) Likewise.
12736         (i6400_msa_long_logic1) Likewise.
12737         (i6400_msa_long_logic2) Likewise.
12738         (i6400_msa_mult) Likewise.
12739         (i6400_msa_long_float2) Likewise.
12740         (i6400_msa_long_float4) Likewise.
12741         (i6400_msa_long_float5) Likewise.
12742         (i6400_msa_long_float8) Likewise.
12743         (i6400_fpu_fadd): Include frint type.
12744         (i6400_fpu_store): New define_insn_reservation.
12745         (i6400_fpu_load): Likewise.
12746         (i6400_fpu_move): Likewise.
12747         (i6400_fpu_fcmp): Likewise.
12748         (i6400_fpu_fmadd): Likewise.
12749         (i6400_int_mult): Include imul3nc type and update reservation.
12750         (i6400_int_div): Include idiv3 type and update reservation.
12751         (i6400_int_load): Update to check type not move_type.
12752         (i6400_int_store): Likewise.
12753         (i6400_int_prefetch): Set zero latency.
12755 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
12757         * gcc.c: Document new %@{...} sequence.
12758         (LINK_COMMAND_SPEC): Use it for the -L switches.
12759         (cpp_unique_options): Use it for the -I switches.
12760         (at_file_argbuf): New global variable.
12761         (in_at_file): Likewise.
12762         (alloc_args): Create at_file_argbuf.
12763         (clear_args): Truncate at_file_argbuf.
12764         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
12765         (open_at_file): New function.
12766         (close_at_file): Likewise.
12767         (create_at_file): Delete.
12768         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
12769         <'o'>: Likewise.
12770         <'@'>: New case.
12771         (validate_switches_from_spec): Deal with %@{...} sequence.
12772         (validate_switches): Likewise.
12773         (driver::finalize): Call clear_args.
12775 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
12777         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
12779 2018-06-11  Martin Sebor  <msebor@redhat.com>
12781         * doc/invoke.texi (-Wall): List -Wc++17-compat.
12782         (Wno-class-memaccess): Add @opindex.
12783         (Wno-templates, Wno-multiple-inheritance): Same.
12784         (Wno-virtual-inheritance, Wno-namespaces): Same.
12785         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
12786         (Wno-format-overflow, Wno-format-truncation): Same.
12787         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
12788         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
12789         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
12790         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
12791         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
12792         (Wno-misspelled-isr): Same.
12794 2018-06-11  Martin Sebor  <msebor@redhat.com>
12796         * PR tree-optimization/86083
12797         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
12799 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
12801         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
12803 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
12805         PR target/85755
12806         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
12807         on the correct operand.
12808         (*movdi_internal64): Ditto.
12810 2018-06-11  Martin Liska  <mliska@suse.cz>
12812         PR tree-optimization/86089
12813         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
12815 2018-06-11  Julia Koval  <julia.koval@intel.com>
12817         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
12818         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
12819         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
12821 2018-06-11  Olivier Hainque  <hainque@adacore.com>
12823         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
12824         for Ada with strict dwarf2.
12826 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
12828         PR target/85755
12829         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
12830         addresses.
12832 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
12834         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
12836 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
12838         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
12839         TARGET_ELF.
12841 2018-06-08  Martin Liska  <mliska@suse.cz>
12843         * tree-cfg.h (debug_function): Fix argument type to match
12844         implementation.
12846 2018-06-08  Martin Liska  <mliska@suse.cz>
12848         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
12849         Remove usage of MPX-related (and removed) fields.
12850         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
12852 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
12854         * cfg.c (debug): Use TDF_NONE rather than 0.
12855         * cfghooks.c (debug): Likewise.
12856         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
12857         (struct dump_option_value_info): Convert to...
12858         (struct kv_pair): ...this template type.
12859         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
12860         rather than 0.
12861         (optinfo_verbosity_options): Likewise.
12862         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
12863         OPTGROUP_NONE.
12864         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
12865         than int for "optgroup_flags" param.
12866         (dump_generic_expr_loc): Use dump_flags_t rather than int for
12867         "dump_kind" param.
12868         (dump_dec): Likewise.
12869         (dump_finish): Use TDF_NONE rather than 0.
12870         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
12871         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
12872         than 0.  Update for change to option_ptr.
12873         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
12874         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
12875         0.  Update for changes to optinfo_verbosity_options and
12876         optgroup_options.
12877         (opt_info_switch_p): Convert optgroup_flags from int to
12878         optgroup_flags_t.
12879         (dump_basic_block): Use dump_flags_t rather than int
12880         for "dump_kind" param.
12881         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
12882         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
12883         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
12884         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
12885         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
12886         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
12887         TDF_NONE): Convert from macros to...
12888         (enum dump_flag): ...this new enum.
12889         (dump_flags_t): Update to use enum.
12890         (operator|, operator&, operator~, operator|=, operator&=):
12891         Implement for dump_flags_t.
12892         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12893         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12894         Convert from macros to...
12895         (enum optgroup_flag): ...this new enum.
12896         (optgroup_flags_t): New typedef.
12897         (operator|, operator|=): Implement for optgroup_flags_t.
12898         (struct dump_file_info): Convert field "alt_flags" to
12899         dump_flags_t.  Convert field "optgroup_flags" to
12900         optgroup_flags_t.
12901         (dump_basic_block): Use dump_flags_t rather than int for param.
12902         (dump_generic_expr_loc): Likewise.
12903         (dump_dec): Likewise.
12904         (dump_register): Convert param "optgroup_flags" to
12905         optgroup_flags_t.
12906         (opt_info_enable_passes): Likewise.
12907         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12908         than 0.
12909         * gimple-pretty-print.c (debug): Likewise.
12910         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12911         (merged_store_group::apply_stores): Likewise.
12912         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12913         * gimple.c (verify_gimple_pp): Likewise.
12914         * graphite-poly.c (print_pbb_body): Likewise.
12915         * passes.c (pass_manager::register_one_dump_file): Convert
12916         local "optgroup_flags" to optgroup_flags_t.
12917         * print-tree.c (print_node): Use TDF_NONE rather than 0.
12918         (debug): Likewise.
12919         (debug_body): Likewise.
12920         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12921         to optgroup_flags_t.
12922         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12923         than 0.
12924         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12925         (convert_mult_to_fma): Likewise.
12926         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12927         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12928         * tree-vect-data-refs.c (dump_lower_bound): Convert param
12929         "dump_kind" to dump_flags_t.
12931 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12933         * config/rs6000/rs6000.c (min, max): Delete.
12935 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
12937         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12938         -mabi=spe and -mabi=no-spe.
12940 2018-06-08  Martin Liska  <mliska@suse.cz>
12942         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12943         where we expect an existing summary.
12945 2018-06-08  Martin Liska  <mliska@suse.cz>
12947         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12948         * ipa-inline.h (estimate_edge_growth): Likewise.
12950 2018-06-08  Martin Liska  <mliska@suse.cz>
12952         * cgraph.c (function_version_hasher::hash): Use
12953         cgraph_node::get_uid ().
12954         (function_version_hasher::equal):
12955         * cgraph.h (cgraph_node::get_uid): New method.
12956         * ipa-inline.c (update_caller_keys): Use
12957         cgraph_node::get_uid ().
12958         (update_callee_keys): Likewise.
12959         * ipa-utils.c (searchc): Likewise.
12960         (ipa_reduced_postorder): Likewise.
12961         * lto-cgraph.c (input_node): Likewise.
12962         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12963         * symbol-summary.h (symtab_insertion): Likewise.
12964         (symtab_removal): Likewise.
12965         (symtab_duplication): Likewise.
12966         * tree-pretty-print.c (dump_function_header): Likewise.
12967         * tree-sra.c (convert_callers_for_node): Likewise.
12969 2018-06-08  Martin Liska  <mliska@suse.cz>
12971         * cgraph.c (symbol_table::create_edge): Always assign a new
12972         unique number.
12973         (symbol_table::free_edge): Do not recycle numbers.
12974         * cgraph.h (cgraph_edge::get): New method.
12975         * symbol-summary.h (symtab_removal): Use it.
12976         (symtab_duplication): Likewise.
12977         (call_summary::hashable_uid): Remove.
12979 2018-06-08  Martin Liska  <mliska@suse.cz>
12981         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12982         (initialize_growth_caches): Remove.
12983         (free_growth_caches): Likewise.
12984         (do_estimate_edge_time): Use edge_growth_cache.
12985         (do_estimate_edge_size): Likewise.
12986         (do_estimate_edge_hints): Likewise.
12987         * ipa-inline.c (reset_edge_caches): Likewise.
12988         (recursive_inlining): Likewise.
12989         (inline_small_functions): Likewise.
12990         * ipa-inline.h (initialize_growth_caches): Remove.
12991         (estimate_edge_size): Likewise.
12992         (estimate_edge_time): Likewise.
12993         (estimate_edge_hints): Likewise.
12994         (reset_edge_growth_cache): Likewise.
12995         * symbol-summary.h (call_summary::remove): New method.
12997 2018-06-08  Martin Liska  <mliska@suse.cz>
12999         * ipa-cp.c (class edge_clone_summary): New summary.
13000         (grow_edge_clone_vectors): Remove.
13001         (ipcp_edge_duplication_hook): Remove.
13002         (class edge_clone_summary_t): New call_summary class.
13003         (ipcp_edge_removal_hook): Remove.
13004         (edge_clone_summary_t::duplicate): New function.
13005         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
13006         (create_specialized_node): Likewise.
13007         (ipcp_driver): Initialize edge_clone_summaries and do not
13008         register hooks.
13010 2018-06-08  Martin Liska  <mliska@suse.cz>
13012         * symbol-summary.h (get): New function.
13013         (call_summary::m_initialize_when_cloning): New class member.
13015 2018-06-08  Martin Liska  <mliska@suse.cz>
13017         * cgraph.c (cgraph_node::remove): Do not recycle uid.
13018         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
13019         (symbol_table::allocate_cgraph_symbol): Do not set uid.
13020         * passes.c (uid_hash_t): Record removed_nodes by their uids.
13021         (remove_cgraph_node_from_order): Use the removed_nodes set.
13022         (do_per_function_toporder): Likwise.
13023         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
13024         instead of summary_uid.
13025         (symtab_removal): Likewise.
13026         (symtab_duplication): Likewise.
13028 2018-06-08  Martin Liska  <mliska@suse.cz>
13030         * ipa-cp.c (ipcp_store_bits_results): Use
13031         ipcp_transformation_sum.
13032         (ipcp_store_vr_results): Likewise.
13033         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
13034         to ...
13035         (ipcp_transformation_initialize): ... this.
13036         (ipa_set_node_agg_value_chain):
13037         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
13038         (write_ipcp_transformation_info): Likewise.
13039         (read_ipcp_transformation_info): Likewise.
13040         (ipcp_update_bits): Likewise.
13041         (ipcp_update_vr): Likewise.
13042         (ipcp_transform_function): Likewise.
13043         * ipa-prop.h: Rename ipcp_transformation_summary to
13044         ipcp_transformation.
13045         (class ipcp_transformation_t): New function summary.
13046         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
13047         (ipa_get_agg_replacements_for_node): Likewise.
13049 2018-06-08  Martin Liska  <mliska@suse.cz>
13051         * ipa-pure-const.c (struct funct_state_d): Do it class instead
13052         of struct.
13053         (class funct_state_summary_t): New function_summary class.
13054         (has_function_state): Remove.
13055         (get_function_state): Likewise.
13056         (set_function_state): Likewise.
13057         (add_new_function): Likewise.
13058         (funct_state_summary_t::insert): New function.
13059         (duplicate_node_data): Remove.
13060         (remove_node_data): Remove.
13061         (funct_state_summary_t::duplicate): New function.
13062         (register_hooks): Create new funct_state_summaries.
13063         (pure_const_generate_summary): Use it.
13064         (pure_const_write_summary): Likewise.
13065         (pure_const_read_summary): Likewise.
13066         (propagate_pure_const): Likewise.
13067         (propagate_nothrow): Likewise.
13068         (dump_malloc_lattice): Likewise.
13069         (propagate_malloc): Likewise.
13070         (execute): Do not register hooks, just remove summary
13071         instead.
13072         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
13073         constructor.
13075 2018-06-08  Martin Liska  <mliska@suse.cz>
13077         * ipa-reference.c (remove_node_data): Remove.
13078         (duplicate_node_data): Likewise.
13079         (class ipa_ref_var_info_summary_t): New class.
13080         (class ipa_ref_opt_summary_t): Likewise.
13081         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
13082         (get_reference_optimization_summary): Use
13083         ipa_ref_opt_sum_summaries.
13084         (set_reference_vars_info): Remove.
13085         (set_reference_optimization_summary): Likewise.
13086         (ipa_init): Create summaries.
13087         (init_function_info): Use function summary.
13088         (ipa_ref_opt_summary_t::duplicate): New function.
13089         (ipa_ref_opt_summary_t::remove): New function.
13090         (get_read_write_all_from_node): Fix GNU coding style.
13091         (propagate): Use function summary.
13092         (write_node_summary_p): Fix GNU coding style.
13093         (stream_out_bitmap): Likewise.
13094         (ipa_reference_read_optimization_summary): Use function summary.
13095         (ipa_reference_c_finalize): Do not release hooks.
13097 2018-06-08  Martin Liska  <mliska@suse.cz>
13099         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
13100         (analyze_function_body): Extract multiple calls of get_create.
13101         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13102         * ipa-inline.c (recursive_inlining): Use ::get method.
13103         * ipa-inline.h (estimate_edge_growth): Likewise.
13105 2018-06-08  Martin Liska  <mliska@suse.cz>
13107         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
13108         HSA_INVALID.
13109         (hsa_function_summary::hsa_function_summary): Use the new enum
13110         value.
13111         (hsa_gpu_implementation_p): Use hsa_summaries::get.
13112         * hsa-gen.c (hsa_get_host_function): Likewise.
13113         (get_brig_function_name): Likewise.
13114         * ipa-hsa.c (process_hsa_functions): Likewise.
13115         (ipa_hsa_write_summary): Likewise.
13116         * symbol-summary.h (symtab_duplication): Use ::get function/
13117         (get): New function.
13119 2018-06-08  Martin Liska  <mliska@suse.cz>
13121         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
13122         of get.
13123         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
13124         (hsa_register_kernel): Likewise.
13125         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
13126         * hsa-gen.c (hsa_get_host_function): Likewise.
13127         (get_brig_function_name): Likewise.
13128         (generate_hsa): Likewise.
13129         (pass_gen_hsail::execute): Likewise.
13130         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
13131         (devirtualization_time_bonus): Likewise.
13132         (ipcp_propagate_stage): Likewise.
13133         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13134         (edge_set_predicate): Likewise.
13135         (evaluate_conditions_for_known_args): Likewise.
13136         (evaluate_properties_for_edge): Likewise.
13137         (ipa_fn_summary::reset): Likewise.
13138         (ipa_fn_summary_t::duplicate): Likewise.
13139         (dump_ipa_call_summary): Likewise.
13140         (ipa_dump_fn_summary): Likewise.
13141         (analyze_function_body): Likewise.
13142         (compute_fn_summary): Likewise.
13143         (estimate_edge_devirt_benefit): Likewise.
13144         (estimate_edge_size_and_time): Likewise.
13145         (estimate_calls_size_and_time): Likewise.
13146         (estimate_node_size_and_time): Likewise.
13147         (inline_update_callee_summaries): Likewise.
13148         (remap_edge_change_prob): Likewise.
13149         (remap_edge_summaries): Likewise.
13150         (ipa_merge_fn_summary_after_inlining): Likewise.
13151         (ipa_update_overall_fn_summary): Likewise.
13152         (read_ipa_call_summary): Likewise.
13153         (inline_read_section): Likewise.
13154         (write_ipa_call_summary): Likewise.
13155         (ipa_fn_summary_write): Likewise.
13156         (ipa_free_fn_summary): Likewise.
13157         * ipa-hsa.c (process_hsa_functions): Likewise.
13158         (ipa_hsa_write_summary): Likewise.
13159         (ipa_hsa_read_section): Likewise.
13160         * ipa-icf.c (sem_function::merge): Likewise.
13161         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
13162         (do_estimate_edge_time): Likewise.
13163         (estimate_size_after_inlining): Likewise.
13164         (estimate_growth): Likewise.
13165         (growth_likely_positive): Likewise.
13166         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13167         (inline_call): Likewise.
13168         * ipa-inline.c (caller_growth_limits): Likewise.
13169         (can_inline_edge_p): Likewise.
13170         (can_inline_edge_by_limits_p): Likewise.
13171         (compute_uninlined_call_time): Likewise.
13172         (compute_inlined_call_time): Likewise.
13173         (want_inline_small_function_p): Likewise.
13174         (edge_badness): Likewise.
13175         (update_caller_keys): Likewise.
13176         (update_callee_keys): Likewise.
13177         (recursive_inlining): Likewise.
13178         (inline_small_functions): Likewise.
13179         (inline_to_all_callers_1): Likewise.
13180         (dump_overall_stats): Likewise.
13181         (early_inline_small_functions): Likewise.
13182         (early_inliner): Likewise.
13183         * ipa-inline.h (estimate_edge_growth): Likewise.
13184         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13185         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13186         * ipa-prop.h (IPA_NODE_REF): Likewise.
13187         (IPA_EDGE_REF): Likewise.
13188         * ipa-pure-const.c (malloc_candidate_p): Likewise.
13189         (propagate_malloc): Likewise.
13190         * ipa-split.c (execute_split_functions): Likewise.
13191         * symbol-summary.h: Rename get to get_create.
13192         (get): Likewise.
13193         (get_create): Likewise.
13194         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13196 2018-06-08  Martin Liska  <mliska@suse.cz>
13198         * symbol-summary.h (release): Move definition out of class
13199         declaration.
13200         (symtab_removal): Likewise.
13201         (symtab_duplication): Likewise.
13203 2018-06-08  Martin Liska  <mliska@suse.cz>
13205         * symbol-summary.h (function_summary): Move constructor
13206         implementation out of class declaration.
13207         (release): Likewise.
13208         (symtab_insertion): Likewise.
13209         (symtab_removal): Likewise.
13210         (symtab_duplication): Likewise.
13211         (get): Likewise.
13213 2018-06-08  Martin Liska  <mliska@suse.cz>
13215         * Makefile.in: Remove support for MPX (macros, related functions,
13216         fields in cgraph_node, ...).
13217         * builtin-types.def (BT_BND): Likewise.
13218         (BT_FN_BND_CONST_PTR): Likewise.
13219         (BT_FN_CONST_PTR_BND): Likewise.
13220         (BT_FN_VOID_PTR_BND): Likewise.
13221         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
13222         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
13223         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
13224         (expand_builtin_mempcpy_with_bounds): Likewise.
13225         (expand_builtin_memset_with_bounds): Likewise.
13226         (expand_builtin_memset_args): Likewise.
13227         (std_expand_builtin_va_start): Likewise.
13228         (expand_builtin): Likewise.
13229         (expand_builtin_with_bounds): Likewise.
13230         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
13231         (DEF_LIB_BUILTIN_CHKP): Likewise.
13232         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
13233         (DEF_CHKP_BUILTIN): Likewise.
13234         (BUILT_IN_MEMCPY): Likewise.
13235         (BUILT_IN_MEMMOVE): Likewise.
13236         (BUILT_IN_MEMPCPY): Likewise.
13237         (BUILT_IN_MEMSET): Likewise.
13238         (BUILT_IN_STPCPY): Likewise.
13239         (BUILT_IN_STRCAT): Likewise.
13240         (BUILT_IN_STRCHR): Likewise.
13241         (BUILT_IN_STRCPY): Likewise.
13242         (BUILT_IN_STRLEN): Likewise.
13243         (BUILT_IN_MEMCPY_CHK): Likewise.
13244         (BUILT_IN_MEMMOVE_CHK): Likewise.
13245         (BUILT_IN_MEMPCPY_CHK): Likewise.
13246         (BUILT_IN_MEMSET_CHK): Likewise.
13247         (BUILT_IN_STPCPY_CHK): Likewise.
13248         (BUILT_IN_STRCAT_CHK): Likewise.
13249         (BUILT_IN_STRCPY_CHK): Likewise.
13250         * calls.c (store_bounds): Likewise.
13251         (emit_call_1): Likewise.
13252         (special_function_p): Likewise.
13253         (maybe_warn_nonstring_arg): Likewise.
13254         (initialize_argument_information): Likewise.
13255         (finalize_must_preallocate): Likewise.
13256         (compute_argument_addresses): Likewise.
13257         (expand_call): Likewise.
13258         * cfgexpand.c (expand_call_stmt): Likewise.
13259         (expand_return): Likewise.
13260         (expand_gimple_stmt_1): Likewise.
13261         (pass_expand::execute): Likewise.
13262         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
13263         (cgraph_node::remove): Likewise.
13264         (cgraph_node::dump): Likewise.
13265         (cgraph_node::verify_node): Likewise.
13266         * cgraph.h (chkp_function_instrumented_p): Likewise.
13267         (symtab_node::get_alias_target): Likewise.
13268         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
13269         (cgraph_local_p): Likewise.
13270         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
13271         (cgraph_edge::rebuild_references): Likewise.
13272         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
13273         (walk_polymorphic_call_targets): Likewise.
13274         (cgraph_node::expand_thunk): Likewise.
13275         (symbol_table::output_weakrefs): Likewise.
13276         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
13277         (ix86_handle_option): Likewise.
13278         * config/i386/constraints.md: Likewise.
13279         * config/i386/i386-builtin-types.def (BND): Likewise.
13280         (VOID): Likewise.
13281         (PVOID): Likewise.
13282         (ULONG): Likewise.
13283         * config/i386/i386-builtin.def (BDESC_END): Likewise.
13284         (BDESC_FIRST): Likewise.
13285         (BDESC): Likewise.
13286         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
13287         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
13288         * config/i386/i386.c (enum reg_class): Likewise.
13289         (ix86_target_string): Likewise.
13290         (ix86_option_override_internal): Likewise.
13291         (ix86_conditional_register_usage): Likewise.
13292         (ix86_valid_target_attribute_inner_p): Likewise.
13293         (ix86_set_indirect_branch_type): Likewise.
13294         (ix86_set_current_function): Likewise.
13295         (ix86_function_arg_regno_p): Likewise.
13296         (init_cumulative_args): Likewise.
13297         (ix86_function_arg_advance): Likewise.
13298         (ix86_function_arg): Likewise.
13299         (ix86_pass_by_reference): Likewise.
13300         (ix86_function_value_regno_p): Likewise.
13301         (ix86_function_value_1): Likewise.
13302         (ix86_function_value_bounds): Likewise.
13303         (ix86_return_in_memory): Likewise.
13304         (ix86_setup_incoming_vararg_bounds): Likewise.
13305         (ix86_va_start): Likewise.
13306         (indirect_thunk_need_prefix): Likewise.
13307         (print_reg): Likewise.
13308         (ix86_print_operand): Likewise.
13309         (ix86_expand_call): Likewise.
13310         (ix86_output_function_return): Likewise.
13311         (reg_encoded_number): Likewise.
13312         (BDESC_VERIFYS): Likewise.
13313         (ix86_init_mpx_builtins): Likewise.
13314         (ix86_init_builtins): Likewise.
13315         (ix86_emit_cmove): Likewise.
13316         (ix86_emit_move_max): Likewise.
13317         (ix86_expand_builtin): Likewise.
13318         (ix86_builtin_mpx_function): Likewise.
13319         (ix86_get_arg_address_for_bt): Likewise.
13320         (ix86_load_bounds): Likewise.
13321         (ix86_store_bounds): Likewise.
13322         (ix86_load_returned_bounds): Likewise.
13323         (ix86_store_returned_bounds): Likewise.
13324         (ix86_class_likely_spilled_p): Likewise.
13325         (ix86_hard_regno_mode_ok): Likewise.
13326         (x86_order_regs_for_local_alloc): Likewise.
13327         (ix86_mitigate_rop): Likewise.
13328         (ix86_bnd_prefixed_insn_p): Likewise.
13329         (ix86_mpx_bound_mode): Likewise.
13330         (ix86_make_bounds_constant): Likewise.
13331         (ix86_initialize_bounds): Likewise.
13332         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
13333         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
13334         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
13335         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
13336         (TARGET_CHKP_BOUND_MODE): Likewise.
13337         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
13338         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
13339         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
13340         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
13341         * config/i386/i386.h (TARGET_MPX): Likewise.
13342         (TARGET_MPX_P): Likewise.
13343         (VALID_BND_REG_MODE): Likewise.
13344         (FIRST_BND_REG): Likewise.
13345         (LAST_BND_REG): Likewise.
13346         (enum reg_class): Likewise.
13347         (BND_REG_P): Likewise.
13348         (BND_REGNO_P): Likewise.
13349         (BNDmode): Likewise.
13350         (ADJUST_INSN_LENGTH): Likewise.
13351         * config/i386/i386.md: Likewise.
13352         * config/i386/i386.opt: Likewise.
13353         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
13354         (defined): Likewise.
13355         (LINK_MPX): Likewise.
13356         (MPX_SPEC): Likewise.
13357         (LIBMPX_SPEC): Likewise.
13358         (LIBMPXWRAPPERS_SPEC): Likewise.
13359         (CHKP_SPEC): Likewise.
13360         * config/i386/predicates.md: Likewise.
13361         * dbxout.c (dbxout_type): Likewise.
13362         * doc/extend.texi: Likewise.
13363         * doc/invoke.texi: Likewise.
13364         * doc/md.texi: Likewise.
13365         * doc/tm.texi: Likewise.
13366         * doc/tm.texi.in: Likewise.
13367         * dwarf2out.c (is_base_type): Likewise.
13368         (gen_formal_types_die): Likewise.
13369         (gen_subprogram_die): Likewise.
13370         (gen_type_die_with_usage): Likewise.
13371         (gen_decl_die): Likewise.
13372         (dwarf2out_late_global_decl): Likewise.
13373         * expr.c (expand_assignment): Likewise.
13374         (emit_storent_insn): Likewise.
13375         (store_expr_with_bounds): Likewise.
13376         (store_expr): Likewise.
13377         (expand_expr_real_1): Likewise.
13378         * expr.h (store_expr_with_bounds): Likewise.
13379         * function.c (use_register_for_decl): Likewise.
13380         (struct bounds_parm_data): Likewise.
13381         (assign_parms_augmented_arg_list): Likewise.
13382         (assign_parm_find_entry_rtl): Likewise.
13383         (assign_parm_is_stack_parm): Likewise.
13384         (assign_parm_load_bounds): Likewise.
13385         (assign_bounds): Likewise.
13386         (assign_parms): Likewise.
13387         (expand_function_start): Likewise.
13388         * gcc.c (CHKP_SPEC): Likewise.
13389         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13390         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
13391         (wrestrict_dom_walker::check_call): Likewise.
13392         * gimple.c (gimple_build_call_from_tree): Likewise.
13393         * gimple.h (enum gf_mask): Likewise.
13394         (gimple_call_with_bounds_p): Likewise.
13395         (gimple_call_set_with_bounds): Likewise.
13396         * gimplify.c (gimplify_init_constructor): Likewise.
13397         * ipa-cp.c (initialize_node_lattices): Likewise.
13398         (propagate_constants_across_call): Likewise.
13399         (find_more_scalar_values_for_callers_subset): Likewise.
13400         * ipa-hsa.c (process_hsa_functions): Likewise.
13401         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
13402         * ipa-icf.c (sem_function::merge): Likewise.
13403         * ipa-inline.c (early_inliner): Likewise.
13404         * ipa-pure-const.c (warn_function_noreturn): Likewise.
13405         (warn_function_cold): Likewise.
13406         (propagate_pure_const): Likewise.
13407         * ipa-ref.h (enum GTY): Likewise.
13408         * ipa-split.c (find_retbnd): Likewise.
13409         (consider_split): Likewise.
13410         (split_function): Likewise.
13411         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
13412         * ipa.c (walk_polymorphic_call_targets): Likewise.
13413         (symbol_table::remove_unreachable_nodes): Likewise.
13414         (process_references): Likewise.
13415         (cgraph_build_static_cdtor_1): Likewise.
13416         * lto-cgraph.c (lto_output_node): Likewise.
13417         (output_refs): Likewise.
13418         (compute_ltrans_boundary): Likewise.
13419         (input_overwrite_node): Likewise.
13420         (input_node): Likewise.
13421         (input_cgraph_1): Likewise.
13422         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
13423         * passes.c (pass_manager::execute_early_local_passes): Likewise.
13424         (class pass_chkp_instrumentation_passes): Likewise.
13425         (make_pass_chkp_instrumentation_passes): Likewise.
13426         * passes.def: Likewise.
13427         * rtl.h (struct GTY): Likewise.
13428         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
13429         * stor-layout.c (layout_type): Likewise.
13430         * symtab.c: Likewise.
13431         * target.def: Likewise.
13432         * targhooks.c (default_chkp_bound_type): Likewise.
13433         (default_chkp_bound_mode): Likewise.
13434         (default_builtin_chkp_function): Likewise.
13435         (default_chkp_function_value_bounds): Likewise.
13436         (default_chkp_make_bounds_constant): Likewise.
13437         (default_chkp_initialize_bounds): Likewise.
13438         * targhooks.h (default_chkp_bound_type): Likewise.
13439         (default_chkp_bound_mode): Likewise.
13440         (default_builtin_chkp_function): Likewise.
13441         (default_chkp_function_value_bounds): Likewise.
13442         (default_chkp_make_bounds_constant): Likewise.
13443         (default_chkp_initialize_bounds): Likewise.
13444         * toplev.c (compile_file): Likewise.
13445         (process_options): Likewise.
13446         * tree-core.h (DEF_BUILTIN): Likewise.
13447         (DEF_BUILTIN_CHKP): Likewise.
13448         * tree-inline.c (declare_return_variable): Likewise.
13449         (remap_gimple_stmt): Likewise.
13450         (copy_bb): Likewise.
13451         (initialize_inlined_parameters): Likewise.
13452         (expand_call_inline): Likewise.
13453         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
13454         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
13455         (make_pass_ipa_chkp_produce_thunks): Likewise.
13456         (make_pass_chkp): Likewise.
13457         (make_pass_chkp_opt): Likewise.
13458         (make_pass_chkp_instrumentation_passes): Likewise.
13459         * tree-pretty-print.c (dump_generic_node): Likewise.
13460         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
13461         * tree-ssa-dce.c (propagate_necessity): Likewise.
13462         (eliminate_unnecessary_stmts): Likewise.
13463         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
13464         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
13465         * tree-ssa-sccvn.h: Likewise.
13466         * tree-ssa-strlen.c (get_string_length): Likewise.
13467         (valid_builtin_call): Likewise.
13468         (adjust_last_stmt): Likewise.
13469         (handle_builtin_strchr): Likewise.
13470         (handle_builtin_strcpy): Likewise.
13471         (handle_builtin_stxncpy): Likewise.
13472         (handle_builtin_memcpy): Likewise.
13473         (handle_builtin_strcat): Likewise.
13474         (strlen_check_and_optimize_stmt): Likewise.
13475         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
13476         * tree-streamer-in.c: Likewise.
13477         * tree-streamer.c (record_common_node): Likewise.
13478         * tree.c (tree_code_size): Likewise.
13479         (wide_int_to_tree_1): Likewise.
13480         (type_contains_placeholder_1): Likewise.
13481         (build_common_tree_nodes): Likewise.
13482         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
13483         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
13484         (POINTER_BOUNDS_P): Likewise.
13485         (BOUNDED_TYPE_P): Likewise.
13486         (BOUNDED_P): Likewise.
13487         (CALL_WITH_BOUNDS_P): Likewise.
13488         (pointer_bounds_type_node): Likewise.
13489         * value-prof.c (gimple_ic): Likewise.
13490         * var-tracking.c (vt_add_function_parameters): Likewise.
13491         * varasm.c (make_decl_rtl): Likewise.
13492         (assemble_start_function): Likewise.
13493         (output_constant): Likewise.
13494         (maybe_assemble_visibility): Likewise.
13495         * varpool.c (ctor_for_folding): Likewise.
13496         * chkp-builtins.def: Remove.
13497         * ipa-chkp.c: Remove.
13498         * ipa-chkp.h: Remove.
13499         * rtl-chkp.c: Remove.
13500         * rtl-chkp.h: Remove.
13501         * tree-chkp-opt.c: Remove.
13502         * tree-chkp.c: Remove.
13503         * tree-chkp.h: Remove.
13505 2018-06-07  Carl Love  <cel@us.ibm.com>
13507         * config/rs6000/vsx.md (vextract_fp_from_shorth,
13508         vextract_fp_from_shortl): Add BE support.
13510 2018-06-07  Paul Koning  <ni1d@arrl.net>
13512         * compare-elim.c (try_merge_compare): Don't merge compare if
13513         address contains a side effect.
13514         (try_eliminate_compare): Likewise.
13516 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
13518         * config.gcc: Support "tremont".
13519         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
13520         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13521         PROCESSOR_TREMONT.
13522         * config/i386/i386.c (m_TREMONT): Define.
13523         (processor_target_table): Add "tremont".
13524         (PTA_TREMONT): Define.
13525         (ix86_lea_outperforms): Add TARGET_TREMONT.
13526         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
13527         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
13528         and M_INTEL_GOLDMONT_PLUS.
13529         (fold_builtin_cpu): Add "tremont".
13530         (ix86_add_stmt_cost): Add TARGET_TREMONT.
13531         (ix86_option_override_internal): Add "tremont".
13532         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
13533         (processor_type): Add PROCESSOR_TREMONT.
13534         * config/i386/x86-tune.def: Add m_TREMONT.
13535         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
13537 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13539         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
13540         symbol defined for msp430i* devices to be lower case.
13542 2018-06-07  Richard Biener  <rguenther@suse.de>
13544         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
13545         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
13546         Properly wrap signed arithmetic if overflow wraps.
13548 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
13550         PR tree-optimization/69615
13551         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
13552         of a cast from a same precision integral SSA_NAME in a bb dominated
13553         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
13554         cast to utype if rhs2 has already a compatible type.
13556 2018-06-07  Richard Biener  <rguenther@suse.de>
13558         PR tree-optimization/85935
13559         * graphite-scop-detection.c (find_params_in_bb): Analyze
13560         condition operands with respect to the correct loop.  Assert
13561         the analysis doesn't fail.
13563 2018-06-04  Carl Love  <cel@us.ibm.com>
13565         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
13566         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
13567         as it is slightly cheaper.
13568         (first_match_or_eos_index_<mode>):
13569         Calculate index using natural element order.
13570         (first_match_index_<mode>):
13571         Calculate index using natural element order.
13572         (first_match_or_eos_index_<mode>):
13573         Calculate index using natural order.
13574         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
13575         for BE and LE modes.
13576         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
13577         P9V_BUILTIN_VCLZLSBB_V16QI.
13578         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
13579         specific.
13581 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13583         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
13584         indentation and line wrap for many prototypes.  Add missing
13585         @smallexample directives around block of prototypes for vec_xl and
13586         vec_xst.
13588 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
13590         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
13591         track if we pass or return IEEE 128-bit floating point.
13592         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
13593         C++ mangling that is compatible with GCC 8.1.
13594         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
13595         (init_cumulative_args): Note if we pass or return IEEE 128-bit
13596         floating point types.
13597         (rs6000_function_arg_advance_1): Likewise.
13598         (rs6000_mangle_type): Optionally generate mangled names that match
13599         what GCC 8.1 generated for IEEE 128-bit floating point types.
13600         (rs6000_globalize_decl_name): If we have an external function that
13601         passes or returns IEEE 128-bit types, generate a weak reference
13602         from the mangled name used in GCC 8.1 to the current mangled
13603         name.
13604         (rs6000_init_builtins): Make __ibm128 use the long double type if
13605         long double is IBM extended double.  Make __float128 use the long
13606         double type if long double is IEEE 128-bit.
13608         PR target/85657
13609         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
13610         macro for __ibm128 built-in functions.
13611         (PACK_IF): Add __ibm128 pack/unpack functions.
13612         (UNPACK_IF): Likewise.
13613         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
13614         enable long double built-in functions if long double is IEEE
13615         128-bit floating point.
13616         (rs6000_invalid_builtin): Update long double built-in function
13617         error message.
13618         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
13619         functions, adjust the built-in function to use the long double
13620         built-in function if __ibm128 and long double are the same type.
13621         * doc/extend.texi (PowerPC builtins): Update documention for
13622         __builtin_{,un}pack_longdouble.  Add documentation for
13623         __builtin_{,un}pack_ibm128.
13625 2018-06-06  Jim Wilson  <jimw@sifive.com>
13627         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
13628         (struct machine_function): New field interrupt_mode.
13629         (riscv_handle_type_attribute): New function.  Add forward declaration.
13630         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
13631         (riscv_expand_epilogue): Check interrupt_mode field.
13632         (riscv_set_current_function): Check interrupt attribute args and
13633         set interrupt_mode field.
13634         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
13635         (riscv_sret, riscv_uret): New.
13636         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
13637         new arguments to interrupt attribute.
13639 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
13641         PR target/63177
13642         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
13643         Don't handle -mcpu=power8 if -mpower9-vector is also used.
13645 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13647         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
13648         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
13649         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13650         several redundant entries.
13652 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
13654         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
13655         type from "rtx" to "rtx_insn *".
13656         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
13657         for local "call_insn", removing cast.
13658         (ix86_expand_call): Likewise, introducing a "call_insn" local.
13660 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
13662         PR tree-optimization/86066
13663         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
13664         for BIT_INSERT_EXPR stores.
13666 2018-06-06  Richard Biener  <rguenther@suse.de>
13668         PR tree-optimization/86062
13669         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
13670         component refs ontop
13671         of to be offsetted base.
13673 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13675         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
13676         to be static and remove check on interrupt attribute name.
13678 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13680         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13681         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
13683 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
13685         PR target/79924
13686         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
13687         second argument.
13688         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
13689         Remove second argument, change how error is called.
13690         (aarch64_layout_arg): Remove second argument from
13691         aarch64_err_no_fpadvsimd call.
13692         (aarch64_init_cumulative_args): Ditto.
13693         (aarch64_gimplify_va_arg_expr): Ditto.
13694         * config/aarch64/aarch64.md (mov<mode>): Ditto.
13696 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
13698         * config/i386/i386.md (simple_return_indirect_internal): New expander.
13699         (*simple_return_indirect_internal<mode>): Rename from
13700         simple_return_indirect_internal.  Use W mode iterator.
13701         (rstorssp): New expander.
13702         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
13703         (clrssbsy): New expander.
13704         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
13706 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13708         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
13709         __typeof__.
13710         (cmse_check_pointed_object): Likewise.
13712 2018-06-05  Martin Liska  <mliska@suse.cz>
13714         PR gcov-profile/47618
13715         * doc/invoke.texi: Document how -fprofile-dir format
13716         is extended.
13718 2018-06-05  Richard Biener  <rguenther@suse.de>
13720         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
13721         removal pretend DOM info isn't available so we do not update
13722         it and only remove edges, not dominated blocks.  Actually free
13723         DOM info in case we removed something.  Remove unreachable blocks.
13724         (mfb_keep_latches): Work with either DOM info or marked backedges.
13725         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
13726         first.  Mark backedges if DOM info isn't available.
13727         (Re-)compute DOM info after cleanup_control_flow_pre.
13729 2018-06-05  Richard Biener  <rguenther@suse.de>
13731         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
13732         (locus_discrim_hasher::hash): Adjust.
13733         (locus_discrim_hasher::equal): Likewise.
13734         (next_discriminator_for_locus): Work on line directly.
13735         (same_line_p): Pass in expanded locus1 as well.
13736         (assign_discriminators): Avoid redundant location expansions.
13738 2018-06-05  Richard Biener  <rguenther@suse.de>
13740         PR tree-optimization/86046
13741         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
13742         if required after clearing TREE_ADDRESSABLE.
13744 2018-06-05  Richard Biener  <rguenther@suse.de>
13746         PR tree-optimization/86047
13747         * tree-ssa-loop.c (for_each_index): Glob handling of all
13748         decls and constants and really handle all of them.
13750 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13752         PR target/81497
13753         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
13754         qualifier_void_pointer and qualifier_const_void_pointer.
13755         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
13756         (arm_init_builtins): Handle the above.
13757         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
13758         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
13759         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
13760         void intrinsics.
13762 2018-06-05  Martin Liska  <mliska@suse.cz>
13764         * auto-profile.c (read_autofdo_file): Do not use
13765         gcov_ctr_summary struct.
13766         (afdo_callsite_hot_enough_for_early_inline): Likewise.
13767         * coverage.c (struct counts_entry): Likewise.
13768         (read_counts_file): Read just single summary entry.
13769         (get_coverage_counts): Use gcov_summary struct.
13770         * coverage.h (get_coverage_counts): Likewise.
13771         * gcov-dump.c (dump_working_sets): Likewise.
13772         (tag_summary): Dump just single summary.
13773         * gcov-io.c (gcov_write_summary): Write just histogram
13774         summary.
13775         (gcov_read_summary): Read just single summary.
13776         (compute_working_sets): Use gcov_summary struct.
13777         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
13778         of GCOV_COUNTERS_SUMMABLE.
13779         (GCOV_COUNTERS_SUMMABLE): Remove.
13780         (GCOV_FIRST_VALUE_COUNTER): Replace with
13781         GCOV_COUNTER_V_INTERVAL.
13782         (struct gcov_ctr_summary): Remove.
13783         (struct gcov_summary): Directly use fields of former
13784         gcov_ctr_summary.
13785         (compute_working_sets): Use gcov_summary struct.
13786         * gcov.c (read_count_file): Do not use ctrs fields.
13787         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
13788         struct.
13789         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
13790         struct.
13791         * profile.c: Likewise.
13792         * profile.h: Likewise.
13794 2018-06-05  Martin Liska  <mliska@suse.cz>
13796         PR gcov-profile/84846
13797         * gcov.c (output_lines): Print working directory only
13798         in intermediate format.
13800 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
13802         * config/s390/s390-builtin-types.def: Add void function type.
13803         * config/s390/s390-builtins.def: Use the function type for the
13804         tbeginc builtin.
13806 2018-06-04  Jim Wilson  <jimw@sifive.com>
13808         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
13809         to int.
13810         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
13811         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
13812         handle EH_RETURN_DATA_REGNO registers properly.
13813         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
13814         (riscv_expand_epilogue): Update comment.  Change argument name and
13815         type.  Update code to use new name and type.  Pass new args to
13816         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
13817         EXCEPTION_RETURN.
13818         * config/riscv/riscv.md (NORMAL_RETURN): New.
13819         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
13820         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
13821         (eh_return): Call gen_eh_return_internal and emit barrier.
13822         (eh_return_internal): Call riscv_expand_epilogue.
13824 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
13826         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
13827         bit_insertion field and declare can_be_merged_into method.
13828         (merged_store_group::can_be_merged_into): New method.
13829         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
13830         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
13831         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
13833 2018-06-04  Richard Biener  <rguenther@suse.de>
13835         PR tree-optimization/85955
13836         * builtins.c (fold_builtin_sincos): Convert pointers to
13837         destination to appropriate type before dereferencing.
13839 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
13841         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
13843 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
13845         * expr.c (expand_expr_real_1): Force the operand into memory if
13846         its TYPE_MODE is BLKmode and if there is no integer mode for
13847         the number of bits being extracted.
13849 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13851         PR target/85832
13852         PR target/86036
13853         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13854         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
13856 2018-06-04  Richard Biener  <rguenther@suse.de>
13858         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
13859         (cleanup_tree_cfg_noloop): ... single caller.  Do
13860         start_recording_case_labels later.
13862 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
13864         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
13865         to _IMMINTRIN_H_INCLUDED.
13866         * config/i386/pconfigintrin.h: Ditto.
13867         * config/i386/waitpkgintrin.h: Ditto.
13868         * config/i386/immintrin.h: Add includes for sgxintrin.h,
13869         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
13870         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
13871         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
13872         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
13873         waitpkgintrin.h and cldemoteintrin.h.
13875 2018-06-04  Richard Biener  <rguenther@suse.de>
13877         PR tree-optimization/86038
13878         * tracer.c (find_best_successor): Check probability for
13879         being initialized, bail out if not.
13881 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
13883         PR target/86003
13884         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
13885         of bits to ignore when comparing architectures.
13887 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
13889         PR tree-optimization/69615
13890         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13891         maximum or minimum of the type, try to merge it also as if
13892         range1 is + [-, x - 1] or + [x + 1, -].
13894         PR c++/86025
13895         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13897 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
13899         PR tree-optimization/86034
13900         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13901         the unsigned bitfield type in a bit insertion sequence if it does not
13902         have a larger precision than the bitfield size.
13903         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13905 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
13907         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13909 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13911         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13912         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13913         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13914         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13916 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
13918         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13919         Disable -fdelete-null-pointer-checks for ELF toolchain.
13921 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13922             Kito Cheng  <kito.cheng@gmail.com>
13924         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13925         (nds32le-*-*, nds32be-*-*): Integrate checking process.
13926         (nds32*-*-*): Add glibc and uclibc conditions.
13927         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13928         (TARGET_EXCEPT_UNWIND_INFO): Define.
13929         * config/nds32/elf.h: New file.
13930         * config/nds32/linux.h: New file.
13931         * config/nds32/nds32-elf.opt: New file.
13932         * config/nds32/nds32-linux.opt: New file.
13933         * config/nds32/nds32-fp-as-gp.c
13934         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13935         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13936         TARGET_LINUX_ABI.
13937         (nds32_asm_file_end): Ditto.
13938         (nds32_print_operand): Ditto.
13939         (nds32_insert_attributes): Ditto.
13940         (nds32_init_libfuncs): New function.
13941         (TARGET_HAVE_TLS): Define.
13942         (TARGET_INIT_LIBFUNCS): Define.
13943         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13944         spec content.
13945         (TARGET_ELF): Apply different mcmodel setting.
13946         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13947         been migrated into elf.h and linux.h files.
13948         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13949         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13950         (mcmodel): The content has been migrated into nds32-elf.opt and
13951         nds32-linux.opt files.
13952         * config/nds32/t-elf: New file.
13953         * config/nds32/t-linux: New file.
13955 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13956             Shiva Chen  <shiva0217@gmail.com>
13958         * config/nds32/constants.md (unspec_volatile_element): Add
13959         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13960         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13961         optimization.
13962         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13963         (make_pass_nds32_fp_as_gp): Declare.
13964         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13965         optmization pass.
13966         (nds32_asm_function_end_prologue): Remove unused asm output.
13967         (nds32_asm_function_begin_epilogue): Remove unused asm output.
13968         (nds32_asm_file_start): Output necessary fp_as_gp information.
13969         (nds32_option_override): Adjust register usage.
13970         (nds32_expand_prologue): Consider fp_as_gp situation.
13971         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13972         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13973         (epilogue): Ditto.
13974         (return): Ditto.
13975         (simple_return): Ditto.
13976         (omit_fp_begin): Output special directive for fp_as_gp.
13977         (omit_fp_end): Output special directive for fp_as_gp.
13978         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13979         mforbid-fp-as-gp): New options.
13981 2018-06-01  Mark Wielaard  <mark@klomp.org>
13983         * dwarf2out.c (dwarf2out_finish): Remove generation of
13984         DW_AT_loclists_base.
13986 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
13988         * gimple-ssa-store-merging.c: Include gimple-fold.h.
13989         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13990         (struct merged_store_group): Add bit_insertion field.
13991         (dump_char_array): Use standard hexadecimal format.
13992         (merged_store_group::merged_store_group): Set bit_insertion to false.
13993         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
13994         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
13995         also print the mask in the dump file.
13996         (pass_store_merging::gate): Minor tweak.
13997         (imm_store_chain_info::coalesce_immediate): Fix wrong association
13998         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
13999         stores with INTEGER_CST stores.
14000         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
14001         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
14002         and use it throughout.  Generate bit insertion sequences if need be.
14003         (pass_store_merging::process_store): Remove redundant condition.
14004         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
14006 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
14008         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
14009         the 128-bit floating point types.  Fix function comment.
14011 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14013         * config/aarch64/aarch64-simd.md
14014         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
14015         mnemonics.
14016         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
14017         mnemonics.
14019 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14021         PR tree-optimization/85989
14022         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
14023         variable.
14024         (backprop::intersect_uses): Check it when deciding whether this
14025         is a backedge reference.
14026         (backprop::process_block): Add each phi to m_visited_phis
14027         after visiting it, then clear it at the end.
14029 2018-06-01  Richard Biener  <rguenther@suse.de>
14031         * tree-vectorizer.h (vect_dr_stmt): New function.
14032         (vect_get_load_cost): Adjust.
14033         (vect_get_store_cost): Likewise.
14034         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
14035         Use vect_dr_stmt instead of DR_SMTT.
14036         (vect_record_base_alignments): Likewise.
14037         (vect_calculate_target_alignment): Likewise.
14038         (vect_compute_data_ref_alignment): Likewise and make static.
14039         (vect_update_misalignment_for_peel): Likewise.
14040         (vect_verify_datarefs_alignment): Likewise.
14041         (vector_alignment_reachable_p): Likewise.
14042         (vect_get_data_access_cost): Likewise.  Pass down
14043         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
14044         (vect_get_peeling_costs_all_drs): Likewise.
14045         (vect_peeling_hash_get_lowest_cost): Likewise.
14046         (vect_enhance_data_refs_alignment): Likewise.
14047         (vect_find_same_alignment_drs): Likewise.
14048         (vect_analyze_data_refs_alignment): Likewise.
14049         (vect_analyze_group_access_1): Likewise.
14050         (vect_analyze_group_access): Likewise.
14051         (vect_analyze_data_ref_access): Likewise.
14052         (vect_analyze_data_ref_accesses): Likewise.
14053         (vect_vfa_segment_size): Likewise.
14054         (vect_small_gap_p): Likewise.
14055         (vectorizable_with_step_bound_p): Likewise.
14056         (vect_prune_runtime_alias_test_list): Likewise.
14057         (vect_analyze_data_refs): Likewise.
14058         (vect_supportable_dr_alignment): Likewise.
14059         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
14060         (vect_gen_prolog_loop_niters): Likewise.
14061         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
14062         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
14063         modify DR_STMT.
14064         (vect_recog_mask_conversion_pattern): Likewise.
14065         (vect_try_gather_scatter_pattern): Likewise.
14066         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
14067         to vect_get_store_cost.
14068         (vect_get_store_cost): Get stmt_info instead of DR.
14069         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
14070         (vect_get_load_cost): Get stmt_info instead of DR.
14072 2018-06-01  Richard Biener  <rguenther@suse.de>
14074         PR middle-end/86017
14075         * gimple-fold.c (var_decl_component_p): Also allow offsetted
14076         vars wrapped in MEM_REFs.
14078 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
14080         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14081         Fix subreg tests so that we only return a choice between
14082         GENERAL_REGS and FP_REGS if the original classes included both.
14084 2018-06-01  Richard Biener  <rguenther@suse.de>
14086         PR ipa/85960
14087         * tree-ssa-structalias.c (get_function_part_constraint):
14088         Handle NULL fi->decl.
14089         (find_func_aliases_for_call): Properly handle indirect
14090         fi from direct call.
14091         (find_func_clobbers): Likewise.
14092         (ipa_pta_execute): Likewise.
14093         (create_variable_info_for): For functions that are ifunc_resolver
14094         resolve to a varinfo that contains the result of the resolver call.
14095         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
14096         aliases.
14098 2018-05-31  Michael Collison  <michael.collison@arm.com>
14100         * config/aarch64/aarch64.md:
14101         (*fix_to_zero_extenddfdi2): New pattern.
14102         * gcc.target/aarch64/fix_extend1.c: New testcase.
14104 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
14106         PR middle-end/78809
14107         PR middle-end/83026
14108         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
14109         and BUILT_IN_STRNCMP_EQ.
14110         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
14111         BUILT_IN_STRNCMP_EQ.
14112         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
14113         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14114         (gimple_fold_builtin): Likewise.
14115         * tree-ssa-strlen.c (compute_string_length): New function.
14116         (determine_min_obsize): New function.
14117         (handle_builtin_string_cmp): New function to handle calls to
14118         string compare functions.
14119         (strlen_optimize_stmt): Add handling to builtin string compare
14120         calls.
14121         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
14122         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
14123         * tree.c (build_common_builtin_nodes): Add new defines of
14124         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
14126 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
14128         PR target/85984
14129         * bb-reorder.c (pass_partition_blocks::gate): Return false for
14130         functions with naked attribute.
14132 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
14134         * config/i386/sse.md (avx_vec_concat<mode>):
14135         Substitute concat_tg_mode mode attribute with xtg_mode.
14136         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
14137         (concat_tg_mode): Remove mode attribute.
14139 2018-05-31  Martin Sebor  <msebor@redhat.com>
14141         PR c/82063
14142         * calls.c (alloc_max_size): Correct a logic error/typo.
14143         Treat excessive arguments as infinite.  Warn for invalid arguments.
14144         * doc/invoke.texi (-Walloc-size-larger-than): Update.
14146 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
14148         PR target/85829
14149         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
14150         and movx for Haswell.
14152 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
14153             Cesar Philippidis  <cesar@codesourcery.com>
14155         PR middle-end/85879
14156         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
14157         when emitting error on private/firstprivate reductions.
14158         * omp-low.c (lower_omp_target): Avoid reference-type processing
14159         on pointers for firstprivate clause.
14161 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14163         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
14164         (st1x2): Likewise.
14165         (st1x3): Likewise.
14166         * config/aarch64/aarch64-simd.md
14167         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
14168         (aarch64_ld1_x3_<mode>): Likewise
14169         (aarch64_st1x2<VALLDIF:mode>): Likewise
14170         (aarch64_st1_x2_<mode>): Likewise
14171         (aarch64_st1x3<VALLDIF:mode>): Likewise
14172         (aarch64_st1_x3_<mode>): Likewise
14173         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
14174         (vld1_s8_x3): Likewise.
14175         (vld1_u16_x3): Likewise.
14176         (vld1_s16_x3): Likewise.
14177         (vld1_u32_x3): Likewise.
14178         (vld1_s32_x3): Likewise.
14179         (vld1_u64_x3): Likewise.
14180         (vld1_s64_x3): Likewise.
14181         (vld1_f16_x3): Likewise.
14182         (vld1_f32_x3): Likewise.
14183         (vld1_f64_x3): Likewise.
14184         (vld1_p8_x3): Likewise.
14185         (vld1_p16_x3): Likewise.
14186         (vld1_p64_x3): Likewise.
14187         (vld1q_u8_x3): Likewise.
14188         (vld1q_s8_x3): Likewise.
14189         (vld1q_u16_x3): Likewise.
14190         (vld1q_s16_x3): Likewise.
14191         (vld1q_u32_x3): Likewise.
14192         (vld1q_s32_x3): Likewise.
14193         (vld1q_u64_x3): Likewise.
14194         (vld1q_s64_x3): Likewise.
14195         (vld1q_f16_x3): Likewise.
14196         (vld1q_f32_x3): Likewise.
14197         (vld1q_f64_x3): Likewise.
14198         (vld1q_p8_x3): Likewise.
14199         (vld1q_p16_x3): Likewise.
14200         (vld1q_p64_x3): Likewise.
14201         (vst1_s64_x2): Likewise.
14202         (vst1_u64_x2): Likewise.
14203         (vst1_f64_x2): Likewise.
14204         (vst1_s8_x2): Likewise.
14205         (vst1_p8_x2): Likewise.
14206         (vst1_s16_x2): Likewise.
14207         (vst1_p16_x2): Likewise.
14208         (vst1_s32_x2): Likewise.
14209         (vst1_u8_x2): Likewise.
14210         (vst1_u16_x2): Likewise.
14211         (vst1_u32_x2): Likewise.
14212         (vst1_f16_x2): Likewise.
14213         (vst1_f32_x2): Likewise.
14214         (vst1_p64_x2): Likewise.
14215         (vst1q_s8_x2): Likewise.
14216         (vst1q_p8_x2): Likewise.
14217         (vst1q_s16_x2): Likewise.
14218         (vst1q_p16_x2): Likewise.
14219         (vst1q_s32_x2): Likewise.
14220         (vst1q_s64_x2): Likewise.
14221         (vst1q_u8_x2): Likewise.
14222         (vst1q_u16_x2): Likewise.
14223         (vst1q_u32_x2): Likewise.
14224         (vst1q_u64_x2): Likewise.
14225         (vst1q_f16_x2): Likewise.
14226         (vst1q_f32_x2): Likewise.
14227         (vst1q_f64_x2): Likewise.
14228         (vst1q_p64_x2): Likewise.
14229         (vst1_s64_x3): Likewise.
14230         (vst1_u64_x3): Likewise.
14231         (vst1_f64_x3): Likewise.
14232         (vst1_s8_x3): Likewise.
14233         (vst1_p8_x3): Likewise.
14234         (vst1_s16_x3): Likewise.
14235         (vst1_p16_x3): Likewise.
14236         (vst1_s32_x3): Likewise.
14237         (vst1_u8_x3): Likewise.
14238         (vst1_u16_x3): Likewise.
14239         (vst1_u32_x3): Likewise.
14240         (vst1_f16_x3): Likewise.
14241         (vst1_f32_x3): Likewise.
14242         (vst1_p64_x3): Likewise.
14243         (vst1q_s8_x3): Likewise.
14244         (vst1q_p8_x3): Likewise.
14245         (vst1q_s16_x3): Likewise.
14246         (vst1q_p16_x3): Likewise.
14247         (vst1q_s32_x3): Likewise.
14248         (vst1q_s64_x3): Likewise.
14249         (vst1q_u8_x3): Likewise.
14250         (vst1q_u16_x3): Likewise.
14251         (vst1q_u32_x3): Likewise.
14252         (vst1q_u64_x3): Likewise.
14253         (vst1q_f16_x3): Likewise.
14254         (vst1q_f32_x3): Likewise.
14255         (vst1q_f64_x3): Likewise.
14256         (vst1q_p64_x3): Likewise.
14258 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14260         * config/msp430/msp430.c (msp430_output_labelref): Prepend
14261         user_label_prefix to name.
14263         * tree-core.h: Update comment about the format of NAME string
14264         passed to handler in attribute_spec.
14266         * config/msp430/msp430.md: Remove erroneous subreg expression from
14267         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
14268         zero_extend{q,h}isi2.
14270 2018-05-30  Borislav Petkov  <bp@suse.de>
14272         * doc/extend.texi: Document some architecture specific
14273         constraints and sort entries.
14275 2018-05-30  Martin Sebor  <msebor@redhat.com>
14277         PR middle-end/85369
14278         * builtins.c (expand_builtin_stpcpy_1): New function.
14279         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
14280         only if the former succeeds.
14282 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
14284         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
14285         in saphira.
14287 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14289         * doc/invoke.texi (-flinker-output): Document
14291 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14293         * passes.c (ipa_write_summaries): Only modify statements if body
14294         is in memory.
14295         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
14296         incrementally linking.
14297         (ipa_passes): Likewise.
14298         * lto-cgraph.c (lto_output_node): When incrementally linking do not
14299         pass down resolution info.
14300         * common.opt (flag_incremental_link): Update info.
14301         * gcc.c (plugin specs): Turn flinker-output=* to
14302         -plugin-opt=-linker-output-known
14303         * toplev.c (compile_file): Also cut compilation when doing incremental
14304         link.
14305         * flag-types. (enum lto_partition_model): Add
14306         LTO_LINKER_OUTPUT_NOLTOREL.
14307         (invoke.texi): Add -flinker-output docs.
14308         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
14309         link same way as WPA; do not stream in dead initializers.
14311         * dwarf2out.c (dwarf2out_die_ref_for_decl,
14312         darf2out_register_external_decl): Support incremental link.
14314 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14316         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
14318 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
14320         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
14321         it down to simple_object_copy_lto_debug_sections.
14322         (run_gcc): Determine incremental LTO link time and configure
14323         lto1 into non-wpa mode, disable renaming of debug sections.
14325 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14327         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14328         descriptions of various incorrectly documented functions.
14330 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14332         Revert:
14333         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14334         address check not strict.
14336 2018-05-30  Richard Biener  <rguenther@suse.de>
14338         PR tree-optimization/85964
14339         * tracer.c (better_p): Drop initialized count check, we only
14340         call the function with initialized counts now.
14341         (find_best_successor): Do find a best edge if one
14342         has uninitialized count.
14343         (find_best_predecessor): Likewise.  Do BB frequency check only
14344         if count is initialized.
14346 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
14348         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
14349         (aarch64_ldrstr_offset_compare): New.
14350         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
14351         load/store orderings.
14352         (aarch64_gen_adjusted_ldpstp): Likewise.
14354 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
14356         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
14357         Check for subset of GENERAL_REGS and FP_REGS.
14358         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
14359         r=w alternative.
14361 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
14363         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
14364         and wi::to_poly_offset.  Add the current offset and then check
14365         whether the sum fits, rather than using an unchecked addition of
14366         a checked term.  Check for a shwi rather than a uhwi.
14367         * expr.c (get_bit_range): Use tree_to_poly_uint64.
14368         (store_constructor): Use poly_int_tree_p.
14369         (expand_expr_real_1): Likewise.
14370         * function.c (assign_temp): Likewise.
14371         * fold-const.c (const_binop): Use poly_int_tree_p and
14372         wi::to_poly_offset.
14373         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
14374         division.
14375         * ipa-icf-gimple.c (func_checker::compare_operand): Use
14376         to_poly_offset for MEM offsets.
14377         * ipa-icf.c (sem_variable::equals): Likewise.
14378         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
14379         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
14380         wi::to_poly_offset for BIT_FIELD_REF offsets.
14381         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
14382         wi::to_poly_offset.
14383         * var-tracking.c (emit_note_insn_var_location): Use
14384         tree_to_poly_uint64.
14386 2018-05-29  Jim Wilson  <jimw@sifive.com>
14388         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
14390 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
14392         PR target/85950
14393         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
14394         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
14395         sequence.
14396         (sse4_1_round<mode>2): Use nonimmediate_operand
14397         for operand 1 predicate.
14399 2018-05-29  Martin Sebor  <msebor@redhat.com>
14400             Richard Biener  <rguenther@suse.de>
14402         PR testsuite/85888
14403         * calls.c (get_size_range): Call determine_value_range instead
14404         of get_value_range..
14405         * tree-vrp.h (determine_value_range): Declared new function.
14406         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
14408 2018-05-29  Richard Biener  <rguenther@suse.de>
14410         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
14411         sure to use non-pattern stmts for get_earlier_stmt arguments.
14412         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
14413         called on pattern stmts.
14414         (get_later_stmt): Likewise.
14416 2018-05-29  Martin Liska  <mliska@suse.cz>
14418         PR gcov-profile/85759
14419         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
14420         env variables.
14422 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
14424         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
14425         VEC_UNPACK_*_EXPR.
14426         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
14427         VEC_PACK_*_EXPR.
14429         PR target/85918
14430         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14431         VEC_PACK_FLOAT_EXPR): New tree codes.
14432         * tree-pretty-print.c (op_code_prio): Handle
14433         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14434         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14435         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14436         * tree-inline.c (estimate_operator_cost): Likewise.
14437         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
14438         * fold-const.c (const_binop): Likewise.
14439         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
14440         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
14441         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14442         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
14443         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
14444         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
14445         * expr.c (expand_expr_real_2): Likewise.
14446         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
14447         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
14448         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
14449         optabs.
14450         * optabs.c (expand_widen_pattern_expr): For
14451         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
14452         sign from result type rather than operand's type.
14453         (expand_binop_directly): For vec_packu_float_optab and
14454         vec_packs_float_optab allow result type to be different from operand's
14455         type.
14456         * optabs-tree.c (optab_for_tree_code): Handle
14457         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14458         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
14459         * tree-vect-generic.c (expand_vector_operations_1):  Handle
14460         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
14461         VEC_PACK_FLOAT_EXPR.
14462         * tree-vect-stmts.c (supportable_widening_operation): Handle
14463         FIX_TRUNC_EXPR.
14464         (supportable_narrowing_operation): Handle FLOAT_EXPR.
14465         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
14466         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
14467         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
14468         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
14469         mode attributes.
14470         (vec_pack<floatprefix>_float_<mode>): New expander.
14471         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
14472         attributes.
14473         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
14474         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
14475         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
14476         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
14477         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
14478         Document.
14479         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
14480         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
14481         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
14482         VEC_PACK_FLOAT_EXPR): Document.
14484 2018-05-29  Richard Biener  <rguenther@suse.de>
14486         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
14487         member.
14488         (stmt_vec_info_vec): Make pointer.
14489         (init_stmt_vec_info_vec): Remove.
14490         (free_stmt_vec_info_vec): Likewise.
14491         (set_stmt_vec_info_vec): New function.
14492         (free_stmt_vec_infos): Likewise.
14493         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
14494         (set_vinfo_for_stmt): Likewise.
14495         (get_earlier_stmt): Likewise.
14496         (get_later_stmt): Likewise.
14497         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
14498         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
14499         (vec_info::~vec_info): Free stmt_vec_infos.
14500         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
14501         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
14502         (pass_slp_vectorize::execute): Likewise.
14503         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
14504         (free_stmt_vec_info_vec): Likewise.
14505         (set_stmt_vec_info_vec): New function.
14506         (free_stmt_vec_infos): Likewise.
14507         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
14508         the global stmt_vec_info_vec.
14509         * tree-parloops.c (gather_scalar_reductions): Use
14510         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
14511         vector.
14513 2018-05-29  Richard Biener  <rguenther@suse.de>
14515         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
14517 2018-05-29  Martin Liska  <mliska@suse.cz>
14518             David Malcolm  <dmalcolm@redhat.com>
14520         * vec.c (test_reverse): New.
14521         (vec_c_tests): Add new test.
14522         * vec.h (vl_ptr>::reverse): New function.
14524 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
14526         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
14528         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
14529         and later.
14531 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14533         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
14535 2018-05-28  Richard Biener  <rguenther@suse.de>
14537         PR tree-optimization/85933
14538         * tree-vect-data-refs.c (vect_record_base_alignments): Only
14539         look at stmts marked as vectorizable.
14541 2018-05-28  Richard Biener  <rguenther@suse.de>
14543         PR tree-optimization/85934
14544         * tree-vect-generic.c (expand_vector_operations_1): Hoist
14545         vector boolean check before scalar optimization.
14547 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
14549         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
14550         for armv5te.
14552 2018-05-28  Mark Wielaard  <mark@klomp.org>
14554         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
14555         if it is an expression containing a minus sign.
14557 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
14559         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
14561 2018-05-27  Paul Koning  <ni1d@arrl.net>
14563         * config/pdp11/pdp11.md (truncsihi2): Remove.
14565 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
14566             Chung-Ju Wu  <jasonwucj@gmail.com>
14568         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
14569         implementation.
14570         (unaligned_store_dw): Ditto.
14571         * config/nds32/nds32-memory-manipulation.c
14572         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
14573         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
14574         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
14575         (emit_setmem_word_loop): Rename to ...
14576         (emit_setmem_doubleword_loop): ... this.
14577         (nds32_gen_dup_4_byte_to_word_value): New function.
14578         (nds32_gen_dup_8_byte_to_double_word_value): New function.
14579         (nds32_expand_setmem_loop): Refine implementation.
14580         (nds32_expand_setmem_loop_v3m): Ditto.
14581         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
14582         pattern.
14584 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14586         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
14588 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14590         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
14591         (nds32_init_machine_status): Initialize machine->attr_naked_p and
14592         machine->attr_no_prologue_p.
14593         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
14594         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
14595         (nds32_expand_epilogue): Consider attr_naked_p.
14596         (nds32_expand_epilogue_v3pop): Likewise.
14597         (nds32_can_use_return_insn): Likewise.
14598         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
14599         attr_no_prologue_p fields.
14600         * config/nds32/nds32.opt (mret-in-naked-func): New option.
14602 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
14604         PR target/85918
14605         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
14606         attributes.
14607         * config/i386/sse.md
14608         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
14609         Rename to ...
14610         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
14611         ... this.
14612         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
14613         Rename to ...
14614         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
14615         ... this.
14616         (*<floatsuffix>floatv2div2sf2): Rename to ...
14617         (*float<floatunssuffix>v2div2sf2): ... this.
14618         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
14619         (float<floatunssuffix>v2div2sf2_mask): ... this.
14620         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
14621         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
14622         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
14623         to ...
14624         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
14625         ... this.
14626         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14627         Rename to ...
14628         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
14629         ... this.
14630         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14631         Rename to ...
14632         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
14633         ... this.
14634         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
14635         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
14636         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
14637         gen_ufix_truncv8dfv8si2.
14638         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
14639         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
14640         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
14641         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
14642         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
14643         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
14644         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
14645         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
14647 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14649         PR target/85900
14650         PR target/85345
14651         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
14653 2018-05-25  Jim Wilson  <jimw@sifive.com>
14655         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
14656         * config/riscv/riscv.c (struct machine_function): Add
14657         interrupt_handler_p and attribute_checked_p fields.
14658         (riscv_attribute_table): Add interrupt.
14659         (riscv_interrupt_type_p): New.
14660         (riscv_save_reg_p): Save extra regs for interrupt handler.
14661         (riscv_use_save_libcall): Return false  for interrupt handler.
14662         (riscv_first_stack_step): Add forward declaration.
14663         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
14664         for interrupt handler with large frame.  Use it for saved reg list.
14665         (riscv_expand_prologue): Move flag_stack_usage_info support to
14666         eliminate duplication.
14667         (riscv_expand_epilogue): Generate mret for interrupt handler.
14668         (riscv_epilogue_uses): New.
14669         (riscv_can_use_return_insn): Return false for interrupt handler.
14670         (riscv_function_ok_for_sibcall): Likewise.
14671         (riscv_set_current_function): Add interrupt handler support.
14672         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
14673         * config/riscv/riscv.md (UNSPECV_MRET): New.
14674         (GP_REGNUM): New.
14675         (riscv_frflags, riscv_fsflags): Use tab after opcode.
14676         (riscv_mret): New.
14677         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
14679 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
14681         PR tree-optimization/85712
14682         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
14683         this candidate has already been replaced in-situ by a copy.
14685 2018-05-25  Jason Merrill  <jason@redhat.com>
14687         PR c++/80485 - inline function non-zero address.
14688         * symtab.c (nonzero_address): Check DECL_COMDAT.
14690 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
14692         PR target/83628
14693         * config/alpha/alpha.md (ashlsi3): New insn pattern.
14694         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
14695         extension of SImode operation.  Use const123_operand predicate.
14696         (*saddsi_1): Remove.
14697         (*saddl_se_1): Ditto.
14698         (*ssubsi_1): Ditto.
14699         (*ssubl_se_1): Ditto.
14700         * config/alpha/predicates.md (const123_operand): New predicate.
14701         * config/alpha/constraints.md (P): Use IN_RANGE.
14703 2018-05-25  Richard Biener  <rguenther@suse.de>
14705         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
14706         defaulted to true.
14707         (ref_maybe_used_by_stmt_p): Likewise.
14708         (stmt_may_clobber_ref_p): Likewise.
14709         (stmt_may_clobber_ref_p_1): Likewise.
14710         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
14711         and pass it along.
14712         (ref_maybe_used_by_stmt_p): Likewise.
14713         (stmt_may_clobber_ref_p): Likewise.
14714         (stmt_may_clobber_ref_p_1): Likewise.
14715         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
14716         the alias oracle to disambiguate DRs with stmts DR analysis
14717         couldn't handle.
14718         (vect_analyze_data_refs): Do not give up on not analyzable
14719         DRs for BB vectorization.  Remove code truncating the dataref
14720         vector.
14722 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
14724         PR target/85832
14725         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
14726         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
14727         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
14729 2018-05-25  Richard Biener  <rguenther@suse.de>
14731         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
14732         function, combining stmt data ref gathering and fatal analysis
14733         parts.
14734         (vect_analyze_data_refs): Remove now redudnant code and simplify.
14735         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
14736         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
14737         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
14738         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
14740 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14742         PR tree-optimization/85720
14743         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
14744         SCC if all partitions are builtins.
14745         (version_loop_by_alias_check): New parameter.  Generate cancelable
14746         runtime alias check if all partitions are builtins.
14747         (distribute_loop): Update call to above function.
14749 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14751         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
14752         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
14753         (parm_default_def_partition_arg): Ditto.
14754         (set_parm_default_def_partition): Ditto.
14755         (get_parm_default_def_partitions): Ditto and make it static.
14756         (get_undefined_value_partitions): Ditto and make it static.
14757         (remove_ssa_form): Refactor call to init_var_map here.
14758         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
14759         computation for loop region.
14760         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
14761         (register_default_def): Delete.
14762         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
14763         (parm_default_def_partition_arg): Ditto.
14764         (set_parm_default_def_partition): Ditto.
14765         (get_parm_default_def_partitions): Ditto and make it static.
14766         (get_undefined_value_partitions): Ditto and make it static.
14767         (coalesce_with_default, coalesce_with_default): Update comment.
14768         (create_coalesce_list_for_region): New func factored out from
14769         create_outofssa_var_map.
14770         (populate_coalesce_list_for_outofssa): New func factored out from
14771         create_outofssa_var_map and coalesce_ssa_name.
14772         (create_outofssa_var_map): Delete.
14773         (coalesce_ssa_name): Refactor to support live range computation.
14774         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
14775         (get_parm_default_def_partitions): Delete.
14776         (get_undefined_value_partitions): Ditto.
14777         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
14778         computation for loop region.
14779         (new_tree_live_info, loe_visit_block): Ditto.
14780         (live_worklist, set_var_live_on_entry): Ditto.
14781         (calculate_live_on_exit, verify_live_on_entry): Ditto.
14782         * tree-ssa-live.h (struct _var_map): New fields.
14783         (init_var_map): Change decl.
14784         (region_contains_p): New.
14786 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
14788         * tree-ssa-live.h (live_merge_and_clear): Delete.
14790 2018-05-25  Richard Biener  <rguenther@suse.de>
14792         PR c++/85912
14793         * tree-dump.c (dequeue_and_dump): Remove access to removed
14794         operand 2 of a SWITCH_EXPR.
14796 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14798         * doc/sourcebuild.texi (vect_double_cond_arith): Include
14799         multiplication and division.
14800         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
14801         (cond_udiv@var{m}, cond_umod@var{m}): Document.
14802         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
14803         (cond_udiv_optab, cond_umod_optab): New optabs.
14804         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
14805         (IFN_COND_RDIV): New internal functions.
14806         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
14807         TRUNC_MOD_EXPR and RDIV_EXPR.
14808         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
14809         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
14810         New unspecs.
14811         (SVE_INT_BINARY): Include mult.
14812         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
14813         (optab, sve_int_op): Handle mult.
14814         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
14815         UNSPEC_COND_DIV.
14816         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
14817         for SVE_INT_BINARY_SD.
14819 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14821         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
14822         (optab, sve_int_op): Handle div and udiv.
14823         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
14824         for SVE_INT_BINARY_SD.
14825         (*<optab><mode>3): New insn for the same.
14827 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14829         * tree-vect-patterns.c: Include predict.h.
14830         (vect_recog_divmod_pattern): Restrict check for division support
14831         to when optimizing for size.
14833 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14835         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
14836         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
14837         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
14838         (gimple_match_op::set_op): Likewise.
14839         (gimple_resimplify4): Declare.
14840         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
14841         (expr::gen_transform): Likewise.
14842         (decision_tree::gen): Generate a simplification routine for 4 operands.
14843         * gimple-match-head.c (gimple_simplify): Add an overload for
14844         4 operands.  In the top-level function, handle up to 4 call
14845         arguments and call gimple_resimplify4.
14846         (gimple_resimplify4): New function.
14847         (build_call_internal): Pass a fourth operand.
14848         (maybe_push_to_seq): Likewise.
14849         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
14850         Fold VEC_COND_EXPRs of an operation and a default value into
14851         an IFN_COND_* function if possible.
14852         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
14853         New unspecs.
14854         (SVE_COND_FP_BINARY): Include them.
14855         (optab, sve_fp_op): Handle them.
14856         (SVE_INT_BINARY_REV): New code iterator.
14857         (SVE_COND_FP_BINARY_REV): New int iterator.
14858         (commutative): New int attribute.
14859         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
14860         Declare.
14861         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
14862         function.
14863         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
14864         (*cond_<optab><mode>): New patterns for reversed operands.
14866 2018-05-25  Richard Biener  <rguenther@suse.de>
14868         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
14869         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
14870         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
14871         (STMT_VINFO_GROUPED_ACCESS): Adjust.
14872         * tree-vect-data-refs.c (everywhere): Adjust users.
14873         * tree-vect-loop.c (everywhere): Likewise.
14874         * tree-vect-slp.c (everywhere): Likewise.
14875         * tree-vect-stmts.c (everywhere): Likewise.
14876         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
14878 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14880         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
14881         Rename to...
14882         (gcc_cv_as_section_exclude): ... this.
14883         Try Solaris as #exclude syntax.
14884         * configure: Regenerate.
14885         * config.in: Regenerate.
14886         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14887         SECTION_EXCLUDE.
14888         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14889         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14891         * varasm.c (default_elf_asm_named_section): Don't check if
14892         HAVE_GAS_SECTION_EXCLUDE is defined.
14894 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14896         * doc/md.texi: Update the documentation of the cond_* optabs
14897         to mention the new final operand.  Fix GET_MODE_NUNITS call.
14898         Describe the scalar case too.
14899         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14900         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14901         instead of 2.
14902         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14903         (get_conditional_internal_fn): Update comment.
14904         * tree-vect-loop.c (vectorizable_reduction): Pass the original
14905         accumulator value as a final argument to conditional functions.
14906         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14907         a define_expand and add an "else" operand.  Assert for now that
14908         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
14909         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14910         (*cond_<optab><mode>): New patterns.
14911         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14912         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14913         (UNSPEC_COND_EOR): Delete.
14914         (optab): Remove associated mappings.
14915         (SVE_INT_BINARY): New code iterator.
14916         (sve_int_op): Remove int attribute and add "minus" to the code
14917         attribute.
14918         (SVE_COND_INT_OP): Delete.
14919         (SVE_COND_FP_OP): Rename to...
14920         (SVE_COND_FP_BINARY): ...this.
14922 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
14924         * optabs.c (can_reuse_operands_p): New function.
14925         (maybe_legitimize_operands): Try to reuse the results for
14926         earlier operands.
14928 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14930         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14931         Add {q} suffix to insn mnemonic.
14933 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14935         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14936         (msp430_warn_func_return): New.
14938 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
14940         * fold-const.c (tree_nonzero_bits): New function.
14941         * fold-const.h (tree_nonzero_bits): Likewise.
14942         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14943         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14945 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
14947         PR target/85900
14948         PR target/85345
14949         * varasm.c (assemble_alias): Check ifunc_resolver only on
14950         FUNCTION_DECL.
14952 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
14954         PR target/85903
14955         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14956         when memory input operand is handled.
14958 2018-05-24  Luis Machado  <luis.machado@linaro.org>
14960         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14961         global.
14962         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14964 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14966         * match.pd: Delay FMA folds until after vectorization.
14968 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14970         PR target/83009
14971         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14972         address check not strict.
14974 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
14976         * gimple-match.h (gimple_match_op): New class.
14977         (mprts_hook): Replace parameters with a gimple_match_op *.
14978         (maybe_build_generic_op): Likewise.
14979         (gimple_simplified_result_is_gimple_val): Replace parameters with
14980         a const gimple_match_op *.
14981         (gimple_simplify): Replace code_helper * and tree * parameters with
14982         a gimple_match_op * parameter.
14983         (gimple_resimplify1): Replace code_helper *, tree and tree *
14984         parameters with a gimple_match_op * parameter.
14985         (gimple_resimplify2): Likewise.
14986         (gimple_resimplify3): Likewise.
14987         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14988         parameters with a gimple_match_op * parameter.
14989         * gimple-match-head.c (gimple_simplify): Change prototypes of
14990         auto-generated functions to take a gimple_match_op * instead of
14991         separate code_helper * and tree * parameters.  Make the same
14992         change in the top-level overload and update calls to the
14993         gimple_resimplify routines.  Update calls to the auto-generated
14994         functions and to maybe_push_res_to_seq in the publicly-facing
14995         operation-specific gimple_simplify overloads.
14996         (gimple_match_op::MAX_NUM_OPS): Define.
14997         (gimple_resimplify1): Replace rcode and ops with a single res_op
14998         parameter.  Update call to gimple_simplify.
14999         (gimple_resimplify2): Likewise.
15000         (gimple_resimplify3): Likewise.
15001         (mprts_hook): Replace parameters with a gimple_match_op *.
15002         (maybe_build_generic_op): Likewise.
15003         (build_call_internal): Replace type, nargs and ops with
15004         a gimple_match_op *.
15005         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
15006         with a single gimple_match_op *.  Update calls to mprts_hook,
15007         build_call_internal and gimple_simplified_result_is_gimple_val.
15008         Factor out code that is common to the tree_code and combined_fn cases.
15009         * genmatch.c (expr::gen_transform): Replace tem_code and
15010         tem_ops with a gimple_match_op called tem_op.  Update calls
15011         to the gimple_resimplify functions and maybe_push_res_to_seq.
15012         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
15013         res_ops.  Update call to the gimple_resimplify functions.
15014         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
15015         (decision_tree::gen): Make the functions take a gimple_match_op *
15016         called res_op instead of separate res_code and res_ops parameters.
15017         Update call accordingly.
15018         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
15019         and ops with a single res_op parameter.  Update calls to
15020         maybe_build_generic_op and maybe_push_res_to_seq.
15021         (fold_stmt_1): Update calls to gimple_simplify and
15022         replace_stmt_with_simplification.
15023         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
15024         and gimple_simplified_result_is_gimple_val.
15025         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
15026         gimple_simplify.
15027         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
15028         with a gimple_match_op *.
15029         (vn_nary_build_or_lookup): Likewise.  Update call to
15030         vn_nary_build_or_lookup_1.
15031         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
15032         gimple_match_op *.  Update calls to the gimple_resimplify routines
15033         and to gimple_simplified_result_is_gimple_val.
15034         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
15035         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
15036         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
15037         (visit_nary_op): Likewise.
15038         (visit_reference_op_load): Likewise.
15040 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15042         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
15043         modifier for printing the step amount.
15045 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
15047         PR target/78849
15048         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
15049         types.
15051 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
15053         * doc/sourcebuild.texi (Endianness): New subsubsection.
15055 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15057         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15058         <prefetch_dynamic_strides>: New const bool field.
15059         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15060         prefetch_dynamic_strides.
15061         (exynosm1_prefetch_tune): Likewise.
15062         (thunderxt88_prefetch_tune): Likewise.
15063         (thunderx_prefetch_tune): Likewise.
15064         (thunderx2t99_prefetch_tune): Likewise.
15065         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
15066         false.
15067         (aarch64_override_options_internal): Update to set
15068         PARAM_PREFETCH_DYNAMIC_STRIDES.
15069         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15070         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15071         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15072         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15073         prefetch-dynamic-strides setting.
15075 2018-05-23  Luis Machado  <luis.machado@linaro.org>
15077         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15078         <minimum_stride>: New const int field.
15079         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15080         minimum_stride field defaulting to -1.
15081         (exynosm1_prefetch_tune): Likewise.
15082         (thunderxt88_prefetch_tune): Likewise.
15083         (thunderx_prefetch_tune): Likewise.
15084         (thunderx2t99_prefetch_tune): Likewise.
15085         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
15086         <default_opt_level>: Set to 3.
15087         (aarch64_override_options_internal): Update to set
15088         PARAM_PREFETCH_MINIMUM_STRIDE.
15089         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15090         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15091         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15092         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15093         stride is constant and is below the minimum stride threshold.
15095 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15097         * config/arm/arm-cpus.in (mode26): Delete.
15098         (armv4): Delete mode26 reference.
15099         * config/arm/arm.c (arm_configure_build_target): Delete use of
15100         isa_bit_mode26.
15102 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15104         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
15105         New insn pattern.
15106         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
15107         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
15108         for non-SSE modes.
15109         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
15110         (floatunsdidf2): Ditto.
15112 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
15114         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
15115         (fixuns_trunc<mode>si2_avx512f): Ditto.
15116         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
15117         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
15118         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
15120 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15122         PR rtl-optimization/79985
15123         * df-scan.c (df_insn_refs_collect): Remove special case for
15124         global registers and asm statements.
15126 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
15128         * extend.texi (Global Register Variables): Rewrite the bullet list.
15129         Note that the register is available for allocation. Note that access
15130         via inline asm must use constraints. Add note about async-signal
15131         handlers. Remove paragraph about automagic register selection.
15133 2018-05-23  Richard Biener  <rguenther@suse.de>
15135         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
15136         of fixed offset from memset VN.
15138 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
15140         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
15141         first_interp field.
15142         (alloc_cand_and_find_basis): Initialize first_interp field.
15143         (slsr_process_mul): Modify first_interp field.
15144         (slsr_process_add): Likewise.
15145         (slsr_process_cast): Modify first_interp field for each new
15146         interpretation.
15147         (slsr_process_copy): Likewise.
15148         (dump_candidate): Dump first_interp field.
15149         (replace_mult_candidate): Process all interpretations, not just
15150         subsequent ones.
15151         (replace_rhs_if_not_dup): Likewise.
15152         (replace_one_candidate): Likewise.
15154 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
15156         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
15157         Add new boolean.
15158         (aarch64_needs_frame_chain): New function.
15159         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
15161 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
15163         PR target/84882
15164         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
15165         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
15166         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
15167         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
15168         as true for strict-align.
15169         (aarch64_can_inline_p): Perform checks even when callee has no
15170         attributes to check for strict alignment.
15171         * doc/extend.texi (AArch64 Function Attributes): Document
15172         no-strict-align.
15173         * doc/invoke.texi: (AArch64 Options): Likewise.
15175 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
15177         PR tree-optimization/85853
15178         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
15179         the handling of the root of the node to...
15180         (vect_slp_analyze_node_operations_1): ...this new function,
15181         and run the whole thing with the child nodes' def types
15182         set according to their SLP node's def type.
15184 2018-05-23  Richard Biener  <rguenther@suse.de>
15186         PR middle-end/85874
15187         * tree-data-ref.c (create_runtime_alias_checks): Defer
15188         and ignore overflow warnings.
15190 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
15192         PR tree-optimization/85822
15193         * tree-vrp.c (is_masked_range_test): Fix handling of negative
15194         constants.
15196 2018-05-23  Richard Biener  <rguenther@suse.de>
15198         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15199         memset constants via native_interpret_expr.
15201 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
15203         PR target/85345
15204         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
15205         attribute.
15206         (cgraph_node::create_alias): Likewise.
15207         (cgraph_node::get_availability): Check ifunc_resolver instead
15208         of looking up ifunc attribute.
15209         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
15210         * varasm.c (do_assemble_alias): Likewise.
15211         (assemble_alias): Likewise.
15212         (default_binds_local_p_3): Likewise.
15213         * cgraph.h (cgraph_node): Add ifunc_resolver.
15214         (cgraph_node::only_called_directly_or_aliased_p): Return false
15215         for IFUNC resolver.
15216         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
15217         attribute.
15218         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
15219         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
15220         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
15221         instead of looking up ifunc attribute.
15223 2018-05-22  Luis Machado  <luis.machado@linaro.org>
15225         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
15227 2018-05-22  Martin Sebor  <msebor@redhat.com>
15229         PR middle-end/85359
15230         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
15231         only when expasion succeeds.
15232         (expand_builtin_strcmp): Same.
15233         (expand_builtin_strncmp): Same.
15235 2018-05-22  Martin Sebor  <msebor@redhat.com>
15237         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
15239 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15240             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15242         * config/aarch64/aarch64-ldpstp.md: Replace uses of
15243         aarch64_mem_pair_operand with memory_operand and delete operand swapping
15244         code.
15245         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15246         Add check for legitimate_address.
15247         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
15248         (aarch64_swap_ldrstr_operands): New.
15249         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
15250         Define prototype.
15252 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
15253             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15255         * config/aarch64/aarch64.md: New patterns to generate stp
15256         and ldp.
15257         (store_pair_sw, store_pair_dw): New patterns to generate stp for
15258         single words and double words.
15259         (load_pair_sw, load_pair_dw): Likewise.
15260         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
15261         Delete.
15262         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
15263         Delete.
15264         * config/aarch64/aarch64-ldpstp.md: Modify peephole
15265         for different mode ldpstp and add peephole for merged zero stores.
15266         Likewise for loads.
15267         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
15268         Add size check.
15269         (aarch64_gen_store_pair): Rename calls to match new patterns.
15270         (aarch64_gen_load_pair): Rename calls to match new patterns.
15271         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
15272         (load_pair<DREG:mode><DREG2:mode>): ... This.
15273         (store_pair<mode>): Rename to...
15274         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
15275         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
15276         New mode iterators.
15277         (V_INT_EQUIV): Handle SImode.
15278         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
15279         New predicate.
15281 2018-05-22  Martin Sebor  <msebor@redhat.com>
15283         PR c/85623
15284         * calls.c (maybe_warn_nonstring_arg): Use string length to set
15285         or ajust the presumed bound on an operation to avoid unnecessary
15286         warnings.
15288 2018-05-22  Martin Sebor  <msebor@redhat.com>
15290         PR tree-optimization/85826
15291         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
15292         assuming that a DECL necesarily has a constant size.
15294 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
15296         PR middle-end/85862
15297         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
15299 2018-05-22  Richard Biener  <rguenther@suse.de>
15301         PR tree-optimization/85834
15302         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
15303         non-constant and non-zero memset arguments.
15305 2018-05-22  Martin Liska  <mliska@suse.cz>
15307         PR ipa/85607
15308         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
15310 2018-05-22  Richard Biener  <rguenther@suse.de>
15312         PR tree-optimization/85863
15313         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
15314         comparisons when vectype is specified.
15315         (vectorizable_condition): Do not specify vectype for
15316         vect_is_simple_cond when SLP vectorizing.
15318 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
15320         PR target/85657
15321         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
15322         define __ibm128 as long double.
15323         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
15324         as a distinct type when IEEE 128-bit support is enabled.
15325         (init_float128_ieee): Fix up conversions between IFmode and IEEE
15326         128-bit types to use the correct functions.
15327         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
15328         convert between 128-bit floating point types that have different
15329         modes but the same representation, instead of using gen_lowpart to
15330         makean alias.
15331         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
15332         KFmode.
15333         (IFKF_reg): New attributes to give the register constraints for
15334         IFmode and KFmode.
15335         (extend<mode>tf2_internal): New insns to mark an explicit
15336         conversion between 128-bit floating point types that have a
15337         different mode but share the same representation.
15339 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
15341         PR tree-optimization/85814
15342         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
15343         a null return from get_strinfo when unsharing the next
15344         strinfo in the chain.
15346 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
15348         PR gcc/84923
15349         * varasm.c (weak_finish): Clean up weak_decls.
15351 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15353         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
15354         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
15355         UNSPEC_UADALP values.
15356         * config/aarch64/iterators.md (ABAL): New int iterator.
15357         (ABDL2): Likewise.
15358         (ADALP): Likewise.
15359         (sur): Add mappings for the above.
15360         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
15361         New define_insn.
15362         (aarch64_<sur>abal<mode>_4): Likewise.
15363         (aarch64_<sur>adalp<mode>_3): Likewise.
15364         (<sur>sadv16qi): New define_expand.
15366 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
15368         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
15369         (*movdf_internal): Ditto.
15370         (*rcpsf2_sse): Ditto.
15371         (*rsqrtsf2_sse): Ditto.
15372         (*sqrt<mode>2_sse): Ditto.
15374 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
15376         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
15377         eor3q<mode>4.
15378         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
15379         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
15380         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
15381         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
15382         vbcaxq_s64): New.
15383         * config/aarch64/arm_neon.h: Likewise.
15384         * config/aarch64/iterators.md (VQ_I): New.
15386 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
15388         * config.gcc: Add arc/t-multilib-linux to tmake_file for
15389         arc*-*-linux*.
15390         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
15391         MULTILIB_DIRNAMES
15393 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15395         * config/nds32/constraints.md (S): New constraint.
15396         * config/nds32/nds32.md (call_internal): Use constraint S.
15397         (call_value_internal): Likewise.
15398         (sibcall_internal): Likewise.
15399         (sibcall_value_internal): Likewise.
15401 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15402             Chung-Ju Wu  <jasonwucj@gmail.com>
15404         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
15405         into consideration.
15407 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
15408             Chung-Ju Wu  <jasonwucj@gmail.com>
15410         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
15411         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
15412         (nds32_rtx_costs_impl): Simplify.
15413         (nds32_address_cost_impl): Simplify.
15414         (nds32_init_rtx_costs): New function.
15415         (nds32_rtx_costs_speed_prefer): Likewise.
15416         (nds32_rtx_costs_size_prefer): Likewise.
15417         (nds32_address_cost_speed_prefer): Likewise.
15418         (nds32_address_cost_speed_fwprop): Likewise.
15419         (nds32_address_cost_size_prefer): Likewise.
15420         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
15421         * config/nds32/nds32.c (nds32_option_override): Use
15422         nds32_init_rtx_costs function.
15424 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
15426         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
15427         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
15428         (TARGET_PIPELINE_N8): Likewise.
15429         (TARGET_PIPELINE_N10): Likewise.
15430         (TARGET_PIPELINE_N13): Likewise.
15431         (TARGET_PIPELINE_GRAYWOLF): Likewise.
15433 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
15435         * config/nds32/nds32-fpu.md: Update copyright year.
15437 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15439         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
15441 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15443         * config/nds32/nds32.c
15444         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
15445         * config/nds32/nds32.opt (minline-asm-r15): New option.
15447 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15449         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
15450         MASK_HW_ABS.
15451         * config/nds32/nds32.md (abssi2): New pattern.
15453 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
15455         * config/i386/i386.md (rex64namesuffix): New mode attribute.
15456         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
15457         Merge insn pattern from sse_cvtsi2ss<round_name> and
15458         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
15459         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
15460         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
15461         using SWI48 mode iterator.
15462         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
15463         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
15464         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
15465         pattern from sse_cvttss2si<round_saeonly_name>
15466         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
15467         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
15468         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
15469         using SWI48 mode iterator.
15470         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
15471         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
15472         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
15473         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
15474         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
15475         using SWI48 mode iterator.
15476         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
15477         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
15478         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
15479         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
15480         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
15481         SWI48 mode iterator.
15482         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
15483         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
15484         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
15485         pattern from sse_cvttsd2si<round_saeonly_name>
15486         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
15488 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15490         * config/nds32/nds32-md-auxiliary.c
15491         (nds32_valid_smw_lwm_base_p): Refine.
15492         (nds32_output_smw_single_word): Refine.
15493         (nds32_output_smw_double_word): New.
15494         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
15496 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15498         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
15499         (nds32_output_stack_pop): Refine.
15500         (nds32_expand_unaligned_load): Refine.
15501         (nds32_expand_unaligned_store): Refine.
15503 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
15504             Chung-Ju Wu  <jasonwucj@gmail.com>
15506         * config/nds32/constants.md: Add TP_REGNUM constant.
15507         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
15508         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
15509         UNSPEC_ADD32.
15510         * config/nds32/nds32-doubleword.md: Consider flag_pic.
15511         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
15512         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
15513         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
15514         and PIC code generation.
15515         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
15516         code generation.
15517         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
15518         optimization.
15519         * config/nds32/nds32.md: Support TLS and PIC.
15520         * config/nds32/nds32.c: Support TLS and PIC.
15521         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
15522         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
15523         predicate.
15525 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
15527         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
15528         mode with E_ prefix.
15530 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
15531             Chung-Ju Wu  <jasonwucj@gmail.com>
15533         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
15534         * config/nds32/nds32-md-auxiliary.c
15535         (symbolic_reference_mentioned_p): New.
15536         (nds32_legitimize_ict_address): New.
15537         (nds32_expand_ict_move): New.
15538         (nds32_indirect_call_referenced_p): New.
15539         (nds32_symbol_binds_local_p): Delete.
15540         (nds32_long_call_p): Modify.
15541         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
15542         * config/nds32/nds32-protos.h
15543         (symbolic_reference_mentioned_p): Declare.
15544         (nds32_legitimize_ict_address): Declare.
15545         (nds32_expand_ict_move): Declare.
15546         (nds32_indirect_call_referenced_p): Declare.
15547         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
15548         (nds32_relax_group): Use nds32_ict_const_p as condition.
15549         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
15550         (nds32_asm_file_start): Output ict_model directive in asm code.
15551         (nds32_legitimate_address_p): Consider indirect call.
15552         (nds32_print_operand): Consider indirect call.
15553         (nds32_print_operand_address): Consider indirect call.
15554         (nds32_insert_attributes): Handle "indirect_call" attribute.
15555         (TARGET_LEGITIMATE_ADDRESS_P): Define.
15556         (TARGET_LEGITIMATE_CONSTANT_P): Define.
15557         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
15558         (TARGET_DELEGITIMIZE_ADDRESS): Define.
15559         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
15560         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
15561         (TARGET_ICT_MODEL_SMALL): Define.
15562         (TARGET_ICT_MODEL_LARGE): Define.
15563         * config/nds32/nds32.md (movsi): Consider ict model.
15564         (call, call_value): Consider ict model.
15565         (sibcall, sibcall_value): Consider ict model.
15566         * config/nds32/nds32.opt (mict-model): New option.
15567         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
15568         model.
15570 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
15571             Monk Chiang  <sh.chiang04@gmail.com>
15572             Jim Wilson <jimw@sifive.com>
15574         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
15575         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
15576         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
15577         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
15578         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
15579         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
15580         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
15581         compute save_libcall_adjustment properly.
15582         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
15583         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
15584         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
15585         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
15586         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
15587         (ABI_SPEC): Handle mabi=ilp32e.
15588         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
15589         (RVE): Add RVE mask.
15590         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
15591         <-march>: Add rv32e as an example.
15593 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
15595         PR c++/82899
15596         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
15597         (intra_create_variable_infos): Handle C++ constructors.
15599 2018-05-18  Martin Liska  <mliska@suse.cz>
15601         * passes.def: Remove a redundant pass.
15603 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
15605         PR bootstrap/85838
15606         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
15608 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15610         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
15611         (ARMv4): Update.
15612         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
15613         (ARMv6m): Update.
15614         (armv2, armv2a, armv3, armv3m): Delete architectures.
15615         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
15616         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
15617         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
15618         Delete cpus.
15619         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
15620         (*mulsidi3adddi): Likewise.
15621         (mulsidi3): Likewise.
15622         (*mulsidi3_nov6): Likewise.
15623         (umulsidi3): Likewise.
15624         (umulsidi3_nov6): Likewise.
15625         (umaddsidi4): Likewise.
15626         (*umulsidi3adddi): Likewise.
15627         (smulsi3_highpart): Likewise.
15628         (*smulsi3_highpart_nov6): Likewise.
15629         (umulsi3_highpart): Likewise.
15630         (*umulsi3_highpart_nov6): Likewise.
15631         * config/arm/arm.h (arm_arch3m): Delete.
15632         * config/arm/arm.c (arm_arch3m): Delete.
15633         (arm_option_override_internal): Update armv3-related comment.
15634         (arm_configure_build_target): Delete use of isa_bit_mode32.
15635         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
15636         (arm_rtx_costs_internal): Delete check of arm_arch3m.
15637         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
15638         (mulsa3): Likewise.
15639         (mulusa3): Likewise.
15640         * config/arm/arm-protos.h (arm_arch3m): Delete.
15641         * config/arm/arm-tables.opt: Regenerate.
15642         * config/arm/arm-tune.md: Likewise.
15643         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
15644         deleted architectures.
15646 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15648         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
15649         (armv5t, armv5te): New features.
15650         (ARMv5, ARMv5e): Delete fgroups.
15651         (ARMv5t, ARMv5te): Adjust for above changes.
15652         (ARMv6m): Likewise.
15653         (armv5, armv5e): Delete arches.
15654         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
15655         arm_arch5.
15656         (*call_reg_arm): Likewise.
15657         (*call_value_reg_armv5): Likewise.
15658         (*call_value_reg_arm): Likewise.
15659         (*call_symbol): Likewise.
15660         (*call_value_symbol): Likewise.
15661         (*sibcall_insn): Likewise.
15662         (*sibcall_value_insn): Likewise.
15663         (clzsi2): Likewise.
15664         (prefetch): Likewise.
15665         (define_split and define_peephole2 dependent on arm_arch5):
15666         Likewise.
15667         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
15668         arm_arch5e.
15669         (TARGET_ARM_QBIT): Likewise.
15670         (TARGET_DSP_MULTIPLY): Likewise.
15671         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
15672         (arm_arch5, arm_arch5e): Delete.
15673         (arm_arch5t, arm_arch5te): Declare.
15674         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
15675         (arm_arch5t): Declare.
15676         (arm_option_reconfigure_globals): Update for the above.
15677         (arm_options_perform_arch_sanity_checks): Update comment, replace
15678         use of arm_arch5 with arm_arch5t.
15679         (use_return_insn): Likewise.
15680         (arm_emit_call_insn): Likewise.
15681         (output_return_instruction): Likewise.
15682         (arm_final_prescan_insn): Likewise.
15683         (arm_coproc_builtin_available): Likewise.
15684         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
15685         arm_arch5e with arm_arch5t and arm_arch5te.
15686         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
15687         (arm_arch5t, arm_arch5te): Declare.
15688         * config/arm/arm-tables.opt: Regenerate.
15689         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
15690         * config/arm/t-multilib: Likewise.
15691         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
15692         instead of arm_arch5.
15693         (*call_reg_thumb1): Likewise.
15694         (*call_value_reg_thumb1_v5): Likewise.
15695         (*call_value_reg_thumb1): Likewise.
15696         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
15697         unreachable path.
15698         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
15700 2018-05-18  Martin Liska  <mliska@suse.cz>
15702         PR gcov-profile/84846
15703         * doc/gcov.texi: Document -t option of gcov tool.
15705 2018-05-18  Martin Liska  <mliska@suse.cz>
15707         PR gcov-profile/84846
15708         * gcov.c (print_usage): Add new -t option.
15709         (process_args): Handle the option.
15710         (generate_results): Use stdout as output when requested by
15711         the option.
15713 2018-05-18  Martin Liska  <mliska@suse.cz>
15715         PR gcov-profile/84846
15716         * coverage.c (coverage_init): Write PWD to .gcno file.
15717         * doc/gcov.texi: Document how working directory is printed.
15718         * gcov-dump.c (dump_gcov_file): Print PWD.
15719         * gcov.c (output_intermediate_file): Likewise.
15720         (read_graph_file): Read PWD string.
15721         (output_lines): Print PWD.
15723 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15725         PR middle-end/85817
15726         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
15727         for retval and return false if all args to phi are zero.
15729 2018-05-18  Richard Biener  <rguenther@suse.de>
15731         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
15732         method.
15733         (evrp_dom_walker::before_dom_children): Call it.
15735 2018-05-18  Richard Biener  <rguenther@suse.de>
15737         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
15738         results when processing array refs with variable index.
15740 2018-05-18  Toon Moene  <toon@moene.org>
15742         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
15743         directly after that of -floop-interchange. Indicate that both
15744         options are enabled by default when specifying -O3.
15746 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15748         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
15749         iterator.  Delete separate integer-mode vec_set<mode> expander.
15750         (aarch64_simd_vec_setv2di): Delete.
15751         (vec_setv2di): Delete.
15752         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
15753         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
15754         the "w, r" alternative.
15756 2018-05-18  Martin Liska  <mliska@suse.cz>
15758         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
15759         * tree-pass.h (make_pass_lower_switch_O0): New function.
15760         * tree-switch-conversion.c (node_has_low_bound): Remove.
15761         (node_has_high_bound): Likewise.
15762         (node_is_bounded): Likewise.
15763         (class pass_lower_switch): Make it a template type and create
15764         two instances.
15765         (pass_lower_switch::execute): Add template argument.
15766         (make_pass_lower_switch): New function.
15767         (make_pass_lower_switch_O0): New function.
15768         (do_jump_if_equal): Remove.
15769         (emit_case_nodes): Simplify to just handle all 3 cases and leave
15770         all the hard work to tree optimization passes.
15772 2018-05-18  Martin Liska  <mliska@suse.cz>
15774         * dbgcnt.c (limit_low): Renamed from limit.
15775         (limit_high): New variable.
15776         (dbg_cnt_is_enabled): Check for upper limit.
15777         (dbg_cnt): Adjust dumping.
15778         (dbg_cnt_set_limit_by_index): Add new argument for high
15779         value.
15780         (dbg_cnt_set_limit_by_name): Likewise.
15781         (dbg_cnt_process_single_pair): Parse new format.
15782         (dbg_cnt_process_opt): Use strtok.
15783         (dbg_cnt_list_all_counters): Remove 'value' and add
15784         'limit_high'.
15785         * doc/invoke.texi: Document changes.
15787 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
15789         * doc/sourcebuild.texi (scalar_all_fma): Document.
15790         * tree.def (FMA_EXPR): Delete.
15791         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
15792         * internal-fn.c (ternary_direct): New macro.
15793         (expand_ternary_optab_fn): Likewise.
15794         (direct_ternary_optab_supported_p): Likewise.
15795         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
15796         * builtins.c (fold_builtin_fma): Delete.
15797         (fold_builtin_3): Don't call it.
15798         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
15799         * expr.c (expand_expr_real_2): Likewise.
15800         * fold-const.c (operand_equal_p): Likewise.
15801         (fold_ternary_loc): Likewise.
15802         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
15803         * gimple.c (DEFTREECODE): Likewise.
15804         * gimplify.c (gimplify_expr): Likewise.
15805         * optabs-tree.c (optab_for_tree_code): Likewise.
15806         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15807         * tree-eh.c (operation_could_trap_p): Likewise.
15808         (stmt_could_throw_1_p): Likewise.
15809         * tree-inline.c (estimate_operator_cost): Likewise.
15810         * tree-pretty-print.c (dump_generic_node): Likewise.
15811         (op_code_prio): Likewise.
15812         * tree-ssa-loop-im.c (stmt_cost): Likewise.
15813         * tree-ssa-operands.c (get_expr_operands): Likewise.
15814         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
15815         * fold-const-call.h (fold_fma): Delete.
15816         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
15817         CFN_FNMA and CFN_FNMS.
15818         (fold_fma): Delete.
15819         * genmatch.c (combined_fn): New enum.
15820         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
15821         (commutative_op): New function.
15822         (commutate): Use it.  Handle more than 2 operands.
15823         (dt_operand::gen_gimple_expr): Use commutative_op.
15824         (parser::parse_expr): Allow :c to be used with non-binary
15825         operators if the commutative operand is known.
15826         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
15827         CFN_FMS, CFN_FNMA and CFN_FNMS.
15828         (backprop::process_assign_use): Remove FMA_EXPR handling.
15829         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
15830         (gen_hsa_fma): New function.
15831         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
15832         IFN_FNMA and IFN_FNMS.
15833         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
15834         * gimple-fold.h (follow_all_ssa_edges): Declare.
15835         * gimple-fold.c (follow_all_ssa_edges): New function.
15836         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
15837         gimple_build interface and use follow_all_ssa_edges to fold the result.
15838         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
15839         instead of checking for optabs directly.
15840         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
15841         rather than FMA_EXPRs.
15842         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
15843         call to IFN_FMA instead of an FMA_EXPR.
15845 2018-05-17  Jim Wilson  <jimw@sifive.com>
15847         * expr.c (do_tablejump): When converting index to Pmode, if we have a
15848         sign extended promoted subreg, and the range does not have the sign bit
15849         set, then do a sign extend.
15851         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
15852         test, check for sign extended subreg and/or constant operands, and
15853         do a sign extend in that case.
15855 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
15857         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
15858         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
15859         Add untyped.
15860         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
15861         Change logics_shift_reg to logics_shift_imm.
15862         (thunderx2t99_fp_loadpair_basic): Delete.
15863         (thunderx2t99_fp_storepair_basic): Delete.
15864         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
15865         (thunderx2t99_asimd_polynomial): Delete.
15866         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
15867         and neon_fp_mul_d_scalar_q.
15868         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
15869         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
15870         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
15871         (thunderx2t99_asimd_lut): Add missing tbl types.
15872         (thunderx2t99_asimd_ext): Delete.
15873         (thunderx2t99_asimd_load1_1_mult): Delete.
15874         (thunderx2t99_asimd_load1_2_mult): Delete.
15875         (thunderx2t99_asimd_load1_ldp): New.
15876         (thunderx2t99_asimd_load1): New.
15877         (thunderx2t99_asimd_load2): Add missing *load2* types.
15878         (thunderx2t99_asimd_load3): New.
15879         (thunderx2t99_asimd_load4): New.
15880         (thunderx2t99_asimd_store1_1_mult): Delete.
15881         (thunderx2t99_asimd_store1_2_mult): Delete.
15882         (thunderx2t99_asimd_store2_mult): Delete.
15883         (thunderx2t99_asimd_store2_onelane): Delete.
15884         (thunderx2t99_asimd_store_stp): New.
15885         (thunderx2t99_asimd_store1): New.
15886         (thunderx2t99_asimd_store2): New.
15887         (thunderx2t99_asimd_store3): New.
15888         (thunderx2t99_asimd_store4): New.
15890 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
15892         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15893         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
15895 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
15896             Segher Boessenkool  <segher@kernel.crashing.org>
15898         PR target/85698
15899         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15900         operand.
15902 2018-05-17  Richard Biener  <rguenther@suse.de>
15904         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15905         for pruning loop and prune defs feeding only already visited PHIs.
15907 2018-05-17  Richard Biener  <rguenther@suse.de>
15909         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15911 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
15912             Richard Biener  <rguenther@suse.de>
15914         PR tree-optimization/85793
15915         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15916         for VMAT_ELEMENTWISE.
15918 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15920         * internal-fn.h (lookup_internal_fn): Declare
15921         * internal-fn.c (lookup_internal_fn): New function.
15922         * gimple.c (gimple_build_call_from_tree): Handle calls to
15923         internal functions.
15924         * gimple-pretty-print.c (dump_gimple_call): Print "." before
15925         internal function names.
15926         * tree-pretty-print.c (dump_generic_node): Likewise.
15927         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15929 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
15931         * gimple-fold.h (gimple_build): Make the function forms take
15932         combined_fn rather than built_in_function.
15933         (gimple_simplify): Likewise.
15934         * gimple-match-head.c (gimple_simplify): Likewise.
15935         * gimple-fold.c (gimple_build): Likewise.
15936         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15937         rather than gimple_build_call_internal.
15938         (get_initial_defs_for_reduction): Likewise.
15939         (vect_create_epilog_for_reduction): Likewise.
15940         (vectorizable_live_operation): Likewise.
15942 2018-05-17  Martin Liska  <mliska@suse.cz>
15944         * gimple-ssa-sprintf.c (format_directive): Do not use
15945         space in between 'G_' and '('.
15947 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
15949         PR target/85323
15950         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15951         even if the mask is not all ones.
15953         PR target/85323
15954         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15955         vector.
15956         (ix86_gimple_fold_builtin): Likewise.
15958         PR target/85323
15959         * config/i386/i386.c: Include tree-vector-builder.h.
15960         (ix86_vector_shift_count): New function.
15961         (ix86_fold_builtin): Fold shift builtins by scalar count.
15962         (ix86_gimple_fold_builtin): Likewise.
15964         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15965         _mm512_setzero): New intrinsics.
15967 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
15968             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15970         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15971         code generation for cases where splatting a value is not useful.
15972         * simplify-rtx.c (simplify_ternary_operation): Simplify
15973         vec_merge across a vec_duplicate and a paradoxical subreg forming
15974         a vector mode to a vec_concat.
15976 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
15978         * config.gcc: Support "goldmont-plus".
15979         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15980         "goldmont-plus".
15981         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15982         PROCESSOR_GOLDMONT_PLUS.
15983         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15984         (processor_target_table): Add "goldmont-plus".
15985         (PTA_GOLDMONT_PLUS): Define.
15986         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15987         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15988         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15989         (fold_builtin_cpu): Add "goldmont-plus".
15990         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15991         (ix86_option_override_internal): Add "goldmont-plus".
15992         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15993         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15994         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15995         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15997 2018-05-17  Richard Biener  <rguenther@suse.de>
15999         PR tree-optimization/85757
16000         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
16001         remove defs that only feed that PHI from further processing.
16003 2018-05-16  Jim Wilson  <jimw@sifive.com>
16005         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
16006         asterisk to name.
16007         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
16009 2018-05-16  Mark Wielaard  <mark@klomp.org>
16011         * dwarf2out.c (count_index_strings): New function.
16012         (output_indirect_strings): Call count_index_strings and generate
16013         header for dwarf_version >= 5.
16015 2018-05-16  Mark Wielaard  <mark@klomp.org>
16017         * dwarf2out.c (dwarf_FORM): New function.
16018         (set_indirect_string): Use dwarf_FORM.
16019         (reset_indirect_string): Likewise.
16020         (size_of_die): Likewise.
16021         (value_format): Likewise.
16022         (output_die): Likewise.
16023         (add_skeleton_AT_string): Likewise.
16024         (output_macinfo_op): Likewise.
16025         (index_string): Likewise.
16026         (output_index_string_offset): Likewise.
16027         (output_index_string): Likewise.
16028         (count_index_strings): Likewise.
16030 2018-05-16  Carl Love  <cel@us.ibm.com>
16032         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16033         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
16035 2018-05-16  Martin Jambor  <mjambor@suse.cz>
16037         * ipa-prop.c (ipa_free_all_edge_args): Remove.
16038         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
16040 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
16042         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
16043         (fnma<mode>4): Likewise.
16044         (fms<mode>4): Likewise.
16045         (fnms<mode>4): Likewise.
16046         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
16047         (aarch64_fnma<mode>4): Likewise.
16048         (aarch64_fms<mode>4): Likewise.
16049         (aarch64_fnms<mode>4): Likewise.
16050         (aarch64_fnmadd<mode>4): Likewise.
16052 2018-05-16  Jason Merrill  <jason@redhat.com>
16054         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
16056 2018-05-16  Richard Biener  <rguenther@suse.de>
16058         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
16059         (dump_stmt_cost): Declare.
16060         (add_stmt_cost): Dump cost we add.
16061         (add_stmt_costs): New function.
16062         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
16063         No longer exported.
16064         (vect_analyze_stmt): Adjust prototype.
16065         (vectorizable_condition): Likewise.
16066         (vectorizable_live_operation): Likewise.
16067         (vectorizable_reduction): Likewise.
16068         (vectorizable_induction): Likewise.
16069         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
16070         cost vector to pass to vectorizable_ and record afterwards.
16071         (vect_model_reduction_cost): Take cost vector argument and adjust.
16072         (vect_model_induction_cost): Likewise.
16073         (vectorizable_reduction): Likewise.
16074         (vectorizable_induction): Likewise.
16075         (vectorizable_live_operation): Likewise.
16076         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
16077         SLP_TREE_NUMBER_OF_VEC_STMTS.
16078         (vect_analyze_slp_cost_1): Remove.
16079         (vect_analyze_slp_cost): Likewise.
16080         (vect_slp_analyze_node_operations): Take visited args and
16081         a target cost vector.  Avoid processing already visited stmt sets.
16082         (vect_slp_analyze_operations): Use a local cost vector to gather
16083         costs and register those of non-discarded instances.
16084         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
16085         (vect_schedule_slp_instance): Remove copying of
16086         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
16087         zero.
16088         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
16089         adding cost.  Record cost entry location.
16090         (vect_prologue_cost_for_slp_op): Function to compute cost of
16091         a constant or invariant generated for SLP vect in the prologue,
16092         split out from vect_analyze_slp_cost_1.
16093         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
16094         (vect_model_promotion_demotion_cost): Likewise.
16095         (vect_model_store_cost): Likewise, make static.
16096         (vect_model_load_cost): Likewise.
16097         (vectorizable_bswap): Add cost vector arg and adjust.
16098         (vectorizable_call): Likewise.
16099         (vectorizable_simd_clone_call): Likewise.
16100         (vectorizable_conversion): Likewise.
16101         (vectorizable_assignment): Likewise.
16102         (vectorizable_shift): Likewise.
16103         (vectorizable_operation): Likewise.
16104         (vectorizable_store): Likewise.
16105         (vectorizable_load): Likewise.
16106         (vectorizable_condition): Likewise.
16107         (vectorizable_comparison): Likewise.
16108         (can_vectorize_live_stmts): Likewise.
16109         (vect_analyze_stmt): Likewise.
16110         (vect_transform_stmt): Adjust calls to vectorizable_*.
16111         * tree-vectorizer.c: Include gimple-pretty-print.h.
16112         (dump_stmt_cost): New function.
16114 2018-05-16  Richard Biener  <rguenther@suse.de>
16116         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
16117         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
16118         * tree-ssa-dse.c: Include tree-ssa-loop.h.
16119         (check_name): New callback.
16120         (dse_classify_store): Track cycles via a visited bitmap of PHI
16121         defs and simplify handling of in-loop and across loop dead stores
16122         and properly fail for loop-variant refs.  Handle byte-tracking with
16123         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
16124         limiting the walk.
16126 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
16128         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
16129         (vect_get_mask_type_for_stmt): Likewise.
16130         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
16131         split out from...
16132         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
16133         to determine the statement's vector type and the vector type that
16134         should be used for calculating nunits.  Deal with cases in which
16135         the type has to be deferred.
16136         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
16137         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
16138         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
16139         (vect_determine_vf_for_stmt): New functions, split out from...
16140         (vect_determine_vectorization_factor): ...here.
16141         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
16142         (vect_get_mask_type_for_stmt): New functions, split out from
16143         vect_determine_vectorization_factor.
16145 2018-05-16  Richard Biener  <rguenther@suse.de>
16147         * tree-cfg.c (verify_gimple_assign_ternary): Properly
16148         verify the [VEC_]COND_EXPR embedded comparison.
16150 2018-05-15  Martin Sebor  <msebor@redhat.com>
16152         PR tree-optimization/85753
16153         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
16154         RECORD_TYPE in addition to ARRAY_TYPE.
16156 2018-05-15  Martin Sebor  <msebor@redhat.com>
16158         PR middle-end/85643
16159         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
16161 2018-05-15  Richard Biener  <rguenther@suse.de>
16163         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
16164         add by_clobber_p one.  Change algorithm to collect all defs
16165         representing uses we need to walk and try reducing them to
16166         a single one before failing.
16167         (dse_dom_walker::dse_optimize_stmt): Adjust.
16169 2018-05-13  Mark Wielaard  <mark@klomp.org>
16171         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
16172         (size_of_loc_descr): Likewise.
16173         (output_loc_operands): Likewise.
16174         (output_loc_operands_raw): Likewise.
16175         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
16176         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
16177         (hash_loc_operands): Likewise.
16178         (compare_loc_operands): Likewise.
16180 2018-05-14  Mark Wielaard  <mark@klomp.org>
16182         * dwarf2out.c (count_index_addrs): New function.
16183         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
16185 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16187         PR tree-optimization/83648
16188         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
16189         return value as malloc candidate.
16191 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16193         PR ipa/85734
16194         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
16195         param as true in call to suggest_attribute.
16197 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
16199         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
16200         -mreadonly-in-sdata.
16202 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16204         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
16205         New pattern.
16206         (aarch64_crypto_aesd_fused): Likewise.
16208 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
16210         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
16211         (movsi_aarch64): Likewise.
16212         (load_pairsi): Likewise.
16213         (load_pairdi): Likewise.
16214         (store_pairsi): Likewise.
16215         (store_pairdi): Likewise.
16216         (load_pairsf): Likewise.
16217         (load_pairdf): Likewise.
16218         (store_pairsf): Likewise.
16219         (store_pairdf): Likewise.
16220         (zero_extend): Likewise.
16221         (trunc): Swap alternatives.
16222         (fcvt_target): Add '?' to prefer w over r.
16224 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
16226         PR target/85756
16227         * config/i386/i386.md: Disallow non-commutative arithmetics in
16228         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
16229         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
16230         in the peephole2 before it.
16232 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
16234         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
16235         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
16236         (ix86_handle_option): Handle -mcldemote.
16237         * config.gcc: New header.
16238         * config/i386/cldemoteintrin.h: New file.
16239         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
16240         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
16241         -mcldemote.
16242         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16243         OPTION_MASK_ISA_CLDEMOTE.
16244         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
16245         (ix86_valid_target_attribute_inner_p): Ditto.
16246         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
16247         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
16248         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
16249         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
16250         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
16251         (cldemote): New.
16252         * config/i386/i386.opt: Add -mcldemote.
16253         * config/i386/x86intrin.h: New header.
16254         * doc/invoke.texi: Add -mcldemote.
16256 2018-05-14  Richard Biener  <rguenther@suse.de>
16258         * doc/match-and-simplify.texi: Adjust :s documentation.
16260 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
16262         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
16263         intended memcpy size.
16264         (REORDER_45): Likewise.
16266 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
16268         * sort.cc: New file.
16269         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
16270         * vec.c (qsort_chk): Use gcc_qsort.
16271         * Makefile.in (OBJS-libcommon): Add sort.o.
16272         (build/sort.o): New target.  Use it...
16273         (BUILD_RTL): ... here, and...
16274         (build/gencfn-macros): ... here, and...
16275         (build/genmatch): ... here.
16277 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16278             Chung-Ju Wu  <jasonwucj@gmail.com>
16280         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
16281         * config/nds32/nds32-graywolf.md: New file.
16282         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
16283         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
16284         pipeline.
16285         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
16286         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
16287         * config/nds32/nds32.md (pipeline_model): Add graywolf.
16288         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
16289         * config/nds32/pipelines.md: Include n15 settings.
16291 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16292             Chung-Ju Wu  <jasonwucj@gmail.com>
16294         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
16295         * config/nds32/nds32-n13.md: New file.
16296         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
16297         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
16298         pipeline.
16299         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
16300         * config/nds32/nds32.md (pipeline_model): Add n13.
16301         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
16302         * config/nds32/pipelines.md: Include n13 settings.
16304 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
16305             Chung-Ju Wu  <jasonwucj@gmail.com>
16307         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
16308         * config/nds32/nds32-n10.md: New file.
16309         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
16310         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
16311         pipeline.
16312         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
16313         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
16314         * config/nds32/nds32.md (pipeline_model): Add n10.
16315         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
16316         * config/nds32/pipelines.md: Include n10 settings.
16318 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
16319             Kito Cheng  <kito.cheng@gmail.com>
16320             Chung-Ju Wu  <jasonwucj@gmail.com>
16322         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
16323         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
16324         Add enum values for DSP extension instructions.
16325         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
16326         New constraints.
16327         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
16328         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
16329         New code iterators.
16330         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
16331         * config/nds32/nds32-dspext.md: New file for DSP implementation.
16332         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
16333         * config/nds32/nds32-intrinsic.md: Likewise.
16334         * config/nds32/nds32_intrinsic.h: Likewise.
16335         * config/nds32/nds32-md-auxiliary.c: Likewise.
16336         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
16337         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
16338         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
16339         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
16340         * config/nds32/nds32-protos.h: New declarations for DSP extension.
16341         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
16342         TYPE_DMAC in switch statement.
16343         * config/nds32/nds32.c: New checking and implementation for DSP
16344         extension instructions.
16345         * config/nds32/nds32.h: Likewise.
16346         * config/nds32/nds32.md: Likewise.
16347         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
16348         * config/nds32/predicates.md: Implement new predicates for DSP
16349         extension.
16351 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
16353         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
16354         Reformat alternatives and attributes so it is easier to identify
16355         which constraints/attributes go with which instruction.
16356         (mov<mode>_hardfloat32, FMOVE64): Likewise.
16357         (mov<mode>_softfloat32, FMOVE64): Likewise.
16358         (mov<mode>_hardfloat64, FMOVE64): Likewise.
16359         (mov<mode>_softfloat64, FMOVE64): Likewise.
16361 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16363         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16364         subsection.
16365         (Basic PowerPC Built-in Functions): The new name of the
16366         subsection previously known as "PowerPC Built-in Functions".
16367         (Basic PowerPC Built-in Functions Available on all Configurations):
16368         New subsubsection.
16369         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
16370         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
16371         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
16372         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
16374 2018-05-11  Martin Jambor  <mjambor@suse.cz>
16376         PR ipa/85655
16377         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
16378         single const.
16380 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16382         PR target/85733
16383         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
16385 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
16387         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
16388         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
16389         (ix86_handle_option): Handle -mwaitpkg.
16390         * config.gcc: New header.
16391         * config/i386/cpuid.h (bit_WAITPKG): New bit.
16392         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
16393         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
16394         function type.
16395         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16396         OPTION_MASK_ISA_WAITPKG.
16397         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
16398         (ix86_option_override_internal): Add PTA_WAITPKG.
16399         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
16400         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
16401         IX86_BUILTIN_TPAUSE.
16402         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
16403         __builtin_ia32_umwait and __builtin_ia32_tpause.
16404         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
16405         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
16406         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
16407         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
16408         UNSPECV_TPAUSE): New.
16409         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
16410         * config/i386/i386.opt: Add -mwaitpkg.
16411         * config/i386/waitpkgintrin.h: New file.
16412         * config/i386/x86intrin.h: New header.
16413         * doc/invoke.texi: Add -mwaitpkg.
16415 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
16417         PR target/85606
16418         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
16419         equivalent.
16420         (cortex-m0): Use armv6s-m isa.
16421         (cortex-m0plus): Likewise.
16422         (cortex-m1): Likewise.
16423         (cortex-m0.small-multiply): Likewise.
16424         (cortex-m0plus.small-multiply): Likewise.
16425         (cortex-m1.small-multiply): Likewise.
16427 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
16428             Jakub Jelinek  <jakub@redhat.com>
16430         PR tree-optimization/85692
16431         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
16432         source permute as well.
16434 2018-05-11  Martin Liska  <mliska@suse.cz>
16436         PR sanitizer/85556
16437         * doc/extend.texi: Document LLVM style format for no_sanitize
16438         attribute.
16440 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
16442         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
16443         mode_supports_vsx_dform_quad to mode_supports_dq_form.
16444         (mode_supports_vsx_dform_quad): Likewise.
16445         (mode_supports_vmx_dform): Move these functions to be next to the
16446         other mode_supports functions.
16447         (mode_supports_dq_form): Likewise.
16448         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
16449         mode_supports_dq_form.
16450         (reg_offset_addressing_ok_p): Likewise.
16451         (offsettable_ok_by_alignment): Likewise.
16452         (rs6000_legitimate_offset_address_p): Likewise.
16453         (legitimate_lo_sum_address_p): Likewise.
16454         (rs6000_legitimize_address): Likewise.
16455         (rs6000_legitimize_reload_address): Likewise.
16456         (rs6000_secondary_reload_inner): Likewise.
16457         (rs6000_preferred_reload_class): Likewise.
16458         (rs6000_output_move_128bit): Likewise.
16460 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16462         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
16463         Generate SImode target register for null target.
16464         <case IX86_BUILTIN_XGETBV>: Ditto.
16465         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
16466         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
16468 2018-05-10  Carl Love  <cel@us.ibm.com>
16470         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
16471         dcbtt and dcbtstt if operands[2] is 0.
16473 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
16475         PR target/85693
16476         * config/i386/sse.md (usadv64qi): New expander.
16478 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
16480         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
16481         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
16482         -maltivec=be support.
16483         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
16484         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
16485         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
16486         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
16487         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
16488         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
16489         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
16490         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
16491         altivec_vsumsws): Adjust.
16492         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
16493         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
16494         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
16495         support.
16496         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
16497         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
16498         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
16499         (altivec_lve<VI_char>x): Delete expand.
16500         (*altivec_lve<VI_char>x_internal): Rename to...
16501         (altivec_lve<VI_char>x): ... this.
16502         (altivec_lvxl_<mode>): Delete expand.
16503         (*altivec_lvxl_<mode>_internal): Rename to ...
16504         (altivec_lvxl_<mode>): ... this.
16505         (altivec_stvxl_<mode>): Delete expand.
16506         (*altivec_stvxl_<mode>_internal): Rename to ...
16507         (altivec_stvxl_<mode>): ... this.
16508         (altivec_stve<VI_char>x): Delete expand.
16509         (*altivec_stve<VI_char>x_internal): Rename to ...
16510         (altivec_stve<VI_char>x): ... this.
16511         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
16512         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
16513         reduc_plus_scal_<mode>): Adjust.
16514         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
16515         comment.
16516         (rs6000_cpu_cpp_builtins): Adjust.
16517         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
16518         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
16519         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
16520         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
16521         -maltivec=be support.
16522         (rs6000_split_vec_extract_var): Adjust.
16523         (rs6000_split_v4si_init): Adjust.
16524         (swap_selector_for_mode): Delete.
16525         (altivec_expand_lvx_be, altivec_expand_stvx_be,
16526         altivec_expand_stvex_be): Delete.
16527         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
16528         -maltivec=be support.
16529         (rs6000_gimple_fold_builtin): Ditto.
16530         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
16531         Adjust.
16532         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
16533         (TARGET_DIRECT_MOVE_64BIT): Adjust.
16534         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
16535         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
16536         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
16537         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
16538         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
16539         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
16540         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
16541         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
16542         anonymous split): Adjust.
16543         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
16544         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
16546 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
16548         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
16549         when --with-gxx-include-dir is also specified.
16550         * configure: Regenerate.
16552 2018-05-09  Jim Wilson  <jimw@sifive.com>
16554         PR target/84797
16555         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
16556         * config/riscv/t-withmultilib: New.
16557         * config/riscv/withmultilib.h: New.
16558         * doc/install.texi: Document RISC-V --with-multilib-list support.
16560 2018-05-09  Richard Biener  <rguenther@suse.de>
16562         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
16563         vector.
16564         (vect_bb_vectorization_profitable_p): Adjust.  Compute
16565         actual scalar cost using the cost vector and the add_stmt_cost
16566         machinery.
16568 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16570         PR rtl-optimization/85645
16571         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
16572         in the REG_CFA_REGISTER note for LR, don't leave it empty.
16574 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16576         PR rtl-optimization/85645
16577         * shrink-wrap.c (spread_components): Return a boolean saying if
16578         anything was changed.
16579         (try_shrink_wrapping_separate): Iterate spread_components until
16580         nothing changes anymore.
16582 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16584         PR rtl-optimization/85645
16585         * regrename.c (build_def_use): Also kill the chains that include the
16586         destination of a REG_CFA_REGISTER note.
16588 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
16590         PR rtl-optimization/85645
16591         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
16592         insn that has a REG_CFA_REGISTER note.
16594 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
16596         * cfgexpand.c (expand_clobber): New function.
16597         (expand_gimple_stmt_1): Use it.
16598         * tree-vect-stmts.c (vect_clobber_variable): New function,
16599         split out from...
16600         (vectorizable_simd_clone_call): ...here.
16601         (vectorizable_store): Emit a clobber either side of an
16602         IFN_STORE_LANES sequence.
16603         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
16605 2018-05-09  Tom de Vries  <tom@codesourcery.com>
16607         PR target/85626
16608         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
16609         (define_insn "trap_if_false"): Add exit after trap.
16611 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
16613         PR rtl-optimization/85638
16614         * bb-reorder.c: Include common/common-target.h.
16615         (create_forwarder_block): New function extracted from...
16616         (fix_up_crossing_landing_pad): ...here.  Rename into...
16617         (dw2_fix_up_crossing_landing_pad): ...this.
16618         (sjlj_fix_up_crossing_landing_pad): New function.
16619         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
16620         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
16621         from both partitions and exit the loop after one iteration.
16623 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16625         Revert:
16626         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16627         subsection.
16628         (Basic PowerPC Built-in Functions): The new name of the
16629         subsection previously known as "PowerPC Built-in Functions".
16630         (Basic PowerPC Built-in Functions Available on all Configurations):
16631         New subsubsection.
16632         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16633         subsubsection.
16634         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16635         subsubsection.
16636         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16637         subsubsection.
16638         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16639         subsubsection.
16641 2018-05-08  Jim Wilson  <jimw@sifive.com>
16643         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
16644         (LD_EMUL_SUFFIX): New.
16645         (LINK_SPEC): Use it.
16647 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16649         * doc/extend.texi (PowerPC Built-in Functions): Rename this
16650         subsection.
16651         (Basic PowerPC Built-in Functions): The new name of the
16652         subsection previously known as "PowerPC Built-in Functions".
16653         (Basic PowerPC Built-in Functions Available on all Configurations):
16654         New subsubsection.
16655         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
16656         subsubsection.
16657         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
16658         subsubsection.
16659         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
16660         subsubsection.
16661         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
16662         subsubsection.
16664 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16666         PR target/85683
16667         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
16668         after cmpelim optimization.
16670 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
16672         * config.gcc: Support "goldmont".
16673         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
16674         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16675         PROCESSOR_GOLDMONT.
16676         * config/i386/i386.c (m_GOLDMONT): Define.
16677         (processor_target_table): Add "goldmont".
16678         (PTA_GOLDMONT): Define.
16679         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
16680         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
16681         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
16682         (fold_builtin_cpu): Add "goldmont".
16683         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
16684         (ix86_option_override_internal): Add "goldmont".
16685         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
16686         (processor_type): Add PROCESSOR_GOLDMONT.
16687         * config/i386/i386.md: Add CPU "glm".
16688         * config/i386/glm.md: New file.
16689         * config/i386/x86-tune.def: Add m_GOLDMONT.
16690         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
16692 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
16694         PR target/85572
16695         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
16696         E_V4DImode.
16697         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
16698         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
16699         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
16701         PR target/85317
16702         * config/i386/i386.c (ix86_fold_builtin): Handle
16703         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
16705         PR target/85480
16706         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
16707         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
16709 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
16711         PR target/85658
16712         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
16713         (check_arch): Likewise.
16714         (check_fpu): Return the result rather than printing it.
16715         (end arch): Fix operator precedence.
16716         (end cpu): Likewise.
16717         (END): Print the result from check_fpu.
16719 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16720             Alan Hayward  <alan.hayward@arm.com>
16721             David Sherwood  <david.sherwood@arm.com>
16723         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
16724         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
16725         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
16726         (*fcmuo<mode>_and): New patterns.
16728 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
16730         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
16731         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
16732         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
16733         (cmp_op, sve_imm_con): New code attributes.
16734         (SVE_COND_INT_CMP, imm_con): Delete.
16735         (cmp_op): Remove above unspecs from int attribute.
16736         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
16737         to...
16738         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
16739         comparison-specific unspecs.
16740         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
16741         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
16742         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
16743         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
16744         (*vec_fcm<cmp_op><mode>): Rename to...
16745         (*fcm<cmp_op><mode>): ...this and adjust likewise.
16746         (*vec_fcmuo<mode>): Rename to...
16747         (*fcmuo<mode>): ...this and adjust likewise.
16748         (*pred_fcm<cmp_op><mode>): New pattern.
16749         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
16750         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
16751         functions.
16752         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
16753         and UNORDERED.
16754         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
16755         (aarch64_emit_sve_predicated_cond): New function.
16756         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
16757         (aarch64_emit_unspec_cond_or): Replace with...
16758         (aarch64_emit_sve_or_conds): ...this new function.  Use
16759         aarch64_emit_sve_ptrue_op for the individual comparisons and
16760         aarch64_emit_binop to OR them together.
16761         (aarch64_emit_inverted_unspec_cond): Replace with...
16762         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
16763         aarch64_emit_sve_ptrue_op for the comparison and
16764         aarch64_emit_unop to invert the result.
16765         (aarch64_expand_sve_vec_cmp_float): Update after the above
16766         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
16768 2018-05-07  Nathan Sidwell  <nathan@acm.org>
16770         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
16771         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
16772         (Backwards Compatibility): Likewise.
16774 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16776         PR bootstrap/85681
16777         Revert:
16778         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16780         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16781         <prefetch_dynamic_strides>: New const bool field.
16782         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16783         prefetch_dynamic_strides.
16784         (exynosm1_prefetch_tune): Likewise.
16785         (thunderxt88_prefetch_tune): Likewise.
16786         (thunderx_prefetch_tune): Likewise.
16787         (thunderx2t99_prefetch_tune): Likewise.
16788         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16789         to false.
16790         (aarch64_override_options_internal): Update to set
16791         PARAM_PREFETCH_DYNAMIC_STRIDES.
16792         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16793         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16794         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16795         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16796         prefetch-dynamic-strides setting.
16798         2018-05-07  Luis Machado  <luis.machado@linaro.org>
16800         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16801         <minimum_stride>: New const int field.
16802         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16803         minimum_stride field.
16804         (exynosm1_prefetch_tune): Likewise.
16805         (thunderxt88_prefetch_tune): Likewise.
16806         (thunderx_prefetch_tune): Likewise.
16807         (thunderx2t99_prefetch_tune): Likewise.
16808         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16809         (aarch64_override_options_internal): Update to set
16810         PARAM_PREFETCH_MINIMUM_STRIDE.
16811         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16812         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16813         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16814         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16815         stride is constant and is below the minimum stride threshold.
16817 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16819         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
16820         to 512.
16822 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16824         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16825         <prefetch_dynamic_strides>: New const bool field.
16826         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16827         prefetch_dynamic_strides.
16828         (exynosm1_prefetch_tune): Likewise.
16829         (thunderxt88_prefetch_tune): Likewise.
16830         (thunderx_prefetch_tune): Likewise.
16831         (thunderx2t99_prefetch_tune): Likewise.
16832         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
16833         to false.
16834         (aarch64_override_options_internal): Update to set
16835         PARAM_PREFETCH_DYNAMIC_STRIDES.
16836         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16837         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16838         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16839         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16840         prefetch-dynamic-strides setting.
16842 2018-05-07  Luis Machado  <luis.machado@linaro.org>
16844         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16845         <minimum_stride>: New const int field.
16846         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16847         minimum_stride field.
16848         (exynosm1_prefetch_tune): Likewise.
16849         (thunderxt88_prefetch_tune): Likewise.
16850         (thunderx_prefetch_tune): Likewise.
16851         (thunderx2t99_prefetch_tune): Likewise.
16852         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
16853         (aarch64_override_options_internal): Update to set
16854         PARAM_PREFETCH_MINIMUM_STRIDE.
16855         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16856         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16857         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16858         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16859         stride is constant and is below the minimum stride threshold.
16861 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
16863         PR c++/85659
16864         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
16865         the type is addressable.  Don't force op into register if it has
16866         BLKmode.
16868 2018-05-05  Roland McGrath  <mcgrathr@google.com>
16870         PR other/77609
16871         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
16872         any section for which we don't know a specific type it should have,
16873         regardless of name.  Previously this was done only for the exact
16874         names ".init_array", ".fini_array", and ".preinit_array".
16875         (default_elf_asm_named_section): Add comment about
16876         relationship with default_section_type_flags and SECTION_NOTYPE.
16877         (get_section): Don't consider it a type conflict if one side has
16878         SECTION_NOTYPE and the other doesn't, as long as neither has the
16879         SECTION_BSS et al used in the default_section_type_flags logic.
16881 2018-05-05  Tom de Vries  <tom@codesourcery.com>
16883         PR target/85653
16884         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
16885         (workaround_barsyncs): New function.
16886         (nvptx_reorg): Use workaround_barsyncs.
16887         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16888         (define_expand "nvptx_membar_cta"): New define_expand.
16889         (define_insn "*nvptx_membar_cta"): New insn.
16891 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
16893         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16894         To improve optimization opportunities.
16895         * builtin-types.def: The new needed builtin types for the above.
16897 2018-05-04  Richard Biener  <rguenther@suse.de>
16899         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16900         * gimple-ssa-store-merging.c
16901         (imm_store_chain_info::output_merged_store): Remove redundant create,
16902         release split_store vector contents on failure.
16903         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16904         scalar stmt vector on cache hit.
16906 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
16908         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16909         Xilinx FP support.
16910         * config.gcc (powerpc-xilinx-eabi*): Remove.
16911         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16912         support.
16913         (fusion_addis_mem_combo_load): Ditto.
16914         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16915         FP support.
16916         (rs6000_cpu_cpp_builtins): Ditto.
16917         * config/rs6000/rs6000-linux.c
16918         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16919         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16920         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16921         support.
16922         (rs6000_setup_reg_addr_masks): Ditto.
16923         (rs6000_init_hard_regno_mode_ok): Ditto.
16924         (rs6000_option_override_internal): Ditto.
16925         (legitimate_lo_sum_address_p): Ditto.
16926         (rs6000_legitimize_address): Ditto.
16927         (rs6000_legitimize_reload_address): Ditto.
16928         (rs6000_legitimate_address_p): Ditto.
16929         (abi_v4_pass_in_fpr): Ditto.
16930         (setup_incoming_varargs): Ditto.
16931         (rs6000_gimplify_va_arg): Ditto.
16932         (rs6000_split_multireg_move): Ditto.
16933         (rs6000_savres_strategy): Ditto.
16934         (rs6000_emit_prologue_components): Ditto.
16935         (rs6000_emit_epilogue_components): Ditto.
16936         (rs6000_emit_prologue): Ditto.
16937         (rs6000_emit_epilogue): Ditto.
16938         (rs6000_elf_file_end): Ditto.
16939         (rs6000_function_value): Ditto.
16940         (rs6000_libcall_value): Ditto.
16941         * config/rs6000/rs6000.h: Ditto.
16942         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16943         (TARGET_MINMAX): ... this.  New.
16944         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16945         * config/rs6000/rs6000.md: Remove Xilinx FP support.
16946         (*movsi_internal1_single): Delete.
16947         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16948         mfpu=, mxilinx-fpu): Delete.
16949         * config/rs6000/singlefp.h: Delete.
16950         * config/rs6000/sysv4.h: Remove Xilinx FP support.
16951         * config/rs6000/t-rs6000: Ditto.
16952         * config/rs6000/t-xilinx: Delete.
16953         * config/rs6000/titan.md: Adjust for fp_type removal.
16954         * config/rs6000/vsx.md: Remove Xilinx FP support.
16955         (VStype_simple): Delete.
16956         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16957         * config/rs6000/xfpu.h: Delete.
16958         * config/rs6000/xfpu.md: Delete.
16959         * config/rs6000/xilinx.h: Delete.
16960         * config/rs6000/xilinx.opt: Delete.
16961         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16962         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16964 2018-05-04  Tom de Vries  <tom@codesourcery.com>
16966         PR libgomp/85639
16967         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16968         if ignore == 0.
16970 2018-05-04  Richard Biener  <rguenther@suse.de>
16972         PR middle-end/85627
16973         * tree-complex.c (update_complex_assignment): We are always in SSA form.
16974         (expand_complex_div_wide): Likewise.
16975         (expand_complex_operations_1): Likewise.
16976         (expand_complex_libcall): Preserve EH info of the original stmt.
16977         (tree_lower_complex): Handle removed blocks.
16978         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16979         on complex multiplication and division libcall builtins.
16981 2018-05-04  Richard Biener  <rguenther@suse.de>
16983         PR middle-end/85574
16984         * fold-const.c (negate_expr_p): Restrict negation of operand
16985         zero of a division to when we know that can happen without
16986         overflow.
16987         (fold_negate_expr_1): Likewise.
16989 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
16991         PR libstdc++/85466
16992         * real.h (real_nextafter): Declare.
16993         * real.c (real_nextafter): New function.
16994         * fold-const-call.c (fold_const_nextafter): New function.
16995         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16996         CASE_CFN_NEXTTOWARD.
16997         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16998         even when arg1_mode is different from arg0_mode.
17000 2018-05-03  Nathan Sidwell  <nathan@acm.org>
17002         * doc/extend.texi (Deprecated Features): Remove
17003         -ffriend-injection.
17004         (Backwards Compatibility): Likewise.
17005         * doc/invoke.texi (C++ Language Options): Likewise.
17006         (C++ Dialect Options): Likewise.
17008 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
17010         PR target/85530
17011         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
17012         _mm512_mask_mullox_epi64): New intrinsics.
17014 2018-05-03  Tom de Vries  <tom@codesourcery.com>
17016         PR testsuite/85106
17017         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17018         dump files): Add offload-tree.
17020 2018-05-03  Richard Biener  <rguenther@suse.de>
17022         PR tree-optimization/85615
17023         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
17024         to loops not nested in BBs loop father to avoid creating multi-entry
17025         loops.
17027 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17029         PR tree-optimization/70291
17030         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
17031         arguments.  Change return type to tree.  Emit libcall as a new
17032         statement rather than replacing existing one when inplace_p is true.
17033         (expand_complex_multiplication_components): New function.
17034         (expand_complex_multiplication): Expand floating-point complex
17035         multiplication using the above.
17036         (expand_complex_division): Rename inner_type parameter to type.
17037         Update expand_complex_libcall call-site.
17038         (expand_complex_operations_1): Update expand_complex_multiplication
17039         and expand_complex_division call-sites.
17041 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17043         PR target/85582
17044         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17045         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17046         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
17047         the highest significant bit of the shift count mask is clear.  In
17048         check whether and[sq]i3 is needed verify that all significant bits
17049         of the shift count other than the highest are set.
17051 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17053         PR libgomp/82428
17054         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
17055         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
17056         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
17057         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
17058         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
17059         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
17060         __builtin_goacc_parlevel_size.
17062 2018-05-02  Richard Biener  <rguenther@suse.de>
17064         PR tree-optimization/85597
17065         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
17066         do not use split vect_get_vec_defs call but call vect_get_slp_defs
17067         directly.
17069 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17071         PR testsuite/85106
17072         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17073         dump files): Add ltrans-tree.
17075 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17077         PR testsuite/85106
17078         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
17079         dump files): Add wpa-ipa.
17081 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
17083         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
17084         powerpc*-*-linux*paired* target.
17085         * config/rs6000/750cl.h: Delete.
17086         * config/rs6000/paired.h: Delete.
17087         * config/rs6000/paired.md: Delete.
17088         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
17089         float support.
17090         * config/rs6000/rs6000-builtin.def: Remove paired float support.
17091         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17092         comment.  Remove paired float support.
17093         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
17094         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
17095         VECTOR_PAIRED.
17096         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
17097         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
17098         declarations.
17099         * config/rs6000/rs6000.c: Remove paired float support.
17100         (paired_expand_vector_init, paired_expand_vector_move,
17101         paired_emit_vector_compare, paired_emit_vector_cond_expr,
17102         (paired_expand_lv_builtin, paired_expand_stv_builtin,
17103         paired_expand_builtin, paired_expand_predicate_builtin,
17104         paired_init_builtins): Delete.
17105         * config/rs6000/rs6000.h: Remove paired float support.
17106         * config/rs6000/rs6000.md: Remove paired float support.
17107         (move_from_CR_ov_bit): Delete.
17108         * config/rs6000/rs6000.opt (mpaired): Delete.
17109         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
17110         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
17112 2018-05-02  Richard Biener  <rguenther@suse.de>
17114         PR middle-end/85567
17115         * gimplify.c (gimplify_save_expr): When in SSA form allow
17116         SAVE_EXPRs to compute to SSA vars.
17118 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
17120         PR target/85582
17121         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
17122         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
17123         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
17124         clobber operands[2], instead use a new pseudo.  Formatting fixes.
17126 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
17128         PR tree-optimization/85586
17129         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
17130         exit early for statements in the same group if the accesses are
17131         not strided.
17133 2018-05-02  Tom de Vries  <tom@codesourcery.com>
17135         PR lto/85451
17136         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
17137         error message.
17139 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
17141         PR tree-optimization/85143
17142         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
17144 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17146         PR lto/85451
17147         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
17148         not found" error message.
17150 2018-05-01  Tom de Vries  <tom@codesourcery.com>
17152         PR other/83786
17153         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
17154         * vec.c (test_ordered_remove_if): New function.
17155         (vec_c_tests): Call test_ordered_remove_if.
17156         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
17157         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
17158         * tree-vect-patterns.c (vect_pattern_recog_1): Use
17159         VEC_ORDERED_REMOVE_IF.
17161 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17163         PR tree-optimization/82665
17164         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
17165         pointer subtraction where arguments come from a memchr call.
17167 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
17169         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
17170         --push-state --as-needed and --pop-state instead of --as-needed and
17171         --no-as-needed if ld supports it.
17172         * configure: Regenerated.
17174         PR web/85578
17175         * doc/install.texi2html: Replace _002d with - and _002a with * in
17176         generated html files using sed.
17178 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17180         PR c++/85523
17181         * gcc-rich-location.c (blank_line_before_p): New function.
17182         (use_new_line): New function.
17183         (gcc_rich_location::add_fixit_insert_formatted): New function.
17184         * gcc-rich-location.h
17185         (gcc_rich_location::add_fixit_insert_formatted): New function.
17187 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17189         * selftest.c (assert_streq): Rename "expected" and "actual" to
17190         "val1" and "val2".  Extend NULL-handling to cover both inputs
17191         symmetrically, while still requiring both to be non-NULL for a pass.
17192         * selftest.h (assert_streq): Rename "expected" and "actual" to
17193         "val1" and "val2".
17194         (ASSERT_EQ): Likewise.
17195         (ASSERT_EQ_AT): Likewise.
17196         (ASSERT_KNOWN_EQ): Likewise.
17197         (ASSERT_KNOWN_EQ_AT): Likewise.
17198         (ASSERT_NE): Likewise.
17199         (ASSERT_MAYBE_NE): Likewise.
17200         (ASSERT_MAYBE_NE_AT): Likewise.
17201         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
17202         the assertion to pass.
17203         (ASSERT_STREQ_AT): Likewise.
17205 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17207         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
17208         interaction with -pie.
17210 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17212         * selftest.h: Fix alphabetization of per-source-file selftest
17213         declarations.
17215 2018-04-30  Jason Merrill  <jason@redhat.com>
17217         PR c++/61982 - dead stores to destroyed objects.
17218         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
17219         of clobber.
17221 2018-04-30  Jason Merrill  <jason@redhat.com>
17223         * tree.c (build_clobber): New.
17224         * tree.h: Declare it.
17225         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
17227 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17229         * diagnostic-show-locus.c (layout::layout): Update for
17230         location_get_source_line returning a char_span.
17231         (struct char_span): Move to input.h.
17232         (struct correction): Update for fields in char_span becoming
17233         private.
17234         (struct source_line): Update for location_get_source_line
17235         returning a char_span.
17236         (layout::print_line): Likewise.
17237         * edit-context.c (edited_file::print_content): Likewise.
17238         (edited_file::print_diff_hunk): Likewise.
17239         (edited_file::print_run_of_changed_lines): Likewise.
17240         (edited_file::get_num_lines): Likewise.
17241         (edited_line::edited_line): Likewise.
17242         * final.c (asm_show_source): Likewise.
17243         * input.c (location_get_source_line): Convert return type
17244         from const char * to char_span, losing the final "line_len"
17245         param.
17246         (dump_location_info): Update for the above.
17247         (get_substring_ranges_for_loc): Likewise.  Use a char_span
17248         when handling the literal within the line.
17249         (test_reading_source_line): Update for location_get_source_line
17250         returning a char_span.
17251         * input.h (class char_span): Move here from
17252         diagnostic-show-locus.c, converting from a struct to a class.
17253         Make data members private.
17254         (char_span::operator bool): New.
17255         (char_span::length): New.
17256         (char_span::get_buffer): New.
17257         (char_span::operator[]): New.
17258         (char_span::subspan): Make const.
17259         (char_span::xstrdup): New.
17260         (location_get_source_line): Convert return type from const char *
17261         to char_span, losing the final "line_size" param.
17263 2018-04-30  Jan Hubicka  <jh@suse.cz>
17265         * lto-wrapper.c (ltrans_priorities): New static var.
17266         (cmp_priority): New.
17267         (run_gcc): Read priorities and if doing parallel build order
17268         the Makefile by them.
17270 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
17272         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
17274 2018-04-30  Richard Biener  <rguenther@suse.de>
17276         * tree-cfg.c (verify_address): Remove base argument, add
17277         flag whether to check TREE_ADDRESSABLE and do that.
17278         (verify_expr): Remove.
17279         (verify_types_in_gimple_reference): Add pieces from verify_expr.
17280         (verify_gimple_assign_single): Likewise.
17281         (verify_gimple_switch): Likewise.
17282         (verify_expr_location_1): Dereference tp once.  Add (disabled)
17283         piece from verify_expr.
17284         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
17286 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17288         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
17290 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17292         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
17293         (small_data_pattern): Likewise.
17294         (arc_rewrite_small_data): Likewise.
17295         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
17296         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
17297         (get_symbol_alignment): New function.
17298         (legitimate_small_data_address_p): Likewise.
17299         (legitimate_scaled_address): Update, call
17300         legitimate_small_data_address_p.
17301         (output_sdata): New static variable.
17302         (arc_print_operand): Update how we handle small data operands.
17303         (arc_print_operand_address): Likewise.
17304         (arc_legitimate_address_p): Update, use
17305         legitimate_small_data_address_p.
17306         (arc_rewrite_small_data_p): Remove.
17307         (arc_rewrite_small_data_1): Likewise.
17308         (arc_rewrite_small_data): Likewise.
17309         (small_data_pattern): Likewise.
17310         (compact_sda_memory_operand): Update to use
17311         legitimate_small_data_address_p and get_symbol_alignment.
17312         (prepare_move_operands): Don't rewite sdata pattern.
17313         (prepare_extend_operands): Remove.
17314         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
17315         pattern.
17316         (zero_extendqisi2): Likewise.
17317         (zero_extendhisi2): Likewise.
17318         (extendqihi2): Likewise.
17319         (extendqisi2): Likewise.
17320         (extendhisi2): Likewise.
17321         (addsi3): Likewise.
17322         (subsi3): Likewise.
17323         (andsi3): Likewise.
17324         * config/arc/constraints.md (Usd): Change it to memory constraint.
17326 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
17328         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
17329         as source of std instructions.
17330         * config/arc/arc.md (movsi_insn): Update pattern predicate to
17331         allow 6-bit constants as source for store instructions.
17332         (movdi_insn): Update instruction pattern to allow 6-bit constants
17333         as source for store instructions.
17335 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
17337         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
17339 2018-04-30  Nathan Sidwell  <nathan@acm.org>
17340             Sandra Loosemore <sandra@codesourcery.com>
17342         * dumpfile.c (dump_open): Allow '-' for stdout.
17343         * doc/invoke.texi (Developer Options): Document dump filename
17344         determination early.  Document stdin/stdout selection.
17346 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
17348         Microblaze Target: PIC data text relative
17350         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
17351         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
17352         Add declaration.
17353         * config/microblaze/microblaze.h (microblaze_constant_address_p):
17354         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
17355         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
17356         New addressing mode for data-text relative position indepenedent code.
17357         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
17358         'ADDRESS_SYMBOLIC_TXT_REL'.
17359         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
17360         (microblaze_legitimate_pic_operand): Exclude function calls from
17361         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
17362         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
17363         addresses cases.
17364         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17365         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
17366         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
17367         for 'address + offset'.
17368         (microblaze_expand_prologue): Add new function prologue call for
17369         'r20' assignation.
17370         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
17371         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
17372         table in case of TARGET_PIC_DATA_TEXT_REL.
17373         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
17374         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
17375         Add new macros 'UNSPEC_TEXT',
17376         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
17377         + exclude function calls from 'UNSPEC_PLT' in case of data text
17378         relative mode.
17379         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17380         new target hook for generating address diff vector tables in case of
17381         flag_pic.
17382         * doc/tm.texi : Regenerate.
17383         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
17384         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
17385         of addr diff vector generation.
17386         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
17387         target hook definition.
17388         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
17389         Add default function for generate_pic_addr_diff_vec -> flag_pic.
17390         * doc/invoke.texi (Add new pic option): Add new microblaze pic
17391         option for data text relative.
17393 2018-04-30  Richard Biener  <rguenther@suse.de>
17395         * tree-chrec.h (evolution_function_is_constant_p): Remove
17396         redundant check.
17397         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
17399 2018-04-30  Richard Biener  <rguenther@suse.de>
17401         PR bootstrap/85571
17402         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
17404 2018-04-30  Richard Biener  <rguenther@suse.de>
17406         PR tree-optimization/28364
17407         PR tree-optimization/85275
17408         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
17409         copying first exit test.
17411 2018-04-28  Mark Wielaard  <mark@klomp.org>
17413         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
17414         dwarf_version >= 5.
17415         (dwarf_AT): Handle DW_AT_addr_base.
17416         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
17418 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
17420         PR target/84431
17421         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
17422         (*ashl<dwi>3_doubleword_mask_1): Ditto.
17423         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
17424         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
17426 2018-04-28  Richard Biener  <rguenther@suse.de>
17428         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
17429         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
17430         to reflect use.  Only add interesting stmts.
17432 2018-04-27  Martin Jambor  <mjambor@suse.cz>
17434         PR ipa/85549
17435         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
17436         the jump function allows for passing through aggregate values.
17438 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
17440         * input.h (in_system_header_at): Convert from macro to inline
17441         function.
17442         (from_macro_expansion_at): Likewise.
17443         (from_macro_definition_at): Likewise.
17445 2018-04-27  Jeff Law  <law@redhat.com>
17447         * config.gcc: Mark tile* targets as deprecated/obsolete.
17449 2018-04-27  Richard Biener  <rguenther@suse.de>
17451         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
17452         fix for ILP32.
17454 2018-04-27  Richard Biener  <rguenther@suse.de>
17456         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
17458 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
17460         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
17461         with Yd constraint. Set "preferred_for_speed" attribute from
17462         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
17463         with Yd constraint.
17464         (*movdi_internal): Ditto.
17465         (movti_interunit splitters): Remove
17466         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
17467         (movdi_interunit splitters): Ditto.
17468         * config/i386/constraints.md (Ye): Remove.
17469         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
17471 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17473         PR target/85512
17474         * config/aarch64/constraints.md (Usg): Limit to 31.
17475         (Usj): Limit to 63.
17477 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
17479         PR tree-optimization/85529
17480         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
17481         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
17482         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
17483         zero extension or masking of the MSB bit.
17484         (optimize_range_tests): Add FIRST_BB argument, pass it through
17485         to optimize_range_tests_var_bound.
17486         (maybe_optimize_range_tests, reassociate_bb): Adjust
17487         optimize_range_tests callers.
17489 2018-04-26  Richard Biener  <rguenther@suse.de>
17490             Jakub Jelinek  <jakub@redhat.com>
17492         * cgraph.h (symbol_table): Just declare debug method here.
17493         * symtab.c (symbol_table::debug): Define.
17495 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
17497         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
17499 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
17501         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
17502         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
17503         (*movdi_internal): Substitute Yi and Yj constraint with x
17504         and Ym and Yn constraint with y constraint.  Update "isa"
17505         attribute and set "preferred_for_speed" attribute from
17506         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
17507         (*movsi_internal): Ditto.
17508         (*movdf_internal): Ditto.
17509         (*movsf_internal): Ditto.
17510         (*zero_extendsidi2): Ditto.
17511         * config/i386/sse.md (vec_set<mode>_0): Ditto.
17512         (sse2_loadld): Ditto.
17513         (*vec_extract<ssevecmodelower>_0): Ditto.
17514         (*vec_extractv4si_0_zext_sse4): Ditto.
17515         (vec_concatv2di): Ditto.
17516         (*vec_dup<mode>): Ditto.
17517         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
17518         * config/i386/constraints.md (Yi): Remove.
17519         (Yj): Remove.
17520         (Ym): Remove.
17521         (Yn): Remove.
17523 2018-04-26  Nathan Sidwell  <nathan@acm.org>
17525         * dumpfile.c (dump_open): New.
17526         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
17527         (dump_finish): Detect stdio/stderr by value not name.
17529 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
17531         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
17533 2018-04-26  Tom de Vries  <tom@codesourcery.com>
17535         PR target/84952
17536         * config/nvptx/nvptx.c (verify_neutering_jumps)
17537         (verify_neutering_labels): New function
17538         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
17540 2018-04-26  Tom de Vries  <tom@codesourcery.com>
17542         PR target/84025
17543         * config/nvptx/nvptx.c (needs_neutering_p): New function.
17544         (nvptx_single): Use needs_neutering_p to skip over insns that do not
17545         need neutering.
17547 2018-04-26  Richard Biener <rguenther@suse.de>
17548             Tom de Vries  <tom@codesourcery.com>
17550         PR lto/85422
17551         * lto-streamer-out.c (output_function): Fixup loops if required to match
17552         discovery done in the reader.
17554 2018-04-26  Richard Biener  <rguenther@suse.de>
17556         PR tree-optimization/85116
17557         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
17558         have a loop exit from the single latch predecessor.  Remove
17559         case of header with just condition.
17560         (ch_base::copy_headers): Exclude infinite loops from any
17561         processing.
17562         (pass_ch::execute): Record exits.
17564 2018-04-26  Richard Biener  <rguenther@suse.de>
17566         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
17567         prologue cost vector and pass it to vect_get_load_cost.
17568         (vect_get_peeling_costs_all_drs): Likewise.
17569         (vect_peeling_hash_get_lowest_cost): Likewise.
17570         (vect_enhance_data_refs_alignment): Likewise.
17572 2018-04-26  Richard Biener  <rguenther@suse.de>
17574         PR middle-end/85450
17575         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
17576         checking of integer<->pointer conversions.
17577         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
17578         sign-/zero-extending pointer types.
17579         (expand_omp_for_static_chunk): Likewise.
17581 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
17582             Jean Lee  <xiaoyur347@gmail.com>
17584         * config/mips/mips.c (mips_asan_shadow_offset): New function.
17585         (TARGET_ASAN_SHADOW_OFFSET): Define.
17586         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
17587         true for -fsanitize=address.
17589 2018-04-25  Mark Wielaard  <mark@klomp.org>
17591         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
17592         shorter ones.
17594 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
17596         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
17597         than "alu", remove explicit "memory" and "imm_disp" attributes.
17598         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
17600         PR middle-end/85414
17601         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
17602         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
17603         gen_lowpart_no_emit.
17605 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
17607         PR target/85473
17608         * config/i386/i386.c (ix86_expand_builtin): Change memory
17609         operand to XI, extend p0 to Pmode.
17610         * config/i386/i386.md: Change unspec volatile and operand
17611         1 mode to XI, change operand 0 mode to P.
17613 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17615         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
17616         GET_MODE_MASK before any checking.
17617         (nds32_can_use_bset_p): Likewise.
17618         (nds32_can_use_btgl_p): Likewise.
17620 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17622         * config/nds32/nds32-doubleword.md: New define_split pattern for
17623         illegal register number.
17625 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17627         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
17629 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
17631         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
17633 2018-04-25  Richard Biener  <rguenther@suse.de>
17635         * lto-streamer.h (LTO_major_version): Bump to 8.
17637 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
17639         * BASE-VER: Set to 9.0.0.
17641 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
17643         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
17644         in __abskf2 and __powikf2.
17646 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17648         PR target/85512
17649         * config/aarch64/constraints.md (Usg, Usj): New constraints.
17650         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
17651         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
17652         Use the above on operand 2.  Reindent.
17653         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
17655 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17657         PR target/85485
17658         * common/config/i386/i386-common.c (ix86_handle_option): Don't
17659         handle OPT_mcet.
17660         * config/i386/i386.opt (mcet): Removed.
17661         * doc/install.texi: Remove -mcet documentation.
17662         * doc/invoke.texi: Likewise.
17664 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
17666         PR target/85485
17667         * doc/install.texi: Remove -mcet from bootstrap-cet.
17669 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17671         PR target/85511
17672         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
17673         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
17674         if TARGET_64BIT.
17676         PR target/85503
17677         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
17678         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
17679         containing a CONST_VECTOR.
17681 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
17683         * doc/install.texi: Update newlib dependency for nvptx.
17685 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17687         PR target/85508
17688         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
17689         instead of INTVAL when shifting x left.
17691 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
17693         PR tree-optimization/85478
17694         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
17695         vect_grouped_store_supported for single element vectors.
17697 2018-04-24  Richard Biener  <rguenther@suse.de>
17699         PR target/85491
17700         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
17701         load cost increase to the case of non-constant step.
17703 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
17705         PR target/84828
17706         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
17707         destination if any_malformed_asm.
17709 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
17711         PR middle-end/85496
17712         * expr.c (store_field): In the bitfield case, if the value comes from
17713         a function call and is returned in registers by means of a PARALLEL,
17714         do not change the mode of the temporary unless BLKmode and VOIDmode.
17716 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
17718         PR rtl-optimization/85423
17719         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
17720         dependencies to debug insns when the previous insn is non-debug.
17722 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17724         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
17725         enums into a single definition.
17726         (fls): Fix predicates and printing.
17727         (seti): Likewise.
17729 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
17731         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
17732         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
17733         and short u6 immediate.
17734         (check_if_valid_sleep_operand): Remove.
17735         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
17737 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17739         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
17740         flag_always_save_lp condition.
17741         * config/nds32/nds32.opt (malways-save-lp): New option.
17743 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17745         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
17746         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
17747         * config/nds32/nds32.h
17748         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
17749         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
17751 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17753         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
17754         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
17756 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
17757             Chung-Ju Wu  <jasonwucj@gmail.com>
17759         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
17760         Declare.
17761         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
17762         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
17764 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17766         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
17768 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17770         * config/nds32/nds32-protos.h (nds32_data_alignment,
17771         nds32_local_alignment): Declare.
17772         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
17773         nds32_local_alignment): New functions.
17774         (TARGET_CONSTANT_ALIGNMENT): Define.
17775         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
17777 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17779         * config/nds32/nds32.c
17780         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
17781         (TARGET_MODES_TIEABLE_P): Likewise.
17783 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
17785         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
17786         level Ofast and Og.
17788 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
17789             Chung-Ju Wu  <jasonwucj@gmail.com>
17791         * config/nds32/constants.md (unspec_volatile_element): Add enum values
17792         for unaligned access.
17793         * config/nds32/nds32-intrinsic.c: Implementation of expanding
17794         unaligned access.
17795         * config/nds32/nds32-intrinsic.md: Likewise.
17796         * config/nds32/nds32_intrinsic.h: Likewise.
17797         * config/nds32/nds32.h (nds32_builtins): Likewise.
17798         * config/nds32/nds32.opt (munaligned-access): New option.
17799         * config/nds32/nds32.c (nds32_asm_file_start): Display
17800         flag_unaligned_access status.
17802 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17804         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
17805         -mno-relax is present.
17806         * config/riscv/linux.h (LINK_SPEC): Ditto.
17808 2018-04-20  Martin Sebor  <msebor@redhat.com>
17810         PR c/85365
17811         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
17812         for null pointers.
17813         (gimple_fold_builtin_stxcpy_chk): Same.
17814         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
17816 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
17818         PR target/85456
17819         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
17820         __powikf2 when long double is IEEE 128-bit.
17822 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
17824         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
17825         step to make sure stack always aligned.
17827 2018-04-20  Carl Love  <cel@us.ibm.com>
17829         PR target/83402
17830         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
17831         size check for arg0.
17833 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
17834             Tom de Vries  <tom@codesourcery.com>
17836         PR target/85445
17837         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
17838         Emit insns for calls too.
17839         (nvptx_find_par): Always look for worker-level predecessor insn.
17840         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
17841         calls.
17842         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
17843         (nvptx_process_pars): Propagate frames for calls.
17845 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
17847         PR target/85469
17848         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
17849         Removed.
17850         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
17851         (ix86_handle_option): Don't handle OPT_mibt.
17852         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
17853         __SHSTK__.
17854         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
17855         has_ibt and ibt.
17856         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
17857         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
17858         (ix86_target_macros): Define __CET__ with flag_cf_protection
17859         for -fcf-protection.
17860         * config/i386/i386.c (isa2_opts): Remove -mibt.
17861         * config/i386/i386.h (TARGET_IBT): Removed.
17862         (TARGET_IBT_P): Likewise.
17863         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
17864         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
17865         * config/i386/i386.opt (mcet): Update help message.
17866         (mshstk): Likewise.
17867         (mibt): Removed.
17868         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
17869         -mcet as an alias for -mshstk.
17871 2018-04-20  Richard Biener <rguenther@suse.de>
17873         PR middle-end/85475
17874         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
17875         complexity by forcing a single use of the multiply operand.
17877 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17879         ipa/85449
17880         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
17881         recursion dependency to only apply to non-clones.
17883 2018-04-20  Martin Jambor  <mjambor@suse.cz>
17885         ipa/85447
17886         * ipa-cp.c (create_specialized_node): Check that clones of
17887         self-recursive edges exist during IPA-CP.
17889 2018-04-19  Toon Moene  <toon@moene.org>
17891         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17892         by -O3.
17894 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17896         PR tree-optimization/85467
17897         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17898         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
17899         VECTOR_CST element to type.
17901 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17903         PR target/85397
17904         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17905         * config/i386/i386.md (builtin_setjmp_setup): Removed.
17906         (builtin_longjmp): Likewise.
17907         (save_stack_nonlocal): New pattern.
17908         (restore_stack_nonlocal): Likewise.
17910 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17912         PR target/85404
17913         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17914         Replace ASM_OUTPUT_LABEL with fprintf.
17916 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
17918         PR target/85417
17919         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17920         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17921         * config/i386/i386-c.c (ix86_target_macros_internal): Also
17922         define __IBT__ and __SHSTK__ for -fcf-protection.
17923         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17924         TARGET_IBT.
17925         (ix86_trampoline_init): Likewise.
17926         (x86_output_mi_thunk): Likewise.
17927         (ix86_notrack_prefixed_insn_p): Likewise.
17928         (ix86_option_override_internal): Don't disallow -fcf-protection.
17929         * config/i386/i386.md (rdssp<mode>): Also enable for
17930         -fcf-protection.
17931         (incssp<mode>): Likewise.
17932         (nop_endbr): Likewise.
17933         * config/i386/i386.opt (mcet): Change help message to built-in
17934         functions only.
17935         (mibt): Likewise.
17936         (mshstk): Likewise.
17937         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17938         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
17939         enable CET built-in functions.
17941 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
17943         * common/config/i386/i386-common.c
17944         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17945         OPTION_MASK_ISA_MOVDIRI_UNSET,
17946         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17947         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17948         * config.gcc (movdirintrin.h): New header.
17949         * config/i386/cpuid.h (bit_MOVDIRI,
17950         bit_MOVDIR64B): New bits.
17951         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17952         and -mmvodir64b.
17953         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17954         (VOID, PVOID, PCVOID)): New function types.
17955         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17956         __builtin_ia32_directstoreu_u64,
17957         __builtin_ia32_movdir64b): New builtins.
17958         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17959         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17960         and -mmovdiri.
17961         (ix86_valid_target_attribute_inner_p): Ditto.
17962         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17963         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17964         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17965         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17966         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17967         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17968         (movdiri<mode>, movdir64b_<mode>): New.
17969         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17970         * config/i386/immintrin.h: Include movdirintrin.h.
17971         * config/i386/movdirintrin.h: New file.
17972         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17974 2018-04-19  Richard Biener  <rguenther@suse.de>
17976         PR middle-end/85455
17977         * cfg.c (clear_bb_flags): When loop state says we have
17978         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17980 2018-04-19  Richard Biener  <rguenther@suse.de>
17982         PR tree-optimization/84737
17983         * tree-vect-data-refs.c (vect_copy_ref_info): New function
17984         copying restrict info.
17985         (vect_setup_realignment): Use it.
17986         * tree-vectorizer.h (vect_copy_ref_info): Declare.
17987         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17988         the first DR to all generated stores.
17989         (vectorizable_load): Likewise for loads.
17991 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
17993         PR tree-optimization/85446
17994         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17995         the integral and pointer types to have the same precision.
17997         * doc/install.texi: Document --disable-cet being the default and
17998         --enable-cet=auto.
18000 2018-04-18  Martin Liska  <mliska@suse.cz>
18002         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
18003         style.
18005 2018-04-18  Martin Liska  <mliska@suse.cz>
18007         Revert
18008         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
18010         PR ipa/83983
18011         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
18012         arguments if they are comparable.
18014 2018-04-18  Martin Liska  <mliska@suse.cz>
18016         Revert
18017         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
18019         PR lto/84805
18020         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
18021         incomplete types.
18023 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
18025         PR target/85388
18026         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
18027         ENDBR after calling __morestack.
18029 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
18031         PR jit/85384
18032         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
18033         by using gcc_base_ver to generate a gcc_driver_version, and use
18034         it when generating GCC_DRIVER_NAME.
18035         * configure: Regenerate.
18037 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
18039         PR target/81084
18040         * config.gcc: Obsolete powerpc*-*-*spe*.
18042 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18044         PR debug/84637
18045         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
18046         (stabstr_D): Change type of unum from unsigned int to
18047         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
18048         type.
18050 2018-04-17  Jim Wilson  <jimw@sifive.com>
18052         PR 84856
18053         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
18054         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
18055         Set arg_pointer_offset after using pretend_args_size.
18057 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18059         PR rtl-optimization/85431
18060         * dse.c (record_store): Ignore zero width stores.
18062         PR sanitizer/85230
18063         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
18064         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
18065         __builtin_stack_restore rather than after it.
18066         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
18067         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
18068         argument instead of virtual_dynamic_stack_rtx.
18070 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18072         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
18073         New prototype.
18074         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18075         Add note to error message to explain internal mapping of overloaded
18076         built-in function name to non-overloaded built-in function name.
18077         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
18078         function.
18080 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18082         PR target/85424
18083         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
18084         where the inputs overlap with the output.
18086 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18088         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
18089         (=v, v) alternative and explicit "memory" attribute.
18090         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
18091         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18092         attributes.
18093         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
18094         "sselog1" type instead of "sselog".
18095         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
18096         "sselog".  Remove explicit "memory" attribute.
18097         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
18098         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18099         attributes.
18100         (vec_extract_hi_v32hi): Merge all alternatives into one, use
18101         "sselog1" type instead of "sselog".  Remove explicit "memory"
18102         attribute.
18103         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
18104         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18105         attribute.
18106         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
18107         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
18108         attributes.
18109         (vec_extract_hi_v64qi): Merge all alternatives into one, use
18110         "sselog1" type instead of "sselog".  Remove explicit "memory"
18111         attribute.
18112         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
18113         use "sselog1" type instead of "sselog".  Remove explicit "memory"
18114         attribute.
18116         PR target/85430
18117         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
18119         PR middle-end/85414
18120         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
18121         on a SUBREG.
18123 2018-04-17  Martin Jambor  <mjambor@suse.cz>
18125         PR ipa/85421
18126         * ipa-cp.c (create_specialized_node): Call
18127         expand_all_artificial_thunks if necessary.
18129 2018-04-17  Martin Liska  <mliska@suse.cz>
18131         PR lto/85405
18132         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
18133         in message, remote space in between '_G' and '('.
18135 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
18137         PR target/85281
18138         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
18139         avx512f_vmcmp<mode>3<round_saeonly_name>,
18140         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
18141         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
18142         avx512f_rndscale<mode><round_saeonly_name>,
18143         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
18144         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
18145         Use %<iptr>2 instead of %2 for -masm=intel.
18146         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
18147         avx512f_vcvttss2usi<round_saeonly_name>,
18148         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
18149         -masm=intel.
18150         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
18151         avx512f_vcvttsd2usi<round_saeonly_name>,
18152         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
18153         Use %q1 instead of %1 for -masm=intel.
18154         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
18155         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
18156         of %3 for -masm=intel.
18157         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
18158         -masm=intel.
18159         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
18160         -masm=intel.
18161         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
18162         -masm=intel.
18163         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
18164         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
18165         %g1.
18166         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
18167         -masm=intel.
18168         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
18169         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
18170         %g1 and one with %0 and %1.
18171         (avx512er_vmrcp28<mode><round_saeonly_name>,
18172         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
18173         %1 for -masm=intel.
18174         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
18175         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
18176         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
18177         of %0 and %{%4%} for -masm=intel.
18178         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
18179         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
18180         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
18181         order of %0 and %{%5%}%{z%} for -masm=intel.
18183 2018-04-17  Jan Hubicka  <jh@suse.cz>
18185         PR lto/85405
18186         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
18188 2018-04-17  Martin Liska  <mliska@suse.cz>
18190         PR ipa/85329
18191         * multiple_target.c (create_dispatcher_calls): Set apostrophes
18192         for target_clone error message.  Make default implementation
18193         clone to be a local declaration.
18194         (separate_attrs): Add new argument and check for an empty
18195         string.
18196         (expand_target_clones): Handle it.
18197         (ipa_target_clone): Make redirection just for target_clones
18198         functions.
18200 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
18201             Tom de Vries  <tom@codesourcery.com>
18203         PR middle-end/84955
18204         * omp-expand.c (expand_oacc_for): Add dummy false branch for
18205         tiled basic blocks without omp continue statements.
18207 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
18209         PR target/83660
18210         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
18211         vec_extract expression as having side effects to make sure it gets
18212         a cleanup point.
18214 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
18216         PR target/85403
18217         * config/i386/i386.c (get_builtin_code_for_version): Check
18218         error_mark_node.
18220 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
18222         PR target/84331
18223         * config.gcc: Support "skylake".
18224         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18225         PROCESSOR_SKYLAKE.
18226         * config/i386/i386.c (m_SKYLAKE): Define.
18227         (processor_target_table): Add "skylake".
18228         (ix86_option_override_internal): Add "skylake".
18229         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
18230         PROCESSOR_CANNONLAKE.
18231         (get_builtin_code_for_version): Fix priority for
18232         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
18233         PROCESSOR_SKYLAKE-AVX512.
18234         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
18235         (processor_type): Add PROCESSOR_SKYLAKE.
18237 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
18238             Jason Merrill  <jason@redhat.com>
18240         PR c++/85112
18241         * convert.c (convert_to_integer_1): Use direct recursion for
18242         enumeral types and types with a precision less than the number
18243         of bits in their mode.
18245 2018-04-16  Julia Koval  <julia.koval@intel.com>
18247         PR target/84413
18248         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
18249         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
18251 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
18253         PR target/85293
18254         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
18255         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
18256         and -mno-direct-move.
18258 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
18260         PR target/83402
18261         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
18262         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
18263         Ensure negative shifts result in {0}.
18265 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
18267         PR rtl-optimization/79916
18268         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
18269         regs (if any) to define how to gnerate SD moves when LRA is in
18270         progress.
18272 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
18274         PR rtl-optimization/85393
18275         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
18276         * except.c (expand_dw2_landing_pad_for_region): Make static.
18277         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
18278         a label and unconditional jump to old_bb, rather than
18279         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
18280         basic block.
18282         PR rtl-optimization/85376
18283         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
18284         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
18285         instead of a specific value.
18287 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18288             Bin Cheng  <bin.cheng@arm.com>
18290         PR tree-optimization/82965
18291         PR tree-optimization/83991
18292         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
18293         by_profile_only parameter.
18294         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
18295         information if the loop was predicted to iterate too many times.
18296         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
18298 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
18300         PR lto/71991
18301         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
18302         always inline.
18304 2018-04-13  Martin Liska  <mliska@suse.cz>
18305             Jakub Jelinek  <jakub@redhat.com>
18307         PR middle-end/81657
18308         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
18309         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
18310         * builtins.c (expand_builtin_memory_copy_args): Use
18311         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
18312         handle dest_addr == pc_rtx.
18314 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
18316         PR target/85291
18317         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
18318         asked to not generate direct moves.
18319         (fix_trunc<mode>si2_stfiwx): Similar.
18320         (fix_trunc<mode>si2_internal): Similar.
18322 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18324         PR debug/83157
18325         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
18326         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
18327         lookup if dest in some wider mode is known to be const0_rtx and
18328         if so, record permanent equivalence for it to be ZERO_EXTEND of
18329         the narrower mode destination.
18331 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18333         * lto-streamer-out.c (output_function): Revert 259346.
18334         * omp-expand.c (expand_oacc_for): Likewise.
18336 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
18338         PR rtl-optimization/85354
18339         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
18340         * sel-sched.c (sel_global_init): ... here.
18342 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
18344         PR target/85238
18345         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
18346         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
18347         mode for PE-COFF targets.
18348         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
18349         (i386_pe_asm_lto_end): Likewise.
18350         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
18351         (TARGET_ASM_LTO_END): Likewise.
18352         * config/i386/winnt.c (saved_debug_info_level): New static variable.
18353         (i386_pe_asm_lto_start): New function.
18354         (i386_pe_asm_lto_end): Likewise.
18356 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
18357             Richard Biener  <rguenther@suse.de>
18359         PR middle-end/84955
18360         * lto-streamer-out.c (output_function): Fix CFG loop state before
18361         streaming out.
18362         * omp-expand.c (expand_oacc_for): Handle calls to internal
18363         functions like regular functions.
18365 2018-04-12  Richard Biener  <rguenther@suse.de>
18367         PR lto/85371
18368         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
18369         for the early LTO debug to properly generate references to it
18370         during DIE emission.  Do not re-use that for the skeleton for
18371         split-dwarf.
18372         (dwarf2out_early_finish): Likewise.
18374 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18376         PR target/85328
18377         * config/i386/sse.md
18378         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
18379         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
18380         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
18381         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
18382         and output is a reg, avoid creating invalid lowpart subreg, but
18383         instead split into a 512-bit move.  Don't split if not AVX512VL,
18384         input is xmm16+ reg and output is a mem.
18385         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
18386         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
18387         xmm16+ reg and output is a mem.
18389 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18391         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
18392         also for flag_dwarf2_cfi_asm.
18394 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
18396         PR rtl-optimization/85342
18397         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
18398         a bool scalar var inside of the loop instead.  Don't try to update
18399         recog_data.operand after failed apply_change_group.
18401 2018-04-12  Tom de Vries  <tom@codesourcery.com>
18403         PR target/85296
18404         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
18405         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
18406         array with flexible array member as array without given dimension.
18407         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
18408         argument for undefined param to true.
18410 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
18412         PR target/85321
18413         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18414         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
18415         from PowerPC section.
18416         * config/rs6000/sysv4.opt (mcall-): Improve help text.
18417         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
18418         help text that is too long.
18419         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
18420         help text that is too long.
18421         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
18422         help text that is too long.
18424 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
18426         * config/alpha/alpha.md (stack_probe_internal): Rename
18427         from "probe_stack".  Update all callers.
18429 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18431         PR rtl-optimization/84566
18432         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
18433         sched_macro_fuse_insns.
18435 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18437         PR target/84301
18438         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
18439         (compute_block_dependences): ... from here.
18441 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18443         PR tree-optimization/85331
18444         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
18445         from int to HOST_WIDE_INT.
18447 2018-04-11  Martin Jambor  <mjambor@suse.cz>
18449         PR ipa/84149
18450         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
18451         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
18452         not the same as the source val.
18453         (cgraph_edge_brings_value_p): New parameter.
18454         (gather_edges_for_value): Pass destination value to
18455         cgraph_edge_brings_value_p.
18456         (perhaps_add_new_callers): Likewise.
18457         (get_info_about_necessary_edges): Likewise and exclude values brought
18458         only by self-recursive edges.
18459         (create_specialized_node): Redirect only clones of self-calling edges.
18460         (+self_recursive_pass_through_p): New function.
18461         (find_more_scalar_values_for_callers_subset): Use it.
18462         (find_aggregate_values_for_callers_subset): Likewise.
18463         (known_aggs_to_agg_replacement_list): Removed.
18464         (decide_whether_version_node): Re-calculate known constants for all
18465         remaining context clones.
18467 2018-04-11  Richard Biener  <rguenther@suse.de>
18469         PR lto/85339
18470         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
18471         from early DWARF output.
18472         (dwarf2out_early_finish): Output line info unconditionally into
18473         early DWARF and add reference to it.
18475 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18477         PR target/85281
18478         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
18479         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
18480         other than V2DFmode using iptr mode attribute.
18481         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
18483 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
18485         PR rtl-optimization/84659
18486         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
18488 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
18490         PR debug/85302
18491         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
18492         SIZEP is NULL.
18493         (output_loc_list): Pass address of a dummy size variable even in the
18494         locview handling loop.
18495         (index_location_lists): Add comment on why skip_loc_list_entry can't
18496         call size_of_locs.
18498 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18500         PR target/85261
18501         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
18502         into register.
18504 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
18506         PR target/85321
18507         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
18508         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
18509         and -mstring-compare-inline-limit.
18511 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18513         PR target/85287
18514         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
18515         for stack clash protection in a register whenever we need it to be in
18516         a register.
18518 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18520         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
18521         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
18523 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
18525         PR target/85321
18526         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
18527         the help text.
18528         (mlong-double-): Ditto.
18529         * config/rs6000/sysv4.opt (msdata=): Ditto.
18530         (mtls-size=): Ditto.
18532 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18534         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18535         erroneous entries for
18536         "vector int vec_ldl (int, long int *)", and
18537         "vector unsigned int vec_ldl (int, unsigned long int *)".
18538         Add comments and entries for
18539         "vector bool char vec_ldl (int, bool char *)",
18540         "vector bool short vec_ldl (int, bool short *)",
18541         "vector bool int vec_ldl (int, bool int *)",
18542         "vector bool long long vec_ldl (int, bool long long *)",
18543         "vector pixel vec_ldl (int, pixel *)",
18544         "vector long long vec_ldl (int, long long *)",
18545         "vector unsigned long long vec_ldl (int, unsigned long long *)".
18546         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
18547         type tree bool_long_long_type_node and correct definition of
18548         bool_V2DI_type_node to make reference to this new type tree.
18549         (rs6000_mangle_type): Replace erroneous reference to
18550         bool_long_type_node with bool_long_long_type_node.
18551         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
18552         comments to emphasize sign distinctions for char and int types and
18553         replace RS6000_BTI_bool_long constant with
18554         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
18555         use of RS6000_BTI_pixel.
18556         (bool_long_type_node): Remove this macro definition.
18557         (bool_long_long_type_node): New macro definition
18559 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
18561         PR rtl-optimization/85300
18562         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
18563         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
18564         simplify_unary_operation fails.
18566 2018-04-10  Martin Liska  <mliska@suse.cz>
18568         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
18569         cgraph_edge and ipa_ref.
18571 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
18573         PR target/85177
18574         PR target/85255
18575         * config/i386/sse.md
18576         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
18577         computation of the VEC_MERGE selector from mask.
18578         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
18579         Fix decoding of the VEC_MERGE selector into mask.
18581 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
18583         PR tree-optimization/85286
18584         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
18586 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
18588         * final.c (final_1): Set insn_last_address as well as
18589         insn_current_address.
18591 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18593         PR target/85173
18594         * explow.c (emit_stack_probe): Call validize_mem on memory location
18595         before passing it to gen_probe_stack.  Create address operand and
18596         legitimize it for the probe_stack_address case.
18598 2018-04-09  Jan Hubicka  <jh@suse.cz>
18600         PR lto/85078
18601         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
18602         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
18603         * tree.c (free_lang_data_in_type): Fix handling of binfos;
18604         walk basetypes.
18605         (free_lang_data): Rebuild type inheritance graph.
18607 2018-04-09  Martin Sebor  <msebor@redhat.com>
18609         * invoke.texi (-finline-small-functions): Mention other optimization
18610         options.
18611         (-findirect-inlining, -fpartial-inlining): Same.
18612         (-finline-functions-called-once): Same.
18613         (-freorder-blocks-and-partition): Same.
18615 2018-04-09  Jan Hubicka  <jh@suse.cz>
18617         PR rtl/84058
18618         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
18619         jumps; choose last target that matches the criteria (i.e.
18620         no partition changes for non-crossing jumps).
18621         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
18622         support for redirecting crossing jumps to non-crossing.
18624 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
18626         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
18627         also for naked functions.
18629 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
18631         * config/arc/arc.md (add_shift): New pattern.
18632         (add_shift2): Likewise.
18633         (sub_shift): Likewise.
18634         (sub_shift_cmp0_noout): Likewise.
18635         (compare_si_ashiftsi): Likewise.
18636         (xbfu_cmp0_noout): New combine pattern.
18637         (xbfu_cmp0"): Likewise.
18638         (movsi_set_cc_insn): Place the predicable variant first.
18639         (commutative_binary_cmp0_noout): Remove clobber.
18640         (commutative_binary_cmp0): New pattern.
18641         (noncommutative_binary_cmp0): Likewise.
18642         (noncommutative_binary_cmp0_noout): Likewise.
18643         (noncommutative_binary_comparison_result_used): Removed.
18644         (rsub_cmp0): New pattern.
18645         (rsub_cmp0_noout): Likewise.
18646         (extzvsi): Changed, keep only meaningful variants.
18647         (SQH, SEZ): New iterators.
18648         (SQH_postfix): New mode attribute.
18649         (SEZ_prefix): New code attribute.
18650         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
18651         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
18652         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
18653         of numerical value.
18654         (noncommutative_operator): Check the availability of barrel
18655         shifter option.
18657 2018-04-09  Richard Biener  <rguenther@suse.de>
18659         PR tree-optimization/85284
18660         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
18661         Only use the niter constraining form of simple_iv when the exit
18662         is always executed.
18664 2018-04-09  Tom de Vries  <tom@codesourcery.com>
18666         PR target/84041
18667         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18668         (define_expand "*memory_barrier"): New define_expand.
18669         (define_insn "memory_barrier"): New insn.
18671 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18673         PR rtl-optimization/80463
18674         PR rtl-optimization/83972
18675         PR rtl-optimization/83480
18677         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
18678         correct producer for the insn.
18679         (tidy_control_flow): Fixup seqnos in case of debug insns.
18681 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18683         PR rtl-optimization/83913
18685         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
18686         different sched-times when merging exprs.
18688 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18690         PR rtl-optimization/83962
18692         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
18693         tidy_fallthru_edge and tidy_control_flow.
18695 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
18697         PR rtl-optimization/83530
18699         * sel-sched.c (force_next_insn): New global variable.
18700         (remove_insn_for_debug): When force_next_insn is true, also leave only
18701         next insn in the ready list.
18702         (sel_sched_region): When the region wasn't scheduled, make another pass
18703         over it with force_next_insn set to 1.
18705 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18707         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
18708         into tm_file.
18709         * config/nds32/constants.md (unspec_volatile_element): Add enum values
18710         for interrupt control.
18711         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18712         functions for interrupt control.
18713         * config/nds32/nds32-intrinsic.md: Likewise.
18714         * config/nds32/nds32_intrinsic.h: Likewise.
18715         * config/nds32/nds32.h (nds32_builtins): Likewise.
18717 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18719         * config/nds32/nds32.c (nds32_init_machine_status,
18720         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
18721         strict_aligned_p field.
18722         (nds32_expand_to_rtl_hook): New function.
18723         (TARGET_EXPAND_TO_RTL_HOOK): Define.
18724         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
18726 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18727             Chung-Ju Wu  <jasonwucj@gmail.com>
18729         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
18730         * config/nds32/nds32-n7.md: New file.
18731         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
18732         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
18733         pipeline.
18734         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
18735         * config/nds32/nds32.md (pipeline_model): Add n7.
18736         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
18737         * config/nds32/pipelines.md: Include n7 settings.
18739 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18740             Chung-Ju Wu  <jasonwucj@gmail.com>
18742         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
18743         * config/nds32/nds32-e8.md: New file.
18744         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
18745         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
18746         pipeline.
18747         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
18748         * config/nds32/nds32.md (pipeline_model): Add e8.
18749         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
18750         * config/nds32/pipelines.md: Include e8 settings.
18752 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18753             Chung-Ju Wu  <jasonwucj@gmail.com>
18755         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
18756         * config/nds32/nds32-n8.md: New file.
18757         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
18758         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
18759         pipeline.
18760         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
18761         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
18762         * config/nds32/nds32.md (pipeline_model): Add n8.
18763         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
18764         * config/nds32/pipelines.md: Include n8 settings.
18766 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
18767             Chung-Ju Wu  <jasonwucj@gmail.com>
18769         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
18770         * config/nds32/nds32-n9-2r1w.md: New file.
18771         * config/nds32/nds32-n9-3r2w.md: New file.
18772         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
18773         nds32_register_ports): New or modify for cpu n9.
18774         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
18775         pipeline.
18776         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
18777         * config/nds32/nds32-utils.c: New file.
18778         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
18779         TARGET_MUL_SLOW): Define.
18780         * config/nds32/nds32.md (pipeline_model): New attribute.
18781         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
18782         New options that support cpu n9.
18783         * config/nds32/pipelines.md: Include n9 settings.
18784         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
18786 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
18788         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
18789         information if necessary.
18790         (output_cond_branch_compare_zero): Likewise.
18791         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
18792         (nds32_target_alignment): Refine for alignment.
18793         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
18794         (FUNCTION_BOUNDARY): Modify.
18795         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
18796         align case.
18797         * config/nds32/nds32.opt (malways-align, malign-functions): New.
18799 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
18801         * config/nds32/constants.md (unspec_volatile_element): Add values for
18802         TLB operation and data prefetch.
18803         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
18804         functions for TLB operation and data prefetch.
18805         * config/nds32/nds32-intrinsic.md: Likewise.
18806         * config/nds32/nds32_intrinsic.h: Likewise.
18807         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
18808         (nds32_print_operand): Likewise.
18809         * config/nds32/nds32.h (nds32_builtins): Likewise.
18811 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
18812         Andrew Pinski <pinsika@gcc.gnu.org>
18814         PR middle-end/82976
18815         * match.pd: Use constant_boolean_node of correct type instead of
18816         boolean_true_node or boolean_false_node for simplifying
18817         pointer comparisons to zero.
18819 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18821         PR tree-optimization/80021
18822         * tree.c (verify_type_variant): Make error call in verify_variant_match
18823         translatable and remove final full stop.
18825 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18827         * config/nds32/constants.md (unspec_volatile_element): Add
18828         UNSPEC_VOLATILE_EH_RETURN.
18829         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
18830         nds32_output_stack_pop): Support dwarf exception handling process.
18831         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
18832         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
18833         exception handling process.
18834         (nds32_compute_stack_frame): Likewise.
18835         (nds32_return_addr_rtx): Likewise.
18836         (nds32_initial_elimination_offset): Likewise.
18837         (nds32_expand_prologue): Likewise.
18838         (nds32_expand_epilogue): Likewise.
18839         (nds32_dynamic_chain_address): New function.
18840         * config/nds32/nds32.h (machine_function): Add fields for dwarf
18841         exception handling.
18842         (DYNAMIC_CHAIN_ADDRESS): Define.
18843         (EH_RETURN_DATA_REGNO): Define.
18844         (EH_RETURN_STACKADJ_RTX): Define.
18845         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
18846         patterns for dwarf exception handling.
18848 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18850         * config/nds32/nds32.h: Clean up obsolete macros.
18852 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18854         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18855         Add enum values for particular instructions.
18856         * config/nds32/nds32-intrinsic.c: Implementation of expanding
18857         particular intrinsic functions.
18858         * config/nds32/nds32-intrinsic.md: Likewise.
18859         * config/nds32/nds32_intrinsic.h: Likewise.
18860         * config/nds32/nds32.h (nds32_builtins): Likewise.
18861         * config/nds32/nds32.md (type): Add pbsad and pbsada.
18862         (btst, ave): New patterns for particular instructions.
18864 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18866         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18867         Add enum values for atomic load/store and memory sync.
18868         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
18869         and memory sync.
18870         * config/nds32/nds32-intrinsic.md: Likewise.
18871         * config/nds32/nds32_intrinsic.h: Likewise.
18872         * config/nds32/nds32.h (nds32_builtins): Likewise.
18874 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
18876         PR tree-optimization/85257
18877         * fold-const.c (native_encode_vector): If not all elts could fit
18878         and off is -1, return 0 rather than offset.
18879         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
18880         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
18881         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
18882         adjust buffer in native_interpret_expr call.
18884 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18886         * config/nds32/constants.md (unspec_volatile_element): Add cache
18887         control enum values.
18888         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18889         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18890         * config/nds32/nds32.c (nds32_cctl_names): New.
18891         (nds32_print_operand): Handle cache control register names.
18892         * config/nds32/nds32.h (nds32_builtins): New enum values.
18893         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18894         macros.
18895         * config/nds32/nds32.md (type): Add mmu.
18896         * config/nds32/pipelines.md (simple_insn): Add mmu.
18898 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18900         * config/nds32/nds32.md (type): Remove call.
18901         * config/nds32/pipelines.md (simple_insn): Likewise.
18903 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18905         * config/nds32/constants.md (unspec_volatile_element): Add
18906         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18907         UNSPEC_VOLATILE_FMFCFG.
18908         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18909         description for fmfcfg and fmfcsr.
18910         (bdesc_1arg): Add fmtcsr.
18911         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18912         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18913         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18914         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18915         unspec_fmfcfg): New patterns.
18916         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18917         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18918         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18919         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18920         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18921         __nds32__fmfcfg): Define.
18923 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
18925         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18926         intrinsic register names.
18927         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18928         intrinsic register enum values and macros.
18930 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
18932         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18933         for load/store addressing form.
18934         (nds32_print_operand_address): Likewise.
18936 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
18938         PR target/85196
18939         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18940         based on LABEL_REF.  Remove useless assertion.
18941         (pic_address_needs_scratch): Fix formatting.
18942         (sparc_legitimize_pic_address): Minor tweaks.
18943         (sparc_delegitimize_address): Adjust assertion accordingly.
18944         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18945         into symbolic_operand.
18946         (movsi_high_pic_label_ref): Likewise.
18947         (movsi_lo_sum_pic_label_ref): Likewise.
18948         (movdi_pic_label_ref): Likewise.
18949         (movdi_high_pic_label_ref): Likewise.
18950         (movdi_lo_sum_pic_label_ref): Likewise.
18952 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
18954         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18955         custom LIB_SPEC setup.
18957 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
18958             Kito Cheng  <kito.cheng@gmail.com>
18960         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18961         * config/riscv/freebsd.h: New.
18963 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18965         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18966         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18967         file.
18969 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
18970             Kito Cheng  <kito.cheng@gmail.com>
18972         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18973         nds32_output_call, nds32_symbol_binds_local_p): New functions.
18974         * config/nds32/nds32-protos.h (nds32_output_call,
18975         nds32_output_return): Declare.
18976         * config/nds32/nds32.md: Refine all the call and return patterns.
18978 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
18980         PR debug/85252
18981         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18982         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18984         PR rtl-optimization/84872
18985         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18986         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18987         EDGE_CROSSING edge.
18989 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
18991         * expr.c (copy_blkmode_to_reg): Revert 254862.
18992         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18994 2018-04-06  Richard Biener  <rguenther@suse.de>
18996         PR middle-end/85244
18997         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18998         after seeing a component reference with an adjacent field.  Treat
18999         refs to arrays at struct end of external decls similar to
19000         refs to unconstrained commons.
19002 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
19004         PR sanitizer/85213
19005         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
19006         look through SAVE_EXPRs with non-side-effects argument.  Adjust
19007         recursive calls.
19008         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
19009         save_p here.
19011 2018-04-06  Richard Biener  <rguenther@suse.de>
19013         PR middle-end/85180
19014         * alias.c (find_base_term): New wrapper around find_base_term
19015         unwinding CSELIB_VAL_PTR changes.
19016         (find_base_term): Do not restore CSELIB_VAL_PTR during the
19017         recursion.
19019 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19021         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
19022         instructions.
19023         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
19024         constant definitions.
19025         ("nop"): lr 0,0 -> nopr r0
19026         ("nop_lr0", "nop_lr1"): New insn definitions.
19028 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
19030         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
19031         NDS32_V3PUSH_AVAILABLE_P macro.
19033 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
19034             Chung-Ju Wu  <jasonwucj@gmail.com>
19036         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
19037         (nds32*-*-*): Add float and fpu_config into supported_defaults.
19038         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
19039         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
19040         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
19041         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
19042         * config/nds32/constraints.md: New constraints and checking for hard
19043         float configuration.
19044         * config/nds32/iterators.md: New mode iterator and attribute for hard
19045         float configuration.
19046         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
19047         patterns.
19048         * config/nds32/nds32-fpu.md: New file.
19049         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
19050         deal with hard float code generation.
19051         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
19052         ARCH_V3S.
19053         (abi_type, float_reg_number): New enum type.
19054         * config/nds32/nds32-predicates.c: New predicates for hard float.
19055         * config/nds32/nds32-protos.h: Declare functions for hard float.
19056         * config/nds32/nds32.c: Implementation for hard float configuration.
19057         * config/nds32/nds32.h: Definitions for hard float configuration.
19058         * config/nds32/nds32.md: Include hard float machine description and
19059         modify patterns for hard float configuration.
19060         * config/nds32/nds32.opt: New options for hard float configuration.
19061         * config/nds32/predicates.md: New predicates for hard float
19062         configuration.
19064 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19066         * common/config/nds32/nds32-common.c
19067         (nds32_option_optimization_table): Enable -mreleax-hint by default.
19069 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
19071         PR middle-end/85195
19072         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
19073         CONSTRUCTOR_ELT (ctor, ...)->value.
19075 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
19077         PR target/85193
19078         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
19080 2018-04-05  Tom de Vries  <tom@codesourcery.com>
19082         PR target/85204
19083         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
19084         cond jump.
19086 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19087             Kito Cheng  <kito.cheng@gmail.com>
19089         * config/nds32/constraints.md (U33): Fine-tune checking condition.
19090         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
19091         * config/nds32/nds32.h (nds32_16bit_address_type): Add
19092         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
19094 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
19095             Kito Cheng  <kito.cheng@gmail.com>
19097         * config/nds32/constraints.md (Ufe): New memory constraint.
19098         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
19099         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
19100         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
19101         operands.
19102         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
19103         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
19105 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19107         * config/nds32/nds32.md: Use optimize_size in the condition for
19108         alu-shift instructions.
19110 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19112         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
19114 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19116         * config/nds32/nds32.md (negsi2): Refine pattern.
19118 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19119             Chung-Ju Wu  <jasonwucj@gmail.com>
19121         * config/nds32/iterators.md (shift_rotate): New code iterator.
19122         (shift): New code attribute.
19123         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
19124         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
19125         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
19126         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
19127         bit-wise operations.
19128         (andsi3, *andsi3): Ditto.
19129         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
19130         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
19131         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
19132         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
19133         nds32_ior_operand, nds32_xor_operand): New predicates.
19135 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19137         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
19138         (addsi3, subsi3): ... this.
19140 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19142         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
19144 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19146         * config/nds32/nds32.md: Adjust indention.
19148 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
19150         * config/nds32/nds32.md (feature): New attribute.
19152 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
19154         * config/nds32/nds32.md (subtype): New attribute.
19156 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19158         PR target/85203
19159         * config/arm/arm-builtins.c (arm_expand_builtin): Change
19160         expansion to perform a bitwise AND of the argument followed by a
19161         boolean negation of the result.
19163 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
19165         PR rtl-optimization/84878
19166         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
19167         the basic block.  Assert the use reference is not artificial and that
19168         it has an associated insn.
19170 2018-04-04  Michael Matz  <matz@suse.de>
19172         * builtins.c (compute_objsize): Pass correct operand
19173         to array_at_struct_end_p.
19175 2018-04-04  Richard Biener  <rguenther@suse.de>
19177         PR lto/85176
19178         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
19179         from contexts for DINFO_LEVEL_TERSE and below.
19181 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19183         * config/nds32/nds32-doubleword.md (move_<mode>): Require
19184         resiter_operand condition.
19185         * config/nds32/nds32.md (*move<mode>): Ditto.
19187 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19188             Monk Chiang  <sh.chiang04@gmail.com>
19190         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
19192 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19194         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
19196 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19197             Kito Cheng  <kito.cheng@gmail.com>
19199         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
19200         nds32_cond_code_str, output_cond_branch,
19201         output_cond_branch_compare_zero, nds32_expand_cbranch,
19202         nds32_expand_cstore, nds32_expand_movcc,
19203         nds32_output_cbranchsi4_equality_zero,
19204         nds32_output_cbranchsi4_equality_reg,
19205         nds32_output_cbranchsi4_equality_reg_or_const_int,
19206         nds32_output_cbranchsi4_greater_less_zero: New functions.
19207         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
19208         nds32_expand_cstore, nds32_expand_movcc,
19209         nds32_output_cbranchsi4_equality_zero,
19210         nds32_output_cbranchsi4_equality_reg,
19211         nds32_output_cbranchsi4_equality_reg_or_const_int,
19212         nds32_output_cbranchsi4_greater_less_zero): Declare.
19213         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
19214         nds32_rimm11s_operand): New predicates.
19215         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
19216         * config/nds32/nds32.md: Rewrite all the branch and conditional move
19217         patterns.
19219 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
19221         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
19222         * config/nds32/nds32.md: Ditto.
19223         * config/nds32/pipelines.md: Ditto.
19225 2018-04-04  Richard Biener  <rguenther@suse.de>
19227         PR tree-optimization/85168
19228         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
19229         propagating abnormals.
19231 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19233         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
19235 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
19236             Kito Cheng  <kito.cheng@gmail.com>
19238         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
19239         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
19240         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
19241         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
19242         * config/nds32/nds32.md (sibcall_internal): New.
19243         (sibcall_register): Remove.
19244         (sibcall_immediate): Remove.
19245         (sibcall_value_internal): New.
19246         (sibcall_value_register): Remove.
19247         (sibcall_value_immediate): Remove.
19248         * config/nds32/predicates.md (nds32_general_register_operand): New.
19249         (nds32_call_address_operand): New.
19251 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19253         PR rtl-optimization/85167
19254         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
19255         bb_defs if *split_p, instead preinitialize it to NULL.
19257         PR tree-optimization/85156
19258         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
19259         evaluating the argument multiple times.
19261 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
19263         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
19264         than vector.
19265         (_mm_cvtpd_ps): Likewise.
19266         (_mm_cvttpd_epi32): Likewise.
19267         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
19268         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
19269         vector, pixel, and bool following altivec.h include.
19271 2018-04-03  Martin Sebor  <msebor@redhat.com>
19273         * doc/extend.texi (Common Function Attributes): Clarify.
19274         (const attribute): Likewise.
19275         (pure attribute): Likewise.
19277 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
19279         PR target/85169
19280         * config/i386/i386.c (ix86_expand_vector_set): Use
19281         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
19283 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
19285         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
19286         instructions when changing rounding bits to preserve precision bits
19287         in the x87 control word.
19289 2018-04-03  Martin Liska  <mliska@suse.cz>
19291         PR tree-optimization/82491
19292         * rtl.h (strip_offset_and_add): Replace += suboffset with
19293         poly_uint64 () + suboffset.
19295 2018-03-29  Martin Liska  <mliska@suse.cz>
19296             Martin Jambor  <mjambor@suse.cz>
19298         PR ipa/84947
19299         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
19300         param_type is not an integral or pointer type.
19302 2018-04-03  Richard Biener  <rguenther@suse.de>
19304         * sese.h (recompute_all_dominators): Remove.
19306 2018-04-02  Martin Sebor  <msebor@redhat.com>
19308         * doc/invoke.texi (-Wrestrict): Fix typos.
19310 2018-04-02  Jim Wilson  <jimw@sifive.com>
19312         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
19313         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
19314         (<optab>di3, <optab>si3_extend): Likewise.
19315         (<optab>si3_mask, <optab>si3_mask_1): New.
19316         (<optab>di3_mask, <optab>di3_mask_1): New.
19317         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
19318         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
19319         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
19321 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
19323         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
19324         example.
19326 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19328         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
19329         (nds32_canonicalize_comparison): New function.
19331 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19332             Kito Cheng  <kito.cheng@gmail.com>
19333             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
19335         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
19336         * config/nds32/constants.md (unspec_volatile_element): Add
19337         UNSPEC_VOLATILE_RELAX_GROUP.
19338         * config/nds32/nds32-relax-opt.c: New file.
19339         * config/nds32/nds32-predicates.c
19340         (nds32_symbol_load_store_p): New function.
19341         * config/nds32/nds32-protos.h
19342         (nds32_symbol_load_store_p): Declare function.
19343         (make_pass_nds32_relax_opt): Declare new rtl pass function.
19344         * config/nds32/nds32.c
19345         (nds32_register_pass): New function to register pass.
19346         (nds32_register_passes): New function to register passes.
19347         * config/nds32/nds32.md (relax_group): New pattern.
19348         * config/nds32/nds32.opt (mrelax-hint): New option.
19349         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
19351 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
19353         * config/nds32/t-nds32: Modify files dependency.
19355 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19357         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
19358         (PROFILE_HOOK): Define its implementation.
19360 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
19362         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
19363         type and 32-bit size.
19365 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
19367         PR middle-end/85090
19368         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
19369         (V_128_256): New mode iterator.
19370         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
19371         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
19372         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
19373         of V.
19374         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
19375         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
19377 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
19379         PR target/83315
19380         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
19381         NaN inputs correctly.
19383 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
19385         PR target/80546
19386         * config/rs6000/vsx.md (??r): New mode attribute.
19387         (*vsx_mov<mode>_64bit): Use it.
19388         (*vsx_mov<mode>_32bit): Likewise.
19390 2018-03-30  Martin Sebor  <msebor@redhat.com>
19392         PR tree-optimization/84818
19393         * builtins.c (check_access): Use warning_n.
19395 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19397         PR target/83822
19398         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
19399         condition.
19400         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
19401         condition.
19403 2018-03-30  Julia Koval  <julia.koval@intel.com>
19405         PR target/84413
19406         * x86-tune.def (movx, partial_reg_dependency): Enable for
19407         m_SKYLAKE_AVX512.
19409 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
19411         PR inline-asm/84985
19412         * lra-constraints.c (process_alt_operands): Move setting
19413         this_alternative_matches below.
19415 2018-03-29  Martin Liska  <mliska@suse.cz>
19417         PR lto/84995.
19418         * doc/invoke.texi: Document how LTO works with debug info.
19419         Describe auto-load support of binutils.  Mention 'x86-64'
19420         as valid option value of -march option.
19422 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
19424         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
19426         PR c/85094
19427         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
19428         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
19429         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
19430         checking.
19432 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19434         PR target/84912
19435         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
19436         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
19437         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
19438         for RS6000_BTM_POWERPC64.
19439         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
19440         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
19441         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
19442         definition.
19443         (DIVDE): Use it.
19444         (DIVDEU): Likewise.
19446 2018-03-28  Carl Love  <cel@us.ibm.com>
19448         Revert
19449         2017-09-27  Carl Love  <cel@us.ibm.com>
19451         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
19452         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
19453         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
19454         fctiw instruction.
19456 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19458         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
19459         instead of __vector bool.
19460         (_mm_max_pu8): Likewise.
19461         (_mm_min_pi16): Likewise.
19463 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
19465         PR target/84912
19466         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
19467         (DIVWEUO): Likewise.
19468         (DIVDEO): Likewise.
19469         (DIVDEUO): Likewise.
19470         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
19471         DIVWEUO and DIVDEUO.
19472         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
19473         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
19474         (div_extend): Likewise.
19475         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
19476         builtin function.
19477         (__builtin_divweuo): Likewise.
19478         (__builtin_divdeo): Likewise.
19479         (__builtin_divdeuo): Likewise.
19481 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
19483         PR target/85095
19484         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
19485         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
19487         PR tree-optimization/82004
19488         * gimple-match-head.c (optimize_pow_to_exp): New function.
19489         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
19490         Don't fold to exp if optimize_pow_to_exp is false.
19492 2018-03-28  Martin Liska  <mliska@suse.cz>
19494         PR other/84819
19495         * calls.c (initialize_argument_information): Fix trailing space.
19496         * common.opt: Fix typo and provide better explanation for
19497         -fsanitize-coverage option.
19498         * config/i386/i386.opt: Fix typo.
19500 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
19501             Martin Liska  <mliska@suse.cz>
19503         PR sanitizer/85081
19504         * gimplify.c (asan_poison_variable): Don't do the check for
19505         gimplify_omp_ctxp here.
19506         (gimplify_decl_expr): Do it here.
19507         (gimplify_target_expr): Likewise.
19509 2018-03-28  Martin Liska  <mliska@suse.cz>
19511         PR target/84988
19512         * config/i386/i386.c (ix86_function_arg_advance): Do not call
19513         chkp_type_bounds_count if MPX is not enabled.
19515 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19517         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
19519 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
19521         PR target/84914
19522         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
19523         function to create the function decl for complex long double
19524         multiply and divide for -mabi=ieeelongdouble.
19525         (init_float128_ieee): Call it.
19527 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
19529         PR target/85044
19530         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
19531         -fcf-protection=branch -mibt.
19532         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
19534 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19536         PR target/81863
19537         * config/arm/arm.c (arm_valid_symbolic_address): Handle
19538         arm_word_relocations.
19540 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
19542         PR target/85056
19543         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
19544         extern array declarations.
19546 2018-03-27  Richard Biener  <rguenther@suse.de>
19548         PR middle-end/84067
19549         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
19550         explicit single_use checks.
19552 2018-03-27  Richard Biener  <rguenther@suse.de>
19554         PR tree-optimization/85082
19555         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
19556         Valueize the VUSE.
19558 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
19560         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
19561         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
19562         Turn on fasynchronous-unwind-tables and funwind-tables.
19564 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
19566         PR target/85073
19567         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
19568         (*bmi_blsr_<mode>_ccz): Ditto.
19570 2018-03-26  Tom de Vries  <tom@codesourcery.com>
19572         PR tree-optimization/85063
19573         * omp-general.c (offloading_function_p): New function.  Factor out
19574         of ...
19575         * omp-offload.c (pass_omp_target_link::gate): ... here.
19576         * omp-general.h (offloading_function_p): Declare.
19577         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
19578         with attribute omp declare target for offloading functions.
19580 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
19582         PR tree-optimization/84005
19583         * tree-data-ref.h (get_base_for_alignment): Declare.
19584         * tree-data-ref.c (get_base_for_alignment_1): New function.
19585         (get_base_for_alignment): Likewise.
19586         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
19587         get_base_for_alignment to find a suitable base object, instead
19588         of always using drb->base_address.
19590 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
19592         PR inline-asm/85022
19593         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
19594         known size by default.
19596 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
19598         PR inline-asm/85030
19599         * lra-constraints.c (process_alt_operands): Don't match BLKmode
19600         and non BLKmode operands.
19602 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19604         PR target/85026
19605         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
19606         Clean up attributes.
19608 2018-03-23  Richard Biener  <rguenther@suse.de>
19610         PR debug/85020
19611         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
19612         we are going to emit early debug for LTO.
19614 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
19616         PR inline-asm/85034
19617         * function.c (match_asm_constraints_1): Don't optimize if input
19618         doesn't satisfy general_operand predicate for output's mode.
19620         PR inline-asm/85022
19621         * alias.c (write_dependence_p): Don't require for x_canonicalized
19622         non-VOIDmode if x has VOIDmode.
19624         PR sanitizer/85029
19625         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
19626         just don't try to optimize it rather than assert it never happens.
19628 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19630         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
19631         macro expansions for definition of ST_INTERNAL_<mode> and
19632         LD_INTERNAL_<mode> builtins.
19633         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
19634         Remove prototype.
19635         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
19636         function.
19637         (altivec_expand_st_builtin): Likewise.
19638         (altivec_expand_builtin): Remove calls to deleted functions.
19639         (rs6000_address_for_altivec): Delete this function.
19640         * config/rs6000/vector.md: Remove expands for
19641         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
19643 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
19645         PR target/84826
19646         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
19647         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
19648         re-computing once computed.
19649         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
19650         (arm_init_machine_status): Initialize
19651         machine->static_chain_stack_bytes.
19653 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19655         PR target/84760
19656         * doc/extend.texi: Add four new prototypes for vec_ld.
19657         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
19658         definitions for more logical presentation.
19659         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
19660         entries for V1TI variants of __builtin_altivec_ld builtin.
19661         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
19662         handling of V1TI variant of LVX icode pattern.
19663         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
19664         (rs6000_gimple_fold_builtin): Likewise.
19665         (altivec_init_builtins): Add code to define
19666         __builtin_altivec_lvx_v1ti function.
19668 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19670         PR inline-asm/84941
19671         * function.c (match_asm_constraints_1): Don't do the optimization
19672         if input isn't a REG, SUBREG, MEM or constant.
19674 2018-03-22  Tom de Vries  <tom@codesourcery.com>
19676         PR tree-optimization/84956
19677         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
19678         bb_has_abnormal_pred.
19680 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
19682         PR sanitizer/85018
19683         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
19684         DECL_INITIAL (decl) to decl at the end.
19685         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
19686         adjust the comment.
19688 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
19690         * doc/extend.texi (__builtin_tgmath): Document when complex
19691         integer types are treated as _Complex _Float64.
19693 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19695         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
19697 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19699         PR tree-optimization/84960
19700         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
19701         if it is ENTRY block, move them into single succ of ENTRY in that case.
19703 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
19705         PR tree-optimization/84811
19706         * poly-int.h (poly_span_traits): Remove the T3 parameter and
19707         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
19708         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
19709         (known_subrange_p): Update accordingly.  Cast each value involved
19710         in the size comparison, rather than casting the result of the
19711         subtraction.
19713 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19715         PR tree-optimization/84982
19716         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
19717         by flipping the least significant bit rather than all bits from
19718         bitpos to bitpos + bitsize - 1.
19720 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19722         * doc/extend.texi (Deprecated Features): Remove mention of
19723         long-deleted deprecations.
19725 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19727         PR jit/84288
19728         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
19729         * configure: Regenerate.
19731 2018-03-21  Tom de Vries  <tom@codesourcery.com>
19733         PR tree-optimization/83126
19734         * tree-parloops.c (num_phis): New function.
19735         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
19737 2018-03-21  Nathan Sidwell  <nathan@acm.org>
19739         * doc/extend.texi (Deprecated Features): Update deprecated flags,
19740         mention anon-struct/union members and trailing attributes.
19742 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
19744         PR tree-optimization/84969
19745         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
19746         builtin memset partitions if they set different rhs values.
19748 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
19750         PR rtl-optimization/84989
19751         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
19752         VEC_DUPLICATE with scalar result mode.
19754 2018-03-21  Martin Liska  <mliska@suse.cz>
19756         PR ipa/84963
19757         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
19758         not intended return statement.
19760 2018-03-21  Martin Liska  <mliska@suse.cz>
19762         PR target/84988
19763         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
19764         (chkp_find_bound_slots_1): Limit number of iterations.
19766 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
19768         PR target/84838
19769         * Minor grammar fixes for x86 options.
19771 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19773         PR debug/84875
19774         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
19775         holding REG_CFA_RESTORE notes, instead turn them into a USE.
19777 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
19779         PR target/83789
19780         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
19781         (altivec_lvx_<mode>_1op): Likewise.
19782         (altivec_stvx_<mode>_2op): Likewise.
19783         (altivec_stvx_<mode>_1op): Likewise.
19784         (altivec_lvx_<VM2:mode>): New define_expand.
19785         (altivec_stvx_<VM2:mode>): Likewise.
19786         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
19787         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19788         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
19789         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
19790         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
19791         (rs6000_gen_lvx): Likewise.
19792         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
19793         (altivec_expand_stv_builtin): Likewise.
19794         (altivec_expand_builtin): Likewise.
19795         * config/rs6000/vector.md: Likewise.
19797 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19799         PR target/82518
19800         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
19801         BYTES_BIG_ENDIAN.
19803 2018-03-20  Richard Biener  <rguenther@suse.de>
19805         PR target/84986
19806         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
19807         sign-conversions as zero, fall back to standard scalar_stmt
19808         cost for the rest.
19810 2018-03-20  Martin Liska  <mliska@suse.cz>
19812         PR ipa/84825
19813         * predict.c (rebuild_frequencies): Handle case when we have
19814         PROFILE_ABSENT, but flag_guess_branch_prob is false.
19816 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19818         PR target/84990
19819         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
19820         flag_section_anchors.
19821         * varasm.c (use_blocks_for_decl_p): Remove hack for
19822         dw2_force_const_mem.
19824         PR target/84845
19825         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
19826         to ...
19827         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
19828         be created, use lowpart_subreg of operands[0] rather than operands[0]
19829         itself.
19830         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
19831         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
19832         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
19833         and n constraint instead of aarch64_shift_imm_di and Usd.
19834         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
19835         (*aarch64_<optab>_reg_minus<mode>3): ... this.
19837 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
19839         PR target/82989
19840         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
19841         to favor GPR over NEON registers.
19842         (<shift>di3_neon): Likewise.
19844 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19846         PR target/84952
19847         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
19848         (nvptx_process_pars): Emit bar.sync asap and alap.
19850 2018-03-20  Tom de Vries  <tom@codesourcery.com>
19852         PR target/84954
19853         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
19854         seen_label if seen_label is already set.
19856 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
19858         PR target/84945
19859         * config/i386/i386.c (fold_builtin_cpu): For features above 31
19860         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
19861         Use 1U instead of 1.  Formatting fixes.
19863         PR c/84953
19864         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
19865         instead of TREE_TYPE (s1) for the return value.
19867 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
19869         PR tree-optimization/84946
19870         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
19871         bitsize + bitsize in poly_uint64 rather than poly_int64.
19873         PR sanitizer/78651
19874         * dwarf2asm.c: Include fold-const.c.
19875         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
19876         of decl rather than decl itself.
19878         PR rtl-optimization/84643
19879         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
19881 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
19883         PR sanitizer/78651
19884         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
19885         calling assemble_variable.
19887 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
19889         PR target/81647
19890         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19891         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19893 2018-03-19  Jim Wilson  <jimw@sifive.com>
19895         PR bootstrap/84856
19896         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19897         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19898         (riscv_first_stack_step): Likewise.
19899         (riscv_option_override): Use STACK_BOUNDARY instead of
19900         MIN_STACK_BOUNDARY.
19901         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19902         MIN_STACK_BOUNDARY.
19903         (BIGGEST_ALIGNMENT): Set to 128.
19904         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19905         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19906         STACK_BOUNDARY.
19908 2018-03-19  Richard Biener  <rguenther@suse.de>
19910         PR tree-optimization/84933
19911         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19912         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19914 2018-03-19  Richard Biener  <rguenther@suse.de>
19916         PR tree-optimization/84859
19917         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19918         (cond_if_else_store_replacement): Perform sinking operation on
19919         single-store BBs regardless of MAX_STORES_TO_SINK setting.
19920         Generalize what a BB with a single eligible store is.
19922 2018-03-19  Richard Biener  <rguenther@suse.de>
19924         PR tree-optimization/84929
19925         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19926         chrec_is_positive against non-chrec arg.
19928 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
19930         PR target/84711
19931         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19933 2018-03-18  Martin Liska  <mliska@suse.cz>
19935         PR rtl-optimization/84635
19936         * regrename.c (build_def_use): Use matches_mode only when
19937         matches >= 0.
19939 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
19941         PR tree-optimization/84913
19942         * tree-vect-loop.c (vectorizable_reduction): Don't try to
19943         vectorize chains of COND_EXPRs.
19945 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19947         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19949 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19951         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19953 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
19955         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19957 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19958             Kito Cheng  <kito.cheng@gmail.com>
19960         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19961         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19962         (nds32_adjust_reg_alloc_order): New function.
19963         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19965 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
19967         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19968         nds32_print_operand, nds32_print_operand_address): Use
19969         HOST_WIDE_INT_PRINT_DEC instead.
19971 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
19973         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19975 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
19977         PR target/84902
19978         * config/i386/i386.c (initial_ix86_tune_features,
19979         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19980         unsigned long long.
19981         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19982         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19983         rather than 1u << ix86_tune.  Formatting fix.
19984         (ix86_option_override_internal): Change ix86_arch_mask from
19985         unsigned int to unsigned HOST_WIDE_INT, initialize to
19986         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19987         (ix86_function_specific_restore): Likewise.
19989 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
19991         PR target/84899
19992         * postreload.c (reload_combine_recognize_pattern): Perform
19993         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19994         truncate_int_for_mode the result for the destination's mode.
19996         PR c/84909
19997         * hsa-gen.c (mem_type_for_type): Fix comment typo.
19998         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19999         Likewise.
20000         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20001         Likewise.
20003 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
20005         PR target/84876
20006         * lra-assigns.c (lra_split_hard_reg_for): Don't use
20007         regno_allocno_class_array and sorted_pseudos.
20008         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
20009         insns where regno is used.
20011 2018-03-16  Martin Liska  <mliska@suse.cz>
20013         PR ipa/84833
20014         * multiple_target.c (create_dispatcher_calls): Redirect
20015         reference in the symbol table.
20017 2018-03-16  Martin Liska  <mliska@suse.cz>
20019         PR ipa/84722
20020         * multiple_target.c (create_dispatcher_calls): Redirect also
20021         an alias.
20023 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20025         PR c++/79937
20026         PR c++/82410
20027         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
20028         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
20029         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
20031 2018-03-16  Julia Koval  <julia.koval@intel.com>
20033         * doc/invoke.texi (Skylake Server): Add CLWB.
20034         Cannonlake): Remove CLWB.
20036 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
20038         PR tree-optimization/84841
20039         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
20040         1 << 3.
20041         (FLOAT_ONE_CONST_TYPE): Define.
20042         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
20043         (sort_by_operand_rank): Put entries with higher constant_type last
20044         rather than first to match comments.
20046 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
20048         * config/nios2/nios2.md (movsi_internal): Fix thinko in
20049         split predicate.
20051 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20053         PR c++/79085
20054         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
20055         check and use address of target always.
20057 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
20059         PR target/84574
20060         * config/i386/i386.c (indirect_thunk_needed): Update comments.
20061         (indirect_thunk_bnd_needed): Likewise.
20062         (indirect_thunks_used): Likewise.
20063         (indirect_thunks_bnd_used): Likewise.
20064         (indirect_return_needed): New.
20065         (indirect_return_bnd_needed): Likewise.
20066         (output_indirect_thunk_function): Add a bool argument for
20067         function return.
20068         (output_indirect_thunk_function): Don't generate alias for
20069         function return thunk.
20070         (ix86_code_end): Call output_indirect_thunk_function to generate
20071         function return thunks.
20072         (ix86_output_function_return): Set indirect_return_bnd_needed
20073         and indirect_return_needed instead of indirect_thunk_bnd_needed
20074         and indirect_thunk_needed.
20076 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
20078         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
20079         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
20080         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
20082 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
20083             Paul Hua <paul.hua.gm@gmail.com>
20085         PR c/84852
20086         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
20088 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
20090         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
20091         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
20092         resp. SFmode cases.
20094 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
20096         PR target/84711
20097         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
20098         instead of GET_MODE_SIZE when comparing Units.
20100 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
20102         PR target/68256
20103         * varasm.c (hash_section): Return an unchangeble hash value
20104         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
20105         Return !aarch64_can_use_per_function_literal_pools_p ().
20107 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
20109         PR target/84860
20110         * optabs.c (emit_conditional_move): Pass address of cmode's copy
20111         rather than address of cmode as last argument to prepare_cmp_insn.
20113 2018-03-15  Julia Koval  <julia.koval@intel.com>
20115         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
20116         F_AVX512VNNI, F_AVX512BITALG): New.
20118 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
20120         PR target/83451
20121         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
20122         insn for floating-point loads and stores.
20124 2018-03-14  Carl Love  <cel@us.ibm.com>
20126         * config/rs6000/rs6000-c.c: Add macro definitions for
20127         ALTIVEC_BUILTIN_VEC_PERMXOR.
20128         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
20129         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
20130         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
20131         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
20132         UNSPEC_VPERMXOR.
20133         * config/doc/extend.texi: Add prototypes for vec_permxor.
20135 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
20137         PR c/84852
20138         * diagnostic-show-locus.c (class layout_point): Convert m_line
20139         from int to linenum_type.
20140         (line_span::comparator): Use linenum "compare" function when
20141         comparing line numbers.
20142         (test_line_span): New function.
20143         (layout_range::contains_point): Convert param "row" from int to
20144         linenum_type.
20145         (layout_range::intersects_line_p): Likewise.
20146         (layout::will_show_line_p): Likewise.
20147         (layout::print_source_line): Likewise.
20148         (layout::should_print_annotation_line_p): Likewise.
20149         (layout::print_annotation_line): Likewise.
20150         (layout::print_leading_fixits): Likewise.
20151         (layout::annotation_line_showed_range_p): Likewise.
20152         (struct line_corrections): Likewise for field m_row.
20153         (line_corrections::line_corrections): Likewise for param "row".
20154         (layout::print_trailing_fixits): Likewise.
20155         (layout::get_state_at_point): Likewise.
20156         (layout::get_x_bound_for_row): Likewise.
20157         (layout::print_line): Likewise.
20158         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
20159         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
20160         * input.c (selftest::test_linenum_comparisons): New function.
20161         (selftest::input_c_tests): Call it.
20162         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
20163         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
20164         * selftest.h (ASSERT_GT): New macro.
20165         (ASSERT_GT_AT): New macro.
20166         (ASSERT_LT): New macro.
20167         (ASSERT_LT_AT): New macro.
20169 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
20171         PR rtl-optimization/84780
20172         * combine.c (distribute_links): Don't make a link based on pc_rtx.
20174 2018-03-14  Martin Liska  <mliska@suse.cz>
20176         * tree.c (record_node_allocation_statistics): Use
20177         get_stats_node_kind.
20178         (get_stats_node_kind): New function extracted from
20179         record_node_allocation_statistics.
20180         (free_node): Use get_stats_node_kind.
20182 2018-03-14  Richard Biener  <rguenther@suse.de>
20184         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
20185         that the value-set of ANTIC_IN doesn't grow.
20187         Revert
20188         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20189         member.
20190         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20191         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20193 2018-03-14  Julia Koval  <julia.koval@intel.com>
20195         * config.gcc (icelake-client, icelake-server): New.
20196         (icelake): Remove.
20197         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
20198         (initial_ix86_arch_features): Ditto.
20199         (PTA_SKYLAKE): Add SGX.
20200         (PTA_ICELAKE): Remove.
20201         (PTA_ICELAKE_CLIENT): New.
20202         (PTA_ICELAKE_SERVER): New.
20203         (ix86_option_override_internal): Split up icelake on icelake client and
20204         icelake server.
20205         (get_builtin_code_for_version): Ditto.
20206         (fold_builtin_cpu): Ditto.
20207         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
20208         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
20209         * config/i386/i386.h (processor_type): Ditto.
20210         * doc/invoke.texi: Ditto.
20212 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
20214         PR sanitizer/83392
20215         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
20216         INTEGER_CST offset, add it together with bitpos / 8 and
20217         sign extend based on POINTER_SIZE.
20219         PR target/84844
20220         Revert
20221         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
20223         PR target/78090
20224         * config/i386/constraints.md (Yc): New register constraint.
20225         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
20226         Use Yc constraint for alternative 2 of operand 0.  Remove
20227         preferred_for_speed attribute.
20229 2018-03-14  Richard Biener  <rguenther@suse.de>
20231         PR tree-optimization/84830
20232         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
20233         with the old one to avoid oscillations.
20235 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
20237         PR target/83712
20238         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
20239         pseudos.
20240         (assign_by_spills): Return a flag of reload assignment failure.
20241         Do not process the reload assignment failures.  Do not spill other
20242         reload pseudos if they has the same reg class.  Update n if
20243         necessary.
20244         (lra_assign): Add a return arg.  Set up from the result of
20245         assign_by_spills call.
20246         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20247         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20248         usage_insns if it is not NULL.
20249         (spill_hard_reg_in_range): New function.
20250         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20251         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20252         function prototypes.
20253         (lra_assign): Change prototype.
20254         * lra.c (lra): Add code to deal with fails by splitting hard reg
20255         live ranges.
20257 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
20259         * config/riscv/riscv.opt (mrelax): New option.
20260         * config/riscv/riscv.c (riscv_file_start): Emit ".option
20261         "norelax" when riscv_mrelax is disabled.
20262         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
20264 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
20266         PR target/84743
20267         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
20268         reassociation for int modes.
20270 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20272         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
20273         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
20274         for big-endian.
20275         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
20276         * config/aarch64/aarch64-sve.md
20277         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
20278         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
20279         (*extend<mode><Vwide>2): Rename to...
20280         (aarch64_sve_extend<mode><Vwide>2): ...this.
20281         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
20282         renaming the old pattern to...
20283         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
20284         unsigned packs.
20285         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
20286         define_expand, renaming the old pattern to...
20287         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
20288         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
20289         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
20290         account when deciding which SVE instruction the optab should use.
20291         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
20293 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20295         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
20296         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
20297         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
20298         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
20299         (tlsdesc_small_<mode>): Turn a define_expand and use
20300         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
20301         (tlsdesc_small_advsimd_<mode>): ...this.
20302         (tlsdesc_small_sve_<mode>): New pattern.
20304 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
20306         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
20307         (UNSPEC_UMUL_HIGHPART): New constants.
20308         (MUL_HIGHPART): New int iteraor.
20309         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
20310         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
20311         define_expand.
20312         (*<su>mul<mode>3_highpart): New define_insn.
20314 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
20316         PR lto/84805
20317         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20318         incomplete types.
20320 2018-03-13  Martin Liska  <mliska@suse.cz>
20322         PR ipa/84658.
20323         * (sem_item_optimizer::sem_item_optimizer): Initialize new
20324         vector.
20325         (sem_item_optimizer::~sem_item_optimizer): Release it.
20326         (sem_item_optimizer::merge_classes): Register variable aliases.
20327         (sem_item_optimizer::fixup_pt_set): New function.
20328         (sem_item_optimizer::fixup_points_to_sets): Likewise.
20329         * ipa-icf.h: Declare new variables and functions.
20331 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
20333         PR middle-end/84834
20334         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
20335         integer_pow2p@2 and test integer_pow2p in condition.
20336         (A < 0 ? C : 0): Similarly for @1.
20338         PR middle-end/84831
20339         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
20340         characters starting at p contain '\0' character, don't look beyond
20341         that.
20343         PR target/84827
20344         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
20345         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
20347         PR target/84828
20348         * reg-stack.c (change_stack): Change update_end var from int to
20349         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
20350         also call set_block_for_insn on the newly added insns and rescan.
20352         PR target/84786
20353         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
20354         on the last operand.
20356         PR c++/84704
20357         * tree.c (stabilize_reference_1): Return save_expr (e) for
20358         STATEMENT_LIST even if it doesn't have side-effects.
20360 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
20362         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
20364 2018-03-12  Renlin Li  <renlin.li@arm.com>
20366         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
20367         aarch64_output_scalar_simd_mov_immediate.
20369 2018-03-12  Martin Sebor  <msebor@redhat.com>
20371         PR tree-optimization/83456
20372         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
20373         for perfectly overlapping calls to memcpy.
20374         (gimple_fold_builtin_memory_chk): Same.
20375         (gimple_fold_builtin_strcpy): Handle no-warning.
20376         (gimple_fold_builtin_stxcpy_chk): Same.
20377         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
20379 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20381         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
20382         parameter.  Use it for SFmode.
20383         (rs6000_function_arg_advance_1): Adjust.
20384         (rs6000_function_arg): Adjust.
20385         (rs6000_gimplify_va_arg): Pass false for that new parameter.
20387 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
20389         PR rtl-optimization/84169
20390         PR rtl-optimization/84780
20391         * combine.c (can_combine_p): Check for a 2-insn combination whether
20392         the destination register is used between the two insns, too.
20394 2018-03-12  Richard Biener  <rguenther@suse.de>
20396         PR tree-optimization/84803
20397         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
20398         for refs DR analysis didn't process.
20400 2018-03-12  Richard Biener  <rguenther@suse.de>
20402         PR tree-optimization/84777
20403         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
20404         force-vectorize loops ignore whether we are optimizing for size.
20406 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20408         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
20409         (TARGET_MD_ASM_ADJUST): Define.
20411 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
20412             Kito Cheng  <kito.cheng@gmail.com>
20413             Chung-Ju Wu  <jasonwucj@gmail.com>
20415         * config/nds32/nds32.c (nds32_compute_stack_frame,
20416         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
20417         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
20418         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
20419         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
20420         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
20421         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
20422         * config/nds32/nds32.md (prologue, epilogue): Use macro
20423         NDS32_V3PUSH_AVAILABLE_P to do checking.
20425 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
20427         PR debug/58150
20428         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
20429         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
20430         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
20431         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
20432         addition of most attributes on !orig_type_die or the attribute not
20433         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
20435 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20436             Chung-Ju Wu  <jasonwucj@gmail.com>
20438         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
20439         __NDS32_VH__ macro.
20440         * config/nds32/nds32.opt (mvh): New option.
20442 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20443             Chung-Ju Wu  <jasonwucj@gmail.com>
20445         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
20446         function.
20447         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
20448         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
20449         definition.
20451 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
20452             Chung-Ju Wu  <jasonwucj@gmail.com>
20454         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
20455         function.
20456         * config/nds32/nds32-multiple.md (strlensi): New pattern.
20457         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
20459 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
20460             Kito Cheng  <kito.cheng@gmail.com>
20461             Chung-Ju Wu  <jasonwucj@gmail.com>
20463         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
20464         UNSPEC_FFMISM and UNSPEC_FLMISM.
20465         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
20466         for ffb, ffmism and flmism.
20467         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
20468         (unspec_ffmism): Ditto.
20469         (unspec_flmism): Ditto.
20470         (nds32_expand_builtin_impl): Check if string extension is available.
20471         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
20472         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
20474 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
20476         Reverting patch:
20477         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
20479         PR target/83712
20480         * lra-assigns.c (assign_by_spills): Return a flag of reload
20481         assignment failure.  Do not process the reload assignment
20482         failures.  Do not spill other reload pseudos if they has the same
20483         reg class.
20484         (lra_assign): Add a return arg.  Set up from the result of
20485         assign_by_spills call.
20486         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20487         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20488         usage_insns if it is not NULL.
20489         (spill_hard_reg_in_range): New function.
20490         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20491         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20492         function prototypes.
20493         (lra_assign): Change prototype.
20494         * lra.c (lra): Add code to deal with fails by splitting hard reg
20495         live ranges.
20497 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
20499         PR target/84807
20500         * config/i386/i386.opt: Replace Enforcment with Enforcement.
20502 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
20504         PR debug/84620
20505         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
20506         (dw_val_node): Add val_symbolic_view.
20507         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
20508         (symview_upper_bound): New.
20509         (new_line_info_table): Initialize symviews_since_reset.
20510         (dwarf2out_source_line): Count symviews_since_reset and set
20511         symview_upper_bound.
20512         (dw_val_equal_p): Handle symview.
20513         (add_AT_symview): New.
20514         (print_dw_val): Handle symview.
20515         (attr_checksum, attr_checksum_ordered): Likewise.
20516         (same_dw_val_p, size_of_die): Likewise.
20517         (value_format, output_die): Likewise.
20518         (add_high_low_attributes): Use add_AT_symview for entry_view.
20519         (dwarf2out_finish): Reset symview_upper_bound, clear
20520         zero_view_p.
20522 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
20524         PR target/83969
20525         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
20526         Add strict argument and use it.
20527         (rs6000_split_multireg_move): Update for new strict argument.
20528         (mem_operand_gpr): Disallow all non-offsettable addresses.
20529         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
20531 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
20533         PR target/84772
20534         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
20535         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
20536         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
20538         PR c++/84767
20539         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
20540         decl, use remap_type if we want to use the type.
20542 2018-03-09  Martin Sebor  <msebor@redhat.com>
20544         PR tree-optimization/84526
20545         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
20546         Remove dead code.
20547         (builtin_access::generic_overlap): Be prepared to handle non-array
20548         base objects.
20550 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
20552         PR rtl-optimization/84682
20553         * lra-constraints.c (process_address_1): Check is_address flag
20554         for address constraints.
20555         (process_alt_operands): Likewise.
20556         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
20557         preprocess_constraints.
20558         * recog.h (preprocess_constraints): Add oploc parameter.
20559         Adjust callers.
20560         * recog.c (preprocess_constraints): Test address_operand for
20561         CT_ADDRESS constraints.
20563 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
20565         PR target/83712
20566         * lra-assigns.c (assign_by_spills): Return a flag of reload
20567         assignment failure.  Do not process the reload assignment
20568         failures.  Do not spill other reload pseudos if they has the same
20569         reg class.
20570         (lra_assign): Add a return arg.  Set up from the result of
20571         assign_by_spills call.
20572         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
20573         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
20574         usage_insns if it is not NULL.
20575         (spill_hard_reg_in_range): New function.
20576         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
20577         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
20578         function prototypes.
20579         (lra_assign): Change prototype.
20580         * lra.c (lra): Add code to deal with fails by splitting hard reg
20581         live ranges.
20583 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20585         PR target/83193
20586         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
20587         Accept complain bool parameter.  Only emit errors if it is true.
20588         (arm_parse_cpu_option_name): Likewise.
20589         (arm_target_thumb_only): Adjust callers of the above.
20590         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
20591         prototype to take a default true bool parameter.
20592         (arm_parse_arch_option_name): Likewise.
20594 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
20595             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
20597         PR jit/64089
20598         PR jit/84288
20599         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
20600         * configure: Regenerate.
20601         * configure.ac ("linker --version-script option"): New.
20602         ("linker soname option"): New.
20604 2018-03-09  Richard Biener  <rguenther@suse.de>
20606         PR tree-optimization/84775
20607         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
20608         immediate uses of predicate stmts and mark them modified.
20610         Revert
20611         PR tree-optimization/84178
20612         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20613         to caller.
20614         (version_loop_for_if_conversion): Delay update_ssa call.
20615         (tree_if_conversion): Delay update_ssa until after predicate
20616         insertion.
20618 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
20620         PR target/84763
20621         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
20622         when the function accesses prior frames.
20624 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20626         PR debug/84456
20627         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
20628         gen_llsym, otherwise call maybe_gen_llsym.
20630         PR inline-asm/84742
20631         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
20632         has ',' character inside of it.
20634 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20636         PR target/84748
20637         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
20638         as clobbering CC_REGNUM.
20640 2018-03-08  Richard Biener  <rguenther@suse.de>
20642         PR middle-end/84552
20643         * tree-scalar-evolution.c: Include tree-into-ssa.h.
20644         (follow_copies_to_constant): Do not follow SSA names registered
20645         for update.
20647 2018-03-08  Richard Biener  <rguenther@suse.de>
20649         PR tree-optimization/84178
20650         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
20651         to caller.
20652         (version_loop_for_if_conversion): Delay update_ssa call.
20653         (tree_if_conversion): Delay update_ssa until after predicate
20654         insertion.
20656 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
20658         PR tree-optimization/84178
20659         * tree-if-conv.c (release_bb_predicate): Remove the
20660         the assertion that the stmts have NULL use_ops.
20661         Discard the statements, asserting that they haven't
20662         yet been added to a BB.
20664 2018-03-08  Richard Biener  <rguenther@suse.de>
20666         PR tree-optimization/84746
20667         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
20668         (phi_translate): Pass in destination ANTIC_OUT set.
20669         (phi_translate_1): Likewise.  For a simplified result lookup
20670         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
20671         (phi_translate_set): Adjust.
20672         (do_pre_regular_insertion): Likewise.
20673         (do_pre_partial_partial_insertion): Likewise.
20675 2018-03-08  Martin Liska  <mliska@suse.cz>
20677         PR gcov-profile/84735
20678         * doc/gcov.texi: Document usage of profile files.
20679         * gcov-io.h: Document changes in the format.
20681 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
20683         PR debug/84404
20684         PR debug/84408
20685         * dwarf2out.c (struct dw_line_info_table): Update comments for
20686         view == -1.
20687         (FORCE_RESET_NEXT_VIEW): New.
20688         (FORCE_RESETTING_VIEW_P): New.
20689         (RESETTING_VIEW_P): Check for -1 too.
20690         (ZERO_VIEW_P): Likewise.
20691         (new_line_info_table): Force-reset next view.
20692         (dwarf2out_begin_function): Likewise.
20693         (dwarf2out_source_line): Simplify zero_view_p initialization.
20694         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
20695         view directly.  Omit view when omitting .loc at line 0.
20697 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
20699         PR tree-optimization/84740
20700         * tree-switch-conversion.c (process_switch): Call build_constructors
20701         only if info.phi_count is non-zero.
20703         PR tree-optimization/84739
20704         * tree-tailcall.c (find_tail_calls): Check call arguments against
20705         DECL_ARGUMENTS (current_function_decl) rather than
20706         DECL_ARGUMENTS (func) when checking for tail recursion.
20708 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20710         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
20711         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
20712         Volker Reichelt's entry and add entries for people that perform
20713         GCC fuzzy testing and report numerous bugs.
20715 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
20717         PR target/82411
20718         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
20719         readonly data in sdata, if that is disabled.
20720         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
20721         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
20722         -mreadonly-in-sdata option.
20724 2018-03-07  Martin Sebor  <msebor@redhat.com>
20726         PR tree-optimization/84468
20727         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
20728         basic block when looking for nul assignment.
20730 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
20732         PR target/84277
20733         * except.h (output_function_exception_table): Adjust prototype.
20734         * except.c (output_function_exception_table): Remove FNNAME parameter
20735         and add SECTION parameter.  Ouput one part of the table at a time.
20736         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
20737         the first part of the exception table and emit unwind directives.
20738         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
20739         (i386_pe_seh_cold_init): Likewise.
20740         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
20741         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
20742         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
20743         (ix86_output_call_insn): Emit a nop in one more case for SEH.
20744         * config/i386/winnt.c: Include except.h.
20745         (struct seh_frame_state): Add reg_offset, after_prologue and
20746         in_cold_section fields.
20747         (i386_pe_seh_end_prologue): Set seh->after_prologue.
20748         (i386_pe_seh_cold_init): New function.
20749         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
20750         to seh->in_cold_section.
20751         (seh_emit_push): Record the offset of the push.
20752         (seh_emit_save): Record the offet of the save.
20753         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
20754         Test seh->after_prologue to disregard the epilogue.
20755         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
20756         (i386_pe_end_cold_function): New function.
20758 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
20760         PR fortran/84565
20761         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
20762         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
20764         PR c++/84704
20765         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
20766         on tmp_var.
20767         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
20768         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
20770         PR middle-end/84723
20771         * multiple_target.c: Include tree-inline.h and intl.h.
20772         (expand_target_clones): Diagnose and fail if node->definition and
20773         !tree_versionable_function_p (node->decl).
20775 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
20777         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
20778         sprint_ul.
20779         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
20780         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
20781         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
20783 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20785         PR target/84710
20786         * combine.c (try_combine): Use reg_or_subregno instead of handling
20787         just paradoxical SUBREGs and REGs.
20789 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
20791         * config/arc/arc.c (arc_finalize_pic): Remove function.
20792         (arc_must_save_register): We use single base PIC register, remove
20793         checks to save/restore the PIC register.
20794         (arc_expand_prologue): Likewise.
20795         * config/arc/arc-protos.h (arc_set_default_type_attributes):
20796         Remove.
20797         (arc_verify_short): Likewise.
20798         (arc_attr_type): Likewise.
20799         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
20800         (walk_stores): Likewise.
20801         (arc_address_cost): Make it static.
20802         (arc_verify_short): Likewise.
20803         (branch_dest): Likewise.
20804         (arc_attr_type): Likewise.
20805         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
20806         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
20807         (arc_final_prescan_insn): Remove inserting the nops due to
20808         hardware hazards.  It is done in reorg step.
20809         (insn_length_variant_t): Remove.
20810         (insn_length_parameters_t): Likewise.
20811         (arc_insn_length_parameters): Likewise.
20812         (arc_get_insn_variants): Likewise.
20813         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
20815 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
20817         PR inline-asm/84683
20818         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
20819         assertion failure.
20821         PR tree-optimization/84687
20822         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
20823         on new_node->decl.
20824         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
20826 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20828         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
20829         Rename to ppc_speculation_barrier.
20830         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
20831         __builtin_ppc_speculation_barrier.
20833 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20835         PR target/84700
20836         * combine.c (combine_simplify_rtx): Don't try to simplify if
20837         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
20838         are equal to x.
20840 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
20842         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
20843         to 32 bytes when compiling for POWER9.
20845 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
20847         PR target/84564
20848         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
20849         regparm >= 3 with no arg reg available also for calls with
20850         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
20852         PR target/84524
20853         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
20854         orig,vex.
20855         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
20857 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
20859         PR target/84264
20860         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
20862 2018-03-05  Richard Biener  <rguenther@suse.de>
20864         PR tree-optimization/84486
20865         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
20866         When inserting a __builtin_assume_aligned call set the LHS
20867         SSA name alignment info accordingly.
20869 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
20871         PR tree-optimization/84114
20872         * config/aarch64/aarch64.c (aarch64_reassociation_width)
20873         Avoid reassociation of FLOAT_MODE addition.
20875 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
20877         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
20878         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
20879         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
20880         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
20881         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
20882         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
20883         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
20884         and -mwbnoinvd.
20885         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
20886         __builtin_ia32_wbinvd): New builtins.
20887         (SPECIAL_ARGS2): New.
20888         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20889         (SPECIAL_ARGS2): New.
20890         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20891         (ix86_valid_target_attribute_inner_p): Ditto.
20892         (ix86_init_mmx_sse_builtins): Add special_args2.
20893         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20894         TARGET_WBNOINVD_P): New.
20895         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20896         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20897         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20898         * config/i386/immintrin.h (_wbinvd): New intrinsic.
20899         * config/i386/pconfigintrin.h: New file.
20900         * config/i386/wbnoinvdintrin.h: Ditto.
20901         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20902         wbnoinvdintrin.h.
20903         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20905 2018-03-05  Richard Biener  <rguenther@suse.de>
20907         PR tree-optimization/84670
20908         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20909         member.
20910         (BB_VISITED_WITH_VISITED_SUCCS): New define.
20911         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20912         (compute_antic_aux): Only assert the number of values in ANTIC_IN
20913         doesn't grow if all successors (recursively) were visited at least
20914         once.
20916 2018-03-05  Richard Biener  <rguenther@suse.de>
20918         PR tree-optimization/84650
20919         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20920         if executed in the loop pipeline.
20922 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
20924         * doc/configfiles.texi (Configuration Files): Move info about
20925         conditionalizing $target-protos.h to...
20926         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
20927         differs from $target-protos.h.
20929 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
20930             Chung-Ju Wu  <jasonwucj@gmail.com>
20932         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20933         * config/nds32/nds32-multiple.md (setmemsi): Define.
20934         * config/nds32/nds32-memory-manipulation.c
20935         (nds32_gen_dup_4_byte_to_word_value): New.
20936         (emit_setmem_word_loop): New.
20937         (emit_setmem_byte_loop): New.
20938         (nds32_expand_setmem_loop): New.
20939         (nds32_expand_setmem_loop_v3m): New.
20940         (nds32_expand_setmem_unroll): New.
20941         (nds32_expand_setmem): New.
20943 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20944             Chung-Ju Wu  <jasonwucj@gmail.com>
20946         * config/nds32/nds32-memory-manipulation.c
20947         (nds32_emit_load_store): New.
20948         (nds32_emit_post_inc_load_store): New.
20949         (nds32_emit_mem_move): New.
20950         (nds32_emit_mem_move_block): New.
20951         (nds32_expand_movmemsi_loop_unknown_size): New.
20952         (nds32_expand_movmemsi_loop_known_size): New.
20953         (nds32_expand_movmemsi_loop): New.
20954         (nds32_expand_movmemsi_unroll): New.
20955         (nds32_expand_movmemqi): Rename ...
20956         (nds32_expand_movmemsi): ... to this.
20957         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20958         (movmemsi): ... to this.
20959         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20960         (nds32_expand_movmemsi): ... to this.
20962 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20963             Monk Chiang  <sh.chiang04@gmail.com>
20964             Chung-Ju Wu  <jasonwucj@gmail.com>
20966         * config/nds32/nds32-protos.h
20967         (nds32_expand_load_multiple): New arguments.
20968         (nds32_expand_store_multiple): Ditto.
20969         (nds32_valid_multiple_load_store): Rename ...
20970         (nds32_valid_multiple_load_store_p): ... to this.
20971         * config/nds32/nds32-memory-manipulation.c
20972         (nds32_expand_load_multiple): Refine implementation.
20973         (nds32_expand_store_multiple): Ditto.
20974         * config/nds32/nds32-multiple.md
20975         (load_multiple): Update nds32_expand_load_multiple interface.
20976         (store_multiple): Update nds32_expand_store_multiple interface.
20977         * config/nds32/nds32-predicates.c
20978         (nds32_valid_multiple_load_store): Rename ...
20979         (nds32_valid_multiple_load_store_p): ... to this and refine
20980         implementation.
20981         * config/nds32/predicates.md
20982         (nds32_load_multiple_and_update_address_operation): New predicate.
20983         (nds32_store_multiple_and_update_address_operation): New predicate.
20985 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
20986             Chung-Ju Wu  <jasonwucj@gmail.com>
20988         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20989         (combo): New attribute.
20990         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20992 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20994         * config/nds32/nds32.opt: Change -mcmodel= default value.
20996 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
20997             Monk Chiang  <sh.chiang04@gmail.com>
20998             Chung-Ju Wu  <jasonwucj@gmail.com>
21000         * config/nds32/constants.md (unspec_element): New enum.
21001         * config/nds32/constraints.md (Umw): New constraint.
21002         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
21003         * config/nds32/nds32-intrinsic.md: Likewise.
21004         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
21005         (nds32_valid_smw_lwm_base_p): New.
21006         (nds32_output_smw_single_word): New.
21007         (nds32_output_lmw_single_word): New.
21008         (nds32_expand_unaligned_load): New.
21009         (nds32_expand_unaligned_store): New.
21010         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
21011         (nds32_output_smw_single_word): Declare.
21012         (nds32_output_lmw_single_word): Declare.
21013         (nds32_expand_unaligned_load): Declare.
21014         (nds32_expand_unaligned_store): Declare.
21015         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
21016         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
21017         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
21018         NDS32_BUILTIN_UASTORE_DW.
21019         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
21020         predicate.
21022 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
21023             Kito Cheng  <kito.cheng@gmail.com>
21024             Chung-Ju Wu  <jasonwucj@gmail.com>
21026         * config/nds32/nds32-intrinsic.c
21027         (nds32_expand_builtin_null_ftype_reg): Delete.
21028         (nds32_expand_builtin_reg_ftype_imm): Ditto.
21029         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
21030         (nds32_read_argument): New.
21031         (nds32_legitimize_target): Ditto.
21032         (nds32_legitimize_argument): Ditto.
21033         (nds32_check_constant_argument): Ditto.
21034         (nds32_expand_unop_builtin): Ditto.
21035         (nds32_expand_unopimm_builtin): Ditto.
21036         (nds32_expand_binop_builtin): Ditto.
21037         (nds32_builtin_decl_impl): Ditto.
21038         (builtin_description): Ditto.
21039         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
21040         (nds32_init_builtins_impl): Ditto.
21041         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
21042         (nds32_builtin_decl): New.
21043         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
21044         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
21046 2018-03-02  Jeff Law  <law@redhat.com>
21048         * reorg.c (stop_search_p): Handle DEBUG_INSN.
21049         (redundant_insn, fill_simple_delay_slots): Likewise.
21050         (fill_slots_from_thread): Likewise.
21051         * resource.c (mark_referenced_resources): Likewise.
21052         (mark_set_resources, find_dead_or_set_registers): Likewise.
21054 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21056         * substring-locations.h (format_warning_va): Formatting fix for
21057         ATTRIBUTE_GCC_DIAG.
21058         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
21059         argument.
21060         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
21061         * substring-locations.c: Include intl.h.
21062         (format_warning_va): Turned into small wrapper around
21063         format_warning_n_va, renamed to ...
21064         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
21065         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
21066         use ngettext.
21067         (format_warning_at_substring_n): New function.
21068         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
21069         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
21070         format_warning_at_substring with just a shorter name instead of
21071         const function pointer.
21072         (fmtwarn_n): New function.
21073         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
21074         appropriate, get rid of all the fmtstr temporaries, move conditionals
21075         with G_() wrapped string literals directly into fmtwarn arguments,
21076         cast dir.len to (int), formatting fixes.
21078 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
21080         * doc/invoke.texi: Remove "Cilk Plus" references.
21082 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21083             Richard Biener  <rguenther@suse.de>
21085         PR ipa/84628
21086         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
21087         for error or warning attributes if CALL_FROM_THUNK_P is set.
21088         Formatting fixes.
21090 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21092         PR target/56540
21093         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
21094         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
21096         PR target/56540
21097         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
21098         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
21100         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
21101         instead of -1U in last predictors element's probability member.
21103 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21105         PR ipa/83983
21106         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21107         arguments if they are comparable.
21109 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21111         PR tree-optimization/84634
21112         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
21113         masks and masked_loop_p with a single loop_masks, making sure it's
21114         null for bb vectorization.
21116 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
21118         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
21119         (vect_analyze_data_ref_access): Use loop->safe_len rather than
21120         loop->force_vectorize to check whether there is no alias.
21122 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
21124         PR target/84614
21125         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
21126         prototypes.
21127         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
21128         comments.
21129         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
21130         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
21131         instead of a loop around prev_real_insn.
21132         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
21133         prev_real_insn.
21135         PR inline-asm/84625
21136         * config/i386/i386.c (ix86_print_operand): Use conditional
21137         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
21138         zero vector.
21140 2018-03-02  Richard Biener  <rguenther@suse.de>
21142         PR tree-optimization/84427
21143         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
21144         (bitmap_set_subtract_values): Rewrite to handle multiple
21145         exprs per value.
21146         (clean): Likewise.
21147         (prune_clobbered_mems): Likewise.
21148         (phi_translate): Take edge instead of pred/phiblock.
21149         (phi_translate_1): Likewise.
21150         (phi_translate_set): Likewise.  Insert all translated
21151         exprs for a value into the set, keeping possibly multiple
21152         expressions per value.
21153         (compute_antic_aux): Adjust for phi_translate changes.
21154         When intersecting union the expressions and prune those
21155         not in the final value set, keeping possibly multiple
21156         expressions per value.  Do not use value-insertion
21157         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
21158         all expressions.  Add verification that the value-sets
21159         only shrink during iteration.
21160         (compute_partial_antic_aux): Adjust for the phi_translate changes.
21161         (do_pre_regular_insertion): Likewise.
21162         (do_pre_partial_partial_insertion): Likewise.
21164 2018-03-02  Richard Biener  <rguenther@suse.de>
21166         PR target/82005
21167         * config/darwin.c (saved_debug_info_level): New static global.
21168         (darwin_asm_lto_start): Disable debug info generation for LTO out.
21169         (darwin_asm_lto_end): Restore debug info generation settings.
21171 2018-03-01  Martin Liska  <mliska@suse.cz>
21173         PR sanitizer/82484
21174         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
21175         volatile arguments.
21177 2018-03-01  Richard Biener  <rguenther@suse.de>
21179         PR debug/84645
21180         * dwarf2out.c (gen_variable_die): Properly handle late VLA
21181         type annotation with LTO when debug was disabled at compile-time.
21183 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
21185         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
21186         XINT with INTVAL.
21187         (mips_final_postscan_insn): Likewise.
21189 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
21191         PR rtl-optimization/84528
21192         * alias.c (init_alias_target): Add commentary.
21193         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
21194         a unique base value if the frame pointer is not eliminated
21195         to the stack pointer.
21197 2018-03-01  Tom de Vries  <tom@codesourcery.com>
21199         PR rtl-optimization/83327
21200         * lra-int.h (hard_regs_spilled_into): Declare.
21201         * lra.c (hard_regs_spilled_into): Define.
21202         (init_reg_info): Init hard_regs_spilled_into.
21203         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
21204         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
21205         (process_bb_lives): Handle hard_regs_spilled_into.
21206         (lra_create_live_ranges_1): Before doing liveness propagation, clear
21207         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
21209 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
21211         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
21212         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
21213         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
21214         * config/rs6000/aix72.h: New file.
21216 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
21218         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
21219         instead of warning_at with conditional singular and plural messages
21220         where possible.
21222         PR target/52991
21223         * stor-layout.c (update_alignment_for_field): For
21224         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
21225         && !DECL_PACKED (field), do the alignment update, just use
21226         only desired_align instead of MAX (type_align, desired_align)
21227         as the alignment.
21228         (place_field): Don't do known_align < desired_align handling
21229         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
21230         is non-NULL, instead do it after rli->prev_field handling and
21231         only if not within a bitfield word.  For DECL_PACKED (field)
21232         use type_align of BITS_PER_UNIT.
21234 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
21236         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
21237         superfluous parentheses and trailing spaces.
21239 2018-02-28  Richard Biener  <rguenther@suse.de>
21241         PR tree-optimization/84584
21242         * graphite-scop-detection.c (scop_detection::add_scop): Discard
21243         SCoPs with fake exit edge.
21245 2018-02-28  Martin Liska  <mliska@suse.cz>
21247         PR testsuite/84597
21248         * timevar.c (timer::print): Fix format to properly print 100%
21249         values.
21251 2018-02-28  Richard Biener  <rguenther@suse.de>
21253         PR middle-end/84607
21254         * genmatch.c (capture_info::walk_match): Do not mark
21255         captured expressions without operands as expr_p given
21256         they act more like predicates and should be subject to
21257         "lost tail" side-effect preserving.
21259 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
21261         PR rtl-optimization/81611
21262         * auto-inc-dec.c (attempt_change): Move dead note from
21263         mem_insn if it's the next use of regno
21264         (find_address): Take address use of reg holding
21265         non-incremented value.  Add parm to limit search to the named
21266         reg only.
21267         (merge_in_block): Attempt to use a mem insn that is the next
21268         use of the original regno.
21270 2018-02-27  Martin Sebor  <msebor@redhat.com>
21272         PR c++/83871
21273         * doc/invoke.texi (-Wmissing-attributes): New option.
21274         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
21276 2018-02-27  Martin Sebor  <msebor@redhat.com>
21278         PR translation/84207
21279         * diagnostic-core.h (warning_n, error_n, inform_n): Change
21280         n argument to unsigned HOST_WIDE_INT.
21281         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
21282         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
21283         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
21284         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
21286 2018-02-27  Richard Biener  <rguenther@suse.de>
21288         PR tree-optimization/84512
21289         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
21290         Do not use the estimate returned from record_stmt_cost for
21291         the scalar iteration cost but sum properly using add_stmt_cost.
21293 2018-02-27  Richard Biener  <rguenther@suse.de>
21295         PR tree-optimization/84466
21296         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21297         Adjust last change to less strictly validate use operands.
21299 2018-02-27  Martin Liska  <mliska@suse.cz>
21301         PR gcov-profile/84548
21302         * gcov.c (process_file): Allow partial overlap and consider it
21303         also as group functions.
21304         (output_lines): Properly calculate range of lines for a group.
21306 2018-02-27  Martin Liska  <mliska@suse.cz>
21308         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
21309         'ggc' suffixes.  Change first column width.
21310         (timer::print): Fix formatting of the column.
21312 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
21314         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
21315         preserve inline entry blocks for the sake of debug inline
21316         entry point markers alone.
21317         (remove_unused_locals): Suggest in comments a better place to
21318         force the preservation of inline entry blocks that are
21319         otherwise unused, but do not preserve them.
21321 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21323         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
21325 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21327         PR target/84039
21328         * config/i386/constraints.md (Bs): Replace
21329         ix86_indirect_branch_register with
21330         TARGET_INDIRECT_BRANCH_REGISTER.
21331         (Bw): Likewise.
21332         * config/i386/i386.md (indirect_jump): Likewise.
21333         (tablejump): Likewise.
21334         (*sibcall_memory): Likewise.
21335         (*sibcall_value_memory): Likewise.
21336         Peepholes of indirect call and jump via memory: Likewise.
21337         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
21338         (*sibcall_value_GOT_32): Likewise.
21339         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21340         (GOT_memory_operand): Likewise.
21341         (call_insn_operand): Likewise.
21342         (sibcall_insn_operand): Likewise.
21343         (GOT32_symbol_operand): Likewise.
21344         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
21346 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21348         PR rtl-optimization/83496
21349         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
21350         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
21351         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
21352         redundant insn, if any.
21353         (relax_delay_slots): Likewise.
21354         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
21356 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
21358         PR tree-optimization/83965
21359         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
21360         that grouped statements are part of a reduction chain.  Return
21361         true if the statement is not marked as a reduction itself but
21362         is part of a group.
21363         (vect_recog_dot_prod_pattern): Don't check whether the statement
21364         is part of a group here.
21365         (vect_recog_sad_pattern): Likewise.
21366         (vect_recog_widen_sum_pattern): Likewise.
21368 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
21370         PR debug/84545
21371         * final.c (rest_of_clean_state): Also look for calls inside sequences.
21373 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
21375         PR target/84530
21376         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
21377         the bool argument.
21378         (ix86_output_indirect_function_return): New prototype.
21379         (ix86_split_simple_return_pop_internal): Likewise.
21380         * config/i386/i386.c (indirect_return_via_cx): New.
21381         (indirect_return_via_cx_bnd): Likewise.
21382         (indirect_thunk_name): Handle return va CX_REG.
21383         (output_indirect_thunk_function): Create alias for
21384         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
21385         (ix86_output_indirect_jmp): Remove the bool argument.
21386         (ix86_output_indirect_function_return): New function.
21387         (ix86_split_simple_return_pop_internal): Likewise.
21388         * config/i386/i386.md (*indirect_jump): Don't pass false
21389         to ix86_output_indirect_jmp.
21390         (*tablejump_1): Likewise.
21391         (simple_return_pop_internal): Change it to define_insn_and_split.
21392         Call ix86_split_simple_return_pop_internal to split it for
21393         -mfunction-return=.
21394         (simple_return_indirect_internal): Call
21395         ix86_output_indirect_function_return instead of
21396         ix86_output_indirect_jmp.
21398 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
21400         PR bootstrap/84405
21401         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
21402         memset and value initialization afterwards.
21404 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
21406         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
21408 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21410         PR target/84521
21411         * common/config/aarch64/aarch64-common.c
21412         (aarch_option_optimization_table[]): Switch
21413         off fomit-frame-pointer
21415 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21416             Chung-Ju Wu  <jasonwucj@gmail.com>
21418         * config/nds32/nds32-multiple.md (load_multiple): Disallow
21419         volatile memory.
21420         (store_multiple): Ditto.
21422 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
21424         * config.gcc: Add --with-cpu support for nds32 target.
21425         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
21426         * config/nds32/nds32.opt: Add -mcpu= option.
21428 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
21430         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
21431         isel=yes): Warn for these deprecated options.
21433 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
21435         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
21436         ISA_2_5_MASKS_EMBEDDED.
21438 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
21440         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
21441         p->max as pointers rather than using iterative_hash_expr.
21443 2018-02-23  Carl Love  <cel@us.ibm.com>
21445         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
21446         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
21447         BU_P8V_OVERLOAD_2.
21448         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
21449         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
21450         P8V_BUILTIN_VEC_VUNSIGNED2.
21452 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
21454         PR target/81572
21455         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
21456         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
21457         LRA_UNKNOWN_ALT.
21458         * lra-constraints.c (curr_insn_transform): Set up
21459         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
21460         LRA_UNKNOWN_ALT.
21461         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
21462         * lra-eliminations.c (spill_pseudos): Ditto.
21463         (process_insn_for_elimination): Ditto.
21464         * lra-lives.c (reg_early_clobber_p): Use the new macros.
21465         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
21466         LRA_NON_CLOBBERED_ALT.
21468 2018-02-22  Martin Sebor  <msebor@redhat.com>
21470         PR tree-optimization/84480
21471         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
21472         to maybe_diag_stxncpy_trunc.  Call it.
21473         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
21474         from gimple_fold_builtin_strcpy.  Print inlining stack.
21475         (handle_builtin_stxncpy): Print inlining stack.
21476         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
21478 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
21480         PR target/84176
21481         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
21482         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
21483         and -fcheck-pointer-bounds are used together.
21484         (indirect_thunk_prefix): New enum.
21485         (indirect_thunk_need_prefix): New function.
21486         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
21487         "_nt" instead of "_bnd" for NOTRACK prefix.
21488         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
21489         (output_indirect_thunk_function): Likewise.
21490         (): Likewise.
21491         (ix86_code_end): Update output_indirect_thunk_function calls.
21492         (ix86_output_indirect_branch_via_reg): Replace
21493         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
21494         (ix86_output_indirect_branch_via_push): Likewise.
21495         (ix86_output_function_return): Likewise.
21496         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
21497         incompatible with -fcf-protection=branch and
21498         -fcheck-pointer-bounds.
21500 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
21502         PR target/83335
21503         * config/aarch64/aarch64.c (aarch64_print_address_internal):
21504         Change gcc_assert call to output_operand_lossage.
21506 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
21508         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
21510 2018-02-22  DJ Delorie  <dj@redhat.com>
21511             Sebastian Perta  <sebastian.perta@renesas.com>
21512             Oleg Endo  <olegendo@gcc.gnu.org>
21514         * config/rx/rx.c (rx_rtx_costs): New function.
21515         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
21517 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21519         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
21521 2018-02-22  Martin Liska  <mliska@suse.cz>
21523         PR driver/83193
21524         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
21525         Add "native" as a possible value.
21527 2018-02-22  Martin Liska  <mliska@suse.cz>
21529         PR driver/83193
21530         * config/i386/i386.c (ix86_option_override_internal):
21531         Add "native" as a possible value for -march and -mtune.
21533 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
21535         PR target/84502
21536         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
21537         to all type variants.
21539         PR tree-optimization/84503
21540         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
21541         width as info->bitpos + info->bitsize - start.
21542         (merged_store_group::merge_overlapping): Simplify width computation.
21543         (check_no_overlap): New function.
21544         (imm_store_chain_info::try_coalesce_bswap): Compute expected
21545         start + width and last_order of the group, fail if check_no_overlap
21546         fails.
21547         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
21548         to group if check_no_overlap fails.
21550 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
21552         * config/rs6000/altivec.md: Delete contraint arguments to
21553         define_expand, define_split, and define_peephole2, and in
21554         define_insn_and_split if always unused.
21555         * config/rs6000/darwin.md: Ditto.
21556         * config/rs6000/dfp.md: Ditto.
21557         * config/rs6000/rs6000.md: Ditto.
21558         * config/rs6000/sync.md: Ditto.
21559         * config/rs6000/vector.md: Ditto.
21560         * config/rs6000/vsx.md: Ditto.
21562 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
21564         * config/rs6000/altivec.md: Write output control strings as braced
21565         blocks instead of double-quoted strings.
21566         * config/rs6000/darwin.md: Ditto.
21567         * config/rs6000/rs6000.md: Ditto.
21568         * config/rs6000/vector.md: Ditto.
21569         * config/rs6000/vsx.md: Ditto.
21571 2018-02-21  Jason Merrill  <jason@redhat.com>
21573         PR c++/84314 - ICE with templates and fastcall attribute.
21574         * attribs.c (build_type_attribute_qual_variant): Remove assert.
21576 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
21578         * ipa-cp.c (determine_versionability): Fix comment typos.
21580 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
21582         PR c/84229
21583         * ipa-cp.c (determine_versionability): Do not version functions caling
21584         va_arg_pack.
21586 2018-02-21  Martin Liska  <mliska@suse.cz>
21588         PR driver/83193
21589         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
21590         Add "native" as a possible value.
21591         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
21592         the macro when native cpu detection is available.
21594 2018-02-21  Martin Liska  <mliska@suse.cz>
21596         PR driver/83193
21597         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
21598         Add "native" as a possible value.
21599         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
21600         when native cpu detection is available.
21602 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
21603             Martin Sebor  <msebor@redhat.com>
21605         PR tree-optimization/84478
21606         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
21607         false.
21608         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
21609         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
21610         support which is conservatively correct, for 2 only stay conservative
21611         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
21612         argument to the 2 argument get_range_strlen, adjust 6 arg
21613         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
21614         false.
21615         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
21616         (gimple_fold_builtin_strlen): Pass true as last argument to
21617         get_range_strlen.
21619 2018-02-20  Martin Sebor  <msebor@redhat.com>
21621         PR middle-end/84095
21622         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
21623         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
21624         (builtin_memref::builtin_memref): Factor out parts into
21625         set_base_and_offset and call it.
21627 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21629         PR middle-end/84406
21630         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
21631         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
21632         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
21633         search at the associated MODE_INT.
21635 2018-02-20  Jeff Law  <law@redhat.com>
21637         PR middle-end/82123
21638         PR tree-optimization/81592
21639         PR middle-end/79257
21640         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
21641         for range data rather than using global data.
21642         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
21643         range data rather than using global data.
21644         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
21645         pass it to children as needed.
21646         (struct directive::fmtresult): Similarly.
21647         (struct directive::set_width): Similarly.
21648         (struct directive::set_precision): Similarly.
21649         (format_integer, format_directive, parse_directive): Similarly.
21650         (format_none): Accept unnamed vr_values parameter.
21651         (format_percent, format_floating, format_character): Similarly.
21652         (format_string, format_plain): Similarly.
21653         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
21654         the EVRP range analyzer for range data rather than using global data.
21655         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
21656         gimple-ssa-evrp-analyze.h
21657         (class sprintf_dom_walker): Add after_dom_children member function.
21658         Add evrp_range_analyzer member.
21659         (sprintf_dom_walker::before_dom_children): Call into the EVRP
21660         range analyzer as needed.
21661         (sprintf_dom_walker::after_dom_children): New member function.
21662         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
21663         if not optimizing.
21664         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
21665         (evrp_range_analyzer::pop_to_marker): Likewise.
21667 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
21669         PR tree-optimization/84419
21670         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
21671         with the required type if its current type is compatible but
21672         different.
21674 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
21676         PR middle-end/82004
21677         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
21678         after vectorization.
21680 2018-02-20  Martin Liska  <mliska@suse.cz>
21682         PR driver/83193
21683         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
21684         possible values if we don't have a hint.
21686 2018-02-20  Martin Liska  <mliska@suse.cz>
21688         PR c/84310
21689         PR target/79747
21690         * final.c (shorten_branches): Build align_tab array with one
21691         more element.
21692         * opts.c (finish_options): Add alignment option limit check.
21693         (MAX_CODE_ALIGN): Likewise.
21694         (MAX_CODE_ALIGN_VALUE): Likewise.
21695         * doc/invoke.texi: Document maximum allowed option value for
21696         all -falign-* options.
21698 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
21700         PR target/84146
21701         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
21702         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
21703         * var-tracking.c (emit_note_insn_var_location): Remove all references
21704         to NOTE_INSN_CALL_ARG_LOCATION.
21705         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
21706         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
21707         Use copy_rtx_if_shared.
21708         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
21709         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
21710         (dwarf2out_var_location): Remove handling of
21711         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
21712         on call_insn.
21713         * final.c (final_scan_insn): Remove all references to
21714         NOTE_INSN_CALL_ARG_LOCATION.
21715         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
21716         before dumping final insns.
21717         * except.c (emit_note_eh_region_end): Remove all references to
21718         NOTE_INSN_CALL_ARG_LOCATION.
21719         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
21720         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
21721         * config/arc/arc.c (hwloop_optimize): Likewise.
21722         * config/arm/arm.c (create_fix_barrier): Likewise.
21723         * config/s390/s390.c (s390_chunkify_start): Likewise.
21724         * config/sh/sh.c (find_barrier): Likewise.
21725         * config/i386/i386.c (rest_of_insert_endbranch,
21726         ix86_seh_fixup_eh_fallthru): Likewise.
21727         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
21728         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
21729         * config/frv/frv.c (frv_function_prologue): Likewise.
21730         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
21731         reg note.
21732         (note_outside_basic_block_p): Remove all references to
21733         NOTE_INSN_CALL_ARG_LOCATION.
21734         * gengtype.c (adjust_field_rtx_def): Likewise.
21735         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
21736         Likewise.
21737         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
21738         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
21740         PR c++/84444
21741         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
21742         is ADDR_EXPR.
21744         PR tree-optimization/84452
21745         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
21746         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
21747         is NULL.
21749 2018-02-19  Martin Liska  <mliska@suse.cz>
21751         PR sanitizer/82183
21752         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
21754 2018-02-19  Martin Liska  <mliska@suse.cz>
21755             Richard Sandiford  <richard.sandiford@linaro.org>
21757         PR tree-optimization/82491
21758         * gimple-fold.c (get_base_constructor): Make earlier bail out
21759         to prevent ubsan.
21761 2018-02-19  Carl Love  <cel@us.ibm.com>
21763         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
21764         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
21765         BU_P8V_OVERLOAD_1.
21766         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
21767         P8V_BUILTIN_VEC_NEG.
21769 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
21771         * config/rl78/rl78.md (movdf): New define expand.
21773 2018-02-19  Martin Liska  <mliska@suse.cz>
21775         PR other/80589
21776         * doc/invoke.texi: Fix typo.
21777         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
21779 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
21781         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
21782         handle rs6000_single_float and rs6000_double_float specially for
21783         e500 family CPUs.
21785 2018-02-16  Jeff Law  <law@redhat.com>
21787         * config/rx/rx.c (add_pop_cfi_notes): New function.;
21788         (pop_regs): Use it.
21790 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21792         PR ipa/84425
21793         * ipa-inline.c (inline_small_functions): Fix a typo.
21795 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21797         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
21799 2018-02-16  Carl Love  <cel@us.ibm.com>
21801         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
21802         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
21803         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
21804         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
21805         expansion to P8V_BUILTIN_VEC_FLOAT2.
21807 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
21809         PR rtl-optimization/70023
21810         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
21811         src_regno into account.
21813 2018-02-16  Carl Love  <cel@us.ibm.com>
21815         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
21816         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
21817         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
21818         * config/rs6000/rs6000.c: Remove case statements for
21819         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
21820         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
21821         and P9V_BUILTIN_VEC_VINSERT4B.
21822         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
21823         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
21824         * config/rs6000/vsx.md:
21825         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
21826         vec_insert4b.
21828 2018-02-16  Carl Love  <cel@us.ibm.com>
21830         * config/rs6000/altivec.h: Add builtin names vec_extract4b
21831         vec_insert4b.
21832         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
21833         definitions.
21834         * config/rs6000/rs6000-c.c: Add the definitions for
21835         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
21836         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
21837         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
21838         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
21839         definition for insert4b and define insn *insert3b_internal.
21840         * doc/extend.texi: Add documentation for vec_extract4b.
21842 2018-02-16  Nathan Sidwell  <nathan@acm.org>
21844         * doc/extend.texi (Backwards Compatibility): Mention friend
21845         injection.  Note for-scope is deprecated.
21846         * doc/invoke.texi (-ffriend-injection): Deprecate.
21848 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
21850         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
21851         that moved to I2, also allow destinations that are a paradoxical
21852         subreg (instead of a normal reg).
21854 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
21856         PR target/83831
21857         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
21858         to QImode.
21860 2018-02-16  Richard Biener  <rguenther@suse.de>
21862         PR tree-optimization/84037
21863         PR tree-optimization/84016
21864         PR target/82862
21865         * config/i386/i386.c (ix86_builtin_vectorization_cost):
21866         Adjust vec_construct for the fact we need additional higher latency
21867         128bit inserts for AVX256 and AVX512 vector builds.
21868         (ix86_add_stmt_cost): Scale vector construction cost for
21869         elementwise loads.
21871 2018-02-16  Richard Biener  <rguenther@suse.de>
21873         PR tree-optimization/84417
21874         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
21875         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
21876         (non_rewritable_lvalue_p): Likewise, use poly-ints.
21878 2018-02-16  Martin Liska  <mliska@suse.cz>
21880         PR sanitizer/84307
21881         * internal-fn.def (ASAN_CHECK): Set proper flags.
21882         (ASAN_MARK): Likewise.
21884 2018-02-16  Julia Koval  <julia.koval@intel.com>
21886         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
21887         from PTA_CANNONLAKE.
21889 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
21891         PR target/84272
21892         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21893         Use ++iter rather than iter++ for std::list iterators.
21894         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
21895         defer deleting them until all nodes in the forest are processed.  Do
21896         free even leaf nodes.  Change to_process into auto_vec.
21898         PR bootstrap/84405
21899         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21900         * vec.h (vec_default_construct): Use memset instead of placement new
21901         if BROKEN_VALUE_INITIALIZATION is defined.
21902         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21903         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21904         is defined.
21906         PR rtl-optimization/83723
21907         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21908         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
21909         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
21910         recursive calls.
21911         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21912         callers.
21913         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21915 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
21917         PR rtl-optimization/81443
21918         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21919         from inner REGs to paradoxical SUBREGs.
21921 2018-02-16  Richard Biener  <rguenther@suse.de>
21923         PR tree-optimization/84399
21924         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21925         For operands we can analyze at their definition make sure we can
21926         analyze them at each use as well.
21928 2018-02-16  Richard Biener  <rguenther@suse.de>
21930         PR tree-optimization/84190
21931         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21932         volatile accesses if the decl isn't volatile.
21934 2018-02-15  Jason Merrill  <jason@redhat.com>
21936         PR c++/84314 - ICE with templates and fastcall attribute.
21937         * attribs.c (build_type_attribute_qual_variant): Don't clobber
21938         TYPE_CANONICAL on an existing type.
21940 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
21942         PR tree-optimization/84383
21943         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21944         dstoff nor call operand_equal_p if dstbase is NULL.
21946         PR tree-optimization/84334
21947         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21948         also a CONSTANT_CLASS_P, punt.
21950 2018-02-14  Jim Wilson  <jimw@sifive.com>
21952         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21953         first SMALL_OPERAND check.  New local min_second_step.  Move assert
21954         to where locals are set.  Add TARGET_RVC support.
21955         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21957 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
21959         * doc/invoke.texi: Correct -Wformat-overflow code sample.
21961 2018-02-14  Martin Sebor  <msebor@redhat.com>
21963         PR tree-optimization/83698
21964         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21965         arrays constrain the offset range to their bounds.
21966         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21967         (builtin_access::overlap): Avoid setting the size of overlap if it's
21968         already been set.
21969         (maybe_diag_overlap): Also consider arrays when deciding what values
21970         of offsets to include in diagnostics.
21972 2018-02-14  Martin Sebor  <msebor@redhat.com>
21974         PR c/84108
21975         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21976         that correspond to the kind of a declaration.
21978 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
21980         PR target/83984
21981         * config/pa/pa.md: Load address of PIC label using the linkage table
21982         if the label is nonlocal.
21984 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21986         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21987         warning message if user requests -maltivec=be.
21988         * doc/invoke.texi: Document deprecation of -maltivec=be.
21990 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
21992         PR target/84220
21993         * config/rs6000/rs6000-c.c: Update definitions for
21994         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21995         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21997 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
21999         PR target/84239
22000         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
22001         add _get_ssp intrinsics. Remove argument from
22002         __builtin_ia32_rdssp[d|q].
22003         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
22004         * config/i386/i386-builtin.def: Remove argument from
22005         __builtin_ia32_rdssp[d|q].
22006         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
22007         ix86_expand_special_args_builtin for _rdssp[d|q].
22008         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
22009         Clear register before usage.
22010         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
22011         Add documentation for new _get_ssp and _inc_ssp intrinsics.
22013 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
22015         PR tree-optimization/84357
22016         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
22017         operand 1 of an ARRAY_REF too.
22019 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
22021         PR target/83831
22022         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
22023         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22024         declarations.
22025         (set_of_reg): New struct.
22026         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
22027         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
22028         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
22029         functions.
22030         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
22031         Split into bitclr, bitset, bitinvert patterns if appropriate.
22032         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
22033         use rx_fuse_in_memory_bitop.
22034         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
22035         to named insn, correct maximum insn length.
22037 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
22039         PR target/79242
22040         * machmode.def: Define a complex mode for PARTIAL_INT.
22041         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
22042         MODE_PARTIAL_INT.
22043         * doc/rtl.texi: Document CSPImode.
22044         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
22045         handling.
22046         (msp430_hard_regno_nregs_with_padding): Likewise.
22048 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
22050         PR target/84279
22051         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
22053 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
22055         PR rtl-optimization/84169
22056         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
22057         we generated a parallel as new i3 and we split that to new i2 and i3
22058         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
22059         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
22060         those to i2, not i1.  Partially rewrite this scan code.
22062 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22064         PR c/82210
22065         * stor-layout.c (place_field): For variable length fields, adjust
22066         offset_align afterwards not just based on the field's alignment,
22067         but also on the size.
22069         PR middle-end/84309
22070         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
22071         of exps and logs in the use_exp2 case.
22073 2018-02-13  Jeff Law  <law@redhat.com>
22075         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
22076         entry for "vector".
22078         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
22079         ARGS as unused.
22081 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
22083         PR debug/84342
22084         PR debug/84319
22085         * common.opt (gas-loc-support, gas-locview-support): New.
22086         (ginline-points, ginternal-reset-location-views): New.
22087         * doc/invoke.texi: Document them.  Use @itemx where intended.
22088         (gvariable-location-views): Adjust.
22089         * target.def (reset_location_view): New.
22090         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
22091         (TARGET_RESET_LOCATION_VIEW): New.
22092         * doc/tm.texi: Rebuilt.
22093         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
22094         (dwarf2out_default_as_locview_support): New.
22095         (output_asm_line_debug_info): Use option variables.
22096         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
22097         (output_loc_list): Likewise.
22098         (add_high_low_attributes): Check option variables.
22099         Don't output entry view attribute in strict mode.
22100         (gen_inlined_subroutine_die): Check option variables.
22101         (dwarf2out_inline_entry): Likewise.
22102         (init_sections_and_labels): Likewise.
22103         (dwarf2out_early_finish): Likewise.
22104         (maybe_reset_location_view): New, from...
22105         (dwarf2out_var_location): ... here.  Call it.
22106         * debug.h (dwarf2out_default_as_loc_support): Declare.
22107         (dwarf2out_default_as_locview_support): Declare.
22108         * hooks.c (hook_int_rtx_insn_0): New.
22109         * hooks.h (hook_int_rtx_insn_0): Declare.
22110         * toplev.c (process_options): Take -gas-loc-support and
22111         -gas-locview-support from dwarf2out.  Enable
22112         -gvariable-location-views by default only with locview
22113         assembler support.  Enable -ginternal-reset-location-views by
22114         default only if the target defines the corresponding hook.
22115         Enable -ginline-points by default if location views are
22116         enabled; force it disabled if statement frontiers are
22117         disabled.
22118         * tree-inline.c (expand_call_inline): Check option variables.
22119         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
22121 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
22123         PR tree-optimization/84321
22124         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
22125         handling.  Also check whether the anti-range contains any values
22126         that satisfy the mask; switch to a VR_RANGE if not.
22128 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
22130         PR sanitizer/84340
22131         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
22133 2018-02-13  Martin Jambor  <mjambor@suse.cz>
22135         PR c++/83990
22136         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
22137         of call statements, also set location of a load to a temporary.
22139 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
22141         * config/rl78/rl78.c (add_vector_labels): New function.
22142         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
22143         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
22144         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
22145         which checks that no arguments are passed.
22146         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
22147         * doc/extend.texi: Documentation for the new attribute.
22149 2018-02-13  Andreas Schwab  <schwab@suse.de>
22151         * config/riscv/linux.h (CPP_SPEC): Define.
22153 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
22155         PR target/84335
22156         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
22157         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
22158         OPTION_MASK_ISA_AES as first argument to def_builtin_const
22159         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
22160         instead of OPTION_MASK_ISA_PCLMUL as first argument to
22161         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
22162         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
22163         temporarily for AES and PCLMUL builtins.
22165         PR tree-optimization/84339
22166         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
22167         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
22168         Formatting fixes.
22170         PR middle-end/84309
22171         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
22172         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
22173         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
22174         inline function.
22175         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
22176         inline function.
22177         * omp-simd-clone.h: New file.
22178         * omp-simd-clone.c: Include omp-simd-clone.h.
22179         (expand_simd_clones): No longer static.
22180         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
22181         cgraph.h and omp-simd-clone.h.
22182         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
22183         (vect_recog_widen_shift_pattern): Formatting fix.
22184         (vect_pattern_recog_1): Don't check optab for calls.
22186         PR target/84336
22187         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
22188         operands[2] into a REG before using gen_lowpart on it.
22190 2018-02-12  Jeff Law  <law@redhat.com>
22192         PR target/83760
22193         * config/sh/sh.c (find_barrier): Consider a sibling call
22194         a barrier as well.
22196         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
22197         successfully back substituting a reg.
22199 2018-02-12  Richard Biener  <rguenther@suse.de>
22201         PR tree-optimization/84037
22202         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
22203         parameter, move visited init to caller.
22204         (vect_slp_analyze_operations): Separate cost from validity
22205         check, initialize visited once for all instances.
22206         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
22207         for all instances.
22208         * tree-vect-stmts.c (vect_model_simple_cost): Make early
22209         out an assert.
22210         (vect_model_promotion_demotion_cost): Likewise.
22211         (vectorizable_bswap): Guard cost modeling with !slp_node
22212         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
22213         SLP stmts.
22214         (vectorizable_call): Likewise.
22215         (vectorizable_conversion): Likewise.
22216         (vectorizable_assignment): Likewise.
22217         (vectorizable_shift): Likewise.
22218         (vectorizable_operation): Likewise.
22219         (vectorizable_store): Likewise.
22220         (vectorizable_load): Likewise.
22221         (vectorizable_condition): Likewise.
22222         (vectorizable_comparison): Likewise.
22224 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
22226         PR sanitizer/84307
22227         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
22228         (ASAN_MARK): Fix fnspec to account for return value, change pointer
22229         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
22231 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22233         PR middle-end/83665
22234         * params.def (inline-min-speedup): Increase from 8 to 15.
22235         (max-inline-insns-auto): Decrease from 40 to 30.
22236         * ipa-split.c (consider_split): Add some buffer for function to
22237         be considered inlining candidate.
22238         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
22239         default values.
22241 2018-02-12  Richard Biener  <rguenther@suse.de>
22243         PR tree-optimization/84037
22244         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
22245         matched stmts if we cannot swap the non-matched ones.
22247 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22249         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
22250         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
22251         _mm_maskz_scalef_round_ss): New intrinsics.
22252         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
22253         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
22254         __builtin_ia32_scalefss_round): Remove.
22255         (__builtin_ia32_scalefsd_mask_round,
22256         __builtin_ia32_scalefss_mask_round): New intrinsics.
22257         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
22258         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
22259         ((match_operand:VF_128 2 "<round_nimm_predicate>"
22260         "<round_constraint>")): Changed to ...
22261         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
22262         "<round_scalar_constraint>")): ... this.
22263         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
22264         %0, %1, %2<round_op3>}"): Changed to ...
22265         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
22266         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
22267         %2<round_scalar_mask_op3>}"): ... this.
22268         * config/i386/subst.md (round_scalar_nimm_predicate): New.
22270 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
22272         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
22273         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
22274         (_mm_maskz_sqrt_round_ss): New intrinsics.
22275         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
22276         (__builtin_ia32_sqrtsd_mask_round)
22277         (__builtin_ia32_sqrtss_mask_round): New builtins.
22278         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
22279         (__builtin_ia32_sqrtss_round): Remove.
22280         (__builtin_ia32_sqrtsd_mask_round)
22281         (__builtin_ia32_sqrtss_mask_round): New builtins.
22282         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
22283         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
22284         ((match_operand:VF_128 1 "vector_operand"
22285         "xBm,<round_constraint>")): Changed to ...
22286         ((match_operand:VF_128 1 "vector_operand"
22287         "xBm,<round_scalar_constraint>")): ... this.
22288         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
22289         %0, %2, %<iptr>1<round_op3>}): Changed to ...
22290         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
22291         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
22292         %<iptr>1<round_scalar_mask_op3>}): ... this.
22293         ((set_attr "prefix" "<round_prefix>")): Changed to ...
22294         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
22296 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
22298         PR target/84266
22299         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
22300         Cast vec_cmpeq result to correct type.
22301         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
22302         Cast vec_cmpgt result to correct type.
22304 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
22306         * final.c (final_scan_insn_1): Renamed from...
22307         (final_scan_insn): ... this.  New wrapper, to recover
22308         seen from the outermost call in recursive ones.
22309         * config/sparc/sparc.c (output_return): Drop seen from call.
22310         (output_sibcall): Likewise.
22311         * config/visium/visium.c (output_branch): Likewise.
22313 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
22315         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
22316         function label.
22318 2018-02-10  Alan Modra  <amodra@gmail.com>
22320         PR target/84300
22321         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
22322         Specify LR as an input.
22324 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
22326         PR sanitizer/83987
22327         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
22328         remove_member_access_dummy_vars): New functions.
22329         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
22330         lower_omp_1, execute_lower_omp): Use them.
22332         PR rtl-optimization/84308
22333         * shrink-wrap.c (spread_components): Release todo vector.
22335 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
22337         PR rtl-optimization/57193
22338         * ira-color.c (struct allocno_color_data): Add member
22339         conflict_allocno_hard_prefs.
22340         (update_conflict_allocno_hard_prefs): New.
22341         (bucket_allocno_compare_func): Add a preference based on
22342         conflict_allocno_hard_prefs.
22343         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
22344         (color_allocnos): Remove a dead code.  Initiate
22345         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
22347 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22349         PR target/84226
22350         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
22351         constraint from =wa to wa.  Avoid a subreg on the output operand,
22352         instead use a pseudo and subreg it in a move.
22353         (p9_xxbrd_<mode>): Changed to ...
22354         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
22355         (p9_xxbrd_v2df): New expander.
22356         (p9_xxbrw_<mode>): Changed to ...
22357         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
22358         (p9_xxbrw_v4sf): New expander.
22360 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22362         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
22364 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
22366         PR target/83926
22367         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
22368         multiply in 32-bit mode.
22369         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
22370         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
22371         mode.
22373 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
22375         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
22376         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
22377         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
22378         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
22380 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
22382         PR lto/84213
22383         * dwarf2out.c (is_trivial_indirect_ref): New function.
22384         (dwarf2out_late_global_decl): Do not generate a location
22385         attribute for variables that have a non-trivial DECL_VALUE_EXPR
22386         and that are not defined in the current unit.
22388 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22390         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
22391         instead of a libcall for UNORDERED.
22393 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
22395         PR target/82641
22396         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
22397         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
22399 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22401         PR target/PR84295
22402         * config/s390/s390.c (s390_set_current_function): Invoke
22403         s390_indirect_branch_settings also if fndecl didn't change.
22405 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22407         * config/rs6000/rs6000.md (blockage): Set length to zero.
22409 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
22411         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
22413 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
22415         PR sanitizer/84285
22416         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
22417         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
22418         -static-lib*san.
22420         PR debug/84252
22421         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
22422         PARALLEL incoming that failed vt_get_decl_and_offset check.
22424         PR middle-end/84237
22425         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
22426         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
22427         TREE_READONLY bit.
22428         (get_variable_section): For decls in named .bss* sections pass true as
22429         second argument to bss_initializer_p.
22431 2018-02-09  Marek Polacek  <polacek@redhat.com>
22432             Jakub Jelinek  <jakub@redhat.com>
22434         PR c++/83659
22435         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
22436         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
22437         Sync some changes from cxx_fold_indirect_ref.
22439 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
22441         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
22442         markers.
22443         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
22444         (BLOCK_INLINE_ENTRY_LABEL): New.
22445         (dwarf2out_var_location): Disregard inline entry markers.
22446         (inline_entry_data): New struct.
22447         (inline_entry_data_hasher): New hashtable type.
22448         (inline_entry_data_hasher::hash): New.
22449         (inline_entry_data_hasher::equal): New.
22450         (inline_entry_data_table): New variable.
22451         (add_high_low_attributes): Add DW_AT_entry_pc and
22452         DW_AT_GNU_entry_view attributes if a pending entry is found
22453         in inline_entry_data_table.  Add old entry_pc attribute only
22454         if debug nonbinding markers are disabled.
22455         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
22456         markers are enabled.
22457         (block_within_block_p, dwarf2out_inline_entry): New.
22458         (dwarf2out_finish): Check that no entries remained in
22459         inline_entry_data_table.
22460         * final.c (reemit_insn_block_notes): Handle inline entry notes.
22461         (final_scan_insn, notice_source_line): Likewise.
22462         (rest_of_clean_state): Skip inline entry markers.
22463         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
22464         markers.
22465         * gimple.c (gimple_build_debug_inline_entry): New.
22466         * gimple.h (enum gimple_debug_subcode): Add
22467         GIMPLE_DEBUG_INLINE_ENTRY.
22468         (gimple_build_debug_inline_entry): Declare.
22469         (gimple_debug_inline_entry_p): New.
22470         (gimple_debug_nonbind_marker_p): Adjust.
22471         * insn-notes.def (INLINE_ENTRY): New.
22472         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
22473         inline entry marker notes.
22474         (print_insn): Likewise.
22475         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
22476         (INSN_DEBUG_MARKER_KIND): Likewise.
22477         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
22478         * tree-inline.c (expand_call_inline): Build and insert
22479         debug_inline_entry stmt.
22480         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
22481         inline entry blocks early, if nonbind markers are enabled.
22482         (dump_scope_block): Dump fragment info.
22483         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
22484         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
22485         (gimple_build_debug_inline_entry): New.
22486         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
22487         Enable/disable inline entry points too.
22488         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
22489         (DEBUG_INSN): Describe inline entry markers.
22491         * common.opt (gvariable-location-views): New.
22492         (gvariable-location-views=incompat5): New.
22493         * config.in: Rebuilt.
22494         * configure: Rebuilt.
22495         * configure.ac: Test assembler for view support.
22496         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
22497         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
22498         * dwarf2out.c (var_loc_view): New typedef.
22499         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
22500         (dwarf2out_locviews_in_attribute): New.
22501         (dwarf2out_locviews_in_loclist): New.
22502         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
22503         (enum dw_line_info_opcode): Add LI_adv_address.
22504         (struct dw_line_info_table): Add view.
22505         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
22506         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
22507         (zero_view_p): New variable.
22508         (ZERO_VIEW_P): New macro.
22509         (output_asm_line_debug_info): New.
22510         (struct var_loc_node): Add view.
22511         (add_AT_view_list, AT_loc_list): New.
22512         (add_var_loc_to_decl): Add view param.  Test it against last.
22513         (new_loc_list): Add view params.  Record them.
22514         (AT_loc_list_ptr): Handle loc and view lists.
22515         (view_list_to_loc_list_val_node): New.
22516         (print_dw_val): Handle dw_val_class_view_list.
22517         (size_of_die): Likewise.
22518         (value_format): Likewise.
22519         (loc_list_has_views): New.
22520         (gen_llsym): Set vl_symbol too.
22521         (maybe_gen_llsym, skip_loc_list_entry): New.
22522         (dwarf2out_maybe_output_loclist_view_pair): New.
22523         (output_loc_list): Output view list or entries too.
22524         (output_view_list_offset): New.
22525         (output_die): Handle dw_val_class_view_list.
22526         (output_dwarf_version): New.
22527         (output_compilation_unit_header): Use it.
22528         (output_skeleton_debug_sections): Likewise.
22529         (output_rnglists, output_line_info): Likewise.
22530         (output_pubnames, output_aranges): Update version comments.
22531         (output_one_line_info_table): Output view numbers in asm comments.
22532         (dw_loc_list): Determine current endview, pass it to new_loc_list.
22533         Call maybe_gen_llsym.
22534         (loc_list_from_tree_1): Adjust.
22535         (add_AT_location_description): Create view list attribute if
22536         needed, check it's absent otherwise.
22537         (convert_cfa_to_fb_loc_list): Adjust.
22538         (maybe_emit_file): Call output_asm_line_debug_info for test.
22539         (dwarf2out_var_location): Reset views as needed.  Precompute
22540         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
22541         attribute.  Set view.
22542         (new_line_info_table): Reset next view.
22543         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
22544         (dwarf2out_source_line): Likewise.  Output view resets and labels to
22545         the assembler, or select appropriate line info opcodes.
22546         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
22547         (optimize_string_length): Catch it.  Adjust.
22548         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
22549         dw_val_class_view_list, and remove it if no longer needed.
22550         (hash_loc_list): Hash view numbers.
22551         (loc_list_hasher::equal): Compare them.
22552         (optimize_location_lists): Check whether a view list symbol is
22553         needed, and whether the locview attribute is present, and
22554         whether they match.  Remove the locview attribute if no longer
22555         needed.
22556         (index_location_lists): Call skip_loc_list_entry for test.
22557         (dwarf2out_finish): Call output_asm_line_debug_info for test.
22558         Use output_dwarf_version.
22559         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
22560         (struct dw_val_node): Add val_view_list.
22561         * final.c (SEEN_NEXT_VIEW): New.
22562         (set_next_view_needed): New.
22563         (clear_next_view_needed): New.
22564         (maybe_output_next_view): New.
22565         (final_start_function): Rename to...
22566         (final_start_function_1): ... this.  Take pointer to FIRST,
22567         add SEEN parameter.  Emit param bindings in the initial view.
22568         (final_start_function): Reintroduce SEEN-less interface.
22569         (final): Rename to...
22570         (final_1): ... this.  Take SEEN parameter.  Output final pending
22571         next view at the end.
22572         (final): Reintroduce seen-less interface.
22573         (final_scan_insn): Output pending next view before switching
22574         sections or ending a block.  Mark the next view as needed when
22575         outputting variable locations.  Notify debug backend of section
22576         changes, and of location view changes.
22577         (rest_of_handle_final): Adjust.
22578         * toplev.c (process_options): Autodetect value for debug variable
22579         location views option.  Warn on incompat5 without -gdwarf-5.
22580         * doc/invoke.texi (gvariable-location-views): New.
22581         (gvariable-location-views=incompat5): New.
22582         (gno-variable-location-views): New.
22584 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
22586         PR tree-optimization/84136
22587         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
22588         that the result of find_edge is non-NULL.
22590 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
22592         PR target/83008
22593         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
22594         storing integer register in SImode.  Fix cost of 256 and 512
22595         byte aligned SSE register store.
22597 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
22599         * config/i386/i386.c (ix86_multiplication_cost): Fix
22600         multiplication cost for TARGET_AVX512DQ.
22602 2018-02-08  Marek Polacek  <polacek@redhat.com>
22604         PR tree-optimization/84238
22605         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
22606         get_range_strlen.
22608 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22610         PR tree-optimization/84265
22611         * tree-vect-stmts.c (vectorizable_store): Don't treat
22612         VMAT_CONTIGUOUS accesses as grouped.
22613         (vectorizable_load): Likewise.
22615 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22617         PR tree-optimization/81635
22618         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
22619         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
22620         (test_round_for_mask): New functions.
22621         (wide_int_cc_tests): Call test_round_for_mask.
22622         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
22623         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
22624         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
22625         range returned by get_range_info.
22627 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
22629         PR ipa/81360
22630         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
22631         * symtab.c: Include builtins.h
22632         (symtab_node::output_to_lto_symbol_table_p): Move here
22633         from lto-streamer-out.c:output_symbol_p.
22634         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
22635         (output_symbol_p): Move all logic to symtab.c
22636         (produce_symtab): Update.
22638 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22640         * config/s390/s390-opts.h (enum indirect_branch): Define.
22641         * config/s390/s390-protos.h (s390_return_addr_from_memory)
22642         (s390_indirect_branch_via_thunk)
22643         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
22644         (enum s390_indirect_branch_type): Define.
22645         * config/s390/s390.c (struct s390_frame_layout, struct
22646         machine_function): Remove.
22647         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
22648         (indirect_branch_table_label_no, indirect_branch_table_name):
22649         Define variables.
22650         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
22651         (enum s390_indirect_branch_option): Define.
22652         (s390_return_addr_from_memory): New function.
22653         (s390_handle_string_attribute): New function.
22654         (s390_attribute_table): Add new attribute handler.
22655         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
22656         (s390_indirect_branch_via_thunk): New function.
22657         (s390_indirect_branch_via_inline_thunk): New function.
22658         (s390_function_ok_for_sibcall): When jumping via thunk disallow
22659         sibling call optimization for non z10 compiles.
22660         (s390_emit_call): Force indirect branch target to be a single
22661         register.  Add r1 clobber for non-z10 compiles.
22662         (s390_emit_epilogue): Emit return jump via return_use expander.
22663         (s390_reorg): Handle JUMP_INSNs as execute targets.
22664         (s390_option_override_internal): Perform validity checks for the
22665         new command line options.
22666         (s390_indirect_branch_attrvalue): New function.
22667         (s390_indirect_branch_settings): New function.
22668         (s390_set_current_function): Invoke s390_indirect_branch_settings.
22669         (s390_output_indirect_thunk_function):  New function.
22670         (s390_code_end): Implement target hook.
22671         (s390_case_values_threshold): Implement target hook.
22672         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
22673         macros.
22674         * config/s390/s390.h (struct s390_frame_layout)
22675         (struct machine_function): Move here from s390.c.
22676         (TARGET_INDIRECT_BRANCH_NOBP_RET)
22677         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
22678         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
22679         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
22680         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
22681         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
22682         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
22683         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
22684         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
22685         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
22686         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
22687         (mnemonic attribute): Add values which aren't recognized
22688         automatically.
22689         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
22690         pattern for branch conversion.  Fix mnemonic attribute.
22691         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
22692         indirect branch via thunk if requested.
22693         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
22694         ("*indirect_jump"): Disable for branch conversion using out of
22695         line thunks.
22696         ("indirect_jump_via_thunk<mode>_z10")
22697         ("indirect_jump_via_thunk<mode>")
22698         ("indirect_jump_via_inlinethunk<mode>_z10")
22699         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
22700         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
22701         ("casesi_jump_via_inlinethunk<mode>_z10")
22702         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
22703         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
22704         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
22705         ("*indirect2_jump"): Disable for branch conversion.
22706         ("casesi_jump"): Turn into expander and expand patterns for branch
22707         conversion.
22708         ("return_use"): New expander.
22709         ("*return"): Emit return via thunk and rename it to ...
22710         ("*return<mode>"): ... this one.
22711         * config/s390/s390.opt: Add new options and and enum for the
22712         option values.
22714 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
22716         * lra-constraints.c (match_reload): Unconditionally use
22717         gen_lowpart_SUBREG, rather than selecting between that
22718         and equivalent gen_rtx_SUBREG code.
22720 2018-02-08  Richard Biener  <rguenther@suse.de>
22722         PR tree-optimization/84233
22723         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
22724         changed flag instead of boguously re-using phi_inserted.
22726 2018-02-08  Martin Jambor  <mjambor@suse.cz>
22728         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
22729         static local variables.
22731 2018-02-08  Richard Biener  <rguenther@suse.de>
22733         PR tree-optimization/84278
22734         * tree-vect-stmts.c (vectorizable_store): When looking for
22735         smaller vector types to perform grouped strided loads/stores
22736         make sure the mode is supported by the target.
22737         (vectorizable_load): Likewise.
22739 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22741         * config/aarch64/aarch64.c (aarch64_components_for_bb):
22742         Increase LDP/STP opportunities by adding adjacent callee-saves.
22744 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
22746         PR rtl-optimization/84068
22747         PR rtl-optimization/83459
22748         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
22750 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
22752         PR tree-optimization/84224
22753         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
22754         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
22755         non-zero arguments.
22757 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
22759         PR target/84113
22760         * config/rs6000/altivec.md (*restore_world): Remove LR use.
22761         * config/rs6000/predicates.md (restore_world_operation): Adjust op
22762         count, remove one USE.
22764 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
22766         * doc/install.texi (Configuration): Document the
22767         --with-long-double-format={ibm,ieee} PowerPC configuration
22768         options.
22770         PR target/84154
22771         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
22772         Convert from define_expand to be define_insn_and_split.  Rework
22773         float/double/_Float128 conversions to QI/HI/SImode to work with
22774         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
22775         conversions to QI/HImode types did a store and then a load to
22776         truncate the value.  For conversions to VSX registers, don't split
22777         the insn, instead emit the code directly.  Use the code iterator
22778         any_fix to combine signed and unsigned conversions.
22779         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
22780         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
22781         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22782         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
22783         (fix_<mode>di2_hw): Likewise.
22784         (fixuns_<mode>di2_hw): Likewise.
22785         (fix_<mode>si2_hw): Likewise.
22786         (fixuns_<mode>si2_hw): Likewise.
22787         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
22788         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
22789         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
22790         fix<uns>_trunc<SFDF:mode>si2_p8.
22791         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
22792         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22793         (fix<uns>_<mode>_mem): Likewise.
22794         (fctiw<u>z_<mode>_mem): Likewise.
22795         (fix<uns>_<mode>_mem): Likewise.
22796         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
22797         the register allocator from doing a direct move to the GPRs to do
22798         a store, and instead use the ISA 3.0 store byte/half-word from
22799         vector register instruction.  For IEEE 128-bit floating point,
22800         also optimize stores of 32-bit ints.
22801         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
22803 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
22805         * genextract.c (push_pathstr_operand): New function to support
22806         [a-zA-Z].
22807         (walk_rtx): Call push_pathstr_operand.
22808         (print_path): Support [a-zA-Z].
22810 2018-02-07  Richard Biener  <rguenther@suse.de>
22812         PR tree-optimization/84037
22813         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
22814         (cse_and_gimplify_to_preheader): Declare.
22815         (vect_get_place_in_interleaving_chain): Likewise.
22816         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
22817         ivexpr_map.
22818         (_loop_vec_info::~_loop_vec_info): Delete it.
22819         (cse_and_gimplify_to_preheader): New function.
22820         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
22821         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
22822         (vectorizable_load): Likewise.  For grouped stores always base
22823         the IV on the first element.
22824         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
22825         condition before gimplifying.
22827 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22829         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
22830         *DIV_EXPR and *MOD_EXPR.
22832 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
22834         PR target/84248
22835         * config/i386/i386.c (ix86_option_override_internal): Mask out
22836         the CF_SET bit when checking -fcf-protection.
22838 2018-02-07  Tom de Vries  <tom@codesourcery.com>
22840         PR libgomp/84217
22841         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
22842         enough.
22844 2018-02-07  Richard Biener  <rguenther@suse.de>
22846         PR tree-optimization/84204
22847         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
22848         this place.
22850         PR tree-optimization/84205
22851         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
22852         special-case isl_ast_op_zdiv_r.
22854         PR tree-optimization/84223
22855         * graphite-scop-detection.c (gather_bbs::before_dom_children):
22856         Only add conditions from within the region.
22857         (gather_bbs::after_dom_children): Adjust.
22859 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
22861         PR target/84209
22862         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
22863         * config/avr/avr.md: Only post-reload split REG-REG moves if
22864         either register is GENERAL_REG_P.
22866 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
22868         PR tree-optimization/84235
22869         * tree-ssa-scopedtables.c
22870         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
22871         if the subtraction is performed in floating point type where NaNs are
22872         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
22873         build 1.  Formatting fix.
22875 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
22877         PR target/84146
22878         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
22879         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
22880         and skip it regardless of bb boundaries.  Use CALL_P macro,
22881         don't test INSN_P (insn) together with CALL_P or JUMP_P check
22882         unnecessarily, formatting fix.
22884 2018-02-06  Michael Collison  <michael.collison@arm.com>
22886         * config/arm/thumb2.md:
22887         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22888         (*thumb_mov_notscc): Ditto.
22890 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
22892         PR target/84154
22893         * config/rs6000/rs6000.md (su code attribute): Use "u" for
22894         unsigned_fix, not "s".
22896 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22898         * configure.ac (gcc_fn_eh_frame_ro): New function.
22899         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22900         correct .eh_frame permissions.
22901         * configure: Regenerate.
22903 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
22905         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22906         irrelevant options.
22908 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22910         * config/rs6000/rs6000.c (rs6000_option_override_internal):
22911         Display warning message for -mno-speculate-indirect-jumps.
22913 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
22915         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22916         Undocumented.
22917         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22919 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
22921         PR tree-optimization/84225
22922         * tree-eh.c (find_trapping_overflow): Only call
22923         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22925 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
22927         PR target/84145
22928         * config/i386/i386.c: Reimplement the check of possible options
22929         -mibt/-mshstk conbination. Change error messages.
22930         * doc/invoke.texi: Fix a typo: remove extra '='.
22932 2018-02-06  Marek Polacek  <polacek@redhat.com>
22934         PR tree-optimization/84228
22935         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22937 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
22939         PR target/82641
22940         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22941         emitted arch directives.
22942         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22943         __ARM_FEATURE_COPROC before changing architectures.
22945 2018-02-06  Richard Biener  <rguenther@suse.de>
22947         * config/i386/i386.c (print_reg): Fix typo.
22948         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22950 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
22952         * configure: Regenerate.
22954 2018-02-05  Martin Sebor  <msebor@redhat.com>
22956         PR tree-optimization/83369
22957         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22958         inlining context.
22960 2018-02-05  Martin Liska  <mliska@suse.cz>
22962         * doc/invoke.texi: Cherry-pick upstream r323995.
22964 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
22966         * ira.c (ira_init_register_move_cost): Adjust comment.
22968 2018-02-05  Martin Liska  <mliska@suse.cz>
22970         PR gcov-profile/84137
22971         * doc/gcov.texi: Fix typo in documentation.
22973 2018-02-05  Martin Liska  <mliska@suse.cz>
22975         PR gcov-profile/83879
22976         * doc/gcov.texi: Document necessity of --dynamic-list-data when
22977         using dlopen functionality.
22979 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
22981         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22982         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22983         _mm_maskz_range_ss, _mm_mask_range_round_ss,
22984         _mm_maskz_range_round_ss): New intrinsics.
22985         (__builtin_ia32_rangesd128_round)
22986         (__builtin_ia32_rangess128_round): Remove.
22987         (__builtin_ia32_rangesd128_mask_round,
22988         __builtin_ia32_rangess128_mask_round): New builtins.
22989         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22990         __builtin_ia32_rangess128_round): Remove.
22991         (__builtin_ia32_rangesd128_mask_round,
22992         __builtin_ia32_rangess128_mask_round): New builtins.
22993         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22994         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22995         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22996         "<round_saeonly_constraint>")): Changed to ...
22997         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22998         "<round_saeonly_scalar_constraint>")): ... this.
22999         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
23000         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
23001         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
23002         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
23003         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
23005 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
23007         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
23008         options.
23009         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
23010         Remove all values except native, 8540 and 8548.
23012 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
23014         * config/i386/i386.c (ix86_output_function_return): Pass
23015         INVALID_REGNUM, instead of -1, as invalid register number to
23016         indirect_thunk_name and output_indirect_thunk.
23018 2018-02-02  Julia Koval  <julia.koval@intel.com>
23020         * config.gcc: Add -march=icelake.
23021         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
23022         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
23023         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
23024         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
23025         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
23026         (processor_target_table): Add icelake.
23027         (ix86_option_override_internal): Handle new PTAs.
23028         (get_builtin_code_for_version): Handle icelake.
23029         (M_INTEL_COREI7_ICELAKE): New.
23030         (fold_builtin_cpu): Handle icelake.
23031         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
23032         * doc/invoke.texi: Add -march=icelake.
23034 2018-02-02  Julia Koval  <julia.koval@intel.com>
23036         * config/i386/i386.c (ix86_option_override_internal): Change flags type
23037         to wide_int_bitmask.
23038         * wide-int-bitmask.h: New.
23040 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
23042         PR target/84066
23043         * config/i386/i386.md: Replace Pmode with word_mode in
23044         builtin_setjmp_setup and builtin_longjmp to support x32.
23046 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
23048         PR target/56010
23049         PR target/83743
23050         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
23051         #include "opts.h".
23052         (rs6000_supported_cpu_names): New static variable.
23053         (linux_cpu_translation_table): Likewise.
23054         (elf_platform) <cpu>: Define new static variable and use it.
23055         Translate kernel AT_PLATFORM name to canonical name if needed.
23056         Error if platform name is unknown.
23058 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
23060         PR target/84089
23061         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
23063 2018-02-01  Jeff Law  <law@redhat.com>
23065         PR target/84128
23066         * config/i386/i386.c (release_scratch_register_on_entry): Add new
23067         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
23068         the scratch if RELEASE_VIA_POP is false.
23069         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
23070         If we have to save a temporary register, decrement SIZE appropriately.
23071         Pass new arguments to release_scratch_register_on_entry.
23072         (ix86_adjust_stack_and_probe): Likewise.
23073         (ix86_emit_probe_stack_range): Pass new arguments to
23074         release_scratch_register_on_entry.
23076 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
23078         PR rtl-optimization/84157
23079         * combine.c (change_zero_ext): Use REG_P predicate in
23080         front of HARD_REGISTER_P predicate.
23082 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
23084         * config/avr/avr.c (avr_option_override): Move disabling of
23085         -fdelete-null-pointer-checks to...
23086         * common/config/avr/avr-common.c (avr_option_optimization_table):
23087         ...here.
23089 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23091         PR tree-optimization/81635
23092         * tree-data-ref.c (split_constant_offset_1): For types that
23093         wrap on overflow, try to use range info to prove that wrapping
23094         cannot occur.
23096 2018-02-01  Renlin Li  <renlin.li@arm.com>
23098         PR target/83370
23099         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
23100         TAILCALL_ADDR_REGS.
23101         (aarch64_register_move_cost): Likewise.
23102         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
23103         TAILCALL_ADDR_REGS.
23104         (REG_CLASS_NAMES): Likewise.
23105         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
23106         TAILCALL_ADDR_REGS. Remove IP registers.
23107         * config/aarch64/aarch64.md (Ucs): Update register constraint.
23109 2018-02-01  Richard Biener  <rguenther@suse.de>
23111         * domwalk.h (dom_walker::dom_walker): Add additional constructor
23112         for specifying RPO order and allow NULL for that.
23113         * domwalk.c (dom_walker::dom_walker): Likewise.
23114         (dom_walker::walk): Handle NULL RPO order.
23115         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
23116         in RPO order.
23117         (rewrite_update_dom_walker): Likewise.
23118         (mark_def_dom_walker): Likewise.
23120 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23122         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
23123         (aarch64_maybe_expand_sve_subreg_move): Declare.
23124         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
23125         * config/aarch64/predicates.md (aarch64_any_register_operand): New
23126         predicate.
23127         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
23128         that are semantically a reverse operation.
23129         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
23130         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
23131         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
23132         functions.
23133         (aarch64_can_change_mode_class): For big-endian, forbid changes
23134         between two SVE modes if they have different element sizes.
23136 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23138         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
23139         the TImode handling for big-endian targets.
23141 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23143         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
23144         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
23145         not just bytes.
23146         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
23147         Remove BSWAP handing for big-endian targets and use the form of
23148         LD1RQ appropariate for the mode.
23150 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23152         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
23153         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
23154         duplicated element.
23156 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
23158         PR tearget/83845
23159         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
23160         check for operands that need to go through aarch64_sve_reload_be.
23162 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
23164         PR tree-optimization/81661
23165         PR tree-optimization/84117
23166         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
23167         * tree-eh.c: Include gimplify.h.
23168         (find_trapping_overflow, replace_trapping_overflow,
23169         rewrite_to_non_trapping_overflow): New functions.
23170         * tree-vect-loop.c: Include tree-eh.h.
23171         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
23172         * tree-data-ref.c: Include tree-eh.h.
23173         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
23175 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
23177         PR rtl-optimization/84123
23178         * combine.c (change_zero_ext): Check if hard register satisfies
23179         can_change_dest_mode before calling gen_lowpart_SUBREG.
23181 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
23183         PR target/82444
23184         * ira.c (ira_init_register_move_cost): Remove assert.
23186 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23188         PR rtl-optimization/84071
23189         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
23190         * doc/tm.texi: Regenerate.
23192 2018-01-31  Richard Biener  <rguenther@suse.de>
23194         PR tree-optimization/84132
23195         * tree-data-ref.c (analyze_miv_subscript): Properly
23196         check whether evolution_function_is_affine_multivariate_p
23197         before calling gcd_of_steps_may_divide_p.
23199 2018-01-31  Julia Koval  <julia.koval@intel.com>
23201         PR target/83618
23202         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
23203         * config/i386/i386.md (rdpid_rex64) New.
23204         (rdpid): Make 32bit only.
23206 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
23208         PR lto/84105
23209         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
23210         an IDENTIFIER_NODE for FUNCTION_TYPE's.
23212 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23214         Revert
23215         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
23217         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
23219 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
23221         PR rtl-optimization/84071
23222         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
23223         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
23225 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23227         * config/arc/arc.c (arc_handle_aux_attribute): New function.
23228         (arc_attribute_table): Add 'aux' attribute.
23229         (arc_in_small_data_p): Consider aux like variables.
23230         (arc_is_aux_reg_p): New function.
23231         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
23232         (arc_get_aux_arg): New function.
23233         (prepare_move_operands): Handle aux-register access.
23234         (arc_handle_aux_attribute): New function.
23235         * doc/extend.texi (ARC Variable attributes): Add subsection.
23237 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
23239         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
23240         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
23241         (arc_attribute_table): Add 'uncached' attribute.
23242         (arc_print_operand): Print '.di' flag for uncached memory
23243         accesses.
23244         (arc_in_small_data_p): Do not consider for small data the uncached
23245         types.
23246         (arc_is_uncached_mem_p): New function.
23247         * config/arc/predicates.md (compact_store_memory_operand): Check
23248         for uncached memory accesses.
23249         (nonvol_nonimm_operand): Likewise.
23250         * doc/extend.texi (ARC Type Attribute): New subsection.
23252 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
23254         PR c/84100
23255         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
23256         falign-loops=): Add Optimization flag.
23258 2018-01-30  Jeff Law  <law@redhat.com>
23260         PR target/84064
23261         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
23262         INT_REGISTERS_SAVED.  Check it prior to calling
23263         get_scratch_register_on_entry.
23264         (ix86_adjust_stack_and_probe): Similarly.
23265         (ix86_emit_probe_stack_range): Similarly.
23266         (ix86_expand_prologue): Corresponding changes.
23268 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23270         PR target/40411
23271         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
23272         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
23274 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
23276         PR target/84112
23277         * lra-constraints.c (curr_insn_transform): Process AND in the
23278         address.
23280 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
23282         PR rtl-optimization/83986
23283         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
23284         dependence against last_pending_memory_flush in addition to
23285         pending_jump_insns.
23287 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
23289         PR tree-optimization/81611
23290         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
23291         copies.
23293 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23295         PR target/83758
23296         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
23297         a reg rtx.
23299 2018-01-30  Richard Biener  <rguenther@suse.de>
23300             Jakub Jelinek  <jakub@redhat.com>
23302         PR tree-optimization/84111
23303         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
23304         inner loops added during recursion, as they don't have up-to-date
23305         SSA form.
23307 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23309         PR ipa/81360
23310         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
23311         (can_inline_edge_by_limits_p): ... here.
23312         (can_early_inline_edge_p, check_callers,
23313         update_caller_keys, update_callee_keys, recursive_inlining,
23314         add_new_edges_to_heap, speculation_useful_p,
23315         inline_small_functions,
23316         inline_small_functions, flatten_function,
23317         inline_to_all_callers_1): Update.
23319 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
23321         * profile-count.c (profile_count::combine_with_ipa_count): Handle
23322         zeros correctly.
23324 2018-01-30  Richard Biener  <rguenther@suse.de>
23326         PR tree-optimization/83008
23327         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
23328         invariant and constant vector uses in stmts when they need
23329         more than one stmt.
23331 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23333         PR bootstrap/84017
23334         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
23335         * configure: Regenerate.
23337 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23339         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
23340         pattern.
23341         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
23342         Use gen_rtx_REG rather than gen_lowpart.
23344 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23346         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
23347         rather than 0 when creating partial subregs.
23349 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
23351         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
23352         of usage.
23354 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
23356         PR target/81550
23357         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
23358         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
23359         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
23360         flags.  This restores the settings used before the 2017-07-24.
23361         Turning off pre increment/decrement/modify allows IVOPTS to
23362         optimize DF/SF loops where the index is an int.
23364 2018-01-29  Richard Biener  <rguenther@suse.de>
23365             Kelvin Nilsen  <kelvin@gcc.gnu.org>
23367         PR bootstrap/80867
23368         * tree-vect-stmts.c (vectorizable_call): Don't call
23369         targetm.vectorize_builtin_md_vectorized_function if callee is
23370         NULL.
23372 2018-01-22  Carl Love  <cel@us.ibm.com>
23374         * doc/extend.tex: Fix typo in second arg in
23375         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
23377 2018-01-29  Richard Biener  <rguenther@suse.de>
23379         PR tree-optimization/84086
23380         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
23381         (flush_ssaname_freelist): When SSA names were released reset
23382         the SCEV hash table.
23384 2018-01-29  Richard Biener  <rguenther@suse.de>
23386         PR tree-optimization/84057
23387         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
23388         removed paths when removing edges.
23390 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
23392         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
23393         -mfunction-return=@var{choice}.
23395 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23397         PR diagnostic/84034
23398         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
23399         Handle CR like TAB.
23400         (layout::print_source_line): Likewise.
23401         (test_get_line_width_without_trailing_whitespace): Add test cases.
23403 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
23405         PR middle-end/84040
23406         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
23407         debug insns.
23409 2018-01-26  Jim Wilson  <jimw@sifive.com>
23411         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
23413         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
23414         specified.
23416 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23418         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
23419         and CMP + SUB-immediate -> SUBS.
23421 2018-01-26  Martin Sebor  <msebor@redhat.com>
23423         PR tree-optimization/83896
23424         * tree-ssa-strlen.c (get_string_len): Rename...
23425         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
23426         Avoid assuming length is constant.
23427         (handle_char_store): Use HOST_WIDE_INT for string length.
23429 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
23431         PR target/81763
23432         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
23433         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
23435 2018-01-26  Richard Biener  <rguenther@suse.de>
23437         PR rtl-optimization/84003
23438         * dse.c (record_store): Only record redundant stores when
23439         the earlier store aliases at least all accesses the later one does.
23441 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
23443         PR rtl-optimization/83985
23444         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
23445         REG_CFA_RESTORE insns.
23446         (delete_unmarked_insns): Don't ignore separate shrink wrapping
23447         REG_CFA_RESTORE insns here.
23449         PR c/83989
23450         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
23451         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
23453 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23455         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
23456         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
23457         (arc_init): Likewise.
23458         (arc_override_options): Likewise.
23459         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
23460         value.
23461         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
23462         support.
23463         * config/arc/arc.h (TARGET_DBNZ): Define.
23464         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
23465         properly set the tune attribute.
23466         (dbnz): Use TARGET_DBNZ guard.
23467         * config/arc/arc.opt (mtune): Add core3 option.
23469 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23471         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
23472         recognize new pic like addresses.
23473         (arc_delegitimize_address): Clean up.
23475 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23477         * config/arc/arc-arches.def: Option mrf16 valid for all
23478         architectures.
23479         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
23480         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
23481         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
23482         * config/arc/arc-tables.opt: Regenerate.
23483         * config/arc/arc.c (arc_conditional_register_usage): Handle
23484         reduced register file case.
23485         (arc_file_start): Set must have build attributes.
23486         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
23487         mrf16 option value.
23488         * config/arc/arc.opt (mrf16): Add new option.
23489         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
23490         * config/arc/genmultilib.awk: Handle new mrf16 option.
23491         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
23492         * config/arc/t-multilib: Regenerate.
23493         * doc/invoke.texi (ARC Options): Document mrf16 option.
23495 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23497         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
23498         * config/arc/arc.c (arc_handle_secure_attribute): New function.
23499         (arc_attribute_table): Add 'secure_call' attribute.
23500         (arc_print_operand): Print secure call operand.
23501         (arc_function_ok_for_sibcall): Don't optimize tail calls when
23502         secure.
23503         (arc_is_secure_call_p): New function.  * config/arc/arc.md
23504         (call_i): Add support for sjli instruction.
23505         (call_value_i): Likewise.
23506         * config/arc/constraints.md (Csc): New constraint.
23508 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
23509             John Eric Martin  <John.Martin@emmicro-us.com>
23511         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
23512         * config/arc/arc.c (_arc_jli_section): New struct.
23513         (arc_jli_section): New type.
23514         (rc_jli_sections): New static variable.
23515         (arc_handle_jli_attribute): New function.
23516         (arc_attribute_table): Add jli_always and jli_fixed attribute.
23517         (arc_file_end): New function.
23518         (TARGET_ASM_FILE_END): Define.
23519         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
23520         (arc_add_jli_section): New function.
23521         (jli_call_scan): Likewise.
23522         (arc_reorg): Call jli_call_scan.
23523         (arc_output_addsi): Remove 'S' from printing asm operand.
23524         (arc_is_jli_call_p): New function.
23525         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
23526         operand.
23527         (movhi_insn): Likewise.
23528         (movsi_insn): Likewise.
23529         (movsi_set_cc_insn): Likewise.
23530         (loadqi_update): Likewise.
23531         (load_zeroextendqisi_update): Likewise.
23532         (load_signextendqisi_update): Likewise.
23533         (loadhi_update): Likewise.
23534         (load_zeroextendhisi_update): Likewise.
23535         (load_signextendhisi_update): Likewise.
23536         (loadsi_update): Likewise.
23537         (loadsf_update): Likewise.
23538         (movsicc_insn): Likewise.
23539         (bset_insn): Likewise.
23540         (bxor_insn): Likewise.
23541         (bclr_insn): Likewise.
23542         (bmsk_insn): Likewise.
23543         (bicsi3_insn): Likewise.
23544         (cmpsi_cc_c_insn): Likewise.
23545         (movsi_ne): Likewise.
23546         (movsi_cond_exec): Likewise.
23547         (clrsbsi2): Likewise.
23548         (norm_f): Likewise.
23549         (normw): Likewise.
23550         (swap): Likewise.
23551         (divaw): Likewise.
23552         (flag): Likewise.
23553         (sr): Likewise.
23554         (kflag): Likewise.
23555         (ffs): Likewise.
23556         (ffs_f): Likewise.
23557         (fls): Likewise.
23558         (call_i): Remove 'S' asm letter, add jli instruction.
23559         (call_value_i): Likewise.
23560         * config/arc/arc.op (mjli-always): New option.
23561         * config/arc/constraints.md (Cji): New constraint.
23562         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
23563         operand.
23564         (subsf3_fpx): Likewise.
23565         (mulsf3_fpx): Likewise.
23566         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
23567         asm operand.
23568         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
23569         function attrbutes.
23570         * doc/invoke.texi (ARC): Document mjli-always option.
23572 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
23574         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
23575         avoid addition with 0 and use incw and decw where possible.
23577 2018-01-26  Richard Biener  <rguenther@suse.de>
23579         PR tree-optimization/81082
23580         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
23581         association if it requires casting to unsigned.
23582         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
23583         from fold_plusminus_mult_expr to catch important cases late when
23584         range info is available.
23586 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23588         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
23589         * configure.ac (hidden_linkonce): New test.
23590         * configure: Regenerate.
23591         * config.in: Regenerate.
23593 2018-01-26  Julia Koval  <julia.koval@intel.com>
23595         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
23596         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
23597         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
23598         _mm_mask_bitshuffle_epi64_mask): Fix type.
23599         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
23600         USI_FTYPE_V4DI_V4DI_USI): Remove.
23601         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
23602         __builtin_ia32_vpshufbitqmb256_mask,
23603         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
23604         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
23605         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
23607 2018-01-26  Alan Modra  <amodra@gmail.com>
23609         PR target/84033
23610         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
23611         UNSPEC_VBPERMQ.  Sort other unspecs.
23613 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
23615         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
23617 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
23619         PR middle-end/83055
23620         * predict.c (drop_profile): Do not push/pop cfun; update also
23621         node->count.
23622         (handle_missing_profiles): Fix logic looking for zero profiles.
23624 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
23626         PR middle-end/83977
23627         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
23628         on functions with #pragma omp declare simd or functions with simd
23629         attribute.
23630         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
23631         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
23632         Remove trailing \n from warning_at calls.
23634 2018-01-25  Tom de Vries  <tom@codesourcery.com>
23636         PR target/84028
23637         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23638         for neutered workers.
23640 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
23642         PR target/68467
23643         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
23644         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
23646 2018-01-24  Jeff Law  <law@redhat.com>
23648         PR target/83994
23649         * i386.c (get_probe_interval): Move to earlier point.
23650         (ix86_compute_frame_layout): If -fstack-clash-protection and
23651         the frame is larger than the probe interval, then use pushes
23652         to save registers rather than reg->mem moves.
23653         (ix86_expand_prologue): Remove conditional for int_registers_saved
23654         assertion.
23656 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
23658         PR target/84014
23659         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
23660         min/max for never referenced object.
23662 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
23664         PR middle-end/83977
23665         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
23666         here.
23667         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
23668         attributes from DECL_ATTRIBUTES (decl) without affecting
23669         DECL_ATTRIBUTES (current_function_decl).
23670         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
23671         functions with non-NULL DECL_ABSTRACT_ORIGIN.
23673 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
23675         PR tree-optimization/83979
23676         * fold-const.c (fold_comparison): Use constant_boolean_node
23677         instead of boolean_{true,false}_node.
23679 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
23681         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
23682         with zero counts.
23684 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23686         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23687         Simplify the clause that sets the length attribute.
23688         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23689         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
23690         clause that sets the length attribute.
23691         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23693 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23695         PR target/83589
23696         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
23697         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
23698         Add strict parameter.
23699         (prevent_branch_around_nothing): Insert dummy insn between branch to
23700         label and label with no ptx insn inbetween.
23701         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
23703 2018-01-24  Tom de Vries  <tom@codesourcery.com>
23705         PR target/81352
23706         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
23707         for neutered threads in warp.
23708         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
23710 2018-01-24  Richard Biener  <rguenther@suse.de>
23712         PR tree-optimization/83176
23713         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
23714         operands.
23716 2018-01-24  Richard Biener  <rguenther@suse.de>
23718         PR tree-optimization/82819
23719         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
23720         code generating pluses that are no-ops in the target precision.
23722 2018-01-24  Richard Biener  <rguenther@suse.de>
23724         PR middle-end/84000
23725         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
23727 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23729         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
23730         to merge probabilities.
23731         * predict.c (probably_never_executed): Also mark as cold functions
23732         with global 0 profile and guessed local profile.
23733         * profile-count.c (profile_probability::combine_with_count): New
23734         member function.
23735         * profile-count.h (profile_probability::operator*,
23736         profile_probability::operator*=, profile_probability::operator/,
23737         profile_probability::operator/=): Reduce precision to adjusted
23738         and set value to guessed on contradictory divisions.
23739         (profile_probability::combine_with_freq): Remove.
23740         (profile_probability::combine_wiht_count): Declare.
23741         (profile_count::force_nonzero):: Set to adjusted.
23742         (profile_count::probability_in):: Set quality to adjusted.
23743         * tree-ssa-tail-merge.c (replace_block_by): Use
23744         combine_with_count.
23746 2018-01-23  Andrew Waterman  <andrew@sifive.com>
23747             Jim Wilson  <jimw@sifive.com>
23749         * config/riscv/riscv.c (riscv_stack_boundary): New.
23750         (riscv_option_override): Set riscv_stack_boundary.  Handle
23751         riscv_preferred_stack_boundary_arg.
23752         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
23753         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
23754         (STACK_BOUNDARY): Set to riscv_stack_boundary.
23755         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
23756         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
23757         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
23759 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
23761         PR target/83905
23762         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
23763         of struct ix86_frame.
23764         (ix86_expand_epilogue): Likewise.  Add a local variable for
23765         the reg_save_offset field in struct ix86_frame.
23767 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
23769         PR tree-optimization/82604
23770         * tree-loop-distribution.c (enum partition_kind): New enum item
23771         PKIND_PARTIAL_MEMSET.
23772         (partition_builtin_p): Support above new enum item.
23773         (generate_code_for_partition): Ditto.
23774         (compute_access_range): Differentiate cases that equality can be
23775         proven at all loops, the innermost loops or no loops.
23776         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
23777         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
23778         (finalize_partitions, distribute_loop): Don't fuse partition of
23779         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
23780         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
23781         parloop is enabled.
23783 2018-01-23  Martin Liska  <mliska@suse.cz>
23785         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
23786         order to ignore the predictor.
23787         (PRED_POLYMORPHIC_CALL): Likewise.
23788         (PRED_RECURSIVE_CALL): Likewise.
23790 2018-01-23  Martin Liska  <mliska@suse.cz>
23792         * tree-profile.c (tree_profiling): Print function header to
23793         aware reader which function we are working on.
23794         * value-prof.c (gimple_find_values_to_profile): Do not print
23795         not interesting value histograms.
23797 2018-01-23  Martin Liska  <mliska@suse.cz>
23799         * profile-count.h (enum profile_quality): Add
23800         profile_uninitialized as the first value. Do not number values
23801         as they are zero based.
23802         (profile_count::verify): Update sanity check.
23803         (profile_probability::verify): Likewise.
23805 2018-01-23  Nathan Sidwell  <nathan@acm.org>
23807         * doc/invoke.texi (ffor-scope): Deprecate.
23809 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23811         PR tree-optimization/83510
23812         * domwalk.c (set_all_edges_as_executable): New function.
23813         (dom_walker::dom_walker): Convert bool param
23814         "skip_unreachable_blocks" to enum reachability.  Move setup of
23815         edge flags to set_all_edges_as_executable and only do it when
23816         reachability is REACHABLE_BLOCKS.
23817         * domwalk.h (enum dom_walker::reachability): New enum.
23818         (dom_walker::dom_walker): Convert bool param
23819         "skip_unreachable_blocks" to enum reachability.
23820         (set_all_edges_as_executable): New decl.
23821         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
23822         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
23823         "reachability".
23824         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
23825         but converting true to REACHABLE_BLOCKS.
23826         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
23827         * tree-vrp.c
23828         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
23829         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
23830         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
23831         REACHABLE_BLOCKS.
23832         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
23833         if check_all_array_refs will be called.
23835 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23837         * tree.c (selftest::test_location_wrappers): Add more test
23838         coverage.
23840 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
23842         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
23843         (selftest::test_bit_in_range): Likewise.
23845 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23847         PR testsuite/83888
23848         * doc/sourcebuild.texi (vect_float): Say that the selector
23849         only describes the situation when -funsafe-math-optimizations is on.
23850         (vect_float_strict): Document.
23852 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
23854         PR tree-optimization/83965
23855         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
23856         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
23857         instead of checking only for a reduction.
23858         (vect_recog_widen_sum_pattern): Likewise.
23860 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23862         * predict.c (probably_never_executed): Only use precise profile info.
23863         (compute_function_frequency): Skip after inlining hack since we now
23864         have quality checking.
23866 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
23868         * profile-count.h (profile_probability::very_unlikely,
23869         profile_probability::unlikely, profile_probability::even): Set
23870         precision to guessed.
23872 2018-01-23  Richard Biener  <rguenther@suse.de>
23874         PR tree-optimization/83963
23875         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
23876         Properly terminate dominator walk when crossing the exit edge not
23877         when visiting its source block.
23879 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
23881         PR c++/83918
23882         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
23883         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
23885 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
23887         PR tree-optimization/83957
23888         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
23889         semicolon after for body surrounded by braces.
23891         PR tree-optimization/83081
23892         * profile-count.h (profile_probability::split): New method.
23893         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23894         Use profile_probability::split.
23895         (do_compare_rtx_and_jump): Fix adjustment of probabilities
23896         when splitting a single conditional jump into 2.
23898 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
23900         PR tree-optimization/69452
23901         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23902         decl.
23904 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23906         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23907         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23908         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23910 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23912         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23913         declaration.
23914         * config/rl78/rl78.md (movdi): New define_expand.
23915         * config/rl78/rl78.c (rl78_split_movdi): New function.
23917 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
23919         PR target/83862
23920         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23921         no longer used.
23922         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23923         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23924         128-bit to produce an UNSPEC move to get the double word with the
23925         signbit and then a shift directly to do signbit.
23926         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23927         implementation with a new version that just does either a direct
23928         move or a regular move.  Move memory interface to separate insns.
23929         Move insns so they are next to the expander.
23930         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23931         with signbit move.  Split big and little endian case.
23932         (signbit<mode>2_dm_mem_le): Likewise.
23933         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23934         (signbit<mode>2_dm2): Likewise.
23936 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23938         * config/rl78/rl78.md (anddi3): New define_expand.
23940 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23942         * config/rl78/rl78.md (umindi3): New define_expand.
23944 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23946         * config/rl78/rl78.md (smindi3): New define_expand.
23948 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23950         * config/rl78/rl78.md (smaxdi3): New define_expand.
23952 2018-01-22  Carl Love  <cel@us.ibm.com>
23954         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23955         LVX_V1TI): Add macro expansion.
23956         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23957         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23958         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23959         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23960         Change check to determine if the instruction is a byte reversing
23961         entry.  Fix typo in comment.
23962         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23963         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23964         Add def_builtin calls for new builtins.
23965         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23966         Add define_insn expansion.
23968 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23970         * config/rl78/rl78.md (umaxdi3): New define_expand.
23972 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
23974         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23975         for non-QImode registers.
23977 2018-01-22  Richard Biener  <rguenther@suse.de>
23979         PR tree-optimization/83963
23980         * graphite-scop-detection.c (scop_detection::get_sese): Delay
23981         including the loop exit block.
23982         (scop_detection::merge_sese): Likewise.
23983         (scop_detection::add_scop): Do it here instead.
23985 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23987         * doc/sourcebuild.texi (arm_softfloat): Document.
23989 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
23991         PR gcc/77734
23992         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23993         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23994         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23996 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23997             David Edelsohn  <dje.gcc@gmail.com>
23999         PR target/83946
24000         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24001         Change "crset eq" to "crset 2".
24002         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24003         (*call_indirect_aix<mode>_nospec): Likewise.
24004         (*call_value_indirect_aix<mode>_nospec): Likewise.
24005         (*call_indirect_elfv2<mode>_nospec): Likewise.
24006         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
24007         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
24008         change assembly output from . to $.
24009         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24010         (indirect_jump<mode>_nospec): Change assembly output from . to $.
24011         (*tablejump<mode>_internal1_nospec): Likewise.
24013 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
24015         PR target/80870
24016         * config/sh/sh_optimize_sett_clrt.cc:
24017         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
24019 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
24021         PR tree-optimization/83940
24022         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
24023         offset_dt to vect_constant_def rather than vect_unknown_def_type.
24024         (vect_check_load_store_mask): Add a mask_dt_out parameter and
24025         use it to pass back the definition type.
24026         (vect_check_store_rhs): Likewise rhs_dt_out.
24027         (vect_build_gather_load_calls): Add a mask_dt argument and use
24028         it instead of a call to vect_is_simple_use.
24029         (vectorizable_store): Update calls to vect_check_load_store_mask
24030         and vect_check_store_rhs.  Use the dt returned by the latter instead
24031         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
24032         instead of calls to vect_is_simple_use.  Pass the scalar rather
24033         than the vector operand to vect_is_simple_use when handling
24034         second and subsequent copies of an rhs value.
24035         (vectorizable_load): Update calls to vect_check_load_store_mask
24036         and vect_build_gather_load_calls.  Use the cached mask_dt and
24037         gs_info.offset_dt instead of calls to vect_is_simple_use.
24039 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
24041         PR middle-end/83945
24042         * tree-emutls.c: Include gimplify.h.
24043         (lower_emutls_2): New function.
24044         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
24045         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
24046         it before further processing.
24048         PR target/83930
24049         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
24050         UINTVAL (trueop1) instead of INTVAL (op1).
24052 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
24054         PR debug/81570
24055         PR debug/83728
24056         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
24057         INCOMING_FRAME_SP_OFFSET if not defined.
24058         (scan_trace): Add ENTRY argument.  If true and
24059         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
24060         emit a note to adjust the CFA offset.
24061         (create_cfi_notes): Adjust scan_trace callers.
24062         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
24063         INCOMING_FRAME_SP_OFFSET in the CIE.
24064         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
24065         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
24066         Likewise.
24067         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
24068         * doc/tm.texi: Regenerated.
24070 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24072         PR rtl-optimization/83147
24073         * lra-constraints.c (remove_inheritance_pseudos): Use
24074         lra_substitute_pseudo_within_insn.
24076 2018-01-19  Tom de Vries  <tom@codesourcery.com>
24077             Cesar Philippidis  <cesar@codesourcery.com>
24079         PR target/83920
24080         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
24082 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
24084         PR target/83790
24085         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
24086         spaces for function labels.
24088 2018-01-19  Martin Liska  <mliska@suse.cz>
24090         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
24091         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
24092         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
24093         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
24094         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
24095         (PRED_CONST_RETURN): Change from 69 to 65.
24096         (PRED_NULL_RETURN): Change from 91 to 71.
24097         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
24098         (PRED_LOOP_GUARD): Change from 66 to 73.
24100 2018-01-19  Martin Liska  <mliska@suse.cz>
24102         * predict.c (predict_insn_def): Add new assert.
24103         (struct branch_predictor): Change type to signed integer.
24104         (test_prediction_value_range): Amend test to cover
24105         PROB_UNINITIALIZED.
24106         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
24107         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
24108         (PRED_LOOP_ITERATIONS_MAX): Likewise.
24109         (PRED_LOOP_IV_COMPARE): Likewise.
24110         * predict.h (PROB_UNINITIALIZED): Define new constant.
24112 2018-01-19  Martin Liska  <mliska@suse.cz>
24114         * predict.c (dump_prediction): Add new format for
24115         analyze_brprob.py script which is enabled with -details
24116         suboption.
24117         * profile-count.h (precise_p): New function.
24119 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24121         PR tree-optimization/83922
24122         * tree-vect-loop.c (vect_verify_full_masking): Return false if
24123         there are no statements that need masking.
24124         (vect_active_double_reduction_p): New function.
24125         (vect_analyze_loop_operations): Use it when handling phis that
24126         are not in the loop header.
24128 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
24130         PR tree-optimization/83914
24131         * tree-vect-loop.c (vectorizable_induction): Don't convert
24132         init_expr or apply the peeling adjustment for inductions
24133         that are nested within the vectorized loop.
24135 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24137         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
24138         instead of NEG.
24140 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24142         PR sanitizer/81715
24143         PR testsuite/83882
24144         * function.h (gimplify_parameters): Add gimple_seq * argument.
24145         * function.c: Include gimple.h and options.h.
24146         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
24147         for the added local temporaries if needed.
24148         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
24149         if there are any parameter cleanups, wrap whole body into a
24150         try/finally with the cleanups.
24152 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
24154         PR target/82964
24155         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24156         Use GET_MODE_CLASS for scalar floating point.
24158 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24160         PR ipa/82256
24161         patch by PaX Team
24162         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
24163         Fix call of call_cgraph_insertion_hooks.
24165 2018-01-18  Martin Sebor  <msebor@redhat.com>
24167         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
24169 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
24171         PR ipa/83619
24172         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
24173         frequencies.
24175 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
24177         PR other/70268
24178         * common.opt: (-ffile-prefix-map): New option.
24179         * opts.c (common_handle_option): Defer it.
24180         * opts-global.c (handle_common_deferred_options): Handle it.
24181         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
24182         * file-prefix-map.h: New file.
24183         (remap_debug_filename, add_debug_prefix_map): ...here.
24184         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
24185         * final.c (debug_prefix_map, add_debug_prefix_map
24186         remap_debug_filename): Move to...
24187         * file-prefix-map.c: New file.
24188         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
24189         generalize, get rid of alloca(), use strrchr() instead of strchr().
24190         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
24191         Implement in terms of add_prefix_map().
24192         (remap_macro_filename, remap_debug_filename): Implement in term of
24193         remap_filename().
24194         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
24195         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
24196         * dbxout.c: Include file-prefix-map.h.
24197         * varasm.c: Likewise.
24198         * vmsdbgout.c: Likewise.
24199         * xcoffout.c: Likewise.
24200         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
24201         * doc/cppopts.texi (-fmacro-prefix-map): Document.
24202         * doc/invoke.texi (-ffile-prefix-map): Document.
24203         (-fdebug-prefix-map): Update description.
24205 2018-01-18  Martin Liska  <mliska@suse.cz>
24207         * config/i386/i386.c (indirect_thunk_name): Document that also
24208         lfence is emitted.
24209         (output_indirect_thunk): Document why both instructions
24210         (pause and lfence) are generated.
24212 2018-01-18  Richard Biener  <rguenther@suse.de>
24214         PR tree-optimization/83887
24215         * graphite-scop-detection.c
24216         (scop_detection::get_nearest_dom_with_single_entry): Remove.
24217         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
24218         (scop_detection::merge_sese): Re-implement with a flood-fill
24219         algorithm that properly finds a SESE region if it exists.
24221 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
24223         PR c/61240
24224         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
24225         pointer_diff optimizations use view_convert instead of convert.
24227 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24229         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24230         Generate different code for -mno-speculate-indirect-jumps.
24231         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24232         (*call_indirect_aix<mode>): Disable for
24233         -mno-speculate-indirect-jumps.
24234         (*call_indirect_aix<mode>_nospec): New define_insn.
24235         (*call_value_indirect_aix<mode>): Disable for
24236         -mno-speculate-indirect-jumps.
24237         (*call_value_indirect_aix<mode>_nospec): New define_insn.
24238         (*sibcall_nonlocal_sysv<mode>): Generate different code for
24239         -mno-speculate-indirect-jumps.
24240         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24242 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
24244         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
24245         long double type, set the flags for noting the default long double
24246         type, even if we don't pass or return a long double type.
24248 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
24250         PR ipa/83051
24251         * ipa-inline.c (flatten_function): Do not overwrite final inlining
24252         failure.
24254 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
24256         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
24257         support for merge[hl].
24258         (fold_mergehl_helper): New helper function.
24259         (tree-vector-builder.h): New #include for tree_vector_builder usage.
24260         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
24261         (altivec_vmrglw_direct): Add xxmrglw insn.
24263 2018-01-17  Andrew Waterman  <andrew@sifive.com>
24265         * config/riscv/riscv.c (riscv_conditional_register_usage): If
24266         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
24268 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
24270         PR lto/83121
24271         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
24272         call the lto_location_cache before reading the
24273         DECL_SOURCE_LOCATION of the types.
24275 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
24276             Richard Sandiford  <richard.sandiford@linaro.org>
24278         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
24279         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
24280         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
24281         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
24282         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
24283         Add declaration.
24284         * config/aarch64/constraints.md (aarch64_movti_operand):
24285         Limit immediates.
24286         * config/aarch64/predicates.md (Uti): Add new constraint.
24288 2018-01-17  Carl Love  <cel@us.ibm.com>
24290         * config/rs6000/vsx.md (define_expand xl_len_r,
24291         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
24292         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
24293         lxvll.
24294         (define_expand, define_insn): Move the shift left from  the
24295         define_insn to the define_expand for lxvl and stxvl instructions.
24296         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
24297         and XL_LEN_R definitions to PURE.
24299 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
24301         * config/i386/i386.c (indirect_thunk_name): Declare regno
24302         as unsigned int.  Compare regno with INVALID_REGNUM.
24303         (output_indirect_thunk): Ditto.
24304         (output_indirect_thunk_function): Ditto.
24305         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
24306         in the call to output_indirect_thunk_function.
24308 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
24310         PR middle-end/83884
24311         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
24312         rather than the size of inner_type to determine the stack slot size
24313         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
24315 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
24317         PR target/83546
24318         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
24319         to PTA_SILVERMONT.
24321 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24323         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
24324         endian Linux systems to optionally enable multilibs for selecting
24325         the long double type if the user configured an explicit type.
24326         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
24327         have no long double multilibs if not defined.
24328         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
24329         warn if the user used -mabi={ieee,ibm}longdouble and we built
24330         multilibs for long double.
24331         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
24332         appropriate multilib option.
24333         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
24334         multilib options.
24335         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
24336         for building long double multilibs.
24337         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
24339 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
24341         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
24342         copies.
24344         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
24345         64 bits.
24346         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
24347         128 bits.
24349         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
24350         variables.
24352         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
24353         return value.
24355 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24357         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
24358         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
24360 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24362         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
24363         different rtl trees depending on TARGET_64BIT.
24364         (rs6000_gen_lvx): Likewise.
24366 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
24368         * config/visium/visium.md (nop): Tweak comment.
24369         (hazard_nop): Likewise.
24371 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24373         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
24374         -mspeculate-indirect-jumps.
24375         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
24376         for -mno-speculate-indirect-jumps.
24377         (*call_indirect_elfv2<mode>_nospec): New define_insn.
24378         (*call_value_indirect_elfv2<mode>): Disable for
24379         -mno-speculate-indirect-jumps.
24380         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
24381         (indirect_jump): Emit different RTL for
24382         -mno-speculate-indirect-jumps.
24383         (*indirect_jump<mode>): Disable for
24384         -mno-speculate-indirect-jumps.
24385         (*indirect_jump<mode>_nospec): New define_insn.
24386         (tablejump): Emit different RTL for
24387         -mno-speculate-indirect-jumps.
24388         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
24389         (tablejumpsi_nospec): New define_expand.
24390         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
24391         (tablejumpdi_nospec): New define_expand.
24392         (*tablejump<mode>_internal1): Disable for
24393         -mno-speculate-indirect-jumps.
24394         (*tablejump<mode>_internal1_nospec): New define_insn.
24395         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
24396         option.
24398 2018-01-16  Artyom Skrobov tyomitch@gmail.com
24400         * caller-save.c (insert_save): Drop unnecessary parameter.  All
24401         callers updated.
24403 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24404             Richard Biener  <rguenth@suse.de>
24406         PR libgomp/83590
24407         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
24408         return early, inline manually is_gimple_sizepos.  Make sure if we
24409         call gimplify_expr we don't end up with a gimple constant.
24410         * tree.c (variably_modified_type_p): Don't return true for
24411         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
24412         * gimplify.h (is_gimple_sizepos): Remove.
24414 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24416         PR tree-optimization/83857
24417         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
24418         vectorizable_live_operation for pure SLP statements.
24419         (vectorizable_live_operation): Handle PHIs.
24421 2018-01-16  Richard Biener  <rguenther@suse.de>
24423         PR tree-optimization/83867
24424         * tree-vect-stmts.c (vect_transform_stmt): Precompute
24425         nested_in_vect_loop_p since the scalar stmt may get invalidated.
24427 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24429         PR c/83844
24430         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
24431         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
24432         If off is not INTEGER_CST, issue a may not be aligned warning
24433         rather than isn't aligned.  Use isn%'t rather than isn't.
24434         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
24435         into MULT_EXPR.
24436         <case MULT_EXPR>: Improve the case when bottom and one of the
24437         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
24438         operand, in that case check if the other operand is multiple of
24439         bottom divided by the INTEGER_CST operand.
24441 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24443         PR target/83858
24444         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
24445         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
24446         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
24447         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
24448         * config/pa/pa.c (pa_function_arg_advance): Likewise.
24449         (pa_function_arg, pa_arg_partial_bytes): Likewise.
24450         (pa_function_arg_size): New function.
24452 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24454         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
24455         in a separate statement.
24457 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
24459         PR tree-optimization/83847
24460         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
24461         group gathers and scatters.
24463 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
24465         PR rtl-optimization/86620
24466         * params.def (max-sched-ready-insns): Bump minimum value to 1.
24468         PR rtl-optimization/83213
24469         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
24470         to last if both are JUMP_INSNs.
24472         PR tree-optimization/83843
24473         * gimple-ssa-store-merging.c
24474         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
24475         store_immediate_info for bswap/nop orig_stores.
24477 2018-01-15  Andrew Waterman  <andrew@sifive.com>
24479         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
24480         !TARGET_MUL.
24481         <UDIV>: Increase cost if !TARGET_DIV.
24483 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
24485         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
24486         (define_attr "cr_logical_3op"): New.
24487         (cceq_ior_compare): Adjust.
24488         (cceq_ior_compare_complement): Adjust.
24489         (*cceq_rev_compare): Adjust.
24490         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
24491         (is_cracked_insn): Adjust.
24492         (insn_must_be_first_in_group): Adjust.
24493         * config/rs6000/40x.md: Adjust.
24494         * config/rs6000/440.md: Adjust.
24495         * config/rs6000/476.md: Adjust.
24496         * config/rs6000/601.md: Adjust.
24497         * config/rs6000/603.md: Adjust.
24498         * config/rs6000/6xx.md: Adjust.
24499         * config/rs6000/7450.md: Adjust.
24500         * config/rs6000/7xx.md: Adjust.
24501         * config/rs6000/8540.md: Adjust.
24502         * config/rs6000/cell.md: Adjust.
24503         * config/rs6000/e300c2c3.md: Adjust.
24504         * config/rs6000/e500mc.md: Adjust.
24505         * config/rs6000/e500mc64.md: Adjust.
24506         * config/rs6000/e5500.md: Adjust.
24507         * config/rs6000/e6500.md: Adjust.
24508         * config/rs6000/mpc.md: Adjust.
24509         * config/rs6000/power4.md: Adjust.
24510         * config/rs6000/power5.md: Adjust.
24511         * config/rs6000/power6.md: Adjust.
24512         * config/rs6000/power7.md: Adjust.
24513         * config/rs6000/power8.md: Adjust.
24514         * config/rs6000/power9.md: Adjust.
24515         * config/rs6000/rs64.md: Adjust.
24516         * config/rs6000/titan.md: Adjust.
24518 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24520         * config/i386/predicates.md (indirect_branch_operand): Rewrite
24521         ix86_indirect_branch_register logic.
24523 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24525         * config/i386/constraints.md (Bs): Update
24526         ix86_indirect_branch_register check.  Don't check
24527         ix86_indirect_branch_register with GOT_memory_operand.
24528         (Bw): Likewise.
24529         * config/i386/predicates.md (GOT_memory_operand): Don't check
24530         ix86_indirect_branch_register here.
24531         (GOT32_symbol_operand): Likewise.
24533 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24535         * config/i386/predicates.md (constant_call_address_operand):
24536         Rewrite ix86_indirect_branch_register logic.
24537         (sibcall_insn_operand): Likewise.
24539 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24541         * config/i386/constraints.md (Bs): Replace
24542         ix86_indirect_branch_thunk_register with
24543         ix86_indirect_branch_register.
24544         (Bw): Likewise.
24545         * config/i386/i386.md (indirect_jump): Likewise.
24546         (tablejump): Likewise.
24547         (*sibcall_memory): Likewise.
24548         (*sibcall_value_memory): Likewise.
24549         Peepholes of indirect call and jump via memory: Likewise.
24550         * config/i386/i386.opt: Likewise.
24551         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24552         (GOT_memory_operand): Likewise.
24553         (call_insn_operand): Likewise.
24554         (sibcall_insn_operand): Likewise.
24555         (GOT32_symbol_operand): Likewise.
24557 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
24559         PR middle-end/83837
24560         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
24561         type rather than type addr's type points to.
24562         (expand_omp_atomic_mutex): Likewise.
24563         (expand_omp_atomic): Likewise.
24565 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
24567         PR target/83839
24568         * config/i386/i386.c (output_indirect_thunk_function): Use
24569         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
24570         for  __x86_return_thunk.
24572 2018-01-15  Richard Biener  <rguenther@suse.de>
24574         PR middle-end/83850
24575         * expmed.c (extract_bit_field_1): Fix typo.
24577 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24579         PR target/83687
24580         * config/arm/iterators.md (VF): New mode iterator.
24581         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
24582         Remove integer-related logic from pattern.
24583         (neon_vabd<mode>_3): Likewise.
24585 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
24587         PR middle-end/82694
24588         * common.opt (fstrict-overflow): No longer an alias.
24589         (fwrapv-pointer): New option.
24590         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
24591         also for pointer types based on flag_wrapv_pointer.
24592         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
24593         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
24594         opts->x_flag_wrapv got set.
24595         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
24596         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
24597         POINTER_TYPE_OVERFLOW_UNDEFINED.
24598         * match.pd: Likewise in address comparison pattern.
24599         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
24601 2018-01-15  Richard Biener  <rguenther@suse.de>
24603         PR lto/83804
24604         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
24605         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
24606         Reset type names to their identifier if their TYPE_DECL doesn't
24607         have linkage (and thus is used for ODR and devirt).
24608         (save_debug_info_for_decl): Remove.
24609         (save_debug_info_for_type): Likewise.
24610         (add_tree_to_fld_list): Adjust.
24611         * tree-pretty-print.c (dump_generic_node): Make dumping of
24612         type names more robust.
24614 2018-01-15  Richard Biener  <rguenther@suse.de>
24616         * BASE-VER: Bump to 8.0.1.
24618 2018-01-14  Martin Sebor  <msebor@redhat.com>
24620         PR other/83508
24621         * builtins.c (check_access): Avoid warning when the no-warning bit
24622         is set.
24624 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
24626         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
24627         * ira-color (allocno_hard_regs_compare): Likewise.
24629 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
24631         PR target/83013
24632         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
24633         Use .pushsection/.popsection.
24635 2018-01-14  Martin Sebor  <msebor@redhat.com>
24637         PR c++/81327
24638         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
24640 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
24642         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
24643         entry from extra_headers.
24644         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
24645         extra_headers, make the list bitwise identical to the i?86-*-* one.
24647 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24649         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
24650         -mcmodel=large with -mindirect-branch=thunk,
24651         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
24652         -mfunction-return=thunk-extern.
24653         * doc/invoke.texi: Document -mcmodel=large is incompatible with
24654         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
24655         -mfunction-return=thunk and -mfunction-return=thunk-extern.
24657 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24659         * config/i386/i386.c (print_reg): Print the name of the full
24660         integer register without '%'.
24661         (ix86_print_operand): Handle 'V'.
24662         * doc/extend.texi: Document 'V' modifier.
24664 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24666         * config/i386/constraints.md (Bs): Disallow memory operand for
24667         -mindirect-branch-register.
24668         (Bw): Likewise.
24669         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24670         (GOT_memory_operand): Likewise.
24671         (call_insn_operand): Likewise.
24672         (sibcall_insn_operand): Likewise.
24673         (GOT32_symbol_operand): Likewise.
24674         * config/i386/i386.md (indirect_jump): Call convert_memory_address
24675         for -mindirect-branch-register.
24676         (tablejump): Likewise.
24677         (*sibcall_memory): Likewise.
24678         (*sibcall_value_memory): Likewise.
24679         Disallow peepholes of indirect call and jump via memory for
24680         -mindirect-branch-register.
24681         (*call_pop): Replace m with Bw.
24682         (*call_value_pop): Likewise.
24683         (*sibcall_pop_memory): Replace m with Bs.
24684         * config/i386/i386.opt (mindirect-branch-register): New option.
24685         * doc/invoke.texi: Document -mindirect-branch-register option.
24687 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24689         * config/i386/i386-protos.h (ix86_output_function_return): New.
24690         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
24691         set function_return_type.
24692         (indirect_thunk_name): Add ret_p to indicate thunk for function
24693         return.
24694         (output_indirect_thunk_function): Pass false to
24695         indirect_thunk_name.
24696         (ix86_output_indirect_branch_via_reg): Likewise.
24697         (ix86_output_indirect_branch_via_push): Likewise.
24698         (output_indirect_thunk_function): Create alias for function
24699         return thunk if regno < 0.
24700         (ix86_output_function_return): New function.
24701         (ix86_handle_fndecl_attribute): Handle function_return.
24702         (ix86_attribute_table): Add function_return.
24703         * config/i386/i386.h (machine_function): Add
24704         function_return_type.
24705         * config/i386/i386.md (simple_return_internal): Use
24706         ix86_output_function_return.
24707         (simple_return_internal_long): Likewise.
24708         * config/i386/i386.opt (mfunction-return=): New option.
24709         (indirect_branch): Mention -mfunction-return=.
24710         * doc/extend.texi: Document function_return function attribute.
24711         * doc/invoke.texi: Document -mfunction-return= option.
24713 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
24715         * config/i386/i386-opts.h (indirect_branch): New.
24716         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
24717         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
24718         with local indirect jump when converting indirect call and jump.
24719         (ix86_set_indirect_branch_type): New.
24720         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
24721         (indirectlabelno): New.
24722         (indirect_thunk_needed): Likewise.
24723         (indirect_thunk_bnd_needed): Likewise.
24724         (indirect_thunks_used): Likewise.
24725         (indirect_thunks_bnd_used): Likewise.
24726         (INDIRECT_LABEL): Likewise.
24727         (indirect_thunk_name): Likewise.
24728         (output_indirect_thunk): Likewise.
24729         (output_indirect_thunk_function): Likewise.
24730         (ix86_output_indirect_branch_via_reg): Likewise.
24731         (ix86_output_indirect_branch_via_push): Likewise.
24732         (ix86_output_indirect_branch): Likewise.
24733         (ix86_output_indirect_jmp): Likewise.
24734         (ix86_code_end): Call output_indirect_thunk_function if needed.
24735         (ix86_output_call_insn): Call ix86_output_indirect_branch if
24736         needed.
24737         (ix86_handle_fndecl_attribute): Handle indirect_branch.
24738         (ix86_attribute_table): Add indirect_branch.
24739         * config/i386/i386.h (machine_function): Add indirect_branch_type
24740         and has_local_indirect_jump.
24741         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
24742         to true.
24743         (tablejump): Likewise.
24744         (*indirect_jump): Use ix86_output_indirect_jmp.
24745         (*tablejump_1): Likewise.
24746         (simple_return_indirect_internal): Likewise.
24747         * config/i386/i386.opt (mindirect-branch=): New option.
24748         (indirect_branch): New.
24749         (keep): Likewise.
24750         (thunk): Likewise.
24751         (thunk-inline): Likewise.
24752         (thunk-extern): Likewise.
24753         * doc/extend.texi: Document indirect_branch function attribute.
24754         * doc/invoke.texi: Document -mindirect-branch= option.
24756 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
24758         PR ipa/83051
24759         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
24761 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
24763         * ipa-inline.c (want_inline_small_function_p): Return false if
24764         inlining has already failed with CIF_FINAL_ERROR.
24765         (update_caller_keys): Call want_inline_small_function_p before
24766         can_inline_edge_p.
24767         (update_callee_keys): Likewise.
24769 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24771         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
24772         New function.
24773         (rs6000_quadword_masked_address_p): Likewise.
24774         (quad_aligned_load_p): Likewise.
24775         (quad_aligned_store_p): Likewise.
24776         (const_load_sequence_p): Add comment to describe the outer-most loop.
24777         (mimic_memory_attributes_and_flags): New function.
24778         (rs6000_gen_stvx): Likewise.
24779         (replace_swapped_aligned_store): Likewise.
24780         (rs6000_gen_lvx): Likewise.
24781         (replace_swapped_aligned_load): Likewise.
24782         (replace_swapped_load_constant): Capitalize argument name in
24783         comment describing this function.
24784         (rs6000_analyze_swaps): Add a third pass to search for vector loads
24785         and stores that access quad-word aligned addresses and replace
24786         with stvx or lvx instructions when appropriate.
24787         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
24788         New function prototype.
24789         (rs6000_quadword_masked_address_p): Likewise.
24790         (rs6000_gen_lvx): Likewise.
24791         (rs6000_gen_stvx): Likewise.
24792         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
24793         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
24794         when memory address is aligned.
24795         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
24796         this split to select lvx instruction when memory address is aligned.
24797         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
24798         instruction when memory address is aligned.
24799         (*vsx_le_perm_load_v16qi): Likewise.
24800         (four unnamed splitters): Modify to select the stvx instruction
24801         when memory is aligned.
24803 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
24805         * predict.c (determine_unlikely_bbs): Handle correctly BBs
24806         which appears in the queue multiple times.
24808 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24809             Alan Hayward  <alan.hayward@arm.com>
24810             David Sherwood  <david.sherwood@arm.com>
24812         * tree-vectorizer.h (vec_lower_bound): New structure.
24813         (_loop_vec_info): Add check_nonzero and lower_bounds.
24814         (LOOP_VINFO_CHECK_NONZERO): New macro.
24815         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
24816         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
24817         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
24818         fields.  Make seg_len the distance travelled, not including the
24819         access size.
24820         (dr_direction_indicator): Declare.
24821         (dr_zero_step_indicator): Likewise.
24822         (dr_known_forward_stride_p): Likewise.
24823         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
24824         tree-ssanames.h.
24825         (runtime_alias_check_p): Allow runtime alias checks with
24826         variable strides.
24827         (operator ==): Compare access_size and align.
24828         (prune_runtime_alias_test_list): Rework for new distinction between
24829         the access_size and seg_len.
24830         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
24831         segment lengths.
24832         (get_segment_min_max): New function.
24833         (create_intersect_range_checks): Use it.
24834         (dr_step_indicator): New function.
24835         (dr_direction_indicator): Likewise.
24836         (dr_zero_step_indicator): Likewise.
24837         (dr_known_forward_stride_p): Likewise.
24838         * tree-loop-distribution.c (data_ref_segment_size): Return
24839         DR_STEP * (niters - 1).
24840         (compute_alias_check_pairs): Update call to the dr_with_seg_len
24841         constructor.
24842         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
24843         (vect_preserves_scalar_order_p): New function, split out from...
24844         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
24845         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
24846         (vect_vfa_access_size): New function.
24847         (vect_vfa_align): Likewise.
24848         (vect_compile_time_alias): Take access_size_a and access_b arguments.
24849         (dump_lower_bound): New function.
24850         (vect_check_lower_bound): Likewise.
24851         (vect_small_gap_p): Likewise.
24852         (vectorizable_with_step_bound_p): Likewise.
24853         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
24854         depencies if the vectorization factor is 1.  Convert the checks
24855         for nonzero steps into checks on the bounds of DR_STEP.  Try using
24856         a bunds check for variable steps if the minimum required step is
24857         relatively small. Update calls to the dr_with_seg_len
24858         constructor and to vect_compile_time_alias.
24859         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
24860         function.
24861         (vect_loop_versioning): Call it.
24862         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
24863         when retrying.
24864         (vect_estimate_min_profitable_iters): Account for any bounds checks.
24866 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24867             Alan Hayward  <alan.hayward@arm.com>
24868             David Sherwood  <david.sherwood@arm.com>
24870         * doc/sourcebuild.texi (vect_scatter_store): Document.
24871         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
24872         optabs.
24873         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
24874         Document.
24875         * genopinit.c (main): Add supports_vec_scatter_store and
24876         supports_vec_scatter_store_cached to target_optabs.
24877         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
24878         IFN_MASK_SCATTER_STORE.
24879         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
24880         functions.
24881         * internal-fn.h (internal_store_fn_p): Declare.
24882         (internal_fn_stored_value_index): Likewise.
24883         * internal-fn.c (scatter_store_direct): New macro.
24884         (expand_scatter_store_optab_fn): New function.
24885         (direct_scatter_store_optab_supported_p): New macro.
24886         (internal_store_fn_p): New function.
24887         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24888         IFN_MASK_SCATTER_STORE.
24889         (internal_fn_mask_index): Likewise.
24890         (internal_fn_stored_value_index): New function.
24891         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24892         for scatter stores.
24893         * optabs-query.h (supports_vec_scatter_store_p): Declare.
24894         * optabs-query.c (supports_vec_scatter_store_p): New function.
24895         * tree-vectorizer.h (vect_get_store_rhs): Declare.
24896         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24897         true for scatter stores.
24898         (vect_gather_scatter_fn_p): Handle scatter stores too.
24899         (vect_check_gather_scatter): Consider using scatter stores if
24900         supports_vec_scatter_store_p.
24901         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24902         scatter stores too.
24903         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24904         internal_fn_stored_value_index.
24905         (check_load_store_masking): Handle scatter stores too.
24906         (vect_get_store_rhs): Make public.
24907         (vectorizable_call): Use internal_store_fn_p.
24908         (vectorizable_store): Handle scatter store internal functions.
24909         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24910         when deciding whether the end of the group has been reached.
24911         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24912         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24913         (mask_scatter_store<mode>): New insns.
24915 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24916             Alan Hayward  <alan.hayward@arm.com>
24917             David Sherwood  <david.sherwood@arm.com>
24919         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24920         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24921         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24922         function.
24923         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24924         Use vect_truncate_gather_scatter_offset if we can't treat the
24925         operation as a normal gather load or scatter store.
24926         (get_group_load_store_type): Take the gather_scatter_info
24927         as argument.  Try using a gather load or scatter store for
24928         single-element groups.
24929         (get_load_store_type): Update calls to get_group_load_store_type
24930         and vect_use_strided_gather_scatters_p.
24932 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24933             Alan Hayward  <alan.hayward@arm.com>
24934             David Sherwood  <david.sherwood@arm.com>
24936         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24937         optional tree argument.
24938         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24939         null target hooks.
24940         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24941         but continue to use the current value as a fallback.
24942         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24943         to compare the updates.
24944         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24945         (get_load_store_type): Use it when handling a strided access.
24946         (vect_get_strided_load_store_ops): New function.
24947         (vect_get_data_ptr_increment): Likewise.
24948         (vectorizable_load): Handle strided gather loads.  Always pass
24949         a step to vect_create_data_ref_ptr and bump_vector_ptr.
24951 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
24952             Alan Hayward  <alan.hayward@arm.com>
24953             David Sherwood  <david.sherwood@arm.com>
24955         * doc/md.texi (gather_load@var{m}): Document.
24956         (mask_gather_load@var{m}): Likewise.
24957         * genopinit.c (main): Add supports_vec_gather_load and
24958         supports_vec_gather_load_cached to target_optabs.
24959         * optabs-tree.c (init_tree_optimization_optabs): Use
24960         ggc_cleared_alloc to allocate target_optabs.
24961         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24962         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24963         functions.
24964         * internal-fn.h (internal_load_fn_p): Declare.
24965         (internal_gather_scatter_fn_p): Likewise.
24966         (internal_fn_mask_index): Likewise.
24967         (internal_gather_scatter_fn_supported_p): Likewise.
24968         * internal-fn.c (gather_load_direct): New macro.
24969         (expand_gather_load_optab_fn): New function.
24970         (direct_gather_load_optab_supported_p): New macro.
24971         (direct_internal_fn_optab): New function.
24972         (internal_load_fn_p): Likewise.
24973         (internal_gather_scatter_fn_p): Likewise.
24974         (internal_fn_mask_index): Likewise.
24975         (internal_gather_scatter_fn_supported_p): Likewise.
24976         * optabs-query.c (supports_at_least_one_mode_p): New function.
24977         (supports_vec_gather_load_p): Likewise.
24978         * optabs-query.h (supports_vec_gather_load_p): Declare.
24979         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24980         and memory_type field.
24981         (NUM_PATTERNS): Bump to 15.
24982         * tree-vect-data-refs.c: Include internal-fn.h.
24983         (vect_gather_scatter_fn_p): New function.
24984         (vect_describe_gather_scatter_call): Likewise.
24985         (vect_check_gather_scatter): Try using internal functions for
24986         gather loads.  Recognize existing calls to a gather load function.
24987         (vect_analyze_data_refs): Consider using gather loads if
24988         supports_vec_gather_load_p.
24989         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24990         (vect_get_gather_scatter_offset_type): Likewise.
24991         (vect_convert_mask_for_vectype): Likewise.
24992         (vect_add_conversion_to_patterm): Likewise.
24993         (vect_try_gather_scatter_pattern): Likewise.
24994         (vect_recog_gather_scatter_pattern): New pattern recognizer.
24995         (vect_vect_recog_func_ptrs): Add it.
24996         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24997         internal_fn_mask_index and internal_gather_scatter_fn_p.
24998         (check_load_store_masking): Take the gather_scatter_info as an
24999         argument and handle gather loads.
25000         (vect_get_gather_scatter_ops): New function.
25001         (vectorizable_call): Check internal_load_fn_p.
25002         (vectorizable_load): Likewise.  Handle gather load internal
25003         functions.
25004         (vectorizable_store): Update call to check_load_store_masking.
25005         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
25006         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
25007         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
25008         (aarch64_gather_scale_operand_d): New predicates.
25009         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
25010         (mask_gather_load<mode>): New insns.
25012 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25013             Alan Hayward  <alan.hayward@arm.com>
25014             David Sherwood  <david.sherwood@arm.com>
25016         * optabs.def (fold_left_plus_optab): New optab.
25017         * doc/md.texi (fold_left_plus_@var{m}): Document.
25018         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
25019         * internal-fn.c (fold_left_direct): Define.
25020         (expand_fold_left_optab_fn): Likewise.
25021         (direct_fold_left_optab_supported_p): Likewise.
25022         * fold-const-call.c (fold_const_fold_left): New function.
25023         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
25024         * tree-parloops.c (valid_reduction_p): New function.
25025         (gather_scalar_reductions): Use it.
25026         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
25027         (vect_finish_replace_stmt): Declare.
25028         * tree-vect-loop.c (fold_left_reduction_fn): New function.
25029         (needs_fold_left_reduction_p): New function, split out from...
25030         (vect_is_simple_reduction): ...here.  Accept reductions that
25031         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
25032         (vect_force_simple_reduction): Also store the reduction type in
25033         the assignment's STMT_VINFO_REDUC_TYPE.
25034         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
25035         (merge_with_identity): New function.
25036         (vect_expand_fold_left): Likewise.
25037         (vectorize_fold_left_reduction): Likewise.
25038         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
25039         scalar phi in place for it.  Check for target support and reject
25040         cases that would reassociate the operation.  Defer the transform
25041         phase to vectorize_fold_left_reduction.
25042         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
25043         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
25044         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
25046 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25048         * tree-if-conv.c (predicate_mem_writes): Remove redundant
25049         call to ifc_temp_var.
25051 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25052             Alan Hayward  <alan.hayward@arm.com>
25053             David Sherwood  <david.sherwood@arm.com>
25055         * target.def (legitimize_address_displacement): Take the original
25056         offset as a poly_int.
25057         * targhooks.h (default_legitimize_address_displacement): Update
25058         accordingly.
25059         * targhooks.c (default_legitimize_address_displacement): Likewise.
25060         * doc/tm.texi: Regenerate.
25061         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
25062         as an argument, moving assert of ad->disp == ad->disp_term to...
25063         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
25064         Try calling targetm.legitimize_address_displacement before expanding
25065         the address rather than afterwards, and adjust for the new interface.
25066         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
25067         Match the new hook interface.  Handle SVE addresses.
25068         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
25069         new hook interface.
25071 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25073         * Makefile.in (OBJS): Add early-remat.o.
25074         * target.def (select_early_remat_modes): New hook.
25075         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
25076         * doc/tm.texi: Regenerate.
25077         * targhooks.h (default_select_early_remat_modes): Declare.
25078         * targhooks.c (default_select_early_remat_modes): New function.
25079         * timevar.def (TV_EARLY_REMAT): New timevar.
25080         * passes.def (pass_early_remat): New pass.
25081         * tree-pass.h (make_pass_early_remat): Declare.
25082         * early-remat.c: New file.
25083         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
25084         function.
25085         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
25087 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25088             Alan Hayward  <alan.hayward@arm.com>
25089             David Sherwood  <david.sherwood@arm.com>
25091         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
25092         vfm1 with a bound_epilog parameter.
25093         (vect_do_peeling): Update calls accordingly, and move the prologue
25094         call earlier in the function.  Treat the base bound_epilog as 0 for
25095         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
25096         this base when peeling for gaps.
25097         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
25098         with fully-masked loops.
25099         (vect_estimate_min_profitable_iters): Handle the single peeled
25100         iteration in that case.
25102 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25103             Alan Hayward  <alan.hayward@arm.com>
25104             David Sherwood  <david.sherwood@arm.com>
25106         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
25107         single-element interleaving even if the size is not a power of 2.
25108         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
25109         accesses for single-element interleaving if the group size is
25110         not a power of 2.
25112 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25113             Alan Hayward  <alan.hayward@arm.com>
25114             David Sherwood  <david.sherwood@arm.com>
25116         * doc/md.texi (fold_extract_last_@var{m}): Document.
25117         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
25118         * optabs.def (fold_extract_last_optab): New optab.
25119         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
25120         * internal-fn.c (fold_extract_direct): New macro.
25121         (expand_fold_extract_optab_fn): Likewise.
25122         (direct_fold_extract_optab_supported_p): Likewise.
25123         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
25124         * tree-vect-loop.c (vect_model_reduction_cost): Handle
25125         EXTRACT_LAST_REDUCTION.
25126         (get_initial_def_for_reduction): Do not create an initial vector
25127         for EXTRACT_LAST_REDUCTION reductions.
25128         (vectorizable_reduction): Leave the scalar phi in place for
25129         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
25130         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
25131         epilogue code for EXTRACT_LAST_REDUCTION and defer the
25132         transform phase to vectorizable_condition.
25133         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
25134         split out from...
25135         (vect_finish_stmt_generation): ...here.
25136         (vect_finish_replace_stmt): New function.
25137         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
25138         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
25139         pattern.
25140         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
25142 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25143             Alan Hayward  <alan.hayward@arm.com>
25144             David Sherwood  <david.sherwood@arm.com>
25146         * doc/md.texi (extract_last_@var{m}): Document.
25147         * optabs.def (extract_last_optab): New optab.
25148         * internal-fn.def (EXTRACT_LAST): New internal function.
25149         * internal-fn.c (cond_unary_direct): New macro.
25150         (expand_cond_unary_optab_fn): Likewise.
25151         (direct_cond_unary_optab_supported_p): Likewise.
25152         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
25153         loops using EXTRACT_LAST.
25154         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
25155         (extract_last_<mode>): ...this optab.
25156         (vec_extract<mode><Vel>): Update accordingly.
25158 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25159             Alan Hayward  <alan.hayward@arm.com>
25160             David Sherwood  <david.sherwood@arm.com>
25162         * target.def (empty_mask_is_expensive): New hook.
25163         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
25164         * doc/tm.texi: Regenerate.
25165         * targhooks.h (default_empty_mask_is_expensive): Declare.
25166         * targhooks.c (default_empty_mask_is_expensive): New function.
25167         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
25168         if the target says that empty masks are expensive.
25169         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
25170         New function.
25171         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
25173 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25174             Alan Hayward  <alan.hayward@arm.com>
25175             David Sherwood  <david.sherwood@arm.com>
25177         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
25178         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
25179         (vect_use_loop_mask_for_alignment_p): New function.
25180         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
25181         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
25182         niters_skip argument.  Make sure that the first niters_skip elements
25183         of the first iteration are inactive.
25184         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
25185         Update call to vect_set_loop_masks_directly.
25186         (get_misalign_in_elems): New function, split out from...
25187         (vect_gen_prolog_loop_niters): ...here.
25188         (vect_update_init_of_dr): Take a code argument that specifies whether
25189         the adjustment should be added or subtracted.
25190         (vect_update_init_of_drs): Likewise.
25191         (vect_prepare_for_masked_peels): New function.
25192         (vect_do_peeling): Skip prologue peeling if we're using a mask
25193         instead.  Update call to vect_update_inits_of_drs.
25194         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25195         mask_skip_niters.
25196         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
25197         alignment.  Do not include the number of peeled iterations in
25198         the minimum threshold in that case.
25199         (vectorizable_induction): Adjust the start value down by
25200         LOOP_VINFO_MASK_SKIP_NITERS iterations.
25201         (vect_transform_loop): Call vect_prepare_for_masked_peels.
25202         Take the number of skipped iterations into account when calculating
25203         the loop bounds.
25204         * tree-vect-stmts.c (vect_gen_while_not): New function.
25206 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25207             Alan Hayward  <alan.hayward@arm.com>
25208             David Sherwood  <david.sherwood@arm.com>
25210         * doc/sourcebuild.texi (vect_fully_masked): Document.
25211         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
25212         default value to 0.
25213         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
25214         split out from...
25215         (vect_analyze_loop_2): ...here. Don't check the vectorization
25216         factor against the number of loop iterations if the loop is
25217         fully-masked.
25219 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25220             Alan Hayward  <alan.hayward@arm.com>
25221             David Sherwood  <david.sherwood@arm.com>
25223         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
25224         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
25225         (dump_groups): Update accordingly.
25226         (iv_use::mem_type): New member variable.
25227         (address_p): New function.
25228         (record_use): Add a mem_type argument and initialize the new
25229         mem_type field.
25230         (record_group_use): Add a mem_type argument.  Use address_p.
25231         Remove obsolete null checks of base_object.  Update call to record_use.
25232         (find_interesting_uses_op): Update call to record_group_use.
25233         (find_interesting_uses_cond): Likewise.
25234         (find_interesting_uses_address): Likewise.
25235         (get_mem_type_for_internal_fn): New function.
25236         (find_address_like_use): Likewise.
25237         (find_interesting_uses_stmt): Try find_address_like_use before
25238         calling find_interesting_uses_op.
25239         (addr_offset_valid_p): Use the iv mem_type field as the type
25240         of the addressed memory.
25241         (add_autoinc_candidates): Likewise.
25242         (get_address_cost): Likewise.
25243         (split_small_address_groups_p): Use address_p.
25244         (split_address_groups): Likewise.
25245         (add_iv_candidate_for_use): Likewise.
25246         (autoinc_possible_for_pair): Likewise.
25247         (rewrite_groups): Likewise.
25248         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
25249         (determine_group_iv_cost): Update after split of USE_ADDRESS.
25250         (get_alias_ptr_type_for_ptr_address): New function.
25251         (rewrite_use_address): Rewrite address uses in calls that were
25252         identified by find_address_like_use.
25254 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25255             Alan Hayward  <alan.hayward@arm.com>
25256             David Sherwood  <david.sherwood@arm.com>
25258         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
25259         TARGET_MEM_REFs.
25260         * gimple-expr.h (is_gimple_addressable: Likewise.
25261         * gimple-expr.c (is_gimple_address): Likewise.
25262         * internal-fn.c (expand_call_mem_ref): New function.
25263         (expand_mask_load_optab_fn): Use it.
25264         (expand_mask_store_optab_fn): Likewise.
25266 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25267             Alan Hayward  <alan.hayward@arm.com>
25268             David Sherwood  <david.sherwood@arm.com>
25270         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
25271         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
25272         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
25273         (cond_umax@var{mode}): Document.
25274         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
25275         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
25276         (cond_umin_optab, cond_umax_optab): New optabs.
25277         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
25278         (COND_IOR, COND_XOR): New internal functions.
25279         * internal-fn.h (get_conditional_internal_fn): Declare.
25280         * internal-fn.c (cond_binary_direct): New macro.
25281         (expand_cond_binary_optab_fn): Likewise.
25282         (direct_cond_binary_optab_supported_p): Likewise.
25283         (get_conditional_internal_fn): New function.
25284         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
25285         Cope with reduction statements that are vectorized as calls rather
25286         than assignments.
25287         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
25288         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
25289         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
25290         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
25291         (UNSPEC_COND_EOR): New unspecs.
25292         (optab): Add mappings for them.
25293         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
25294         (sve_int_op, sve_fp_op): New int attributes.
25296 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25297             Alan Hayward  <alan.hayward@arm.com>
25298             David Sherwood  <david.sherwood@arm.com>
25300         * optabs.def (while_ult_optab): New optab.
25301         * doc/md.texi (while_ult@var{m}@var{n}): Document.
25302         * internal-fn.def (WHILE_ULT): New internal function.
25303         * internal-fn.h (direct_internal_fn_supported_p): New override
25304         that takes two types as argument.
25305         * internal-fn.c (while_direct): New macro.
25306         (expand_while_optab_fn): New function.
25307         (convert_optab_supported_p): Likewise.
25308         (direct_while_optab_supported_p): New macro.
25309         * wide-int.h (wi::udiv_ceil): New function.
25310         * tree-vectorizer.h (rgroup_masks): New structure.
25311         (vec_loop_masks): New typedef.
25312         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
25313         and fully_masked_p.
25314         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
25315         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
25316         (vect_max_vf): New function.
25317         (slpeel_make_loop_iterate_ntimes): Delete.
25318         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
25319         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
25320         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
25321         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
25322         internal-fn.h, stor-layout.h and optabs-query.h.
25323         (vect_set_loop_mask): New function.
25324         (add_preheader_seq): Likewise.
25325         (add_header_seq): Likewise.
25326         (interleave_supported_p): Likewise.
25327         (vect_maybe_permute_loop_masks): Likewise.
25328         (vect_set_loop_masks_directly): Likewise.
25329         (vect_set_loop_condition_masked): Likewise.
25330         (vect_set_loop_condition_unmasked): New function, split out from
25331         slpeel_make_loop_iterate_ntimes.
25332         (slpeel_make_loop_iterate_ntimes): Rename to..
25333         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
25334         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
25335         (vect_do_peeling): Update call accordingly.
25336         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
25337         loops.
25338         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25339         mask_compare_type, can_fully_mask_p and fully_masked_p.
25340         (release_vec_loop_masks): New function.
25341         (_loop_vec_info): Use it to free the loop masks.
25342         (can_produce_all_loop_masks_p): New function.
25343         (vect_get_max_nscalars_per_iter): Likewise.
25344         (vect_verify_full_masking): Likewise.
25345         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
25346         retries, and free the mask rgroups before retrying.  Check loop-wide
25347         reasons for disallowing fully-masked loops.  Make the final decision
25348         about whether use a fully-masked loop or not.
25349         (vect_estimate_min_profitable_iters): Do not assume that peeling
25350         for the number of iterations will be needed for fully-masked loops.
25351         (vectorizable_reduction): Disable fully-masked loops.
25352         (vectorizable_live_operation): Likewise.
25353         (vect_halve_mask_nunits): New function.
25354         (vect_double_mask_nunits): Likewise.
25355         (vect_record_loop_mask): Likewise.
25356         (vect_get_loop_mask): Likewise.
25357         (vect_transform_loop): Handle the case in which the final loop
25358         iteration might handle a partial vector.  Call vect_set_loop_condition
25359         instead of slpeel_make_loop_iterate_ntimes.
25360         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
25361         (check_load_store_masking): New function.
25362         (prepare_load_store_mask): Likewise.
25363         (vectorizable_store): Handle fully-masked loops.
25364         (vectorizable_load): Likewise.
25365         (supportable_widening_operation): Use vect_halve_mask_nunits for
25366         booleans.
25367         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
25368         (vect_gen_while): New function.
25369         * config/aarch64/aarch64.md (umax<mode>3): New expander.
25370         (aarch64_uqdec<mode>): New insn.
25372 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25373             Alan Hayward  <alan.hayward@arm.com>
25374             David Sherwood  <david.sherwood@arm.com>
25376         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
25377         (reduc_xor_scal_optab): New optabs.
25378         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
25379         (reduc_xor_scal_@var{m}): Document.
25380         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
25381         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
25382         internal functions.
25383         * fold-const-call.c (fold_const_call): Handle them.
25384         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
25385         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
25386         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
25387         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
25388         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
25389         (UNSPEC_XORV): New unspecs.
25390         (optab): Add entries for them.
25391         (BITWISEV): New int iterator.
25392         (bit_reduc_op): New int attributes.
25394 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25395             Alan Hayward  <alan.hayward@arm.com>
25396             David Sherwood  <david.sherwood@arm.com>
25398         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
25399         * internal-fn.def (VEC_SHL_INSERT): New internal function.
25400         * optabs.def (vec_shl_insert_optab): New optab.
25401         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
25402         (duplicate_and_interleave): Likewise.
25403         * tree-vect-loop.c: Include internal-fn.h.
25404         (neutral_op_for_slp_reduction): New function, split out from
25405         get_initial_defs_for_reduction.
25406         (get_initial_def_for_reduction): Handle option 2 for variable-length
25407         vectors by loading the neutral value into a vector and then shifting
25408         the initial value into element 0.
25409         (get_initial_defs_for_reduction): Replace the code argument with
25410         the neutral value calculated by neutral_op_for_slp_reduction.
25411         Use gimple_build_vector for constant-length vectors.
25412         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
25413         but the first group_size elements have a neutral value.
25414         Use duplicate_and_interleave otherwise.
25415         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
25416         Update call to get_initial_defs_for_reduction.  Handle SLP
25417         reductions for variable-length vectors by creating one vector
25418         result for each scalar result, with the elements associated
25419         with other scalar results stubbed out with the neutral value.
25420         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
25421         Require IFN_VEC_SHL_INSERT for double reductions on
25422         variable-length vectors, or SLP reductions that have
25423         a neutral value.  Require can_duplicate_and_interleave_p
25424         support for variable-length unchained SLP reductions if there
25425         is no neutral value, such as for MIN/MAX reductions.  Also require
25426         the number of vector elements to be a multiple of the number of
25427         SLP statements when doing variable-length unchained SLP reductions.
25428         Update call to vect_create_epilog_for_reduction.
25429         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
25430         and remove initial values.
25431         (duplicate_and_interleave): Make public.
25432         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
25433         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
25435 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25436             Alan Hayward  <alan.hayward@arm.com>
25437             David Sherwood  <david.sherwood@arm.com>
25439         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
25440         (can_duplicate_and_interleave_p): New function.
25441         (vect_get_and_check_slp_defs): Take the vector of statements
25442         rather than just the current one.  Remove excess parentheses.
25443         Restriction rejectinon of vect_constant_def and vect_external_def
25444         for variable-length vectors to boolean types, or types for which
25445         can_duplicate_and_interleave_p is false.
25446         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
25447         (duplicate_and_interleave): New function.
25448         (vect_get_constant_vectors): Use gimple_build_vector for
25449         constant-length vectors and suitable variable-length constant
25450         vectors.  Use duplicate_and_interleave for other variable-length
25451         vectors.  Don't defer the update when inserting new statements.
25453 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25454             Alan Hayward  <alan.hayward@arm.com>
25455             David Sherwood  <david.sherwood@arm.com>
25457         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
25458         min_profitable_iters doesn't go negative.
25460 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25461             Alan Hayward  <alan.hayward@arm.com>
25462             David Sherwood  <david.sherwood@arm.com>
25464         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
25465         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
25466         * optabs.def (vec_mask_load_lanes_optab): New optab.
25467         (vec_mask_store_lanes_optab): Likewise.
25468         * internal-fn.def (MASK_LOAD_LANES): New internal function.
25469         (MASK_STORE_LANES): Likewise.
25470         * internal-fn.c (mask_load_lanes_direct): New macro.
25471         (mask_store_lanes_direct): Likewise.
25472         (expand_mask_load_optab_fn): Handle masked operations.
25473         (expand_mask_load_lanes_optab_fn): New macro.
25474         (expand_mask_store_optab_fn): Handle masked operations.
25475         (expand_mask_store_lanes_optab_fn): New macro.
25476         (direct_mask_load_lanes_optab_supported_p): Likewise.
25477         (direct_mask_store_lanes_optab_supported_p): Likewise.
25478         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
25479         parameter.
25480         (vect_load_lanes_supported): Likewise.
25481         * tree-vect-data-refs.c (strip_conversion): New function.
25482         (can_group_stmts_p): Likewise.
25483         (vect_analyze_data_ref_accesses): Use it instead of checking
25484         for a pair of assignments.
25485         (vect_store_lanes_supported): Take a masked_p parameter.
25486         (vect_load_lanes_supported): Likewise.
25487         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
25488         vect_store_lanes_supported and vect_load_lanes_supported.
25489         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
25490         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
25491         parameter.  Don't allow gaps for masked accesses.
25492         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
25493         and vect_load_lanes_supported.
25494         (get_load_store_type): Take a masked_p parameter and update
25495         call to get_group_load_store_type.
25496         (vectorizable_store): Update call to get_load_store_type.
25497         Handle IFN_MASK_STORE_LANES.
25498         (vectorizable_load): Update call to get_load_store_type.
25499         Handle IFN_MASK_LOAD_LANES.
25501 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25502             Alan Hayward  <alan.hayward@arm.com>
25503             David Sherwood  <david.sherwood@arm.com>
25505         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
25506         modes for SVE.
25507         * config/aarch64/aarch64-protos.h
25508         (aarch64_sve_struct_memory_operand_p): Declare.
25509         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
25510         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
25511         (VPRED, vpred): Handle SVE structure modes.
25512         * config/aarch64/constraints.md (Utx): New constraint.
25513         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
25514         (aarch64_sve_struct_nonimmediate_operand): New predicates.
25515         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
25516         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
25517         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
25518         structure modes.  Split into pieces after RA.
25519         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
25520         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
25521         New patterns.
25522         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
25523         SVE structure modes.
25524         (aarch64_classify_address): Likewise.
25525         (sizetochar): Move earlier in file.
25526         (aarch64_print_operand): Handle SVE register lists.
25527         (aarch64_array_mode): New function.
25528         (aarch64_sve_struct_memory_operand_p): Likewise.
25529         (TARGET_ARRAY_MODE): Redefine.
25531 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25532             Alan Hayward  <alan.hayward@arm.com>
25533             David Sherwood  <david.sherwood@arm.com>
25535         * target.def (array_mode): New target hook.
25536         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
25537         * doc/tm.texi: Regenerate.
25538         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
25539         * hooks.c (hook_optmode_mode_uhwi_none): New function.
25540         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
25541         targetm.array_mode.
25542         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
25543         type sizes.
25545 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25546             Alan Hayward  <alan.hayward@arm.com>
25547             David Sherwood  <david.sherwood@arm.com>
25549         * fold-const.c (fold_binary_loc): Check the argument types
25550         rather than the result type when testing for a vector operation.
25552 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25554         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
25555         * doc/tm.texi: Regenerate.
25557 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25558             Alan Hayward  <alan.hayward@arm.com>
25559             David Sherwood  <david.sherwood@arm.com>
25561         * doc/invoke.texi (-msve-vector-bits=): Document new option.
25562         (sve): Document new AArch64 extension.
25563         * doc/md.texi (w): Extend the description of the AArch64
25564         constraint to include SVE vectors.
25565         (Upl, Upa): Document new AArch64 predicate constraints.
25566         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
25567         enum.
25568         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
25569         (msve-vector-bits=): New option.
25570         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
25571         SVE when these are disabled.
25572         (sve): New extension.
25573         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
25574         modes.  Adjust their number of units based on aarch64_sve_vg.
25575         (MAX_BITSIZE_MODE_ANY_MODE): Define.
25576         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
25577         aarch64_addr_query_type.
25578         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
25579         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
25580         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
25581         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
25582         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
25583         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
25584         (aarch64_simd_imm_zero_p): Delete.
25585         (aarch64_check_zero_based_sve_index_immediate): Declare.
25586         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25587         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25588         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25589         (aarch64_sve_float_mul_immediate_p): Likewise.
25590         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25591         rather than an rtx.
25592         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
25593         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
25594         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
25595         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
25596         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
25597         (aarch64_regmode_natural_size): Likewise.
25598         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
25599         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
25600         left one place.
25601         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
25602         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
25603         for VG and the SVE predicate registers.
25604         (V_ALIASES): Add a "z"-prefixed alias.
25605         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
25606         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
25607         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
25608         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
25609         (REG_CLASS_NAMES): Add entries for them.
25610         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
25611         and the predicate registers.
25612         (aarch64_sve_vg): Declare.
25613         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
25614         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
25615         (REGMODE_NATURAL_SIZE): Define.
25616         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
25617         SVE macros.
25618         * config/aarch64/aarch64.c: Include cfgrtl.h.
25619         (simd_immediate_info): Add a constructor for series vectors,
25620         and an associated step field.
25621         (aarch64_sve_vg): New variable.
25622         (aarch64_dbx_register_number): Handle VG and the predicate registers.
25623         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
25624         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
25625         (VEC_ANY_DATA, VEC_STRUCT): New constants.
25626         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
25627         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
25628         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
25629         (aarch64_get_mask_mode): New functions.
25630         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
25631         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
25632         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
25633         predicate modes and predicate registers.  Explicitly restrict
25634         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
25635         to store a vector mode if it is recognized by
25636         aarch64_classify_vector_mode.
25637         (aarch64_regmode_natural_size): New function.
25638         (aarch64_hard_regno_caller_save_mode): Return the original mode
25639         for predicates.
25640         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
25641         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
25642         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
25643         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
25644         functions.
25645         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
25646         does not overlap dest if the function is frame-related.  Handle
25647         SVE constants.
25648         (aarch64_split_add_offset): New function.
25649         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
25650         them aarch64_add_offset.
25651         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
25652         and update call to aarch64_sub_sp.
25653         (aarch64_add_cfa_expression): New function.
25654         (aarch64_expand_prologue): Pass extra temporary registers to the
25655         functions above.  Handle the case in which we need to emit new
25656         DW_CFA_expressions for registers that were originally saved
25657         relative to the stack pointer, but now have to be expressed
25658         relative to the frame pointer.
25659         (aarch64_output_mi_thunk): Pass extra temporary registers to the
25660         functions above.
25661         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
25662         IP0 and IP1 values for SVE frames.
25663         (aarch64_expand_vec_series): New function.
25664         (aarch64_expand_sve_widened_duplicate): Likewise.
25665         (aarch64_expand_sve_const_vector): Likewise.
25666         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
25667         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
25668         into the register, rather than emitting a SET directly.
25669         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
25670         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
25671         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
25672         (offset_9bit_signed_scaled_p): New functions.
25673         (aarch64_replicate_bitmask_imm): New function.
25674         (aarch64_bitmask_imm): Use it.
25675         (aarch64_cannot_force_const_mem): Reject expressions involving
25676         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
25677         (aarch64_classify_index): Handle SVE indices, by requiring
25678         a plain register index with a scale that matches the element size.
25679         (aarch64_classify_address): Handle SVE addresses.  Assert that
25680         the mode of the address is VOIDmode or an integer mode.
25681         Update call to aarch64_classify_symbol.
25682         (aarch64_classify_symbolic_expression): Update call to
25683         aarch64_classify_symbol.
25684         (aarch64_const_vec_all_in_range_p): New function.
25685         (aarch64_print_vector_float_operand): Likewise.
25686         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
25687         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
25688         and the FP immediates 1.0 and 0.5.
25689         (aarch64_print_address_internal): Handle SVE addresses.
25690         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
25691         (aarch64_regno_regclass): Handle predicate registers.
25692         (aarch64_secondary_reload): Handle big-endian reloads of SVE
25693         data modes.
25694         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
25695         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
25696         (aarch64_convert_sve_vector_bits): New function.
25697         (aarch64_override_options): Use it to handle -msve-vector-bits=.
25698         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
25699         rather than an rtx.
25700         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
25701         Handle SVE vector and predicate modes.  Accept VL-based constants
25702         that need only one temporary register, and VL offsets that require
25703         no temporary registers.
25704         (aarch64_conditional_register_usage): Mark the predicate registers
25705         as fixed if SVE isn't available.
25706         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
25707         Return true for SVE vector and predicate modes.
25708         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
25709         rather than an unsigned int.  Handle SVE modes.
25710         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
25711         SVE modes.
25712         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
25713         if SVE is enabled.
25714         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
25715         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
25716         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
25717         (aarch64_sve_float_mul_immediate_p): New functions.
25718         (aarch64_sve_valid_immediate): New function.
25719         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
25720         Explicitly reject structure modes.  Check for INDEX constants.
25721         Handle PTRUE and PFALSE constants.
25722         (aarch64_check_zero_based_sve_index_immediate): New function.
25723         (aarch64_simd_imm_zero_p): Delete.
25724         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
25725         vector modes.  Accept constants in the range of CNT[BHWD].
25726         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
25727         ask for an Advanced SIMD mode.
25728         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
25729         (aarch64_simd_vector_alignment): Handle SVE predicates.
25730         (aarch64_vectorize_preferred_vector_alignment): New function.
25731         (aarch64_simd_vector_alignment_reachable): Use it instead of
25732         the vector size.
25733         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
25734         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
25735         functions.
25736         (MAX_VECT_LEN): Delete.
25737         (expand_vec_perm_d): Add a vec_flags field.
25738         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
25739         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
25740         (aarch64_evpc_ext): Don't apply a big-endian lane correction
25741         for SVE modes.
25742         (aarch64_evpc_rev): Rename to...
25743         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
25744         (aarch64_evpc_rev_global): New function.
25745         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
25746         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
25747         MAX_VECT_LEN.
25748         (aarch64_evpc_sve_tbl): New function.
25749         (aarch64_expand_vec_perm_const_1): Update after rename of
25750         aarch64_evpc_rev.  Handle SVE permutes too, trying
25751         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
25752         than aarch64_evpc_tbl.
25753         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
25754         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
25755         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
25756         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
25757         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
25758         (aarch64_expand_sve_vcond): New functions.
25759         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
25760         of aarch64_vector_mode_p.
25761         (aarch64_dwarf_poly_indeterminate_value): New function.
25762         (aarch64_compute_pressure_classes): Likewise.
25763         (aarch64_can_change_mode_class): Likewise.
25764         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
25765         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
25766         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
25767         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
25768         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
25769         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
25770         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
25771         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
25772         constraints.
25773         (Dn, Dl, Dr): Accept const as well as const_vector.
25774         (Dz): Likewise.  Compare against CONST0_RTX.
25775         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
25776         of "vector" where appropriate.
25777         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
25778         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
25779         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
25780         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
25781         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
25782         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
25783         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
25784         (v_int_equiv): Extend to SVE modes.
25785         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
25786         mode attributes.
25787         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
25788         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
25789         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
25790         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
25791         (SVE_COND_FP_CMP): New int iterators.
25792         (perm_hilo): Handle the new unpack unspecs.
25793         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
25794         attributes.
25795         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
25796         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
25797         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
25798         (aarch64_equality_operator, aarch64_constant_vector_operand)
25799         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
25800         (aarch64_sve_nonimmediate_operand): Likewise.
25801         (aarch64_sve_general_operand): Likewise.
25802         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
25803         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
25804         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
25805         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
25806         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
25807         (aarch64_sve_float_arith_immediate): Likewise.
25808         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
25809         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
25810         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
25811         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
25812         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
25813         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
25814         (aarch64_sve_float_arith_operand): Likewise.
25815         (aarch64_sve_float_arith_with_sub_operand): Likewise.
25816         (aarch64_sve_float_mul_operand): Likewise.
25817         (aarch64_sve_vec_perm_operand): Likewise.
25818         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
25819         (aarch64_mov_operand): Accept const_poly_int and const_vector.
25820         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
25821         as well as const_vector.
25822         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
25823         in file.  Use CONST0_RTX and CONSTM1_RTX.
25824         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
25825         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
25826         Use aarch64_simd_imm_zero.
25827         * config/aarch64/aarch64-sve.md: New file.
25828         * config/aarch64/aarch64.md: Include it.
25829         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
25830         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
25831         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
25832         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
25833         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
25834         (sve): New attribute.
25835         (enabled): Disable instructions with the sve attribute unless
25836         TARGET_SVE.
25837         (movqi, movhi): Pass CONST_POLY_INT operaneds through
25838         aarch64_expand_mov_immediate.
25839         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
25840         CNT[BHSD] immediates.
25841         (movti): Split CONST_POLY_INT moves into two halves.
25842         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
25843         Split additions that need a temporary here if the destination
25844         is the stack pointer.
25845         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
25846         (*add<mode>3_poly_1): New instruction.
25847         (set_clobber_cc): New expander.
25849 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25851         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
25852         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
25853         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
25854         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
25855         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
25856         Change innermode from fixed_mode_size to machine_mode.
25857         (simplify_subreg): Update call accordingly.  Handle a constant-sized
25858         subreg of a variable-length CONST_VECTOR.
25860 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
25861             Alan Hayward  <alan.hayward@arm.com>
25862             David Sherwood  <david.sherwood@arm.com>
25864         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
25865         (add_offset_to_base): New function, split out from...
25866         (create_mem_ref): ...here.  When handling a scale other than 1,
25867         check first whether the address is valid without the offset.
25868         Add it into the base if so, leaving the index and scale as-is.
25870 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25872         PR c++/83778
25873         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
25874         fold_for_warn before checking if arg2 is INTEGER_CST.
25876 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
25878         * config/rs6000/predicates.md (load_multiple_operation): Delete.
25879         (store_multiple_operation): Delete.
25880         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
25881         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
25882         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
25883         guarded by TARGET_STRING.
25884         (rs6000_output_load_multiple): Delete.
25885         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25886         OPTION_MASK_STRING / TARGET_STRING handling.
25887         (print_operand) <'N', 'O'>: Add comment that these are unused now.
25888         (const rs6000_opt_masks) <"string">: Change mask to 0.
25889         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25890         (MASK_STRING): Delete.
25891         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25892         parts.  Simplify.
25893         (load_multiple): Delete.
25894         (*ldmsi8): Delete.
25895         (*ldmsi7): Delete.
25896         (*ldmsi6): Delete.
25897         (*ldmsi5): Delete.
25898         (*ldmsi4): Delete.
25899         (*ldmsi3): Delete.
25900         (store_multiple): Delete.
25901         (*stmsi8): Delete.
25902         (*stmsi7): Delete.
25903         (*stmsi6): Delete.
25904         (*stmsi5): Delete.
25905         (*stmsi4): Delete.
25906         (*stmsi3): Delete.
25907         (movmemsi_8reg): Delete.
25908         (corresponding unnamed define_insn): Delete.
25909         (movmemsi_6reg): Delete.
25910         (corresponding unnamed define_insn): Delete.
25911         (movmemsi_4reg): Delete.
25912         (corresponding unnamed define_insn): Delete.
25913         (movmemsi_2reg): Delete.
25914         (corresponding unnamed define_insn): Delete.
25915         (movmemsi_1reg): Delete.
25916         (corresponding unnamed define_insn): Delete.
25917         * config/rs6000/rs6000.opt (mno-string): New.
25918         (mstring): Replace by deprecation warning stub.
25919         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25921 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
25923         * regrename.c (regrename_do_replace): If replacing the same
25924         reg multiple times, try to reuse last created gen_raw_REG.
25926         PR debug/81155
25927         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25928         main to workaround a bug in GDB.
25930 2018-01-12  Tom de Vries  <tom@codesourcery.com>
25932         PR target/83737
25933         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25935 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
25937         PR rtl-optimization/80481
25938         * ira-color.c (get_cap_member): New function.
25939         (allocnos_conflict_by_live_ranges_p): Use it.
25940         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25941         (setup_slot_coalesced_allocno_live_ranges): Ditto.
25943 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
25945         PR target/83628
25946         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25947         (*saddl_se_1): Ditto.
25948         (*ssubsi_1): Ditto.
25949         (*ssubl_se_1): Ditto.
25951 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25953         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25954         rather than wi::to_widest for DR_INITs.
25955         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25956         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25957         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25958         INTEGER_CSTs.
25959         (vect_analyze_group_access_1): Note that here.
25961 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25963         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25964         polynomial type sizes.
25966 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
25968         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25969         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25970         (gimple_add_tmp_var): Likewise.
25972 2018-01-12  Martin Liska  <mliska@suse.cz>
25974         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25975         (gimple_alloc_sizes): Likewise.
25976         (dump_gimple_statistics): Use PRIu64 in printf format.
25977         * gimple.h: Change uint64_t to int.
25979 2018-01-12  Martin Liska  <mliska@suse.cz>
25981         * tree-core.h: Use uint64_t instead of int.
25982         * tree.c (tree_node_counts): Likewise.
25983         (tree_node_sizes): Likewise.
25984         (dump_tree_statistics): Use PRIu64 in printf format.
25986 2018-01-12  Martin Liska  <mliska@suse.cz>
25988         * Makefile.in: As qsort_chk is implemented in vec.c, add
25989         vec.o to linkage of gencfn-macros.
25990         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25991         passing the info to record_node_allocation_statistics.
25992         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25993         and pass the info.
25994         * ggc-common.c (struct ggc_usage): Add operator== and use
25995         it in operator< and compare function.
25996         * mem-stats.h (struct mem_usage): Likewise.
25997         * vec.c (struct vec_usage): Remove operator< and compare
25998         function. Can be simply inherited.
26000 2018-01-12  Martin Jambor  <mjambor@suse.cz>
26002         PR target/81616
26003         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
26004         * tree-ssa-math-opts.c: Include domwalk.h.
26005         (convert_mult_to_fma_1): New function.
26006         (fma_transformation_info): New type.
26007         (fma_deferring_state): Likewise.
26008         (cancel_fma_deferring): New function.
26009         (result_of_phi): Likewise.
26010         (last_fma_candidate_feeds_initial_phi): Likewise.
26011         (convert_mult_to_fma): Added deferring logic, split actual
26012         transformation to convert_mult_to_fma_1.
26013         (math_opts_dom_walker): New type.
26014         (math_opts_dom_walker::after_dom_children): New method, body moved
26015         here from pass_optimize_widening_mul::execute, added deferring logic
26016         bits.
26017         (pass_optimize_widening_mul::execute): Moved most of code to
26018         math_opts_dom_walker::after_dom_children.
26019         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
26020         * config/i386/i386.c (ix86_option_override_internal): Added
26021         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
26023 2018-01-12  Richard Biener  <rguenther@suse.de>
26025         PR debug/83157
26026         * dwarf2out.c (gen_variable_die): Do not reset old_die for
26027         inline instance vars.
26029 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
26031         PR target/81819
26032         * config/rx/rx.c (rx_is_restricted_memory_address):
26033         Handle SUBREG case.
26035 2018-01-12  Richard Biener  <rguenther@suse.de>
26037         PR tree-optimization/80846
26038         * target.def (split_reduction): New target hook.
26039         * targhooks.c (default_split_reduction): New function.
26040         * targhooks.h (default_split_reduction): Declare.
26041         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
26042         target requests first reduce vectors by combining low and high
26043         parts.
26044         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
26045         (get_vectype_for_scalar_type_and_size): Export.
26046         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
26047         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
26048         * doc/tm.texi: Regenerate.
26049         * config/i386/i386.c (ix86_split_reduction): Implement
26050         TARGET_VECTORIZE_SPLIT_REDUCTION.
26052 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26054         PR target/83368
26055         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
26056         in PIC mode except for TARGET_VXWORKS_RTP.
26057         * config/sparc/sparc.c: Include cfgrtl.h.
26058         (TARGET_INIT_PIC_REG): Define.
26059         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
26060         (sparc_pic_register_p): New predicate.
26061         (sparc_legitimate_address_p): Use it.
26062         (sparc_legitimize_pic_address): Likewise.
26063         (sparc_delegitimize_address): Likewise.
26064         (sparc_mode_dependent_address_p): Likewise.
26065         (gen_load_pcrel_sym): Remove 4th parameter.
26066         (load_got_register): Adjust call to above.  Remove obsolete stuff.
26067         (sparc_expand_prologue): Do not call load_got_register here.
26068         (sparc_flat_expand_prologue): Likewise.
26069         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
26070         (sparc_use_pseudo_pic_reg): New function.
26071         (sparc_init_pic_reg): Likewise.
26072         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26073         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
26075 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
26077         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26078         Add item for branch_cost.
26080 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26082         PR rtl-optimization/83565
26083         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
26084         not extend the result to a larger mode for rotate operations.
26085         (num_sign_bit_copies1): Likewise.
26087 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26089         PR target/40411
26090         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
26091         -symbolic.
26092         Use values-Xc.o for -pedantic.
26093         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
26095 2018-01-12  Martin Liska  <mliska@suse.cz>
26097         PR ipa/83054
26098         * ipa-devirt.c (final_warning_record::grow_type_warnings):
26099         New function.
26100         (possible_polymorphic_call_targets): Use it.
26101         (ipa_devirt): Likewise.
26103 2018-01-12  Martin Liska  <mliska@suse.cz>
26105         * profile-count.h (enum profile_quality): Use 0 as invalid
26106         enum value of profile_quality.
26108 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
26110         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
26111         -mext-string options.
26113 2018-01-12  Richard Biener  <rguenther@suse.de>
26115         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
26116         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
26117         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
26118         Likewise.
26119         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
26121 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
26123         * configure.ac (--with-long-double-format): Add support for the
26124         configuration option to change the default long double format on
26125         PowerPC systems.
26126         * config.gcc (powerpc*-linux*-*): Likewise.
26127         * configure: Regenerate.
26128         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
26129         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
26130         used without modification.
26132 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26134         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
26135         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
26136         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
26137         MISC_BUILTIN_SPEC_BARRIER.
26138         (rs6000_init_builtins): Likewise.
26139         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
26140         enum value.
26141         (speculation_barrier): New define_insn.
26142         * doc/extend.texi: Document __builtin_speculation_barrier.
26144 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26146         PR target/83203
26147         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
26148         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
26149         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
26150         iterators.
26151         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
26152         integral modes instead of "ss" and "sd".
26153         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
26154         vectors with 32-bit and 64-bit elements.
26155         (vecdupssescalarmodesuffix): New mode attribute.
26156         (vec_dup<mode>): Use it.
26158 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
26160         PR target/83330
26161         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
26162         frame if argument is passed on stack.
26164 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
26166         PR target/82682
26167         * ree.c (combine_reaching_defs): Optimize also
26168         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
26169         reg2=any_extend(exp); reg1=reg2;, formatting fix.
26171 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26173         PR middle-end/83189
26174         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
26176 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
26178         PR middle-end/83718
26179         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
26180         after they are computed.
26182 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
26184         PR tree-optimization/83695
26185         * gimple-loop-linterchange.cc
26186         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
26187         reset cached scev information after interchange.
26188         (pass_linterchange::execute): Remove call to scev_reset_htab.
26190 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26192         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
26193         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
26194         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
26195         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
26196         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
26197         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
26198         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
26199         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
26200         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
26201         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
26202         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
26203         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
26204         (V_lane_reg): Likewise.
26205         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
26206         New define_expand.
26207         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
26208         (vfmal_lane_low<mode>_intrinsic,
26209         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
26210         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
26211         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
26212         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
26213         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
26214         vfmsl_lane_high<mode>_intrinsic): New define_insns.
26216 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26218         * config/arm/arm-cpus.in (fp16fml): New feature.
26219         (ALL_SIMD): Add fp16fml.
26220         (armv8.2-a): Add fp16fml as an option.
26221         (armv8.3-a): Likewise.
26222         (armv8.4-a): Add fp16fml as part of fp16.
26223         * config/arm/arm.h (TARGET_FP16FML): Define.
26224         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
26225         when appropriate.
26226         * config/arm/arm-modes.def (V2HF): Define.
26227         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
26228         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
26229         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
26230         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
26231         vfmsl_low, vfmsl_high): New set of builtins.
26232         * config/arm/iterators.md (PLUSMINUS): New code iterator.
26233         (vfml_op): New code attribute.
26234         (VFMLHALVES): New int iterator.
26235         (VFML, VFMLSEL): New mode attributes.
26236         (V_reg): Define mapping for V2HF.
26237         (V_hi, V_lo): New mode attributes.
26238         (VF_constraint): Likewise.
26239         (vfml_half, vfml_half_selector): New int attributes.
26240         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
26241         define_expand.
26242         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
26243         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
26244         New define_insn.
26245         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
26246         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
26247         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
26248         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
26249         documentation.
26250         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
26251         Document new effective target and option set.
26253 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26255         * config/arm/arm-cpus.in (armv8_4): New feature.
26256         (ARMv8_4a): New fgroup.
26257         (armv8.4-a): New arch.
26258         * config/arm/arm-tables.opt: Regenerate.
26259         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
26260         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
26261         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
26262         Add matching rules for -march=armv8.4-a and extensions.
26263         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
26265 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
26267         PR target/81821
26268         * config/rx/rx.md (BW): New mode attribute.
26269         (sync_lock_test_and_setsi): Add mode suffix to insn output.
26271 2018-01-11  Richard Biener  <rguenther@suse.de>
26273         PR tree-optimization/83435
26274         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
26275         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
26276         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
26278 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26279             Alan Hayward  <alan.hayward@arm.com>
26280             David Sherwood  <david.sherwood@arm.com>
26282         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
26283         field.
26284         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
26285         (aarch64_print_address_internal): Use it to check for a zero offset.
26287 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26288             Alan Hayward  <alan.hayward@arm.com>
26289             David Sherwood  <david.sherwood@arm.com>
26291         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
26292         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
26293         Return a poly_int64 rather than a HOST_WIDE_INT.
26294         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
26295         rather than a HOST_WIDE_INT.
26296         * config/aarch64/aarch64.h (aarch64_frame): Protect with
26297         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
26298         hard_fp_offset, frame_size, initial_adjust, callee_offset and
26299         final_offset from HOST_WIDE_INT to poly_int64.
26300         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
26301         to_constant when getting the number of units in an Advanced SIMD
26302         mode.
26303         (aarch64_builtin_vectorized_function): Check for a constant number
26304         of units.
26305         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
26306         GET_MODE_SIZE.
26307         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
26308         attribute instead of GET_MODE_NUNITS.
26309         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
26310         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
26311         GET_MODE_SIZE for fixed-size registers.
26312         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
26313         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
26314         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
26315         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
26316         (aarch64_print_operand, aarch64_print_address_internal)
26317         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
26318         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
26319         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
26320         Handle polynomial GET_MODE_SIZE.
26321         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
26322         wider than SImode without modification.
26323         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
26324         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
26325         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
26326         passing and returning SVE modes.
26327         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
26328         rather than GEN_INT.
26329         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
26330         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
26331         (aarch64_allocate_and_probe_stack_space): Likewise.
26332         (aarch64_layout_frame): Cope with polynomial offsets.
26333         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
26334         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
26335         polynomial offsets.
26336         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
26337         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
26338         poly_int64 rather than a HOST_WIDE_INT.
26339         (aarch64_get_separate_components, aarch64_process_components)
26340         (aarch64_expand_prologue, aarch64_expand_epilogue)
26341         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
26342         (aarch64_anchor_offset): New function, split out from...
26343         (aarch64_legitimize_address): ...here.
26344         (aarch64_builtin_vectorization_cost): Handle polynomial
26345         TYPE_VECTOR_SUBPARTS.
26346         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
26347         GET_MODE_NUNITS.
26348         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
26349         number of elements from the PARALLEL rather than the mode.
26350         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
26351         rather than GET_MODE_BITSIZE.
26352         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
26353         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
26354         (aarch64_expand_vec_perm_const_1): Handle polynomial
26355         d->perm.length () and d->perm elements.
26356         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
26357         Apply to_constant to d->perm elements.
26358         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
26359         polynomial CONST_VECTOR_NUNITS.
26360         (aarch64_move_pointer): Take amount as a poly_int64 rather
26361         than an int.
26362         (aarch64_progress_pointer): Avoid temporary variable.
26363         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
26364         the mode attribute instead of GET_MODE.
26366 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26367             Alan Hayward  <alan.hayward@arm.com>
26368             David Sherwood  <david.sherwood@arm.com>
26370         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
26371         x exists before using it.
26372         (aarch64_add_constant_internal): Rename to...
26373         (aarch64_add_offset_1): ...this.  Replace regnum with separate
26374         src and dest rtxes.  Handle the case in which they're different,
26375         including when the offset is zero.  Replace scratchreg with an rtx.
26376         Use 2 additions if there is no spare register into which we can
26377         move a 16-bit constant.
26378         (aarch64_add_constant): Delete.
26379         (aarch64_add_offset): Replace reg with separate src and dest
26380         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
26381         Use aarch64_add_offset_1.
26382         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
26383         an rtx rather than an int.  Take the delta as a poly_int64
26384         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
26385         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
26386         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
26387         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
26388         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
26389         and aarch64_add_sp.
26390         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
26391         aarch64_add_constant.
26393 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26395         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
26396         Use scalar_float_mode.
26398 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26400         * config/aarch64/aarch64-simd.md
26401         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
26402         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
26403         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
26404         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
26405         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
26406         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
26407         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
26408         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
26409         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
26410         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
26412 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26414         PR target/83514
26415         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
26416         targ_options->x_arm_arch_string is non NULL.
26418 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
26420         * config/aarch64/aarch64.h
26421         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
26423 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
26425         PR target/82096
26426         * expmed.c (emit_store_flag_force): Swap if const op0
26427         and change VOIDmode to mode of op0.
26429 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
26431         PR rtl-optimization/83761
26432         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
26433         than bytes to mode_for_size.
26435 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26437         PR middle-end/83189
26438         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
26439         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
26440         profile.
26442 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26444         PR middle-end/83575
26445         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
26446         when in layout mode.
26447         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
26448         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
26449         partition fixup.
26451 2018-01-10  Michael Collison  <michael.collison@arm.com>
26453         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
26454         * config/aarch64/aarch64-option-extension.def: Add
26455         AARCH64_OPT_EXTENSION of 'fp16fml'.
26456         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26457         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
26458         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
26459         * config/aarch64/constraints.md (Ui7): New constraint.
26460         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
26461         (VFMLA_SEL_W): Ditto.
26462         (f16quad): Ditto.
26463         (f16mac1): Ditto.
26464         (VFMLA16_LOW): New int iterator.
26465         (VFMLA16_HIGH): Ditto.
26466         (UNSPEC_FMLAL): New unspec.
26467         (UNSPEC_FMLSL): Ditto.
26468         (UNSPEC_FMLAL2): Ditto.
26469         (UNSPEC_FMLSL2): Ditto.
26470         (f16mac): New code attribute.
26471         * config/aarch64/aarch64-simd-builtins.def
26472         (aarch64_fmlal_lowv2sf): Ditto.
26473         (aarch64_fmlsl_lowv2sf): Ditto.
26474         (aarch64_fmlalq_lowv4sf): Ditto.
26475         (aarch64_fmlslq_lowv4sf): Ditto.
26476         (aarch64_fmlal_highv2sf): Ditto.
26477         (aarch64_fmlsl_highv2sf): Ditto.
26478         (aarch64_fmlalq_highv4sf): Ditto.
26479         (aarch64_fmlslq_highv4sf): Ditto.
26480         (aarch64_fmlal_lane_lowv2sf): Ditto.
26481         (aarch64_fmlsl_lane_lowv2sf): Ditto.
26482         (aarch64_fmlal_laneq_lowv2sf): Ditto.
26483         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
26484         (aarch64_fmlalq_lane_lowv4sf): Ditto.
26485         (aarch64_fmlsl_lane_lowv4sf): Ditto.
26486         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
26487         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
26488         (aarch64_fmlal_lane_highv2sf): Ditto.
26489         (aarch64_fmlsl_lane_highv2sf): Ditto.
26490         (aarch64_fmlal_laneq_highv2sf): Ditto.
26491         (aarch64_fmlsl_laneq_highv2sf): Ditto.
26492         (aarch64_fmlalq_lane_highv4sf): Ditto.
26493         (aarch64_fmlsl_lane_highv4sf): Ditto.
26494         (aarch64_fmlalq_laneq_highv4sf): Ditto.
26495         (aarch64_fmlsl_laneq_highv4sf): Ditto.
26496         * config/aarch64/aarch64-simd.md:
26497         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
26498         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26499         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
26500         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
26501         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
26502         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
26503         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
26504         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
26505         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
26506         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
26507         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
26508         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
26509         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
26510         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
26511         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
26512         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
26513         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
26514         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
26515         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
26516         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
26517         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
26518         (vfmlsl_low_u32): Ditto.
26519         (vfmlalq_low_u32): Ditto.
26520         (vfmlslq_low_u32): Ditto.
26521         (vfmlal_high_u32): Ditto.
26522         (vfmlsl_high_u32): Ditto.
26523         (vfmlalq_high_u32): Ditto.
26524         (vfmlslq_high_u32): Ditto.
26525         (vfmlal_lane_low_u32): Ditto.
26526         (vfmlsl_lane_low_u32): Ditto.
26527         (vfmlal_laneq_low_u32): Ditto.
26528         (vfmlsl_laneq_low_u32): Ditto.
26529         (vfmlalq_lane_low_u32): Ditto.
26530         (vfmlslq_lane_low_u32): Ditto.
26531         (vfmlalq_laneq_low_u32): Ditto.
26532         (vfmlslq_laneq_low_u32): Ditto.
26533         (vfmlal_lane_high_u32): Ditto.
26534         (vfmlsl_lane_high_u32): Ditto.
26535         (vfmlal_laneq_high_u32): Ditto.
26536         (vfmlsl_laneq_high_u32): Ditto.
26537         (vfmlalq_lane_high_u32): Ditto.
26538         (vfmlslq_lane_high_u32): Ditto.
26539         (vfmlalq_laneq_high_u32): Ditto.
26540         (vfmlslq_laneq_high_u32): Ditto.
26541         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
26542         (AARCH64_FL_FOR_ARCH8_4): New.
26543         (AARCH64_ISA_F16FML): New ISA flag.
26544         (TARGET_F16FML): New feature flag for fp16fml.
26545         (doc/invoke.texi): Document new fp16fml option.
26547 2018-01-10  Michael Collison  <michael.collison@arm.com>
26549         * config/aarch64/aarch64-builtins.c:
26550         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
26551         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26552         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
26553         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
26554         (AARCH64_ISA_SHA3): New ISA flag.
26555         (TARGET_SHA3): New feature flag for sha3.
26556         * config/aarch64/iterators.md (sha512_op): New int attribute.
26557         (CRYPTO_SHA512): New int iterator.
26558         (UNSPEC_SHA512H): New unspec.
26559         (UNSPEC_SHA512H2): Ditto.
26560         (UNSPEC_SHA512SU0): Ditto.
26561         (UNSPEC_SHA512SU1): Ditto.
26562         * config/aarch64/aarch64-simd-builtins.def
26563         (aarch64_crypto_sha512hqv2di): New builtin.
26564         (aarch64_crypto_sha512h2qv2di): Ditto.
26565         (aarch64_crypto_sha512su0qv2di): Ditto.
26566         (aarch64_crypto_sha512su1qv2di): Ditto.
26567         (aarch64_eor3qv8hi): Ditto.
26568         (aarch64_rax1qv2di): Ditto.
26569         (aarch64_xarqv2di): Ditto.
26570         (aarch64_bcaxqv8hi): Ditto.
26571         * config/aarch64/aarch64-simd.md:
26572         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
26573         (aarch64_crypto_sha512su0qv2di): Ditto.
26574         (aarch64_crypto_sha512su1qv2di): Ditto.
26575         (aarch64_eor3qv8hi): Ditto.
26576         (aarch64_rax1qv2di): Ditto.
26577         (aarch64_xarqv2di): Ditto.
26578         (aarch64_bcaxqv8hi): Ditto.
26579         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
26580         (vsha512h2q_u64): Ditto.
26581         (vsha512su0q_u64): Ditto.
26582         (vsha512su1q_u64): Ditto.
26583         (veor3q_u16): Ditto.
26584         (vrax1q_u64): Ditto.
26585         (vxarq_u64): Ditto.
26586         (vbcaxq_u16): Ditto.
26587         * config/arm/types.md (crypto_sha512): New type attribute.
26588         (crypto_sha3): Ditto.
26589         (doc/invoke.texi): Document new sha3 option.
26591 2018-01-10  Michael Collison  <michael.collison@arm.com>
26593         * config/aarch64/aarch64-builtins.c:
26594         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
26595         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26596         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
26597         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
26598         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
26599         (AARCH64_ISA_SM4): New ISA flag.
26600         (TARGET_SM4): New feature flag for sm4.
26601         * config/aarch64/aarch64-simd-builtins.def
26602         (aarch64_sm3ss1qv4si): Ditto.
26603         (aarch64_sm3tt1aq4si): Ditto.
26604         (aarch64_sm3tt1bq4si): Ditto.
26605         (aarch64_sm3tt2aq4si): Ditto.
26606         (aarch64_sm3tt2bq4si): Ditto.
26607         (aarch64_sm3partw1qv4si): Ditto.
26608         (aarch64_sm3partw2qv4si): Ditto.
26609         (aarch64_sm4eqv4si): Ditto.
26610         (aarch64_sm4ekeyqv4si): Ditto.
26611         * config/aarch64/aarch64-simd.md:
26612         (aarch64_sm3ss1qv4si): Ditto.
26613         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
26614         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
26615         (aarch64_sm4eqv4si): Ditto.
26616         (aarch64_sm4ekeyqv4si): Ditto.
26617         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
26618         (sm3part_op): Ditto.
26619         (CRYPTO_SM3TT): Ditto.
26620         (CRYPTO_SM3PART): Ditto.
26621         (UNSPEC_SM3SS1): New unspec.
26622         (UNSPEC_SM3TT1A): Ditto.
26623         (UNSPEC_SM3TT1B): Ditto.
26624         (UNSPEC_SM3TT2A): Ditto.
26625         (UNSPEC_SM3TT2B): Ditto.
26626         (UNSPEC_SM3PARTW1): Ditto.
26627         (UNSPEC_SM3PARTW2): Ditto.
26628         (UNSPEC_SM4E): Ditto.
26629         (UNSPEC_SM4EKEY): Ditto.
26630         * config/aarch64/constraints.md (Ui2): New constraint.
26631         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
26632         * config/arm/types.md (crypto_sm3): New type attribute.
26633         (crypto_sm4): Ditto.
26634         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
26635         (vsm3tt1aq_u32): Ditto.
26636         (vsm3tt1bq_u32): Ditto.
26637         (vsm3tt2aq_u32): Ditto.
26638         (vsm3tt2bq_u32): Ditto.
26639         (vsm3partw1q_u32): Ditto.
26640         (vsm3partw2q_u32): Ditto.
26641         (vsm4eq_u32): Ditto.
26642         (vsm4ekeyq_u32): Ditto.
26643         (doc/invoke.texi): Document new sm4 option.
26645 2018-01-10  Michael Collison  <michael.collison@arm.com>
26647         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
26648         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
26649         (AARCH64_FL_FOR_ARCH8_4): New.
26650         (AARCH64_FL_V8_4): New flag.
26651         (doc/invoke.texi): Document new armv8.4-a option.
26653 2018-01-10  Michael Collison  <michael.collison@arm.com>
26655         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
26656         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
26657         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
26658         * config/aarch64/aarch64-option-extension.def: Add
26659         AARCH64_OPT_EXTENSION of 'sha2'.
26660         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
26661         (crypto): Disable sha2 and aes if crypto disabled.
26662         (crypto): Enable aes and sha2 if enabled.
26663         (simd): Disable sha2 and aes if simd disabled.
26664         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
26665         New flags.
26666         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
26667         (TARGET_SHA2): New feature flag for sha2.
26668         (TARGET_AES): New feature flag for aes.
26669         * config/aarch64/aarch64-simd.md:
26670         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
26671         conditional on TARGET_AES.
26672         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
26673         (aarch64_crypto_sha1hsi): Make pattern conditional
26674         on TARGET_SHA2.
26675         (aarch64_crypto_sha1hv4si): Ditto.
26676         (aarch64_be_crypto_sha1hv4si): Ditto.
26677         (aarch64_crypto_sha1su1v4si): Ditto.
26678         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
26679         (aarch64_crypto_sha1su0v4si): Ditto.
26680         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
26681         (aarch64_crypto_sha256su0v4si): Ditto.
26682         (aarch64_crypto_sha256su1v4si): Ditto.
26683         (doc/invoke.texi): Document new aes and sha2 options.
26685 2018-01-10  Martin Sebor  <msebor@redhat.com>
26687         PR tree-optimization/83781
26688         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
26689         as string arrays.
26691 2018-01-11  Martin Sebor  <msebor@gmail.com>
26692             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26694         PR tree-optimization/83501
26695         PR tree-optimization/81703
26697         * tree-ssa-strlen.c (get_string_cst): Rename...
26698         (get_string_len): ...to this.  Handle global constants.
26699         (handle_char_store): Adjust.
26701 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
26702             Jim Wilson  <jimw@sifive.com>
26704         * config/riscv/riscv-protos.h (riscv_output_return): New.
26705         * config/riscv/riscv.c (struct machine_function): New naked_p field.
26706         (riscv_attribute_table, riscv_output_return),
26707         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
26708         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
26709         (riscv_compute_frame_info): Only compute frame->mask if not a naked
26710         function.
26711         (riscv_expand_prologue): Add early return for naked function.
26712         (riscv_expand_epilogue): Likewise.
26713         (riscv_function_ok_for_sibcall): Return false for naked function.
26714         (riscv_set_current_function): New.
26715         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
26716         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
26717         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
26718         * doc/extend.texi (RISC-V Function Attributes): New.
26720 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
26722         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
26723         check for 128-bit long double before checking TCmode.
26724         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
26725         128-bit long doubles before checking TFmode or TCmode.
26726         (FLOAT128_IBM_P): Likewise.
26728 2018-01-10  Martin Sebor  <msebor@redhat.com>
26730         PR tree-optimization/83671
26731         * builtins.c (c_strlen): Unconditionally return zero for the empty
26732         string.
26733         Use -Warray-bounds for warnings.
26734         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
26735         for non-constant array indices with COMPONENT_REF, arrays of
26736         arrays, and pointers to arrays.
26737         (gimple_fold_builtin_strlen): Determine and set length range for
26738         non-constant character arrays.
26740 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
26742         PR middle-end/81897
26743         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
26744         empty blocks.
26746 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
26748         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
26750 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26752         PR target/83399
26753         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
26754         VECTOR_MEM_ALTIVEC_OR_VSX_P.
26755         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
26756         indexed_or_indirect_operand predicate.
26757         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
26758         (*vsx_le_perm_load_v8hi): Likewise.
26759         (*vsx_le_perm_load_v16qi): Likewise.
26760         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
26761         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
26762         (*vsx_le_perm_store_v8hi): Likewise.
26763         (*vsx_le_perm_store_v16qi): Likewise.
26764         (eight unnamed splitters): Likewise.
26766 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
26768         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
26769         * config/rs6000/emmintrin.h: Likewise.
26770         * config/rs6000/mmintrin.h: Likewise.
26771         * config/rs6000/xmmintrin.h: Likewise.
26773 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
26775         PR c++/43486
26776         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
26777         "public_flag".
26778         * tree.c (tree_nop_conversion): Return true for location wrapper
26779         nodes.
26780         (maybe_wrap_with_location): New function.
26781         (selftest::check_strip_nops): New function.
26782         (selftest::test_location_wrappers): New function.
26783         (selftest::tree_c_tests): Call it.
26784         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
26785         (maybe_wrap_with_location): New decl.
26786         (EXPR_LOCATION_WRAPPER_P): New macro.
26787         (location_wrapper_p): New inline function.
26788         (tree_strip_any_location_wrapper): New inline function.
26790 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
26792         PR target/83735
26793         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
26794         stack_realign_offset for the largest alignment of stack slot
26795         actually used.
26796         (ix86_find_max_used_stack_alignment): New function.
26797         (ix86_finalize_stack_frame_flags): Use it.  Set
26798         max_used_stack_alignment if we don't realign stack.
26799         * config/i386/i386.h (machine_function): Add
26800         max_used_stack_alignment.
26802 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
26804         * config/arm/arm.opt (-mbranch-cost): New option.
26805         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
26806         account.
26808 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
26810         PR target/83629
26811         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
26812         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
26814 2018-01-10  Richard Biener  <rguenther@suse.de>
26816         PR debug/83765
26817         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
26818         early out so it also covers the case where we have a non-NULL
26819         origin.
26821 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26823         PR tree-optimization/83753
26824         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
26825         for non-strided grouped accesses if the number of elements is 1.
26827 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
26829         PR target/81616
26830         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
26831         * i386.h (TARGET_USE_GATHER): Define.
26832         * x86-tune.def (X86_TUNE_USE_GATHER): New.
26834 2018-01-10  Martin Liska  <mliska@suse.cz>
26836         PR bootstrap/82831
26837         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
26838         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
26839         partitioning.
26840         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
26841         CLEANUP_NO_PARTITIONING is not set.
26843 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
26845         * doc/rtl.texi: Remove documentation of (const ...) wrappers
26846         for vectors, as a partial revert of r254296.
26847         * rtl.h (const_vec_p): Delete.
26848         (const_vec_duplicate_p): Don't test for vector CONSTs.
26849         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
26850         * expmed.c (make_tree): Likewise.
26852         Revert:
26853         * common.md (E, F): Use CONSTANT_P instead of checking for
26854         CONST_VECTOR.
26855         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
26856         checking for CONST_VECTOR.
26858 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26860         PR middle-end/83575
26861         * predict.c (force_edge_cold): Handle in more sane way edges
26862         with no prediction.
26864 2018-01-09  Carl Love  <cel@us.ibm.com>
26866         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
26867         V4SI, V4SF types.
26868         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
26869         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
26870         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
26871         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
26872         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
26873         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
26874         * config/rs6000/rs6000-protos.h: Add extern defition for
26875         rs6000_generate_float2_double_code.
26876         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
26877         function.
26878         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
26879         (float2_v2df): Add define_expand.
26881 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
26883         PR target/83628
26884         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
26885         op_mode in the force_to_mode call.
26887 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26889         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26890         instead of checking each element individually.
26891         (aarch64_evpc_uzp): Likewise.
26892         (aarch64_evpc_zip): Likewise.
26893         (aarch64_evpc_ext): Likewise.
26894         (aarch64_evpc_rev): Likewise.
26895         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26896         instead of checking each element individually.  Return true without
26897         generating rtl if
26898         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26899         whether all selected elements come from the same input, instead of
26900         checking each element individually.  Remove calls to gen_rtx_REG,
26901         start_sequence and end_sequence and instead assert that no rtl is
26902         generated.
26904 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26906         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26907         order of HIGH and CONST checks.
26909 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
26911         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26912         if the destination isn't an SSA_NAME.
26914 2018-01-09  Richard Biener  <rguenther@suse.de>
26916         PR tree-optimization/83668
26917         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26918         move prologue...
26919         (canonicalize_loop_form): ... here, renamed from ...
26920         (canonicalize_loop_closed_ssa_form): ... this and amended to
26921         swap successor edges for loop exit blocks to make us use
26922         the RPO order we need for initial schedule generation.
26924 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
26926         PR tree-optimization/64811
26927         * match.pd: When optimizing comparisons with Inf, avoid
26928         introducing or losing exceptions from comparisons with NaN.
26930 2018-01-09  Martin Liska  <mliska@suse.cz>
26932         PR sanitizer/82517
26933         * asan.c (shadow_mem_size): Add gcc_assert.
26935 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
26937         Don't save registers in main().
26939         PR target/83738
26940         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26941         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26942         * config/avr/avr.c (avr_set_current_function): Don't error if
26943         naked, OS_task or OS_main are specified at the same time.
26944         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26945         OS_main.
26946         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26947         attribute.
26948         * common/config/avr/avr-common.c (avr_option_optimization_table):
26949         Switch on -mmain-is-OS_task for optimizing compilations.
26951 2018-01-09  Richard Biener  <rguenther@suse.de>
26953         PR tree-optimization/83572
26954         * graphite.c: Include cfganal.h.
26955         (graphite_transform_loops): Connect infinite loops to exit
26956         and remove fake edges at the end.
26958 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26960         * ipa-inline.c (edge_badness): Revert accidental checkin.
26962 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
26964         PR ipa/80763
26965         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26966         symbols; not inline clones.
26968 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
26970         PR target/83507
26971         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26972         hard registers.  Formatting fixes.
26974         PR preprocessor/83722
26975         * gcc.c (try_generate_repro): Pass
26976         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26977         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26978         do_report_bug.
26980 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
26981             Kito Cheng  <kito.cheng@gmail.com>
26983         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26984         (riscv_leaf_function_p): Delete.
26985         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26987 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26989         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26990         function.
26991         (do_ifelse): New function.
26992         (do_isel): New function.
26993         (do_sub3): New function.
26994         (do_add3): New function.
26995         (do_load_mask_compare): New function.
26996         (do_overlap_load_compare): New function.
26997         (expand_compare_loop): New function.
26998         (expand_block_compare): Call expand_compare_loop() when appropriate.
26999         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
27000         option description.
27001         (-mblock-compare-inline-loop-limit): New option.
27003 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27005         PR target/83677
27006         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
27007         Reverse order of second and third operands in first alternative.
27008         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
27009         of first and second elements in UNSPEC_VPERMR vector.
27010         (altivec_expand_vec_perm_le): Likewise.
27012 2018-01-08  Jeff Law  <law@redhat.com>
27014         PR rtl-optimizatin/81308
27015         * tree-switch-conversion.c (cfg_altered): New file scoped static.
27016         (process_switch): If group_case_labels makes a change, then set
27017         cfg_altered.
27018         (pass_convert_switch::execute): If a switch is converted, then
27019         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
27021         PR rtl-optimization/81308
27022         * recog.c (split_all_insns): Conditionally cleanup the CFG after
27023         splitting insns.
27025 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
27027         PR target/83663 - Revert r255946
27028         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
27029         generation for cases where splatting a value is not useful.
27030         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
27031         across a vec_duplicate and a paradoxical subreg forming a vector
27032         mode to a vec_concat.
27034 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27036         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
27037         -march=armv8.3-a variants.
27038         * config/arm/t-multilib: Likewise.
27039         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
27041 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27043         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
27044         to generate rtl.
27045         (cceq_ior_compare_complement): Give it a name so I can use it, and
27046         change boolean_or_operator predicate to boolean_operator so it can
27047         be used to generate a crand.
27048         (eqne): New code iterator.
27049         (bd/bd_neg): New code_attrs.
27050         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
27051         a single define_insn.
27052         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
27053         decrement (bdnzt/bdnzf/bdzt/bdzf).
27054         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
27055         with the new names of the branch decrement patterns, and added the
27056         names of the branch decrement conditional patterns.
27058 2018-01-08  Richard Biener  <rguenther@suse.de>
27060         PR tree-optimization/83563
27061         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
27062         cache.
27064 2018-01-08  Richard Biener  <rguenther@suse.de>
27066         PR middle-end/83713
27067         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
27069 2018-01-08  Richard Biener  <rguenther@suse.de>
27071         PR tree-optimization/83685
27072         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
27073         references to abnormals.
27075 2018-01-08  Richard Biener  <rguenther@suse.de>
27077         PR lto/83719
27078         * dwarf2out.c (output_indirect_strings): Handle empty
27079         skeleton_debug_str_hash.
27080         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
27082 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27084         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
27085         (emit_store_direct): Likewise.
27086         (arc_trampoline_adjust_address): Likewise.
27087         (arc_asm_trampoline_template): New function.
27088         (arc_initialize_trampoline): Use asm_trampoline_template.
27089         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
27090         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
27091         * config/arc/arc.md (flush_icache): Delete pattern.
27093 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
27095         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
27096         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
27097         munaligned-access.
27099 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27101         PR target/83681
27102         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
27103         by not USED_FOR_TARGET.
27104         (make_pass_resolve_sw_modes): Likewise.
27106 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27108         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
27109         USED_FOR_TARGET.
27111 2018-01-08  Richard Biener  <rguenther@suse.de>
27113         PR middle-end/83580
27114         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
27116 2018-01-08  Richard Biener  <rguenther@suse.de>
27118         PR middle-end/83517
27119         * match.pd ((t * 2) / 2) -> t): Add missing :c.
27121 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
27123         PR middle-end/81897
27124         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
27125         basic blocks with a small number of successors.
27126         (convert_control_dep_chain_into_preds): Improve handling of
27127         forwarder blocks.
27128         (dump_predicates): Split apart into...
27129         (dump_pred_chain): ...here...
27130         (dump_pred_info): ...and here.
27131         (can_one_predicate_be_invalidated_p): Add debugging printfs.
27132         (can_chain_union_be_invalidated_p): Improve check for invalidation
27133         of paths.
27134         (uninit_uses_cannot_happen): Avoid unnecessary if
27135         convert_control_dep_chain_into_preds yielded nothing.
27137 2018-01-06  Martin Sebor  <msebor@redhat.com>
27139         PR tree-optimization/83640
27140         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
27141         subtracting negative offset from size.
27142         (builtin_access::overlap): Adjust offset bounds of the access to fall
27143         within the size of the object if possible.
27145 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
27147         PR rtl-optimization/83699
27148         * expmed.c (extract_bit_field_1): Restrict the vector usage of
27149         extract_bit_field_as_subreg to cases in which the extracted
27150         value is also a vector.
27152         * lra-constraints.c (process_alt_operands): Test for the equivalence
27153         substitutions when detecting a possible reload cycle.
27155 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
27157         PR debug/83480
27158         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
27159         by default if flag_selective_schedling{,2}.  Formatting fixes.
27161         PR rtl-optimization/83682
27162         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
27163         if it has non-VECTOR_MODE element mode.
27164         (vec_duplicate_p): Likewise.
27166         PR middle-end/83694
27167         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
27168         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
27170 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27172         PR target/83604
27173         * config/i386/i386-builtin.def
27174         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
27175         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
27176         Require also OPTION_MASK_ISA_AVX512F in addition to
27177         OPTION_MASK_ISA_GFNI.
27178         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
27179         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
27180         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
27181         to OPTION_MASK_ISA_GFNI.
27182         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
27183         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
27184         OPTION_MASK_ISA_AVX512BW.
27185         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
27186         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
27187         addition to OPTION_MASK_ISA_GFNI.
27188         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
27189         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
27190         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
27191         to OPTION_MASK_ISA_GFNI.
27192         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
27193         a requirement for all ISAs rather than any of them with a few
27194         exceptions.
27195         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
27196         processing.
27197         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
27198         bitmasks to be enabled with 3 exceptions, instead of requiring any
27199         enabled ISA with lots of exceptions.
27200         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
27201         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
27202         Change avx512bw in isa attribute to avx512f.
27203         * config/i386/sgxintrin.h: Add license boilerplate.
27204         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
27205         to __AVX512F__ and __AVX512VL to __AVX512VL__.
27206         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
27207         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
27208         defined.
27209         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
27210         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
27211         temporarily sse2 rather than sse if not enabled already.
27213         PR target/83604
27214         * config/i386/sse.md (VI248_VLBW): Rename to ...
27215         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
27216         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
27217         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
27218         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
27219         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
27220         mode iterator instead of VI248_VLBW.
27222 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
27224         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
27225         (record_modified): Skip clobbers; add debug output.
27226         (param_change_prob): Use sreal frequencies.
27228 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27230         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
27231         punt for user-aligned variables.
27233 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
27235         * tree-chrec.c (chrec_contains_symbols): Return true for
27236         POLY_INT_CST.
27238 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
27240         PR target/82439
27241         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
27242         of (x|y) == x for BICS pattern.
27244 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
27246         PR tree-optimization/83605
27247         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
27248         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
27249         can throw.
27251 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
27253         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
27254         * config/epiphany/rtems.h: New file.
27256 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27257             Uros Bizjak  <ubizjak@gmail.com>
27259         PR target/83554
27260         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
27261         QIreg_operand instead of register_operand predicate.
27262         * config/i386/i386.c (ix86_rop_should_change_byte_p,
27263         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
27264         comments instead of -fmitigate[-_]rop.
27266 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27268         PR bootstrap/81926
27269         * cgraphunit.c (symbol_table::compile): Switch to text_section
27270         before calling assembly_start debug hook.
27271         * run-rtl-passes.c (run_rtl_passes): Likewise.
27272         Include output.h.
27274 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27276         * tree-vrp.c (extract_range_from_binary_expr_1): Check
27277         range_int_cst_p rather than !symbolic_range_p before calling
27278         extract_range_from_multiplicative_op_1.
27280 2018-01-04  Jeff Law  <law@redhat.com>
27282         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
27283         redundant test in assertion.
27285 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27287         * doc/rtl.texi: Document machine_mode wrapper classes.
27289 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27291         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
27292         using tree_to_uhwi.
27294 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27296         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
27297         the VEC_PERM_EXPR fold to fail.
27299 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27301         PR debug/83585
27302         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
27303         to switched_sections.
27305 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27307         PR target/83680
27308         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
27309         test for d.testing.
27311 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
27313         PR target/83387
27314         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
27315         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
27317 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27319         PR debug/83666
27320         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
27321         is BLKmode and bitpos not zero or mode change is needed.
27323 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
27325         PR target/83675
27326         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
27327         TARGET_VIS2.
27329 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
27331         PR target/83628
27332         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
27333         instead of MULT rtx.  Update all corresponding splitters.
27334         (*saddl_se): Ditto.
27335         (*ssub<modesuffix>): Ditto.
27336         (*ssubl_se): Ditto.
27337         (*cmp_sadd_di): Update split patterns.
27338         (*cmp_sadd_si): Ditto.
27339         (*cmp_sadd_sidi): Ditto.
27340         (*cmp_ssub_di): Ditto.
27341         (*cmp_ssub_si): Ditto.
27342         (*cmp_ssub_sidi): Ditto.
27343         * config/alpha/predicates.md (const23_operand): New predicate.
27344         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
27345         Look for ASHIFT, not MULT inner operand.
27346         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
27348 2018-01-04  Martin Liska  <mliska@suse.cz>
27350         PR gcov-profile/83669
27351         * gcov.c (output_intermediate_file): Add version to intermediate
27352         gcov file.
27353         * doc/gcov.texi: Document new field 'version' in intermediate
27354         file format. Fix location of '-k' option of gcov command.
27356 2018-01-04  Martin Liska  <mliska@suse.cz>
27358         PR ipa/82352
27359         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
27361 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
27363         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
27365 2018-01-03  Martin Sebor  <msebor@redhat.com>
27367         PR tree-optimization/83655
27368         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
27369         checking calls with invalid arguments.
27371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27373         * tree-vect-stmts.c (vect_get_store_rhs): New function.
27374         (vectorizable_mask_load_store): Delete.
27375         (vectorizable_call): Return false for masked loads and stores.
27376         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
27377         instead of gimple_assign_rhs1.
27378         (vectorizable_load): Handle IFN_MASK_LOAD.
27379         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
27381 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27383         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
27384         split out from..,
27385         (vectorizable_mask_load_store): ...here.
27386         (vectorizable_load): ...and here.
27388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27390         * tree-vect-stmts.c (vect_build_all_ones_mask)
27391         (vect_build_zero_merge_argument): New functions, split out from...
27392         (vectorizable_load): ...here.
27394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27396         * tree-vect-stmts.c (vect_check_store_rhs): New function,
27397         split out from...
27398         (vectorizable_mask_load_store): ...here.
27399         (vectorizable_store): ...and here.
27401 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27403         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
27404         split out from...
27405         (vectorizable_mask_load_store): ...here.
27407 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27409         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
27410         (vect_model_store_cost): Take a vec_load_store_type instead of a
27411         vect_def_type.
27412         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
27413         (vect_model_store_cost): Take a vec_load_store_type instead of a
27414         vect_def_type.
27415         (vectorizable_mask_load_store): Update accordingly.
27416         (vectorizable_store): Likewise.
27417         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
27419 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27421         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
27422         IFN_MASK_LOAD calls here rather than...
27423         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
27425 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27426             Alan Hayward  <alan.hayward@arm.com>
27427             David Sherwood  <david.sherwood@arm.com>
27429         * expmed.c (extract_bit_field_1): For vector extracts,
27430         fall back to extract_bit_field_as_subreg if vec_extract
27431         isn't available.
27433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27434             Alan Hayward  <alan.hayward@arm.com>
27435             David Sherwood  <david.sherwood@arm.com>
27437         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
27438         they are variable or constant sized.
27439         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
27440         slots for constant-sized data.
27442 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27443             Alan Hayward  <alan.hayward@arm.com>
27444             David Sherwood  <david.sherwood@arm.com>
27446         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
27447         handling COND_EXPRs with boolean comparisons, try to find a better
27448         basis for the mask type than the boolean itself.
27450 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27452         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
27453         is calculated and how it can be overridden.
27454         * genmodes.c (max_bitsize_mode_any_mode): New variable.
27455         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
27456         if defined.
27457         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
27458         if nonzero.
27460 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27461             Alan Hayward  <alan.hayward@arm.com>
27462             David Sherwood  <david.sherwood@arm.com>
27464         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
27465         Remove the mode argument.
27466         (aarch64_simd_valid_immediate): Remove the mode and inverse
27467         arguments.
27468         * config/aarch64/iterators.md (bitsize): New iterator.
27469         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
27470         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
27471         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
27472         aarch64_simd_valid_immediate.
27473         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
27474         (aarch64_reg_or_bic_imm): Likewise.
27475         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
27476         with an insn_type enum and msl with a modifier_type enum.
27477         Replace element_width with a scalar_mode.  Change the shift
27478         to unsigned int.  Add constructors for scalar_float_mode and
27479         scalar_int_mode elements.
27480         (aarch64_vect_float_const_representable_p): Delete.
27481         (aarch64_can_const_movi_rtx_p)
27482         (aarch64_simd_scalar_immediate_valid_for_move)
27483         (aarch64_simd_make_constant): Update call to
27484         aarch64_simd_valid_immediate.
27485         (aarch64_advsimd_valid_immediate_hs): New function.
27486         (aarch64_advsimd_valid_immediate): Likewise.
27487         (aarch64_simd_valid_immediate): Remove mode and inverse
27488         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
27489         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
27490         and aarch64_float_const_representable_p on the result.
27491         (aarch64_output_simd_mov_immediate): Remove mode argument.
27492         Update call to aarch64_simd_valid_immediate and use of
27493         simd_immediate_info.
27494         (aarch64_output_scalar_simd_mov_immediate): Update call
27495         accordingly.
27497 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27498             Alan Hayward  <alan.hayward@arm.com>
27499             David Sherwood  <david.sherwood@arm.com>
27501         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
27502         (mode_nunits): Likewise CONST_MODE_NUNITS.
27503         * machmode.def (ADJUST_NUNITS): Document.
27504         * genmodes.c (mode_data::need_nunits_adj): New field.
27505         (blank_mode): Update accordingly.
27506         (adj_nunits): New variable.
27507         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
27508         parameter.
27509         (emit_mode_size_inline): Set need_bytesize_adj for all modes
27510         listed in adj_nunits.
27511         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
27512         listed in adj_nunits.  Don't emit case statements for such modes.
27513         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
27514         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
27515         nothing if adj_nunits is nonnull.
27516         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
27517         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
27518         (emit_mode_fbit): Update use of print_maybe_const_decl.
27519         (emit_move_size): Likewise.  Treat the array as non-const
27520         if adj_nunits.
27521         (emit_mode_adjustments): Handle adj_nunits.
27523 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27525         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
27526         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
27527         (VECTOR_MODES): Use it.
27528         (make_vector_modes): Take the prefix as an argument.
27530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27531             Alan Hayward  <alan.hayward@arm.com>
27532             David Sherwood  <david.sherwood@arm.com>
27534         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
27535         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
27536         for MODE_VECTOR_BOOL.
27537         * machmode.def (VECTOR_BOOL_MODE): Document.
27538         * genmodes.c (VECTOR_BOOL_MODE): New macro.
27539         (make_vector_bool_mode): New function.
27540         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
27541         MODE_VECTOR_BOOL.
27542         * lto-streamer-in.c (lto_input_mode_table): Likewise.
27543         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
27544         Likewise.
27545         * stor-layout.c (int_mode_for_mode): Likewise.
27546         * tree.c (build_vector_type_for_mode): Likewise.
27547         * varasm.c (output_constant_pool_2): Likewise.
27548         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
27549         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
27550         for MODE_VECTOR_BOOL.
27551         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
27552         of mode class checks.
27553         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
27554         instead of a list of mode class checks.
27555         (expand_vector_scalar_condition): Likewise.
27556         (type_for_widest_vector_mode): Handle BImode as an inner mode.
27558 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27559             Alan Hayward  <alan.hayward@arm.com>
27560             David Sherwood  <david.sherwood@arm.com>
27562         * machmode.h (mode_size): Change from unsigned short to
27563         poly_uint16_pod.
27564         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
27565         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27566         or if measurement_type is not polynomial.
27567         (fixed_size_mode::includes_p): Check for constant-sized modes.
27568         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
27569         return a poly_uint16 rather than an unsigned short.
27570         (emit_mode_size): Change the type of mode_size from unsigned short
27571         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
27572         (emit_mode_adjustments): Cope with polynomial vector sizes.
27573         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27574         for GET_MODE_SIZE.
27575         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27576         for GET_MODE_SIZE.
27577         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
27578         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
27579         * caller-save.c (setup_save_areas): Likewise.
27580         (replace_reg_with_saved_mem): Likewise.
27581         * calls.c (emit_library_call_value_1): Likewise.
27582         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
27583         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
27584         (gen_lowpart_for_combine): Likewise.
27585         * convert.c (convert_to_integer_1): Likewise.
27586         * cse.c (equiv_constant, cse_insn): Likewise.
27587         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
27588         (cselib_subst_to_values): Likewise.
27589         * dce.c (word_dce_process_block): Likewise.
27590         * df-problems.c (df_word_lr_mark_ref): Likewise.
27591         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
27592         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
27593         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
27594         (rtl_for_decl_location): Likewise.
27595         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
27596         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
27597         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
27598         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
27599         (expand_expr_real_1): Likewise.
27600         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
27601         (pad_below): Likewise.
27602         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27603         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
27604         * ira.c (get_subreg_tracking_sizes): Likewise.
27605         * ira-build.c (ira_create_allocno_objects): Likewise.
27606         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
27607         (ira_sort_regnos_for_alter_reg): Likewise.
27608         * ira-costs.c (record_operand_costs): Likewise.
27609         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
27610         (resolve_simple_move): Likewise.
27611         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
27612         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
27613         (lra_constraints): Likewise.
27614         (CONST_POOL_OK_P): Reject variable-sized modes.
27615         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
27616         (add_pseudo_to_slot, lra_spill): Likewise.
27617         * omp-low.c (omp_clause_aligned_alignment): Likewise.
27618         * optabs-query.c (get_best_extraction_insn): Likewise.
27619         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27620         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
27621         (expand_mult_highpart, valid_multiword_target_p): Likewise.
27622         * recog.c (offsettable_address_addr_space_p): Likewise.
27623         * regcprop.c (maybe_mode_change): Likewise.
27624         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
27625         * regrename.c (build_def_use): Likewise.
27626         * regstat.c (dump_reg_info): Likewise.
27627         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
27628         (find_reloads, find_reloads_subreg_address): Likewise.
27629         * reload1.c (eliminate_regs_1): Likewise.
27630         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
27631         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
27632         (simplify_binary_operation_1, simplify_subreg): Likewise.
27633         * targhooks.c (default_function_arg_padding): Likewise.
27634         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
27635         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
27636         (verify_gimple_assign_ternary): Likewise.
27637         * tree-inline.c (estimate_move_cost): Likewise.
27638         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27639         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
27640         (get_address_cost_ainc): Likewise.
27641         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
27642         (vect_supportable_dr_alignment): Likewise.
27643         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27644         (vectorizable_reduction): Likewise.
27645         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
27646         (vectorizable_operation, vectorizable_load): Likewise.
27647         * tree.c (build_same_sized_truth_vector_type): Likewise.
27648         * valtrack.c (cleanup_auto_inc_dec): Likewise.
27649         * var-tracking.c (emit_note_insn_var_location): Likewise.
27650         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
27651         (ADDR_VEC_ALIGN): Likewise.
27653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27654             Alan Hayward  <alan.hayward@arm.com>
27655             David Sherwood  <david.sherwood@arm.com>
27657         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
27658         unsigned short.
27659         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
27660         or if measurement_type is polynomial.
27661         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
27662         * combine.c (make_extraction): Likewise.
27663         * dse.c (find_shift_sequence): Likewise.
27664         * dwarf2out.c (mem_loc_descriptor): Likewise.
27665         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
27666         (extract_bit_field, extract_low_bits): Likewise.
27667         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
27668         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
27669         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
27670         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
27671         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
27672         * reload.c (find_reloads): Likewise.
27673         * reload1.c (alter_reg): Likewise.
27674         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
27675         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
27676         * tree-if-conv.c (predicate_mem_writes): Likewise.
27677         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
27678         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
27679         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
27680         * valtrack.c (dead_debug_insert_temp): Likewise.
27681         * varasm.c (mergeable_constant_section): Likewise.
27682         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
27684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27685             Alan Hayward  <alan.hayward@arm.com>
27686             David Sherwood  <david.sherwood@arm.com>
27688         * expr.c (expand_assignment): Cope with polynomial mode sizes
27689         when assigning to a CONCAT.
27691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27692             Alan Hayward  <alan.hayward@arm.com>
27693             David Sherwood  <david.sherwood@arm.com>
27695         * machmode.h (mode_precision): Change from unsigned short to
27696         poly_uint16_pod.
27697         (mode_to_precision): Return a poly_uint16 rather than an unsigned
27698         short.
27699         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
27700         or if measurement_type is not polynomial.
27701         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
27702         in which the mode is already known to be a scalar_int_mode.
27703         * genmodes.c (emit_mode_precision): Change the type of mode_precision
27704         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
27705         initializer.
27706         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27707         for GET_MODE_PRECISION.
27708         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27709         for GET_MODE_PRECISION.
27710         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
27711         as polynomial.
27712         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
27713         (expand_field_assignment, make_extraction): Likewise.
27714         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
27715         (get_last_value): Likewise.
27716         * convert.c (convert_to_integer_1): Likewise.
27717         * cse.c (cse_insn): Likewise.
27718         * expr.c (expand_expr_real_1): Likewise.
27719         * lra-constraints.c (simplify_operand_subreg): Likewise.
27720         * optabs-query.c (can_atomic_load_p): Likewise.
27721         * optabs.c (expand_atomic_load): Likewise.
27722         (expand_atomic_store): Likewise.
27723         * ree.c (combine_reaching_defs): Likewise.
27724         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
27725         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
27726         * tree.h (type_has_mode_precision_p): Likewise.
27727         * ubsan.c (instrument_si_overflow): Likewise.
27729 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27730             Alan Hayward  <alan.hayward@arm.com>
27731             David Sherwood  <david.sherwood@arm.com>
27733         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
27734         polynomial numbers of units.
27735         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
27736         (valid_vector_subparts_p): New function.
27737         (build_vector_type): Remove temporary shim and take the number
27738         of units as a poly_uint64 rather than an int.
27739         (build_opaque_vector_type): Take the number of units as a
27740         poly_uint64 rather than an int.
27741         * tree.c (build_vector_from_ctor): Handle polynomial
27742         TYPE_VECTOR_SUBPARTS.
27743         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
27744         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
27745         (build_vector_from_val): If the number of units is variable,
27746         use build_vec_duplicate_cst for constant operands and
27747         VEC_DUPLICATE_EXPR otherwise.
27748         (make_vector_type): Remove temporary is_constant ().
27749         (build_vector_type, build_opaque_vector_type): Take the number of
27750         units as a poly_uint64 rather than an int.
27751         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
27752         VECTOR_CST_NELTS.
27753         * cfgexpand.c (expand_debug_expr): Likewise.
27754         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
27755         (store_constructor, expand_expr_real_1): Likewise.
27756         (const_scalar_mask_from_tree): Likewise.
27757         * fold-const-call.c (fold_const_reduction): Likewise.
27758         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
27759         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
27760         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
27761         (fold_relational_const): Likewise.
27762         (native_interpret_vector): Likewise.  Change the size from an
27763         int to an unsigned int.
27764         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
27765         TYPE_VECTOR_SUBPARTS.
27766         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
27767         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
27768         duplicating a non-constant operand into a variable-length vector.
27769         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
27770         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
27771         * ipa-icf.c (sem_variable::equals): Likewise.
27772         * match.pd: Likewise.
27773         * omp-simd-clone.c (simd_clone_subparts): Likewise.
27774         * print-tree.c (print_node): Likewise.
27775         * stor-layout.c (layout_type): Likewise.
27776         * targhooks.c (default_builtin_vectorization_cost): Likewise.
27777         * tree-cfg.c (verify_gimple_comparison): Likewise.
27778         (verify_gimple_assign_binary): Likewise.
27779         (verify_gimple_assign_ternary): Likewise.
27780         (verify_gimple_assign_single): Likewise.
27781         * tree-pretty-print.c (dump_generic_node): Likewise.
27782         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27783         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
27784         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
27785         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
27786         (vect_shift_permute_load_chain): Likewise.
27787         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
27788         (expand_vector_condition, optimize_vector_constructor): Likewise.
27789         (lower_vec_perm, get_compute_type): Likewise.
27790         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27791         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
27792         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
27793         (vect_recog_mask_conversion_pattern): Likewise.
27794         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
27795         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
27796         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27797         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
27798         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
27799         (vectorizable_shift, vectorizable_operation, vectorizable_store)
27800         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
27801         (supportable_widening_operation): Likewise.
27802         (supportable_narrowing_operation): Likewise.
27803         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
27804         Likewise.
27805         * varasm.c (output_constant): Likewise.
27807 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27808             Alan Hayward  <alan.hayward@arm.com>
27809             David Sherwood  <david.sherwood@arm.com>
27811         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
27812         so that both the length == 3 and length != 3 cases set up their
27813         own permute vectors.  Add comments explaining why we know the
27814         number of elements is constant.
27815         (vect_permute_load_chain): Likewise.
27817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27818             Alan Hayward  <alan.hayward@arm.com>
27819             David Sherwood  <david.sherwood@arm.com>
27821         * machmode.h (mode_nunits): Change from unsigned char to
27822         poly_uint16_pod.
27823         (ONLY_FIXED_SIZE_MODES): New macro.
27824         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
27825         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
27826         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
27827         New typedefs.
27828         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
27829         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
27830         or if measurement_type is not polynomial.
27831         * genmodes.c (ZERO_COEFFS): New macro.
27832         (emit_mode_nunits_inline): Make mode_nunits_inline return a
27833         poly_uint16.
27834         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
27835         Use ZERO_COEFFS when emitting initializers.
27836         * data-streamer.h (bp_pack_poly_value): New function.
27837         (bp_unpack_poly_value): Likewise.
27838         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
27839         for GET_MODE_NUNITS.
27840         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
27841         for GET_MODE_NUNITS.
27842         * tree.c (make_vector_type): Remove temporary shim and make
27843         the real function take the number of units as a poly_uint64
27844         rather than an int.
27845         (build_vector_type_for_mode): Handle polynomial nunits.
27846         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
27847         * emit-rtl.c (const_vec_series_p_1): Likewise.
27848         (gen_rtx_CONST_VECTOR): Likewise.
27849         * fold-const.c (test_vec_duplicate_folding): Likewise.
27850         * genrecog.c (validate_pattern): Likewise.
27851         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
27852         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
27853         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
27854         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
27855         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
27856         * rtlanal.c (subreg_get_info): Likewise.
27857         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27858         (vect_grouped_load_supported): Likewise.
27859         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
27860         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
27861         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
27862         (simplify_const_unary_operation, simplify_binary_operation_1)
27863         (simplify_const_binary_operation, simplify_ternary_operation)
27864         (test_vector_ops_duplicate, test_vector_ops): Likewise.
27865         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
27866         instead of CONST_VECTOR_NUNITS.
27867         * varasm.c (output_constant_pool_2): Likewise.
27868         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
27869         explicit-encoded elements in the XVEC for variable-length vectors.
27871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27873         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
27875 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27876             Alan Hayward  <alan.hayward@arm.com>
27877             David Sherwood  <david.sherwood@arm.com>
27879         * coretypes.h (fixed_size_mode): Declare.
27880         (fixed_size_mode_pod): New typedef.
27881         * builtins.h (target_builtins::x_apply_args_mode)
27882         (target_builtins::x_apply_result_mode): Change type to
27883         fixed_size_mode_pod.
27884         * builtins.c (apply_args_size, apply_result_size, result_vector)
27885         (expand_builtin_apply_args_1, expand_builtin_apply)
27886         (expand_builtin_return): Update accordingly.
27888 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
27890         * cse.c (hash_rtx_cb): Hash only the encoded elements.
27891         * cselib.c (cselib_hash_rtx): Likewise.
27892         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27893         CONST_VECTOR encoding.
27895 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27896             Jeff Law  <law@redhat.com>
27898         PR target/83641
27899         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27900         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27901         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27902         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27904         PR target/83641
27905         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27906         explicitly probe *sp in a noreturn function if there were any callee
27907         register saves or frame pointer is needed.
27909 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27911         PR debug/83621
27912         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27913         BLKmode for ternary, binary or unary expressions.
27915         PR debug/83645
27916         * var-tracking.c (delete_vta_debug_insn): New inline function.
27917         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27918         insns from get_insns () to NULL instead of each bb separately.
27919         Use delete_vta_debug_insn.  No longer static.
27920         (vt_debug_insns_local, variable_tracking_main_1): Adjust
27921         delete_vta_debug_insns callers.
27922         * rtl.h (delete_vta_debug_insns): Declare.
27923         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27924         instead of variable_tracking_main.
27926 2018-01-03  Martin Sebor  <msebor@redhat.com>
27928         PR tree-optimization/83603
27929         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27930         arguments past the endof the argument list in functions declared
27931         without a prototype.
27932         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27933         Avoid checking when arguments are null.
27935 2018-01-03  Martin Sebor  <msebor@redhat.com>
27937         PR c/83559
27938         * doc/extend.texi (attribute const): Fix a typo.
27939         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27940         issuing -Wsuggest-attribute for void functions.
27942 2018-01-03  Martin Sebor  <msebor@redhat.com>
27944         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27945         offset_int::from instead of wide_int::to_shwi.
27946         (maybe_diag_overlap): Remove assertion.
27947         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27948         * gimple-ssa-sprintf.c (format_directive): Same.
27949         (parse_directive): Same.
27950         (sprintf_dom_walker::compute_format_length): Same.
27951         (try_substitute_return_value): Same.
27953 2018-01-03  Jeff Law  <law@redhat.com>
27955         PR middle-end/83654
27956         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27957         non-constant residual for zero at runtime and avoid probing in
27958         that case.  Reorganize code for trailing problem to mirror handling
27959         of the residual.
27961 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
27963         PR tree-optimization/83501
27964         * tree-ssa-strlen.c (get_string_cst): New.
27965         (handle_char_store): Call get_string_cst.
27967 2018-01-03  Martin Liska  <mliska@suse.cz>
27969         PR tree-optimization/83593
27970         * tree-ssa-strlen.c: Include tree-cfg.h.
27971         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27972         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27973         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27974         to false.
27975         (strlen_dom_walker::before_dom_children): Call
27976         gimple_purge_dead_eh_edges. Dump tranformation with details
27977         dump flags.
27978         (strlen_dom_walker::before_dom_children): Update call by adding
27979         new argument cleanup_eh.
27980         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27982 2018-01-03  Martin Liska  <mliska@suse.cz>
27984         PR ipa/83549
27985         * cif-code.def (VARIADIC_THUNK): New enum value.
27986         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27987         thunks.
27989 2018-01-03  Jan Beulich  <jbeulich@suse.com>
27991         * sse.md (mov<mode>_internal): Tighten condition for when to use
27992         vmovdqu<ssescalarsize> for TI and OI modes.
27994 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
27996         Update copyright years.
27998 2018-01-03  Martin Liska  <mliska@suse.cz>
28000         PR ipa/83594
28001         * ipa-visibility.c (function_and_variable_visibility): Skip
28002         functions with noipa attribure.
28004 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
28006         * gcc.c (process_command): Update copyright notice dates.
28007         * gcov-dump.c (print_version): Ditto.
28008         * gcov.c (print_version): Ditto.
28009         * gcov-tool.c (print_version): Ditto.
28010         * gengtype.c (create_file): Ditto.
28011         * doc/cpp.texi: Bump @copying's copyright year.
28012         * doc/cppinternals.texi: Ditto.
28013         * doc/gcc.texi: Ditto.
28014         * doc/gccint.texi: Ditto.
28015         * doc/gcov.texi: Ditto.
28016         * doc/install.texi: Ditto.
28017         * doc/invoke.texi: Ditto.
28019 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28021         * vector-builder.h (vector_builder::m_full_nelts): Change from
28022         unsigned int to poly_uint64.
28023         (vector_builder::full_nelts): Update prototype accordingly.
28024         (vector_builder::new_vector): Likewise.
28025         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
28026         (vector_builder::operator ==): Likewise.
28027         (vector_builder::finalize): Likewise.
28028         * int-vector-builder.h (int_vector_builder::int_vector_builder):
28029         Take the number of elements as a poly_uint64 rather than an
28030         unsigned int.
28031         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
28032         from unsigned int to poly_uint64.
28033         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
28034         (vec_perm_indices::new_vector): Likewise.
28035         (vec_perm_indices::length): Likewise.
28036         (vec_perm_indices::nelts_per_input): Likewise.
28037         (vec_perm_indices::input_nelts): Likewise.
28038         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
28039         number of elements per input as a poly_uint64 rather than an
28040         unsigned int.  Use the original encoding for variable-length
28041         vectors, rather than clamping each individual element.
28042         For the second and subsequent elements in each pattern,
28043         clamp the step and base before clamping their sum.
28044         (vec_perm_indices::series_p): Handle polynomial element counts.
28045         (vec_perm_indices::all_in_range_p): Likewise.
28046         (vec_perm_indices_to_tree): Likewise.
28047         (vec_perm_indices_to_rtx): Likewise.
28048         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
28049         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
28050         (tree_vector_builder::new_binary_operation): Handle polynomial
28051         element counts.  Return false if we need to know the number
28052         of elements at compile time.
28053         * fold-const.c (fold_vec_perm): Punt if the number of elements
28054         isn't known at compile time.
28056 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28058         * vec-perm-indices.h (vec_perm_builder): Change element type
28059         from HOST_WIDE_INT to poly_int64.
28060         (vec_perm_indices::element_type): Update accordingly.
28061         (vec_perm_indices::clamp): Handle polynomial element_types.
28062         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28063         (vec_perm_indices::all_in_range_p): Likewise.
28064         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
28065         than shwi trees.
28066         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
28067         polynomial vec_perm_indices element types.
28068         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
28069         * fold-const.c (fold_vec_perm): Likewise.
28070         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
28071         * tree-vect-generic.c (lower_vec_perm): Likewise.
28072         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28073         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
28074         element type to HOST_WIDE_INT.
28076 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28077             Alan Hayward  <alan.hayward@arm.com>
28078             David Sherwood  <david.sherwood@arm.com>
28080         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
28081         rather than an int.  Use plus_constant.
28082         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
28083         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
28085 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28086             Alan Hayward  <alan.hayward@arm.com>
28087             David Sherwood  <david.sherwood@arm.com>
28089         * calls.c (emit_call_1, expand_call): Change struct_value_size from
28090         a HOST_WIDE_INT to a poly_int64.
28092 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28093             Alan Hayward  <alan.hayward@arm.com>
28094             David Sherwood  <david.sherwood@arm.com>
28096         * calls.c (load_register_parameters): Cope with polynomial
28097         mode sizes.  Require a constant size for BLKmode parameters
28098         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
28099         forces a parameter to be padded at the lsb end in order to
28100         fill a complete number of words, require the parameter size
28101         to be ordered wrt UNITS_PER_WORD.
28103 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28104             Alan Hayward  <alan.hayward@arm.com>
28105             David Sherwood  <david.sherwood@arm.com>
28107         * reload1.c (spill_stack_slot_width): Change element type
28108         from unsigned int to poly_uint64_pod.
28109         (alter_reg): Treat mode sizes as polynomial.
28111 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28112             Alan Hayward  <alan.hayward@arm.com>
28113             David Sherwood  <david.sherwood@arm.com>
28115         * reload.c (complex_word_subreg_p): New function.
28116         (reload_inner_reg_of_subreg, push_reload): Use it.
28118 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28119             Alan Hayward  <alan.hayward@arm.com>
28120             David Sherwood  <david.sherwood@arm.com>
28122         * lra-constraints.c (process_alt_operands): Reject matched
28123         operands whose sizes aren't ordered.
28124         (match_reload): Refer to this check here.
28126 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28127             Alan Hayward  <alan.hayward@arm.com>
28128             David Sherwood  <david.sherwood@arm.com>
28130         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
28131         that the mode size is in the set {1, 2, 4, 8, 16}.
28133 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28134             Alan Hayward  <alan.hayward@arm.com>
28135             David Sherwood  <david.sherwood@arm.com>
28137         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
28138         Use plus_constant instead of gen_rtx_PLUS.
28140 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28141             Alan Hayward  <alan.hayward@arm.com>
28142             David Sherwood  <david.sherwood@arm.com>
28144         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
28145         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
28146         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
28147         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
28148         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
28149         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
28150         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
28151         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
28152         * config/i386/i386.c (ix86_push_rounding): ...this new function.
28153         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
28154         a poly_int64.
28155         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
28156         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
28157         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
28158         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
28159         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
28160         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
28161         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
28162         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
28163         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
28164         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
28165         function.
28166         * expr.c (emit_move_resolve_push): Treat the input and result
28167         of PUSH_ROUNDING as a poly_int64.
28168         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
28169         (emit_push_insn): Likewise.
28170         * lra-eliminations.c (mark_not_eliminable): Likewise.
28171         * recog.c (push_operand): Likewise.
28172         * reload1.c (elimination_effects): Likewise.
28173         * rtlanal.c (nonzero_bits1): Likewise.
28174         * calls.c (store_one_arg): Likewise.  Require the padding to be
28175         known at compile time.
28177 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28178             Alan Hayward  <alan.hayward@arm.com>
28179             David Sherwood  <david.sherwood@arm.com>
28181         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
28182         Use plus_constant instead of gen_rtx_PLUS.
28184 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28185             Alan Hayward  <alan.hayward@arm.com>
28186             David Sherwood  <david.sherwood@arm.com>
28188         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
28189         rather than an int.
28191 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28192             Alan Hayward  <alan.hayward@arm.com>
28193             David Sherwood  <david.sherwood@arm.com>
28195         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
28196         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
28197         via stack temporaries.  Treat the mode size as polynomial too.
28199 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28200             Alan Hayward  <alan.hayward@arm.com>
28201             David Sherwood  <david.sherwood@arm.com>
28203         * expr.c (expand_expr_real_2): When handling conversions involving
28204         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
28205         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
28206         as a poly_uint64 too.
28208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28209             Alan Hayward  <alan.hayward@arm.com>
28210             David Sherwood  <david.sherwood@arm.com>
28212         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
28214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28215             Alan Hayward  <alan.hayward@arm.com>
28216             David Sherwood  <david.sherwood@arm.com>
28218         * combine.c (can_change_dest_mode): Handle polynomial
28219         REGMODE_NATURAL_SIZE.
28220         * expmed.c (store_bit_field_1): Likewise.
28221         * expr.c (store_constructor): Likewise.
28222         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
28223         and polynomial REGMODE_NATURAL_SIZE.
28224         (gen_lowpart_common): Likewise.
28225         * reginfo.c (record_subregs_of_mode): Likewise.
28226         * rtlanal.c (read_modify_subreg_p): Likewise.
28228 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28229             Alan Hayward  <alan.hayward@arm.com>
28230             David Sherwood  <david.sherwood@arm.com>
28232         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
28233         numbers of elements.
28235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28236             Alan Hayward  <alan.hayward@arm.com>
28237             David Sherwood  <david.sherwood@arm.com>
28239         * match.pd: Cope with polynomial numbers of vector elements.
28241 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28242             Alan Hayward  <alan.hayward@arm.com>
28243             David Sherwood  <david.sherwood@arm.com>
28245         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
28246         in a POINTER_PLUS_EXPR.
28248 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28249             Alan Hayward  <alan.hayward@arm.com>
28250             David Sherwood  <david.sherwood@arm.com>
28252         * omp-simd-clone.c (simd_clone_subparts): New function.
28253         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
28254         (ipa_simd_modify_function_body): Likewise.
28256 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28257             Alan Hayward  <alan.hayward@arm.com>
28258             David Sherwood  <david.sherwood@arm.com>
28260         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
28261         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
28262         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
28263         (expand_vector_condition, vector_element): Likewise.
28264         (subparts_gt): New function.
28265         (get_compute_type): Use subparts_gt.
28266         (count_type_subparts): Delete.
28267         (expand_vector_operations_1): Use subparts_gt instead of
28268         count_type_subparts.
28270 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28271             Alan Hayward  <alan.hayward@arm.com>
28272             David Sherwood  <david.sherwood@arm.com>
28274         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
28275         (vect_compile_time_alias): ...this new function.  Do the calculation
28276         on poly_ints rather than trees.
28277         (vect_prune_runtime_alias_test_list): Update call accordingly.
28279 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28280             Alan Hayward  <alan.hayward@arm.com>
28281             David Sherwood  <david.sherwood@arm.com>
28283         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
28284         numbers of units.
28285         (vect_schedule_slp_instance): Likewise.
28287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28288             Alan Hayward  <alan.hayward@arm.com>
28289             David Sherwood  <david.sherwood@arm.com>
28291         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
28292         constant and extern definitions for variable-length vectors.
28293         (vect_get_constant_vectors): Note that the number of units
28294         is known to be constant.
28296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28297             Alan Hayward  <alan.hayward@arm.com>
28298             David Sherwood  <david.sherwood@arm.com>
28300         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
28301         of units as polynomial.  Choose between WIDE and NARROW based
28302         on multiple_p.
28304 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28305             Alan Hayward  <alan.hayward@arm.com>
28306             David Sherwood  <david.sherwood@arm.com>
28308         * tree-vect-stmts.c (simd_clone_subparts): New function.
28309         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
28311 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28312             Alan Hayward  <alan.hayward@arm.com>
28313             David Sherwood  <david.sherwood@arm.com>
28315         * tree-vect-stmts.c (vectorizable_call): Treat the number of
28316         vectors as polynomial.  Use build_index_vector for
28317         IFN_GOMP_SIMD_LANE.
28319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28320             Alan Hayward  <alan.hayward@arm.com>
28321             David Sherwood  <david.sherwood@arm.com>
28323         * tree-vect-stmts.c (get_load_store_type): Treat the number of
28324         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
28325         for variable-length vectors.
28326         (vectorizable_mask_load_store): Treat the number of units as
28327         polynomial, asserting that it is constant if the condition has
28328         already been enforced.
28329         (vectorizable_store, vectorizable_load): Likewise.
28331 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28332             Alan Hayward  <alan.hayward@arm.com>
28333             David Sherwood  <david.sherwood@arm.com>
28335         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
28336         of units as polynomial.  Punt if we can't tell at compile time
28337         which vector contains the final result.
28339 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28340             Alan Hayward  <alan.hayward@arm.com>
28341             David Sherwood  <david.sherwood@arm.com>
28343         * tree-vect-loop.c (vectorizable_induction): Treat the number
28344         of units as polynomial.  Punt on SLP inductions.  Use an integer
28345         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
28346         cast of such a series for variable-length floating-point
28347         reductions.
28349 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28350             Alan Hayward  <alan.hayward@arm.com>
28351             David Sherwood  <david.sherwood@arm.com>
28353         * tree.h (build_index_vector): Declare.
28354         * tree.c (build_index_vector): New function.
28355         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
28356         of units as polynomial, forcibly converting it to a constant if
28357         vectorizable_reduction has already enforced the condition.
28358         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
28359         to create a {1,2,3,...} vector.
28360         (vectorizable_reduction): Treat the number of units as polynomial.
28361         Choose vectype_in based on the largest scalar element size rather
28362         than the smallest number of units.  Enforce the restrictions
28363         relied on above.
28365 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28366             Alan Hayward  <alan.hayward@arm.com>
28367             David Sherwood  <david.sherwood@arm.com>
28369         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
28370         number of units as polynomial.
28372 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28373             Alan Hayward  <alan.hayward@arm.com>
28374             David Sherwood  <david.sherwood@arm.com>
28376         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
28377         * target.def (autovectorize_vector_sizes): Return the vector sizes
28378         by pointer, using vector_sizes rather than a bitmask.
28379         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
28380         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
28381         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
28382         Likewise.
28383         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
28384         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
28385         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
28386         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
28387         * omp-general.c (omp_max_vf): Likewise.
28388         * omp-low.c (omp_clause_aligned_alignment): Likewise.
28389         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
28390         * tree-vect-loop.c (vect_analyze_loop): Likewise.
28391         * tree-vect-slp.c (vect_slp_bb): Likewise.
28392         * doc/tm.texi: Regenerate.
28393         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
28394         to a poly_uint64.
28395         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
28396         the vector size as a poly_uint64 rather than an unsigned int.
28397         (current_vector_size): Change from an unsigned int to a poly_uint64.
28398         (get_vectype_for_scalar_type): Update accordingly.
28399         * tree.h (build_truth_vector_type): Take the size and number of
28400         units as a poly_uint64 rather than an unsigned int.
28401         (build_vector_type): Add a temporary overload that takes
28402         the number of units as a poly_uint64 rather than an unsigned int.
28403         * tree.c (make_vector_type): Likewise.
28404         (build_truth_vector_type): Take the number of units as a poly_uint64
28405         rather than an unsigned int.
28407 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28408             Alan Hayward  <alan.hayward@arm.com>
28409             David Sherwood  <david.sherwood@arm.com>
28411         * target.def (get_mask_mode): Take the number of units and length
28412         as poly_uint64s rather than unsigned ints.
28413         * targhooks.h (default_get_mask_mode): Update accordingly.
28414         * targhooks.c (default_get_mask_mode): Likewise.
28415         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
28416         * doc/tm.texi: Regenerate.
28418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28419             Alan Hayward  <alan.hayward@arm.com>
28420             David Sherwood  <david.sherwood@arm.com>
28422         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
28423         * omp-general.c (omp_max_vf): Likewise.
28424         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
28425         (expand_omp_simd): Handle polynomial safelen.
28426         * omp-low.c (omplow_simd_context): Add a default constructor.
28427         (omplow_simd_context::max_vf): Change from int to poly_uint64.
28428         (lower_rec_simd_input_clauses): Update accordingly.
28429         (lower_rec_input_clauses): Likewise.
28431 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28432             Alan Hayward  <alan.hayward@arm.com>
28433             David Sherwood  <david.sherwood@arm.com>
28435         * tree-vectorizer.h (vect_nunits_for_cost): New function.
28436         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
28437         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
28438         (vect_analyze_slp_cost): Likewise.
28439         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
28440         (vect_model_load_cost): Likewise.
28442 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28443             Alan Hayward  <alan.hayward@arm.com>
28444             David Sherwood  <david.sherwood@arm.com>
28446         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
28447         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
28448         from an unsigned int * to a poly_uint64_pod *.
28449         (calculate_unrolling_factor): New function.
28450         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
28452 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28453             Alan Hayward  <alan.hayward@arm.com>
28454             David Sherwood  <david.sherwood@arm.com>
28456         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
28457         from an unsigned int to a poly_uint64.
28458         (_loop_vec_info::slp_unrolling_factor): Likewise.
28459         (_loop_vec_info::vectorization_factor): Change from an int
28460         to a poly_uint64.
28461         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
28462         (vect_get_num_vectors): New function.
28463         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
28464         (vect_get_num_copies): Use vect_get_num_vectors.
28465         (vect_analyze_data_ref_dependences): Change max_vf from an int *
28466         to an unsigned int *.
28467         (vect_analyze_data_refs): Change min_vf from an int * to a
28468         poly_uint64 *.
28469         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28470         than an unsigned HOST_WIDE_INT.
28471         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
28472         (vect_analyze_data_ref_dependence): Change max_vf from an int *
28473         to an unsigned int *.
28474         (vect_analyze_data_ref_dependences): Likewise.
28475         (vect_compute_data_ref_alignment): Handle polynomial vf.
28476         (vect_enhance_data_refs_alignment): Likewise.
28477         (vect_prune_runtime_alias_test_list): Likewise.
28478         (vect_shift_permute_load_chain): Likewise.
28479         (vect_supportable_dr_alignment): Likewise.
28480         (dependence_distance_ge_vf): Take the vectorization factor as a
28481         poly_uint64 rather than an unsigned HOST_WIDE_INT.
28482         (vect_analyze_data_refs): Change min_vf from an int * to a
28483         poly_uint64 *.
28484         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
28485         vfm1 as a poly_uint64 rather than an int.  Make the same change
28486         for the returned bound_scalar.
28487         (vect_gen_vector_loop_niters): Handle polynomial vf.
28488         (vect_do_peeling): Likewise.  Update call to
28489         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
28490         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
28491         be constant.
28492         * tree-vect-loop.c (vect_determine_vectorization_factor)
28493         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
28494         (vect_get_known_peeling_cost): Likewise.
28495         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
28496         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
28497         (vect_transform_loop): Likewise.  Use the lowest possible VF when
28498         updating the upper bounds of the loop.
28499         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
28500         rather than an int.
28501         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
28502         polynomial unroll factors.
28503         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
28504         (vect_make_slp_decision): Likewise.
28505         (vect_supported_load_permutation_p): Likewise, and polynomial
28506         vf too.
28507         (vect_analyze_slp_cost): Handle polynomial vf.
28508         (vect_slp_analyze_node_operations): Likewise.
28509         (vect_slp_analyze_bb_1): Likewise.
28510         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
28511         than an unsigned HOST_WIDE_INT.
28512         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
28513         (vectorizable_load): Handle polynomial vf.
28514         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
28515         a poly_uint64.
28516         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
28518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28519             Alan Hayward  <alan.hayward@arm.com>
28520             David Sherwood  <david.sherwood@arm.com>
28522         * match.pd: Handle bit operations involving three constants
28523         and try to fold one pair.
28525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
28527         * tree-vect-loop-manip.c: Include gimple-fold.h.
28528         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
28529         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
28530         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
28531         Add a path that uses a step of VF instead of 1, but disable it
28532         for now.
28533         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
28534         and niters_no_overflow parameters.  Update calls to
28535         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
28536         Create a new SSA name if the latter choses to use a ste other
28537         than zero, and return it via niters_vector_mult_vf_var.
28538         * tree-vect-loop.c (vect_transform_loop): Update calls to
28539         vect_do_peeling, vect_gen_vector_loop_niters and
28540         slpeel_make_loop_iterate_ntimes.
28541         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
28542         (vect_gen_vector_loop_niters): Update declarations after above changes.
28544 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
28546         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
28547         128-bit round to integer instructions.
28548         (ceil<mode>2): Likewise.
28549         (btrunc<mode>2): Likewise.
28550         (round<mode>2): Likewise.
28552 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28554         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
28555         unaligned VSX load/store on P8/P9.
28556         (expand_block_clear): Allow the use of unaligned VSX
28557         load/store on P8/P9.
28559 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28561         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
28562         New function.
28563         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
28564         swap associated with both a load and a store.
28566 2018-01-02  Andrew Waterman  <andrew@sifive.com>
28568         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
28569         * config/riscv/riscv.md (clear_cache): Use it.
28571 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
28573         * web.c: Remove out-of-date comment.
28575 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28577         * expr.c (fixup_args_size_notes): Check that any existing
28578         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
28579         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
28580         (emit_single_push_insn): ...here.
28582 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28584         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
28585         (const_vector_encoded_nelts): New function.
28586         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
28587         (const_vector_int_elt, const_vector_elt): Declare.
28588         * emit-rtl.c (const_vector_int_elt_1): New function.
28589         (const_vector_elt): Likewise.
28590         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
28591         of CONST_VECTOR_ELT.
28593 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28595         * expr.c: Include rtx-vector-builder.h.
28596         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
28597         directly on the tree encoding.
28598         (const_vector_from_tree): Likewise.
28599         * optabs.c: Include rtx-vector-builder.h.
28600         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
28601         sequence of "u" values.
28602         * vec-perm-indices.c: Include rtx-vector-builder.h.
28603         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
28604         directly on the vec_perm_indices encoding.
28606 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28608         * doc/rtl.texi (const_vector): Describe new encoding scheme.
28609         * Makefile.in (OBJS): Add rtx-vector-builder.o.
28610         * rtx-vector-builder.h: New file.
28611         * rtx-vector-builder.c: Likewise.
28612         * rtl.h (rtx_def::u2): Add a const_vector field.
28613         (CONST_VECTOR_NPATTERNS): New macro.
28614         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
28615         (CONST_VECTOR_DUPLICATE_P): Likewise.
28616         (CONST_VECTOR_STEPPED_P): Likewise.
28617         (CONST_VECTOR_ENCODED_ELT): Likewise.
28618         (const_vec_duplicate_p): Check for a duplicated vector encoding.
28619         (unwrap_const_vec_duplicate): Likewise.
28620         (const_vec_series_p): Check for a non-duplicated vector encoding.
28621         Say that the function only returns true for integer vectors.
28622         * emit-rtl.c: Include rtx-vector-builder.h.
28623         (gen_const_vec_duplicate_1): Delete.
28624         (gen_const_vector): Call gen_const_vec_duplicate instead of
28625         gen_const_vec_duplicate_1.
28626         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
28627         (gen_const_vec_duplicate): Use rtx_vector_builder.
28628         (gen_const_vec_series): Likewise.
28629         (gen_rtx_CONST_VECTOR): Likewise.
28630         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
28631         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28632         Build a new vector rather than modifying a CONST_VECTOR in-place.
28633         (handle_special_swappables): Update call accordingly.
28634         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
28635         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
28636         Build a new vector rather than modifying a CONST_VECTOR in-place.
28637         (handle_special_swappables): Update call accordingly.
28639 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28641         * simplify-rtx.c (simplify_const_binary_operation): Use
28642         CONST_VECTOR_ELT instead of XVECEXP.
28644 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28646         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
28647         the selector elements to be different from the data elements
28648         if the selector is a VECTOR_CST.
28649         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
28650         ssizetype for the selector.
28652 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28654         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
28655         before testing each element individually.
28656         * tree-vect-generic.c (lower_vec_perm): Likewise.
28658 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28660         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
28661         * selftest-run-tests.c (selftest::run_tests): Call it.
28662         * vector-builder.h (vector_builder::operator ==): New function.
28663         (vector_builder::operator !=): Likewise.
28664         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
28665         (vec_perm_indices::all_from_input_p): New function.
28666         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
28667         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
28668         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
28669         instead of reading the VECTOR_CST directly.  Detect whether both
28670         vector inputs are the same before constructing the vec_perm_indices,
28671         and update the number of inputs argument accordingly.  Use the
28672         utility functions added above.  Only construct sel2 if we need to.
28674 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28676         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
28677         the broadcast of the low byte.
28678         (expand_mult_highpart): Use an explicit encoding for the permutes.
28679         * optabs-query.c (can_mult_highpart_p): Likewise.
28680         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
28681         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28682         (vectorizable_bswap): Likewise.
28683         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
28684         explicit encoding for the power-of-2 permutes.
28685         (vect_permute_store_chain): Likewise.
28686         (vect_grouped_load_supported): Likewise.
28687         (vect_permute_load_chain): Likewise.
28689 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28691         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
28692         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
28693         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
28694         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
28695         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
28696         (vect_gen_perm_mask_any): Likewise.
28698 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28700         * int-vector-builder.h: New file.
28701         * vec-perm-indices.h: Include int-vector-builder.h.
28702         (vec_perm_indices): Redefine as an int_vector_builder.
28703         (auto_vec_perm_indices): Delete.
28704         (vec_perm_builder): Redefine as a stand-alone class.
28705         (vec_perm_indices::vec_perm_indices): New function.
28706         (vec_perm_indices::clamp): Likewise.
28707         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
28708         (vec_perm_indices::new_vector): New function.
28709         (vec_perm_indices::new_expanded_vector): Update for new
28710         vec_perm_indices class.
28711         (vec_perm_indices::rotate_inputs): New function.
28712         (vec_perm_indices::all_in_range_p): Operate directly on the
28713         encoded form, without computing elided elements.
28714         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
28715         encoding.  Update for new vec_perm_indices class.
28716         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
28717         the given vec_perm_builder.
28718         (expand_vec_perm_var): Update vec_perm_builder constructor.
28719         (expand_mult_highpart): Use vec_perm_builder instead of
28720         auto_vec_perm_indices.
28721         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
28722         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
28723         or double series encoding as appropriate.
28724         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
28725         vec_perm_indices instead of auto_vec_perm_indices.
28726         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28727         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28728         (vect_permute_store_chain): Likewise.
28729         (vect_grouped_load_supported): Likewise.
28730         (vect_permute_load_chain): Likewise.
28731         (vect_shift_permute_load_chain): Likewise.
28732         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28733         (vect_transform_slp_perm_load): Likewise.
28734         (vect_schedule_slp_instance): Likewise.
28735         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28736         (vectorizable_mask_load_store): Likewise.
28737         (vectorizable_bswap): Likewise.
28738         (vectorizable_store): Likewise.
28739         (vectorizable_load): Likewise.
28740         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
28741         vec_perm_indices instead of auto_vec_perm_indices.  Use
28742         tree_to_vec_perm_builder to read the vector from a tree.
28743         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
28744         vec_perm_builder instead of a vec_perm_indices.
28745         (have_whole_vector_shift): Use vec_perm_builder and
28746         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
28747         truncation to calc_vec_perm_mask_for_shift.
28748         (vect_create_epilog_for_reduction): Likewise.
28749         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
28750         from auto_vec_perm_indices to vec_perm_indices.
28751         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28752         instead of changing individual elements.
28753         (aarch64_vectorize_vec_perm_const): Use new_vector to install
28754         the vector in d.perm.
28755         * config/arm/arm.c (expand_vec_perm_d::perm): Change
28756         from auto_vec_perm_indices to vec_perm_indices.
28757         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
28758         instead of changing individual elements.
28759         (arm_vectorize_vec_perm_const): Use new_vector to install
28760         the vector in d.perm.
28761         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
28762         Update vec_perm_builder constructor.
28763         (rs6000_expand_interleave): Likewise.
28764         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
28765         (rs6000_expand_interleave): Likewise.
28767 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28769         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
28770         to qimode could truncate the indices.
28771         * optabs.c (expand_vec_perm_var): Likewise.
28773 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28775         * Makefile.in (OBJS): Add vec-perm-indices.o.
28776         * vec-perm-indices.h: New file.
28777         * vec-perm-indices.c: Likewise.
28778         * target.h (vec_perm_indices): Replace with a forward class
28779         declaration.
28780         (auto_vec_perm_indices): Move to vec-perm-indices.h.
28781         * optabs.h: Include vec-perm-indices.h.
28782         (expand_vec_perm): Delete.
28783         (selector_fits_mode_p, expand_vec_perm_var): Declare.
28784         (expand_vec_perm_const): Declare.
28785         * target.def (vec_perm_const_ok): Replace with...
28786         (vec_perm_const): ...this new hook.
28787         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
28788         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
28789         * doc/tm.texi: Regenerate.
28790         * optabs.def (vec_perm_const): Delete.
28791         * doc/md.texi (vec_perm_const): Likewise.
28792         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
28793         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
28794         expand_vec_perm for constant permutation vectors.  Assert that
28795         the mode of variable permutation vectors is the integer equivalent
28796         of the mode that is being permuted.
28797         * optabs-query.h (selector_fits_mode_p): Declare.
28798         * optabs-query.c: Include vec-perm-indices.h.
28799         (selector_fits_mode_p): New function.
28800         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
28801         is defined, instead of checking whether the vec_perm_const_optab
28802         exists.  Use targetm.vectorize.vec_perm_const instead of
28803         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
28804         fit in the vector mode before using a variable permute.
28805         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
28806         vec_perm_indices instead of an rtx.
28807         (expand_vec_perm): Replace with...
28808         (expand_vec_perm_const): ...this new function.  Take the selector
28809         as a vec_perm_indices rather than an rtx.  Also take the mode of
28810         the selector.  Update call to shift_amt_for_vec_perm_mask.
28811         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
28812         Use vec_perm_indices::new_expanded_vector to expand the original
28813         selector into bytes.  Check whether the indices fit in the vector
28814         mode before using a variable permute.
28815         (expand_vec_perm_var): Make global.
28816         (expand_mult_highpart): Use expand_vec_perm_const.
28817         * fold-const.c: Includes vec-perm-indices.h.
28818         * tree-ssa-forwprop.c: Likewise.
28819         * tree-vect-data-refs.c: Likewise.
28820         * tree-vect-generic.c: Likewise.
28821         * tree-vect-loop.c: Likewise.
28822         * tree-vect-slp.c: Likewise.
28823         * tree-vect-stmts.c: Likewise.
28824         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
28825         Delete.
28826         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
28827         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
28828         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
28829         (aarch64_vectorize_vec_perm_const): ...this new function.
28830         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28831         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28832         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
28833         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
28834         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28835         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28836         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
28837         into...
28838         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
28839         check for NEON modes.
28840         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
28841         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
28842         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
28843         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
28844         into...
28845         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
28846         the old VEC_PERM_CONST conditions.
28847         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
28848         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
28849         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
28850         (ia64_vectorize_vec_perm_const_ok): Merge into...
28851         (ia64_vectorize_vec_perm_const): ...this new function.
28852         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
28853         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
28854         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
28855         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
28856         * config/mips/mips.c (mips_expand_vec_perm_const)
28857         (mips_vectorize_vec_perm_const_ok): Merge into...
28858         (mips_vectorize_vec_perm_const): ...this new function.
28859         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
28860         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
28861         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
28862         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
28863         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
28864         (rs6000_expand_vec_perm_const): Delete.
28865         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
28866         Delete.
28867         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28868         (altivec_expand_vec_perm_const_le): Take each operand individually.
28869         Operate on constant selectors rather than rtxes.
28870         (altivec_expand_vec_perm_const): Likewise.  Update call to
28871         altivec_expand_vec_perm_const_le.
28872         (rs6000_expand_vec_perm_const): Delete.
28873         (rs6000_vectorize_vec_perm_const_ok): Delete.
28874         (rs6000_vectorize_vec_perm_const): New function.
28875         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28876         an element count and rtx array.
28877         (rs6000_expand_extract_even): Update call accordingly.
28878         (rs6000_expand_interleave): Likewise.
28879         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
28880         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
28881         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
28882         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
28883         (rs6000_expand_vec_perm_const): Delete.
28884         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
28885         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28886         (altivec_expand_vec_perm_const_le): Take each operand individually.
28887         Operate on constant selectors rather than rtxes.
28888         (altivec_expand_vec_perm_const): Likewise.  Update call to
28889         altivec_expand_vec_perm_const_le.
28890         (rs6000_expand_vec_perm_const): Delete.
28891         (rs6000_vectorize_vec_perm_const_ok): Delete.
28892         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
28893         reference to the SPE evmerge intructions.
28894         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28895         an element count and rtx array.
28896         (rs6000_expand_extract_even): Update call accordingly.
28897         (rs6000_expand_interleave): Likewise.
28898         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28899         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28900         new function.
28901         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28903 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28905         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28906         vector mode and that that mode matches the mode of the data
28907         being permuted.
28908         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28909         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
28910         directly using expand_vec_perm_1 when forcing selectors into
28911         registers.
28912         (expand_vec_perm_var): New function, split out from expand_vec_perm.
28914 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28916         * optabs-query.h (can_vec_perm_p): Delete.
28917         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28918         * optabs-query.c (can_vec_perm_p): Split into...
28919         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28920         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28921         particular selector is valid.
28922         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28923         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28924         (vect_grouped_load_supported): Likewise.
28925         (vect_shift_permute_load_chain): Likewise.
28926         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28927         (vect_transform_slp_perm_load): Likewise.
28928         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28929         (vectorizable_bswap): Likewise.
28930         (vect_gen_perm_mask_checked): Likewise.
28931         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
28932         implementations of variable permutation vectors into account
28933         when deciding which selector to use.
28934         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28935         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28936         with a false third argument.
28937         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28938         to test whether the constant selector is valid and can_vec_perm_var_p
28939         to test whether a variable selector is valid.
28941 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28943         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28944         * optabs-query.c (can_vec_perm_p): Likewise.
28945         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28946         instead of vec_perm_indices.
28947         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28948         (vect_gen_perm_mask_checked): Likewise,
28949         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28950         (vect_gen_perm_mask_checked): Likewise,
28952 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
28954         * optabs-query.h (qimode_for_vec_perm): Declare.
28955         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28956         (qimode_for_vec_perm): ...this new function.
28957         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28959 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28961         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28962         does not have a conditional at the top.
28964 2018-01-02  Richard Biener  <rguenther@suse.de>
28966         * ipa-inline.c (big_speedup_p): Fix expression.
28968 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28970         PR target/81616
28971         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28972         for generic 4->6.
28974 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
28976         PR target/81616
28977         Generic tuning.
28978         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28979         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28980         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28981         cond_taken_branch_cost 3->4.
28983 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
28985         PR tree-optimization/83581
28986         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28987         TODO_cleanup_cfg if any changes have been made.
28989         PR middle-end/83608
28990         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28991         convert_modes if target mode has the right side, but different mode
28992         class.
28994         PR middle-end/83609
28995         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28996         last argument when extracting from CONCAT.  If either from_real or
28997         from_imag is NULL, use expansion through memory.  If result is not
28998         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28999         the parts directly to inner mode, if even that fails, use expansion
29000         through memory.
29002         PR middle-end/83623
29003         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
29004         check for bswap in mode rather than HImode and use that in expand_unop
29005         too.
29007 Copyright (C) 2018 Free Software Foundation, Inc.
29009 Copying and distribution of this file, with or without modification,
29010 are permitted in any medium without royalty provided the copyright
29011 notice and this notice are preserved.